[*] Binary protection state of dqtool

  
  	Full RELRO     Canary found      NX disabled  PIE enabled  No RPATH     No RUNPATH   No Symbols


[*] Function fprintf tear down of dqtool

    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/dqtool @ 0x2930 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) fcn.00002930 ()              | void fcn_00002930 () {
                                         | label_8:
    0x00002930 lui gp, 2                 |     
    0x00002934 addiu gp, gp, -0x860      |     
    0x00002938 addu gp, gp, t9           |     gp += t9;
    0x0000293c addiu sp, sp, -0x48       |     
    0x00002940 lw t9, -0x7db0(gp)        |     t9 = sym.imp.fopen64;
    0x00002944 sw s2, 0x34(sp)           |     *(var_34h) = s2;
    0x00002948 lw s2, -0x7dac(gp)        |     s2 = *((gp - 8043));
    0x0000294c sw s5, 0x40(sp)           |     *(var_40h) = s5;
    0x00002950 move s5, a1               |     s5 = a1;
    0x00002954 lw v0, (s2)               |     v0 = *(s2);
    0x00002958 lw a1, -0x7fdc(gp)        |     a1 = *((gp - 8183));
    0x0000295c sw gp, 0x10(sp)           |     *(var_10h) = gp;
    0x00002960 addiu v1, zero, 1         |     v1 = 1;
    0x00002964 sw s4, 0x3c(sp)           |     *(var_3ch) = s4;
    0x00002968 sw s0, 0x2c(sp)           |     *(var_2ch) = s0;
    0x0000296c sw ra, 0x44(sp)           |     *(var_44h) = ra;
    0x00002970 sw s3, 0x38(sp)           |     *(var_38h) = s3;
    0x00002974 sw s1, 0x30(sp)           |     *(var_30h) = s1;
    0x00002978 addiu a1, a1, -0x6d6c     |     a1 += -0x6d6c;
    0x0000297c sw v1, 0xc(a2)            |     *((a2 + 3)) = v1;
    0x00002980 sw zero, 0x10(a2)         |     *((a2 + 4)) = 0;
    0x00002984 sw v0, 0x24(sp)           |     *(var_24h) = v0;
    0x00002988 move s0, a2               |     s0 = a2;
    0x0000298c move s4, a0               |     s4 = a0;
    0x00002990 jalr t9                   |     t9 ();
    0x00002994 lw gp, 0x10(sp)           |     gp = *(var_10h);
                                         |     if (v0 == 0) {
    0x00002998 beqz v0, 0x2b28           |         goto label_11;
                                         |     }
    0x0000299c lw t9, -0x7d80(gp)        |     t9 = sym.imp.fread;
    0x000029a0 addiu s3, sp, 0x1c        |     s3 = sp + 0x1c;
    0x000029a4 move a3, v0               |     a3 = v0;
    0x000029a8 addiu a2, zero, 1         |     a2 = 1;
    0x000029ac addiu a1, zero, 4         |     a1 = 4;
    0x000029b0 move a0, s3               |     a0 = s3;
    0x000029b4 move s1, v0               |     s1 = v0;
    0x000029b8 jalr t9                   |     t9 ();
    0x000029bc lw gp, 0x10(sp)           |     gp = *(var_10h);
                                         |     if (v0 == 0) {
    0x000029c0 beqz v0, 0x2b00           |         goto label_12;
                                         |     }
                                         | label_1:
    0x000029c4 lw t9, -0x7e24(gp)        |     t9 = sym.imp.fclose;
    0x000029c8 move a0, s1               |     a0 = s1;
    0x000029cc jalr t9                   |     t9 ();
    0x000029d0 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x000029d4 move a0, s3               |     a0 = s3;
    0x000029d8 sb zero, 0x20(sp)         |     *(var_20h_2) = 0;
    0x000029dc lw a1, -0x7fdc(gp)        |     a1 = *((gp - 8183));
    0x000029e0 lw t9, -0x7e08(gp)        |     t9 = sym.imp.strcmp;
    0x000029e4 addiu a1, a1, -0x6d50     |     a1 += -0x6d50;
    0x000029e8 jalr t9                   |     t9 ();
    0x000029ec lw gp, 0x10(sp)           |     gp = *(var_10h);
                                         |     if (v0 == 0) {
    0x000029f0 beqz v0, 0x2a84           |         goto label_13;
                                         |     }
    0x000029f4 lw v0, 0x10(s0)           |     v0 = *((s0 + 4));
    0x000029f8 lw t9, -0x7fd8(gp)        |     t9 = sym.log_queue_disk_non_reliable_new;
                                         |     if (v0 != 0) {
    0x000029fc bnez v0, 0x2a8c           |         goto label_14;
                                         |     }
    0x00002a00 addiu v0, zero, 0x80      |     v0 = 0x80;
    0x00002a04 addiu a0, zero, 1         |     a0 = 1;
    0x00002a08 move a1, zero             |     a1 = 0;
    0x00002a0c sw a0, (s0)               |     *(s0) = a0;
    0x00002a10 sw a1, 4(s0)              |     *((s0 + 1)) = a1;
    0x00002a14 move a0, s0               |     a0 = s0;
    0x00002a18 sw v0, 0x14(s0)           |     *((s0 + 5)) = v0;
    0x00002a1c sw v0, 8(s0)              |     *((s0 + 2)) = v0;
    0x00002a20 move a1, zero             |     a1 = 0;
    0x00002a24 bal 0x4d68                |     sym_log_queue_disk_non_reliable_new ();
    0x00002a28 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00002a2c move a0, v0               |     a0 = v0;
    0x00002a30 sw v0, (s5)               |     *(s5) = v0;
    0x00002a34 lw t9, -0x7fd4(gp)        |     t9 = sym.log_queue_disk_load_queue;
    0x00002a38 move a1, s4               |     a1 = s4;
    0x00002a3c bal 0x38f8                |     sym_log_queue_disk_load_queue ();
    0x00002a40 move s0, v0               |     s0 = v0;
    0x00002a44 lw gp, 0x10(sp)           |     gp = *(var_10h);
                                         |     if (v0 == 0) {
    0x00002a48 beqz v0, 0x2ad8           |         goto label_15;
                                         |     }
                                         |     do {
    0x00002a4c addiu s0, zero, 1         |         s0 = 1;
                                         | label_0:
    0x00002a50 lw a0, 0x24(sp)           |         a0 = *(var_24h);
    0x00002a54 lw v1, (s2)               |         v1 = *(s2);
    0x00002a58 move v0, s0               |         v0 = s0;
                                         |         if (a0 != v1) {
    0x00002a5c bne a0, v1, 0x2b54        |             goto label_16;
                                         |         }
    0x00002a60 lw ra, 0x44(sp)           |         ra = *(var_44h);
    0x00002a64 lw s5, 0x40(sp)           |         s5 = *(var_40h);
    0x00002a68 lw s4, 0x3c(sp)           |         s4 = *(var_3ch);
    0x00002a6c lw s3, 0x38(sp)           |         s3 = *(var_38h);
    0x00002a70 lw s2, 0x34(sp)           |         s2 = *(var_34h);
    0x00002a74 lw s1, 0x30(sp)           |         s1 = *(var_30h);
    0x00002a78 lw s0, 0x2c(sp)           |         s0 = *(var_2ch);
    0x00002a7c addiu sp, sp, 0x48        |         
    0x00002a80 jr ra                     |         return v0;
                                         | label_13:
    0x00002a84 addiu v0, zero, 1         |         v0 = 1;
    0x00002a88 sw v0, 0x10(s0)           |         *((s0 + 4)) = v0;
                                         | label_14:
    0x00002a8c addiu v0, zero, 0x80      |         v0 = 0x80;
    0x00002a90 lw t9, -0x7fd0(gp)        |         t9 = sym.log_queue_disk_reliable_new;
    0x00002a94 move v1, zero             |         v1 = 0;
    0x00002a98 sw v0, (s0)               |         *(s0) = v0;
    0x00002a9c lui v0, 0x10              |         v0 = 0x100000;
    0x00002aa0 sw v1, 4(s0)              |         *((s0 + 1)) = v1;
    0x00002aa4 move a0, s0               |         a0 = s0;
    0x00002aa8 sw v0, 0x14(s0)           |         *((s0 + 5)) = v0;
    0x00002aac move a1, zero             |         a1 = 0;
    0x00002ab0 bal 0x5c00                |         sym_log_queue_disk_reliable_new ();
    0x00002ab4 lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002ab8 move a0, v0               |         a0 = v0;
    0x00002abc sw v0, (s5)               |         *(s5) = v0;
    0x00002ac0 lw t9, -0x7fd4(gp)        |         t9 = sym.log_queue_disk_load_queue;
    0x00002ac4 move a1, s4               |         a1 = s4;
    0x00002ac8 bal 0x38f8                |         sym_log_queue_disk_load_queue ();
    0x00002acc move s0, v0               |         s0 = v0;
    0x00002ad0 lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002ad4 bnez v0, 0x2a4c           |         
                                         |     } while (v0 != 0);
                                         | label_15:
    0x00002ad8 lw v0, -0x7f00(gp)        |     v0 = *((gp - 8128));
    0x00002adc lw a0, -0x7fdc(gp)        |     a0 = *((gp - 8183));
    0x00002ae0 lw t9, -0x7dd8(gp)        |     t9 = sym.imp.fwrite;
    0x00002ae4 lw a3, (v0)               |     a3 = *(v0);
    0x00002ae8 addiu a2, zero, 0x22      |     a2 = 0x22;
    0x00002aec addiu a1, zero, 1         |     a1 = 1;
    0x00002af0 addiu a0, a0, -0x6d34     |     a0 += -0x6d34;
    0x00002af4 jalr t9                   |     t9 ();
    0x00002af8 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00002afc b 0x2a50                  |     goto label_0;
                                         | label_12:
    0x00002b00 lw v0, -0x7f00(gp)        |     v0 = *((gp - 8128));
    0x00002b04 lw a2, -0x7fdc(gp)        |     a2 = *((gp - 8183));
    0x00002b08 lw t9, -0x7ecc(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00002b0c lw a0, (v0)               |     a0 = *(v0);
    0x00002b10 move a3, s4               |     a3 = s4;
    0x00002b14 addiu a2, a2, -0x6d68     |     a2 += -0x6d68;
    0x00002b18 addiu a1, zero, 1         |     a1 = 1;
    0x00002b1c jalr t9                   |     t9 ();
    0x00002b20 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00002b24 b 0x29c4                  |     goto label_1;
                                         | label_11:
    0x00002b28 lw v0, -0x7f00(gp)        |     v0 = *((gp - 8128));
    0x00002b2c lw a2, -0x7fdc(gp)        |     a2 = *((gp - 8183));
    0x00002b30 lw t9, -0x7ecc(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00002b34 lw a0, (v0)               |     a0 = *(v0);
    0x00002b38 move a3, s4               |     a3 = s4;
    0x00002b3c addiu a2, a2, -0x6d48     |     a2 += -0x6d48;
    0x00002b40 addiu a1, zero, 1         |     a1 = 1;
    0x00002b44 jalr t9                   |     t9 ();
    0x00002b48 move s0, zero             |     s0 = 0;
    0x00002b4c lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00002b50 b 0x2a50                  |     goto label_0;
                                         | label_16:
    0x00002b54 lw t9, -0x7e60(gp)        |     t9 = sym.imp.__stack_chk_fail;
    0x00002b58 jalr t9                   |     t9 ();
    0x00002b5c nop                       |     
    0x00002b60 lui gp, 2                 |     
    0x00002b64 addiu gp, gp, -0xa90      |     
    0x00002b68 addu gp, gp, t9           |     gp += t9;
    0x00002b6c addiu sp, sp, -0xa0       |     
    0x00002b70 lw v0, -0x7dac(gp)        |     v0 = *((gp - 8043));
    0x00002b74 sw s0, 0x78(sp)           |     *(var_78h) = s0;
    0x00002b78 lw s0, -0x7fcc(gp)        |     s0 = *(gp);
    0x00002b7c sw v0, 0x34(sp)           |     *(var_34h_2) = v0;
    0x00002b80 sw a0, 0xa0(sp)           |     *(var_a0h) = a0;
    0x00002b84 lw v0, (v0)               |     v0 = *(v0);
    0x00002b88 lw a0, (s0)               |     a0 = *(s0);
    0x00002b8c sw gp, 0x20(sp)           |     *(var_20h) = gp;
    0x00002b90 sw s4, 0x88(sp)           |     *(var_88h) = s4;
    0x00002b94 sw s1, 0x7c(sp)           |     *(var_7ch) = s1;
    0x00002b98 sw ra, 0x9c(sp)           |     *(var_9ch) = ra;
    0x00002b9c sw fp, 0x98(sp)           |     *(var_98h) = fp;
    0x00002ba0 sw s7, 0x94(sp)           |     *(var_94h) = s7;
    0x00002ba4 sw s6, 0x90(sp)           |     *(var_90h) = s6;
    0x00002ba8 sw s5, 0x8c(sp)           |     *(var_8ch) = s5;
    0x00002bac sw s3, 0x84(sp)           |     *(var_84h) = s3;
    0x00002bb0 sw s2, 0x80(sp)           |     *(var_80h) = s2;
    0x00002bb4 move s1, a1               |     s1 = a1;
    0x00002bb8 sw v0, 0x74(sp)           |     *(var_74h) = v0;
    0x00002bbc sw zero, 0x3c(sp)         |     *(var_3ch_2) = 0;
    0x00002bc0 sw zero, 0x50(sp)         |     *(var_50h) = 0;
    0x00002bc4 sw zero, 0x54(sp)         |     *(var_54h) = 0;
    0x00002bc8 sw zero, 0x58(sp)         |     *(var_58h) = 0;
    0x00002bcc sw zero, 0x5c(sp)         |     *(var_5ch) = 0;
    0x00002bd0 sw zero, 0x60(sp)         |     *(var_60h) = 0;
    0x00002bd4 sw zero, 0x64(sp)         |     *(var_64h) = 0;
    0x00002bd8 sw zero, 0x68(sp)         |     *(var_68h) = 0;
    0x00002bdc sw zero, 0x6c(sp)         |     *(var_6ch) = 0;
    0x00002be0 lw s4, -0x7dd0(gp)        |     s4 = *((gp - 8052));
                                         |     if (a0 == 0) {
    0x00002be4 beqz a0, 0x2ed0           |         goto label_17;
                                         |     }
    0x00002be8 lw t9, -0x7eb4(gp)        |     t9 = sym.imp.g_strcompress;
    0x00002bec addiu s2, sp, 0x3c        |     s2 = sp + 0x3c;
    0x00002bf0 jalr t9                   |     t9 ();
    0x00002bf4 lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x00002bf8 lw a0, (s4)               |     a0 = *(s4);
    0x00002bfc move a1, zero             |     a1 = 0;
    0x00002c00 lw t9, -0x7d98(gp)        |     t9 = sym.imp.log_template_new;
    0x00002c04 sw v0, (s0)               |     *(s0) = v0;
    0x00002c08 jalr t9                   |     t9 ();
    0x00002c0c lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x00002c10 lw a1, (s0)               |     a1 = *(s0);
    0x00002c14 move a2, s2               |     a2 = s2;
    0x00002c18 lw t9, -0x7eb0(gp)        |     t9 = sym.imp.log_template_compile;
    0x00002c1c move a0, v0               |     a0 = v0;
    0x00002c20 move s3, v0               |     s3 = v0;
    0x00002c24 jalr t9                   |     t9 ();
    0x00002c28 lw gp, 0x20(sp)           |     gp = *(var_20h);
                                         |     if (v0 == 0) {
    0x00002c2c beqz v0, 0x2e38           |         goto label_18;
                                         |     }
    0x00002c30 lw t9, -0x7e7c(gp)        |     t9 = sym.imp.g_free;
    0x00002c34 lw a0, (s0)               |     a0 = *(s0);
    0x00002c38 jalr t9                   |     t9 ();
    0x00002c3c lw gp, 0x20(sp)           |     gp = *(var_20h);
                                         |     if (s3 == 0) {
    0x00002c40 beqz s3, 0x2ed0           |         goto label_17;
                                         |     }
                                         | label_7:
    0x00002c44 lw t9, -0x7e54(gp)        |     t9 = sym.imp.g_string_sized_new;
    0x00002c48 addiu a0, zero, 0x80      |     a0 = 0x80;
    0x00002c4c jalr t9                   |     t9 ();
    0x00002c50 lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x00002c54 move s0, v0               |     s0 = v0;
    0x00002c58 lw v0, -0x7e94(gp)        |     v0 = *((gp - 8101));
    0x00002c5c lw s2, (v0)               |     s2 = *(v0);
    0x00002c60 lw v0, 0xa0(sp)           |     v0 = *(var_a0h);
    0x00002c64 slt v0, s2, v0            |     v0 = (s2 < v0) ? 1 : 0;
    0x00002c68 lw t9, -0x7ea4(gp)        |     t9 = sym.imp.g_string_free;
                                         |     if (v0 == 0) {
    0x00002c6c beqz v0, 0x2e20           |         goto label_19;
                                         |     }
    0x00002c70 lw s7, -0x7fc8(gp)        |     s7 = *((gp - 8178));
    0x00002c74 sll v0, s2, 2             |     v0 = s2 << 2;
    0x00002c78 lw s5, -0x7fdc(gp)        |     s5 = *((gp - 8183));
    0x00002c7c addu s1, s1, v0           |     s1 += v0;
    0x00002c80 addiu v0, s7, 0x2930      |     v0 = s7 + fcn.00002930;
    0x00002c84 sw v0, 0x30(sp)           |     *(var_30h_3) = v0;
    0x00002c88 addiu v0, s5, -0x6c70     |     v0 = s5 + -0x6c70;
    0x00002c8c addiu s6, sp, 0x50        |     s6 = sp + 0x50;
    0x00002c90 addiu fp, sp, 0x40        |     fp = sp + 0x40;
    0x00002c94 addiu s7, sp, 0x44        |     s7 = sp + 0x44;
    0x00002c98 sw v0, 0x2c(sp)           |     *(var_2ch_4) = v0;
    0x00002c9c b 0x2cb0                  |     
                                         |     while (v0 == 0) {
    0x00002ca0 lw v0, 0xa0(sp)           |         v0 = *(var_a0h);
                                         | label_2:
    0x00002ca4 addiu s2, s2, 1           |         s2++;
                                         | label_3:
    0x00002ca8 addiu s1, s1, 4           |         s1 += 4;
                                         |         if (v0 == s2) {
    0x00002cac beq v0, s2, 0x2e1c        |             goto label_20;
                                         |         }
                                         | label_4:
    0x00002cb0 addiu v0, zero, 1         |         v0 = 1;
    0x00002cb4 lw a0, (s1)               |         a0 = *(s1);
    0x00002cb8 lw t9, 0x30(sp)           |         t9 = *(var_30h_3);
    0x00002cbc move a2, s6               |         a2 = s6;
    0x00002cc0 move a1, fp               |         a1 = fp;
    0x00002cc4 sw v0, 0x44(sp)           |         *(var_44h_3) = v0;
    0x00002cc8 sw zero, 0x48(sp)         |         *(var_48h) = 0;
    0x00002ccc sw zero, 0x4c(sp)         |         *(var_4ch_2) = 0;
    0x00002cd0 jalr t9                   |         t9 ();
    0x00002cd4 lw gp, 0x20(sp)           |         gp = *(var_20h);
    0x00002cd8 beqz v0, 0x2ca0           |         
                                         |     }
    0x00002cdc lw s5, 0x40(sp)           |     s5 = *(var_40h_3);
    0x00002ce0 addiu v0, zero, 1         |     v0 = 1;
                                         |     if (s5 == 0) {
    0x00002ce4 beqz s5, 0x2ebc           |         goto label_21;
                                         |     }
    0x00002ce8 sw v0, 8(s5)              |     *((s5 + 2)) = v0;
    0x00002cec lw t9, 0x7c(s5)           |     t9 = *((s5 + 31));
                                         | label_6:
    0x00002cf0 move a0, s5               |     a0 = s5;
    0x00002cf4 jalr t9                   |     t9 ();
    0x00002cf8 lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x00002cfc lw s5, 0x40(sp)           |     s5 = *(var_40h_3);
    0x00002d00 b 0x2d78                  |     
                                         |     while (v0 != 0) {
    0x00002d04 lw a0, 0x10(s5)           |         a0 = *((s5 + 4));
                                         |         if (a0 > 0) {
    0x00002d08 blezl a0, 0x2d1c          |             
    0x00002d0c lw a2, (s4)               |             a2 = *(s4);
    0x00002d10 addiu a0, a0, -1          |             a0 += -1;
    0x00002d14 sw a0, 0x10(s5)           |             *((s5 + 4)) = a0;
    0x00002d18 lw a2, (s4)               |             a2 = *(s4);
                                         |         }
    0x00002d1c lw t9, -0x7e4c(gp)        |         t9 = sym.imp.log_template_format;
    0x00002d20 move a1, v0               |         a1 = v0;
    0x00002d24 move a3, zero             |         a3 = 0;
    0x00002d28 addiu a2, a2, 0xd8        |         a2 += 0xd8;
    0x00002d2c sw v0, 0x28(sp)           |         *(var_28h_3) = v0;
    0x00002d30 move a0, s3               |         a0 = s3;
    0x00002d34 sw s0, 0x18(sp)           |         *(var_18h_3) = s0;
    0x00002d38 sw zero, 0x14(sp)         |         *(var_14h) = 0;
    0x00002d3c sw zero, 0x10(sp)         |         *(var_10h_4) = 0;
    0x00002d40 jalr t9                   |         t9 ();
    0x00002d44 lw gp, 0x20(sp)           |         gp = *(var_20h);
    0x00002d48 lw v0, 0x28(sp)           |         v0 = *(var_28h_3);
    0x00002d4c lw t9, -0x7e50(gp)        |         t9 = sym.imp.log_msg_unref;
    0x00002d50 move a0, v0               |         a0 = v0;
    0x00002d54 jalr t9                   |         t9 ();
    0x00002d58 lw gp, 0x20(sp)           |         gp = *(var_20h);
    0x00002d5c lw a2, (s0)               |         a2 = *(s0);
    0x00002d60 lw a1, 0x2c(sp)           |         a1 = *(var_2ch_4);
    0x00002d64 lw t9, -0x7d74(gp)        |         t9 = sym.imp.__printf_chk;
    0x00002d68 addiu a0, zero, 1         |         a0 = 1;
    0x00002d6c jalr t9                   |         t9 ();
    0x00002d70 lw gp, 0x20(sp)           |         gp = *(var_20h);
    0x00002d74 lw s5, 0x40(sp)           |         s5 = *(var_40h_3);
    0x00002d78 lw v0, 0xc(s5)            |         v0 = *((s5 + 3));
                                         |         if (v0 != 0) {
                                         | label_5:
    0x00002d7c beql v0, zero, 0x2d94     |             
    0x00002d80 lw t9, 0x70(s5)           |             t9 = *((s5 + 28));
    0x00002d84 lw v0, 0x10(s5)           |             v0 = *((s5 + 4));
                                         |             if (v0 == 0) {
    0x00002d88 beqz v0, 0x2db4           |                 goto label_22;
                                         |             }
    0x00002d8c nop                       |             
    0x00002d90 lw t9, 0x70(s5)           |             t9 = *((s5 + 28));
                                         |         }
    0x00002d94 move a1, s7               |         a1 = s7;
    0x00002d98 move a0, s5               |         a0 = s5;
    0x00002d9c jalr t9                   |         t9 ();
    0x00002da0 lw gp, 0x20(sp)           |         gp = *(var_20h);
    0x00002da4 bnez v0, 0x2d04           |         
                                         |     }
    0x00002da8 lw s5, 0x40(sp)           |     s5 = *(var_40h_3);
    0x00002dac lw v0, 0xa0(sp)           |     v0 = *(var_a0h);
                                         |     if (s5 == 0) {
    0x00002db0 beqz s5, 0x2ca4           |         goto label_2;
                                         |     }
                                         | label_22:
    0x00002db4 sync                      |     __asm ("sync");
    0x00002db8 lw a0, 4(s5)              |     a0 = *((s5 + 1));
    0x00002dbc addiu v0, s5, 4           |     v0 = s5 + 4;
    0x00002dc0 sync                      |     __asm ("sync");
                                         |     if (a0 <= 0) {
    0x00002dc4 blezl a0, 0x2f08          |         goto label_23;
                                         |     }
    0x00002dc8 lw v0, -0x7fdc(gp)        |     v0 = *((gp - 8183));
    0x00002dcc sync                      |     __asm ("sync");
                                         |     do {
    0x00002dd0 ll a0, (v0)               |         __asm ("ll a0, (v0)");
    0x00002dd4 addiu at, a0, -1          |         at = a0 + -1;
    0x00002dd8 sc at, (v0)               |         __asm ("sc at, (v0)");
    0x00002ddc beqz at, 0x2dd0           |         
                                         |     } while (at == 0);
    0x00002de0 nop                       |     
    0x00002de4 sync                      |     __asm ("sync");
    0x00002de8 addiu v0, zero, 1         |     v0 = 1;
    0x00002dec lw v0, 0xa0(sp)           |     v0 = *(var_a0h);
                                         |     if (a0 != v0) {
    0x00002df0 bne a0, v0, 0x2ca4        |         goto label_2;
                                         |     }
    0x00002df4 lw t9, 0x88(s5)           |     t9 = *((s5 + 34));
                                         |     if (t9 == 0) {
    0x00002df8 beql t9, zero, 0x2ca8     |         goto label_3;
                                         |     }
    0x00002dfc addiu s2, s2, 1           |     s2++;
    0x00002e00 move a0, s5               |     a0 = s5;
    0x00002e04 jalr t9                   |     t9 ();
    0x00002e08 lw v0, 0xa0(sp)           |     v0 = *(var_a0h);
    0x00002e0c addiu s2, s2, 1           |     s2++;
    0x00002e10 lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x00002e14 addiu s1, s1, 4           |     s1 += 4;
                                         |     if (v0 != s2) {
    0x00002e18 bne v0, s2, 0x2cb0        |         goto label_4;
                                         |     }
                                         | label_20:
    0x00002e1c lw t9, -0x7ea4(gp)        |     t9 = sym.imp.g_string_free;
                                         | label_19:
    0x00002e20 addiu a1, zero, 1         |     a1 = 1;
    0x00002e24 move a0, s0               |     a0 = s0;
    0x00002e28 jalr t9                   |     t9 ();
    0x00002e2c lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x00002e30 move v0, zero             |     v0 = 0;
    0x00002e34 b 0x2e7c                  |     goto label_24;
                                         | label_18:
    0x00002e38 lw v0, 0x3c(sp)           |     v0 = *(var_3ch_2);
    0x00002e3c lw v1, -0x7f00(gp)        |     v1 = *((gp - 8128));
    0x00002e40 lw a2, -0x7fdc(gp)        |     a2 = *((gp - 8183));
    0x00002e44 lw v0, 8(v0)              |     v0 = *((v0 + 2));
    0x00002e48 lw a0, (v1)               |     a0 = *(v1);
    0x00002e4c lw t9, -0x7ecc(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00002e50 lw a3, 8(s3)              |     a3 = *((s3 + 2));
    0x00002e54 addiu a2, a2, -0x6cf4     |     a2 += -0x6cf4;
    0x00002e58 addiu a1, zero, 1         |     a1 = 1;
    0x00002e5c sw v0, 0x10(sp)           |     *(var_10h_4) = v0;
    0x00002e60 jalr t9                   |     t9 ();
    0x00002e64 lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x00002e68 lw t9, -0x7e98(gp)        |     t9 = sym.imp.g_clear_error;
    0x00002e6c move a0, s2               |     a0 = s2;
    0x00002e70 jalr t9                   |     t9 ();
    0x00002e74 lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x00002e78 addiu v0, zero, 1         |     v0 = 1;
                                         | label_24:
    0x00002e7c lw v1, 0x34(sp)           |     v1 = *(var_34h_2);
    0x00002e80 lw a0, 0x74(sp)           |     a0 = *(var_74h);
    0x00002e84 lw v1, (v1)               |     v1 = *(v1);
    0x00002e88 lw ra, 0x9c(sp)           |     ra = *(var_9ch);
                                         |     if (a0 != v1) {
    0x00002e8c bne a0, v1, 0x2f30        |         goto label_25;
                                         |     }
    0x00002e90 lw fp, 0x98(sp)           |     fp = *(var_98h);
    0x00002e94 lw s7, 0x94(sp)           |     s7 = *(var_94h);
    0x00002e98 lw s6, 0x90(sp)           |     s6 = *(var_90h);
    0x00002e9c lw s5, 0x8c(sp)           |     s5 = *(var_8ch);
    0x00002ea0 lw s4, 0x88(sp)           |     s4 = *(var_88h);
    0x00002ea4 lw s3, 0x84(sp)           |     s3 = *(var_84h);
    0x00002ea8 lw s2, 0x80(sp)           |     s2 = *(var_80h);
    0x00002eac lw s1, 0x7c(sp)           |     s1 = *(var_7ch);
    0x00002eb0 lw s0, 0x78(sp)           |     s0 = *(var_78h);
    0x00002eb4 addiu sp, sp, 0xa0        |     
    0x00002eb8 jr ra                     |     return v0;
                                         | label_21:
    0x00002ebc lw v0, 8(zero)            |     v0 = *((zero + 2));
                                         |     if (v0 == 0) {
    0x00002ec0 beql v0, zero, 0x2d7c     |         goto label_5;
                                         |     }
    0x00002ec4 lw v0, 0xc(s5)            |     v0 = *((s5 + 3));
    0x00002ec8 lw t9, 0x7c(s5)           |     t9 = *((s5 + 31));
    0x00002ecc b 0x2cf0                  |     goto label_6;
                                         | label_17:
    0x00002ed0 lw t9, -0x7d98(gp)        |     t9 = sym.imp.log_template_new;
    0x00002ed4 lw a0, (s4)               |     a0 = *(s4);
    0x00002ed8 move a1, zero             |     a1 = 0;
    0x00002edc jalr t9                   |     t9 ();
    0x00002ee0 lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x00002ee4 move a2, zero             |     a2 = 0;
    0x00002ee8 move a0, v0               |     a0 = v0;
    0x00002eec lw a1, -0x7fdc(gp)        |     a1 = *((gp - 8183));
    0x00002ef0 lw t9, -0x7eb0(gp)        |     t9 = sym.imp.log_template_compile;
    0x00002ef4 addiu a1, a1, -0x6d10     |     a1 += -0x6d10;
    0x00002ef8 move s3, v0               |     s3 = v0;
    0x00002efc jalr t9                   |     t9 ();
    0x00002f00 lw gp, 0x20(sp)           |     gp = *(var_20h);
    0x00002f04 b 0x2c44                  |     goto label_7;
                                         | label_23:
    0x00002f08 lw a3, -0x7fdc(gp)        |     a3 = *((gp - 8183));
    0x00002f0c lw a1, -0x7fdc(gp)        |     a1 = *((gp - 8183));
    0x00002f10 addiu v0, v0, -0x6ca4     |     v0 += -0x6ca4;
    0x00002f14 lw t9, -0x7ef4(gp)        |     t9 = sym.imp.g_assertion_message_expr;
    0x00002f18 sw v0, 0x10(sp)           |     *(var_10h_4) = v0;
    0x00002f1c addiu a3, a3, -0x6a90     |     a3 += -0x6a90;
    0x00002f20 addiu a2, zero, 0xb4      |     a2 = 0xb4;
    0x00002f24 addiu a1, a1, -0x6cc8     |     a1 += -0x6cc8;
    0x00002f28 move a0, zero             |     a0 = 0;
    0x00002f2c jalr t9                   |     t9 ();
                                         | label_25:
    0x00002f30 lw t9, -0x7e60(gp)        |     t9 = sym.imp.__stack_chk_fail;
    0x00002f34 jalr t9                   |     t9 ();
    0x00002f38 nop                       |     
    0x00002f3c lui gp, 2                 |     
    0x00002f40 addiu gp, gp, -0xe6c      |     
    0x00002f44 addu gp, gp, t9           |     gp += t9;
    0x00002f48 addiu sp, sp, -0x78       |     
    0x00002f4c lw v0, -0x7e94(gp)        |     v0 = *((gp - 8101));
    0x00002f50 sw s6, 0x6c(sp)           |     *(var_6ch_2) = s6;
    0x00002f54 lw s6, -0x7dac(gp)        |     s6 = *((gp - 8043));
    0x00002f58 sw s1, 0x58(sp)           |     *(var_58h_2) = s1;
    0x00002f5c lw s1, (v0)               |     s1 = *(v0);
    0x00002f60 lw v1, (s6)               |     v1 = *(s6);
    0x00002f64 sw gp, 0x18(sp)           |     *(var_18h) = gp;
    0x00002f68 slt v0, s1, a0            |     v0 = (s1 < a0) ? 1 : 0;
    0x00002f6c sw ra, 0x74(sp)           |     *(var_74h_2) = ra;
    0x00002f70 sw s7, 0x70(sp)           |     *(var_70h) = s7;
    0x00002f74 sw s5, 0x68(sp)           |     *(var_68h_2) = s5;
    0x00002f78 sw s4, 0x64(sp)           |     *(var_64h_2) = s4;
    0x00002f7c sw s3, 0x60(sp)           |     *(var_60h_2) = s3;
    0x00002f80 sw s2, 0x5c(sp)           |     *(var_5ch_2) = s2;
    0x00002f84 sw s0, 0x54(sp)           |     *(var_54h_2) = s0;
    0x00002f88 sw v1, 0x4c(sp)           |     *(var_4ch) = v1;
    0x00002f8c lw s2, -0x7fc8(gp)        |     s2 = *((gp - 8178));
                                         |     if (v0 == 0) {
    0x00002f90 beqz v0, 0x306c           |         goto label_26;
                                         |     }
    0x00002f94 sll s0, s1, 2             |     s0 = s1 << 2;
    0x00002f98 move s3, a0               |     s3 = a0;
    0x00002f9c addu s0, a1, s0           |     s0 = a1 + s0;
    0x00002fa0 addiu s5, sp, 0x28        |     s5 = sp + 0x28;
    0x00002fa4 addiu s4, sp, 0x24        |     s4 = sp + 0x24;
    0x00002fa8 addiu s2, s2, 0x2930      |     s2 += fcn.00002930;
    0x00002fac addiu s7, zero, 1         |     s7 = 1;
    0x00002fb0 b 0x2fe4                  |     goto label_27;
                                         | label_10:
    0x00002fb4 sync                      |     __asm ("sync");
                                         |     do {
    0x00002fb8 ll v1, (v0)               |         __asm ("ll v1, (v0)");
    0x00002fbc addiu at, v1, -1          |         at = v1 + -1;
    0x00002fc0 sc at, (v0)               |         __asm ("sc at, (v0)");
    0x00002fc4 beqz at, 0x2fb8           |         
                                         |     } while (at == 0);
    0x00002fc8 nop                       |     
    0x00002fcc sync                      |     __asm ("sync");
                                         |     if (v1 == s7) {
    0x00002fd0 beql v1, s7, 0x30a8       |         goto label_28;
                                         |     }
    0x00002fd4 lw t9, 0x88(a0)           |     t9 = *((a0 + 34));
                                         |     do {
    0x00002fd8 addiu s1, s1, 1           |         s1++;
                                         | label_9:
    0x00002fdc addiu s0, s0, 4           |         s0 += 4;
                                         |         if (s3 == s1) {
    0x00002fe0 beq s3, s1, 0x306c        |             goto label_26;
                                         |         }
                                         | label_27:
    0x00002fe4 lw a0, (s0)               |         a0 = *(s0);
    0x00002fe8 move a2, s5               |         a2 = s5;
    0x00002fec move a1, s4               |         a1 = s4;
    0x00002ff0 sw zero, 0x28(sp)         |         *(var_28h_2) = 0;
    0x00002ff4 sw zero, 0x2c(sp)         |         *(var_2ch_3) = 0;
    0x00002ff8 sw zero, 0x30(sp)         |         *(var_30h_2) = 0;
    0x00002ffc sw zero, 0x34(sp)         |         *(var_34h_3) = 0;
    0x00003000 sw zero, 0x38(sp)         |         *(var_38h_2) = 0;
    0x00003004 sw zero, 0x3c(sp)         |         *(var_3ch_3) = 0;
    0x00003008 sw zero, 0x40(sp)         |         *(var_40h_2) = 0;
    0x0000300c move t9, s2               |         t9 = s2;
    0x00003010 sw zero, 0x44(sp)         |         *(var_44h_2) = 0;
    0x00003014 bal 0x2930                |         fcn_00002930 ();
                                         |         goto label_8;
    0x00003018 lw gp, 0x18(sp)           |         gp = *(var_18h);
    0x0000301c beqz v0, 0x2fd8           |         
                                         |     } while (v0 == 0);
    0x00003020 lw a0, 0x24(sp)           |     a0 = *(var_24h_3);
                                         |     if (a0 == 0) {
    0x00003024 beql a0, zero, 0x2fdc     |         goto label_9;
                                         |     }
    0x00003028 addiu s1, s1, 1           |     s1++;
    0x0000302c sync                      |     __asm ("sync");
    0x00003030 lw v1, 4(a0)              |     v1 = *((a0 + 1));
    0x00003034 addiu v0, a0, 4           |     v0 = a0 + 4;
    0x00003038 sync                      |     __asm ("sync");
    0x0000303c lw a3, -0x7fdc(gp)        |     a3 = *((gp - 8183));
                                         |     if (v1 > 0) {
    0x00003040 bgtz v1, 0x2fb4           |         goto label_10;
                                         |     }
    0x00003044 lw v0, -0x7fdc(gp)        |     v0 = *((gp - 8183));
    0x00003048 lw a1, -0x7fdc(gp)        |     a1 = *((gp - 8183));
    0x0000304c addiu v0, v0, -0x6ca4     |     v0 += -0x6ca4;
    0x00003050 lw t9, -0x7ef4(gp)        |     t9 = sym.imp.g_assertion_message_expr;
    0x00003054 sw v0, 0x10(sp)           |     *(var_10h_3) = v0;
    0x00003058 addiu a3, a3, -0x6a90     |     a3 += -0x6a90;
    0x0000305c addiu a2, zero, 0xb4      |     a2 = 0xb4;
    0x00003060 addiu a1, a1, -0x6cc8     |     a1 += -0x6cc8;
    0x00003064 move a0, zero             |     a0 = 0;
    0x00003068 jalr t9                   |     t9 ();
                                         | label_26:
    0x0000306c lw a0, 0x4c(sp)           |     a0 = *(var_4ch);
    0x00003070 lw v1, (s6)               |     v1 = *(s6);
    0x00003074 move v0, zero             |     v0 = 0;
                                         |     if (a0 != v1) {
    0x00003078 bne a0, v1, 0x30c0        |         goto label_29;
                                         |     }
    0x0000307c lw ra, 0x74(sp)           |     ra = *(var_74h_2);
    0x00003080 lw s7, 0x70(sp)           |     s7 = *(var_70h);
    0x00003084 lw s6, 0x6c(sp)           |     s6 = *(var_6ch_2);
    0x00003088 lw s5, 0x68(sp)           |     s5 = *(var_68h_2);
    0x0000308c lw s4, 0x64(sp)           |     s4 = *(var_64h_2);
    0x00003090 lw s3, 0x60(sp)           |     s3 = *(var_60h_2);
    0x00003094 lw s2, 0x5c(sp)           |     s2 = *(var_5ch_2);
    0x00003098 lw s1, 0x58(sp)           |     s1 = *(var_58h_2);
    0x0000309c lw s0, 0x54(sp)           |     s0 = *(var_54h_2);
    0x000030a0 addiu sp, sp, 0x78        |     
    0x000030a4 jr ra                     |     return v0;
                                         | label_28:
    0x000030a8 addiu s1, s1, 1           |     s1++;
                                         |     if (t9 == 0) {
    0x000030ac beqz t9, 0x2fdc           |         goto label_9;
                                         |     }
    0x000030b0 jalr t9                   |     t9 ();
    0x000030b4 nop                       |     
    0x000030b8 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x000030bc b 0x2fdc                  |     goto label_9;
                                         | label_29:
    0x000030c0 lw t9, -0x7e60(gp)        |     t9 = sym.imp.__stack_chk_fail;
    0x000030c4 jalr t9                   |     t9 ();
    0x000030c8 nop                       |     
                                         | }
    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/dqtool @ 0x23f0 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) main ()                      | int32_t main () {
                                         |     /* [13] -r-x section size 26720 named .text */
    0x000023f0 lui gp, 2                 |     
    0x000023f4 addiu gp, gp, -0x320      |     
    0x000023f8 addu gp, gp, t9           |     gp += t9;
    0x000023fc addiu sp, sp, -0x48       |     
    0x00002400 slti v0, a0, 2            |     v0 = (a0 < 2) ? 1 : 0;
    0x00002404 sw s3, 0x38(sp)           |     *(var_38h) = s3;
    0x00002408 lw s3, -0x7dac(gp)        |     s3 = *((gp - 8043));
    0x0000240c sw gp, 0x10(sp)           |     *(var_10h) = gp;
    0x00002410 sw ra, 0x44(sp)           |     *(var_44h) = ra;
    0x00002414 lw v1, (s3)               |     v1 = *(s3);
    0x00002418 sw s5, 0x40(sp)           |     *(var_40h) = s5;
    0x0000241c sw s4, 0x3c(sp)           |     *(var_3ch) = s4;
    0x00002420 sw s2, 0x34(sp)           |     *(var_34h) = s2;
    0x00002424 sw s1, 0x30(sp)           |     *(var_30h) = s1;
    0x00002428 sw s0, 0x2c(sp)           |     *(var_2ch) = s0;
    0x0000242c sw a0, 0x48(sp)           |     *(arg_48h) = a0;
    0x00002430 sw a1, 0x1c(sp)           |     *(var_1ch) = a1;
    0x00002434 sw v1, 0x24(sp)           |     *(var_24h) = v1;
    0x00002438 sw zero, 0x20(sp)         |     *(var_20h) = 0;
                                         |     if (v0 != 0) {
    0x0000243c bnez v0, 0x2484           |         goto label_2;
                                         |     }
    0x00002440 lw s0, 4(a1)              |     s0 = *((a1 + 1));
    0x00002444 addiu v0, zero, 0x2d      |     v0 = 0x2d;
    0x00002448 lb v1, (s0)               |     v1 = *(s0);
    0x0000244c move a3, a0               |     a3 = a0;
                                         |     if (v1 != v0) {
    0x00002450 bne v1, v0, 0x2498        |         goto label_3;
                                         |     }
    0x00002454 addiu v0, a1, 8           |     v0 = a1 + 8;
    0x00002458 addiu a2, zero, 1         |     a2 = 1;
    0x0000245c addiu t1, zero, 0x2d      |     t1 = 0x2d;
    0x00002460 b 0x2478                  |     
                                         |     while (a3 == a2) {
    0x00002464 move a0, v0               |         a0 = v0;
    0x00002468 move t0, a2               |         t0 = a2;
    0x0000246c lb v1, (s0)               |         v1 = *(s0);
    0x00002470 addiu v0, v0, 4           |         v0 += 4;
                                         |         if (v1 != t1) {
    0x00002474 bne v1, t1, 0x24a4        |             goto label_4;
                                         |         }
    0x00002478 addiu a2, a2, 1           |         a2++;
    0x0000247c lw s0, (v0)               |         s0 = *(v0);
    0x00002480 bnel a3, a2, 0x2464       |         
                                         |     }
                                         | label_2:
    0x00002484 lw t9, -0x7fc4(gp)        |     t9 = sym.usage;
    0x00002488 addiu s4, zero, 1         |     s4 = 1;
    0x0000248c bal 0x30cc                |     sym_usage ();
    0x00002490 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00002494 b 0x25f0                  |     goto label_0;
                                         | label_3:
    0x00002498 addiu a0, a1, 4           |     a0 = a1 + 4;
    0x0000249c addiu t0, zero, 1         |     t0 = 1;
    0x000024a0 addiu a2, zero, 1         |     a2 = 1;
                                         | label_4:
    0x000024a4 addiu t0, t0, 1           |     t0++;
    0x000024a8 lw t9, -0x7efc(gp)        |     t9 = sym.imp.memmove;
    0x000024ac subu a2, a3, a2           |     __asm ("subu a2, a3, a2");
    0x000024b0 sll t0, t0, 2             |     t0 <<= 2;
    0x000024b4 sll a2, a2, 2             |     a2 <<= 2;
    0x000024b8 addu a1, a1, t0           |     a1 += t0;
    0x000024bc jalr t9                   |     t9 ();
    0x000024c0 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x000024c4 lw v0, 0x48(sp)           |     v0 = *(arg_48h);
    0x000024c8 lw s2, -0x7fc0(gp)        |     s2 = *((gp - 8176));
    0x000024cc lw a0, -0x7fdc(gp)        |     a0 = *((gp - 8183));
                                         |     /* section..data.rel.ro */
    0x000024d0 addiu s5, s2, -0x6030     |     s5 = s2 + -0x6030;
    0x000024d4 addiu v0, v0, -1          |     v0 += -1;
    0x000024d8 sw v0, 0x48(sp)           |     *(arg_48h) = v0;
    0x000024dc move s1, s5               |     s1 = s5;
    0x000024e0 move s2, zero             |     s2 = 0;
    0x000024e4 addiu a0, a0, -0x6c30     |     a0 += -0x6c30;
    0x000024e8 b 0x24fc                  |     
                                         |     while (v0 != 0) {
    0x000024ec addiu s1, s1, 0x10        |         s1 += 0x10;
    0x000024f0 lw a0, (s1)               |         a0 = *(s1);
    0x000024f4 addiu s2, s2, 1           |         s2++;
                                         |         if (a0 == 0) {
    0x000024f8 beqz a0, 0x2624           |             goto label_5;
                                         |         }
    0x000024fc lw t9, -0x7e08(gp)        |         t9 = sym.imp.strcmp;
    0x00002500 move a1, s0               |         a1 = s0;
    0x00002504 jalr t9                   |         t9 ();
    0x00002508 move s4, v0               |         s4 = v0;
    0x0000250c lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002510 bnez v0, 0x24ec           |         
                                         |     }
    0x00002514 lw t9, -0x7dbc(gp)        |     t9 = sym.imp.g_option_context_new;
    0x00002518 move a0, s0               |     a0 = s0;
    0x0000251c jalr t9                   |     t9 ();
    0x00002520 sll s2, s2, 4             |     s2 <<= 4;
    0x00002524 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00002528 addu s2, s5, s2           |     s2 = s5 + s2;
    0x0000252c move a0, v0               |     a0 = v0;
    0x00002530 lw t9, -0x7dc8(gp)        |     t9 = sym.imp.g_option_context_set_summary;
    0x00002534 lw a1, 8(s2)              |     a1 = *((s2 + 2));
    0x00002538 move s0, v0               |     s0 = v0;
    0x0000253c jalr t9                   |     t9 ();
    0x00002540 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00002544 lw a1, 4(s2)              |     a1 = *((s2 + 1));
    0x00002548 move a2, zero             |     a2 = 0;
    0x0000254c lw t9, -0x7e9c(gp)        |     t9 = sym.imp.g_option_context_add_main_entries;
    0x00002550 move a0, s0               |     a0 = s0;
    0x00002554 jalr t9                   |     t9 ();
    0x00002558 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x0000255c move a2, zero             |     a2 = 0;
    0x00002560 move a0, s0               |     a0 = s0;
    0x00002564 lw a1, -0x7fc0(gp)        |     a1 = *((gp - 8176));
    0x00002568 lw t9, -0x7e9c(gp)        |     t9 = sym.imp.g_option_context_add_main_entries;
                                         |     /* esilref: 'debug' */
    0x0000256c addiu a1, a1, -0x5ff0     |     a1 += -0x5ff0;
    0x00002570 jalr t9                   |     t9 ();
    0x00002574 lw gp, 0x10(sp)           |     gp = *(var_10h);
                                         |     if (s0 == 0) {
    0x00002578 beqz s0, 0x2624           |         goto label_5;
                                         |     }
    0x0000257c lw t9, -0x7d88(gp)        |     t9 = sym.imp.g_option_context_parse;
    0x00002580 addiu s1, sp, 0x20        |     s1 = sp + 0x20;
    0x00002584 move a3, s1               |     a3 = s1;
    0x00002588 addiu a2, sp, 0x1c        |     a2 = sp + 0x1c;
    0x0000258c addiu a1, sp, 0x48        |     a1 = sp + 0x48;
    0x00002590 move a0, s0               |     a0 = s0;
    0x00002594 jalr t9                   |     t9 ();
    0x00002598 lw gp, 0x10(sp)           |     gp = *(var_10h);
                                         |     if (v0 != 0) {
    0x0000259c bnez v0, 0x265c           |         goto label_6;
                                         |     }
    0x000025a0 lw v1, -0x7f00(gp)        |     v1 = *((gp - 8128));
    0x000025a4 lw v0, 0x20(sp)           |     v0 = *(var_20h);
    0x000025a8 lw a0, (v1)               |     a0 = *(v1);
                                         |     if (v0 == 0) {
    0x000025ac beqz v0, 0x279c           |         goto label_7;
                                         |     }
    0x000025b0 lw a3, 8(v0)              |     a3 = *((v0 + 2));
                                         | label_1:
    0x000025b4 lw a2, -0x7fdc(gp)        |     a2 = *((gp - 8183));
    0x000025b8 lw t9, -0x7ecc(gp)        |     t9 = sym.imp.__fprintf_chk
    0x000025bc addiu a2, a2, -0x6b90     |     a2 += -0x6b90;
    0x000025c0 addiu a1, zero, 1         |     a1 = 1;
    0x000025c4 jalr t9                   |     t9 ();
    0x000025c8 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x000025cc move a0, s1               |     a0 = s1;
    0x000025d0 lw t9, -0x7e98(gp)        |     t9 = sym.imp.g_clear_error;
    0x000025d4 addiu s4, zero, 1         |     s4 = 1;
    0x000025d8 jalr t9                   |     t9 ();
    0x000025dc lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x000025e0 lw t9, -0x7e58(gp)        |     t9 = sym.imp.g_option_context_free;
    0x000025e4 move a0, s0               |     a0 = s0;
    0x000025e8 jalr t9                   |     t9 ();
    0x000025ec lw gp, 0x10(sp)           |     gp = *(var_10h);
                                         |     do {
                                         | label_0:
    0x000025f0 lw a0, 0x24(sp)           |         a0 = *(var_24h);
    0x000025f4 lw v1, (s3)               |         v1 = *(s3);
    0x000025f8 move v0, s4               |         v0 = s4;
                                         |         if (a0 != v1) {
    0x000025fc bne a0, v1, 0x27a8        |             goto label_8;
                                         |         }
    0x00002600 lw ra, 0x44(sp)           |         ra = *(var_44h);
    0x00002604 lw s5, 0x40(sp)           |         s5 = *(var_40h);
    0x00002608 lw s4, 0x3c(sp)           |         s4 = *(var_3ch);
    0x0000260c lw s3, 0x38(sp)           |         s3 = *(var_38h);
    0x00002610 lw s2, 0x34(sp)           |         s2 = *(var_34h);
    0x00002614 lw s1, 0x30(sp)           |         s1 = *(var_30h);
    0x00002618 lw s0, 0x2c(sp)           |         s0 = *(var_2ch);
    0x0000261c addiu sp, sp, 0x48        |         
    0x00002620 jr ra                     |         return v0;
                                         | label_5:
    0x00002624 lw v0, -0x7f00(gp)        |         v0 = *((gp - 8128));
    0x00002628 lw a0, -0x7fdc(gp)        |         a0 = *((gp - 8183));
    0x0000262c lw t9, -0x7dd8(gp)        |         t9 = sym.imp.fwrite;
    0x00002630 lw a3, (v0)               |         a3 = *(v0);
    0x00002634 addiu a2, zero, 0x10      |         a2 = 0x10;
    0x00002638 addiu a1, zero, 1         |         a1 = 1;
    0x0000263c addiu a0, a0, -0x6ba4     |         a0 += -0x6ba4;
    0x00002640 jalr t9                   |         t9 ();
    0x00002644 lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002648 lw t9, -0x7fc4(gp)        |         t9 = sym.usage;
    0x0000264c addiu s4, zero, 1         |         s4 = 1;
    0x00002650 bal 0x30cc                |         sym_usage ();
    0x00002654 lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002658 b 0x25f0                  |         
                                         |     } while (1);
                                         | label_6:
    0x0000265c lw t9, -0x7e58(gp)        |     t9 = sym.imp.g_option_context_free;
    0x00002660 move a0, s0               |     a0 = s0;
    0x00002664 jalr t9                   |     t9 ();
    0x00002668 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x0000266c lw v0, -0x7fbc(gp)        |     v0 = *(gp);
    0x00002670 lw v0, (v0)               |     v0 = *(v0);
    0x00002674 lw t9, -0x7df0(gp)        |     t9 = sym.imp.cfg_new_snippet;
                                         |     if (v0 == 0) {
    0x00002678 bnez v0, 0x2784           |         
    0x0000267c jalr t9                   |         t9 ();
    0x00002680 nop                       |         
    0x00002684 lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002688 move s0, v0               |         s0 = v0;
    0x0000268c addiu v0, zero, 3         |         v0 = 3;
    0x00002690 sw v0, 0xe0(s0)           |         *((s0 + 56)) = v0;
    0x00002694 lw v0, -0x7dd0(gp)        |         v0 = *((gp - 8052));
    0x00002698 lw t9, -0x7df4(gp)        |         t9 = sym.imp.time_zone_info_new;
    0x0000269c move a0, zero             |         a0 = 0;
    0x000026a0 sw s0, (v0)               |         *(v0) = s0;
    0x000026a4 jalr t9                   |         t9 ();
    0x000026a8 lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x000026ac sw v0, 0xec(s0)           |         *((s0 + 59)) = v0;
    0x000026b0 lw t9, -0x7e1c(gp)        |         t9 = sym.imp.msg_init;
    0x000026b4 addiu a0, zero, 1         |         a0 = 1;
    0x000026b8 jalr t9                   |         t9 ();
    0x000026bc lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x000026c0 lw t9, -0x7e70(gp)        |         t9 = sym.imp.stats_init;
    0x000026c4 jalr t9                   |         t9 ();
    0x000026c8 nop                       |         
    0x000026cc lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x000026d0 lw t9, -0x7dc0(gp)        |         t9 = sym.imp.scratch_buffers_global_init;
    0x000026d4 jalr t9                   |         t9 ();
    0x000026d8 nop                       |         
    0x000026dc lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x000026e0 lw t9, -0x7e0c(gp)        |         t9 = sym.imp.scratch_buffers_allocator_init;
    0x000026e4 jalr t9                   |         t9 ();
    0x000026e8 nop                       |         
    0x000026ec lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x000026f0 lw t9, -0x7db4(gp)        |         t9 = sym.imp.log_template_global_init;
    0x000026f4 jalr t9                   |         t9 ();
    0x000026f8 nop                       |         
    0x000026fc lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002700 lw t9, -0x7e68(gp)        |         t9 = sym.imp.log_msg_registry_init;
    0x00002704 jalr t9                   |         t9 ();
    0x00002708 nop                       |         
    0x0000270c lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002710 lw t9, -0x7f10(gp)        |         t9 = sym.imp.log_tags_global_init;
    0x00002714 jalr t9                   |         t9 ();
    0x00002718 nop                       |         
    0x0000271c lw a1, 0x1c(sp)           |         a1 = *(var_1ch);
    0x00002720 lw t9, 0xc(s2)            |         t9 = *((s2 + 3));
    0x00002724 lw a0, 0x48(sp)           |         a0 = *(arg_48h);
    0x00002728 jalr t9                   |         t9 ();
    0x0000272c lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002730 lw t9, -0x7d84(gp)        |         t9 = sym.imp.log_tags_global_deinit;
    0x00002734 jalr t9                   |         t9 ();
    0x00002738 nop                       |         
    0x0000273c lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002740 lw t9, -0x7ec4(gp)        |         t9 = sym.imp.scratch_buffers_allocator_deinit;
    0x00002744 jalr t9                   |         t9 ();
    0x00002748 nop                       |         
    0x0000274c lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002750 lw t9, -0x7e20(gp)        |         t9 = sym.imp.scratch_buffers_global_deinit;
    0x00002754 jalr t9                   |         t9 ();
    0x00002758 nop                       |         
    0x0000275c lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002760 lw t9, -0x7e6c(gp)        |         t9 = sym.imp.stats_destroy;
    0x00002764 jalr t9                   |         t9 ();
    0x00002768 nop                       |         
    0x0000276c lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002770 lw t9, -0x7da4(gp)        |         t9 = sym.imp.msg_deinit;
    0x00002774 jalr t9                   |         t9 ();
    0x00002778 nop                       |         
    0x0000277c lw gp, 0x10(sp)           |         gp = *(var_10h);
    0x00002780 b 0x25f0                  |         goto label_0;
                                         |     }
    0x00002784 lw a0, -0x7fdc(gp)        |     a0 = *((gp - 8183));
    0x00002788 lw t9, -0x7eac(gp)        |     t9 = sym.imp.puts;
    0x0000278c addiu a0, a0, -0x6bc0     |     a0 += -0x6bc0;
    0x00002790 jalr t9                   |     t9 ();
    0x00002794 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x00002798 b 0x25f0                  |     goto label_0;
                                         | label_7:
    0x0000279c lw a3, -0x7fdc(gp)        |     a3 = *((gp - 8183));
    0x000027a0 addiu a3, a3, -0x6bb8     |     a3 += -0x6bb8;
    0x000027a4 b 0x25b4                  |     goto label_1;
                                         | label_8:
    0x000027a8 lw t9, -0x7e60(gp)        |     t9 = sym.imp.__stack_chk_fail;
    0x000027ac jalr t9                   |     t9 ();
    0x000027b0 nop                       |     
    0x000027b4 nop                       |     
    0x000027b8 nop                       |     
    0x000027bc nop                       |     
                                         | }
    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/dqtool @ 0x30cc */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) sym.usage ()                 | void usage () {
    0x000030cc lui gp, 2                 |     
    0x000030d0 addiu gp, gp, -0xffc      |     
    0x000030d4 addu gp, gp, t9           |     gp += t9;
    0x000030d8 addiu sp, sp, -0x30       |     
    0x000030dc lw a0, -0x7fdc(gp)        |     a0 = *((gp - 8183));
    0x000030e0 sw s0, 0x24(sp)           |     *(var_24h) = s0;
    0x000030e4 lw s0, -0x7f00(gp)        |     s0 = *((gp - 8128));
    0x000030e8 lw t9, -0x7dd8(gp)        |     t9 = sym.imp.fwrite;
    0x000030ec sw ra, 0x2c(sp)           |     *(var_2ch) = ra;
    0x000030f0 lw a3, (s0)               |     a3 = *(s0);
    0x000030f4 sw s1, 0x28(sp)           |     *(var_28h) = s1;
    0x000030f8 sw gp, 0x18(sp)           |     *(var_18h) = gp;
    0x000030fc addiu a2, zero, 0x3a      |     a2 = 0x3a;
    0x00003100 addiu a1, zero, 1         |     a1 = 1;
    0x00003104 addiu a0, a0, -0x6c6c     |     a0 += -0x6c6c;
    0x00003108 jalr t9                   |     t9 ();
    0x0000310c lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00003110 lw a0, (s0)               |     a0 = *(s0);
    0x00003114 addiu a1, zero, 1         |     a1 = 1;
    0x00003118 lw v0, -0x7fdc(gp)        |     v0 = *((gp - 8183));
    0x0000311c lw s1, -0x7fdc(gp)        |     s1 = *((gp - 8183));
    0x00003120 lw a3, -0x7fdc(gp)        |     a3 = *((gp - 8183));
    0x00003124 lw t9, -0x7ecc(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00003128 addiu v0, v0, -0x6c1c     |     v0 += -0x6c1c;
    0x0000312c addiu a2, s1, -0x6c2c     |     a2 = s1 + -0x6c2c;
    0x00003130 addiu a3, a3, -0x6c30     |     a3 += -0x6c30;
    0x00003134 sw v0, 0x10(sp)           |     *(var_10h) = v0;
    0x00003138 jalr t9                   |     t9 ();
    0x0000313c lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00003140 lw a0, (s0)               |     a0 = *(s0);
    0x00003144 addiu a2, s1, -0x6c2c     |     a2 = s1 + -0x6c2c;
    0x00003148 lw v0, -0x7fdc(gp)        |     v0 = *((gp - 8183));
    0x0000314c lw a3, -0x7fdc(gp)        |     a3 = *((gp - 8183));
    0x00003150 lw t9, -0x7ecc(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00003154 addiu v0, v0, -0x6bec     |     v0 += -0x6bec;
    0x00003158 sw v0, 0x10(sp)           |     *(var_10h) = v0;
    0x0000315c addiu a3, a3, -0x6bf4     |     a3 += -0x6bf4;
    0x00003160 addiu a1, zero, 1         |     a1 = 1;
    0x00003164 jalr t9                   |     t9 ();
    0x00003168 lw ra, 0x2c(sp)           |     ra = *(var_2ch);
    0x0000316c lw s1, 0x28(sp)           |     s1 = *(var_28h);
    0x00003170 lw s0, 0x24(sp)           |     s0 = *(var_24h);
    0x00003174 addiu sp, sp, 0x30        |     
    0x00003178 jr ra                     |     return v0;
                                         | }

[*] Function fprintf used 7 times dqtool