[*] Binary protection state of pidstat

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


[*] Function fprintf tear down of pidstat

    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0xc120 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.get_proc_cpu_nr ()           | void get_proc_cpu_nr () {
    0x0000c120 lui gp, 2                     |     
    0x0000c124 addiu gp, gp, -0x2070         |     
    0x0000c128 addu gp, gp, t9               |     gp += t9;
    0x0000c12c addiu sp, sp, -0x58           |     
    0x0000c130 lw a1, -0x7fd4(gp)            |     a1 = *(gp);
    0x0000c134 sw s5, 0x4c(sp)               |     *(var_4ch) = s5;
    0x0000c138 lw s5, -0x7cd8(gp)            |     s5 = *((gp - 7990));
    0x0000c13c sw s0, 0x38(sp)               |     *(var_38h) = s0;
    0x0000c140 lw s0, -0x7fd4(gp)            |     s0 = *(gp);
    0x0000c144 lw v0, (s5)                   |     v0 = *(s5);
    0x0000c148 lw t9, -0x7cc8(gp)            |     t9 = sym.imp.fopen;
    0x0000c14c sw gp, 0x18(sp)               |     *(var_18h) = gp;
    0x0000c150 sw ra, 0x54(sp)               |     *(var_54h) = ra;
    0x0000c154 sw s6, 0x50(sp)               |     *(var_50h) = s6;
    0x0000c158 sw s4, 0x48(sp)               |     *(var_48h) = s4;
    0x0000c15c sw s3, 0x44(sp)               |     *(var_44h) = s3;
    0x0000c160 sw s2, 0x40(sp)               |     *(var_40h) = s2;
    0x0000c164 sw s1, 0x3c(sp)               |     *(var_3ch) = s1;
    0x0000c168 addiu a1, a1, 0x184c          |     a1 += 0x184c;
                                             |     /* esilref: '/proc/stat' */
    0x0000c16c addiu a0, s0, 0x1550          |     a0 = s0 + 0x1550;
    0x0000c170 sw v0, 0x34(sp)               |     *(var_34h) = v0;
    0x0000c174 jalr t9                       |     t9 ();
    0x0000c178 nop                           |     
    0x0000c17c lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 == 0) {
    0x0000c180 beqz v0, 0xc280               |         goto label_2;
                                             |     }
    0x0000c184 lw s2, -0x7fd4(gp)            |     s2 = *(gp);
    0x0000c188 lw s3, -0x7fd4(gp)            |     s3 = *(gp);
    0x0000c18c lw s6, -0x7fd4(gp)            |     s6 = *(gp);
    0x0000c190 move s1, v0                   |     s1 = v0;
    0x0000c194 addiu s4, zero, -1            |     s4 = -1;
    0x0000c198 addiu s0, sp, 0x24            |     s0 = sp + 0x24;
                                             |     /* str.cpu_ */
    0x0000c19c addiu s2, s2, 0x1570          |     s2 += 0x1570;
                                             |     /* esilref: 'cpu' */
    0x0000c1a0 addiu s3, s3, 0x16fc          |     s3 += 0x16fc;
                                             |     do {
                                             | label_0:
    0x0000c1a4 lw t9, -0x7cdc(gp)            |         t9 = sym.imp.fgets;
    0x0000c1a8 move a2, s1                   |         a2 = s1;
    0x0000c1ac addiu a1, zero, 0x10          |         a1 = 0x10;
    0x0000c1b0 move a0, s0                   |         a0 = s0;
    0x0000c1b4 jalr t9                       |         t9 ();
    0x0000c1b8 lw gp, 0x18(sp)               |         gp = *(var_18h);
                                             |         if (v0 == 0) {
    0x0000c1bc beqz v0, 0xc238               |             goto label_3;
                                             |         }
                                             | label_1:
    0x0000c1c0 lw t9, -0x7dbc(gp)            |         t9 = sym.imp.strncmp;
    0x0000c1c4 addiu a2, zero, 4             |         a2 = 4;
    0x0000c1c8 move a1, s2                   |         a1 = s2;
    0x0000c1cc move a0, s0                   |         a0 = s0;
    0x0000c1d0 jalr t9                       |         t9 ();
    0x0000c1d4 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x0000c1d8 beqz v0, 0xc1a4               |         
                                             |     } while (v0 == 0);
    0x0000c1dc lw t9, -0x7dbc(gp)            |     t9 = sym.imp.strncmp;
    0x0000c1e0 addiu a2, zero, 3             |     a2 = 3;
    0x0000c1e4 move a1, s3                   |     a1 = s3;
    0x0000c1e8 move a0, s0                   |     a0 = s0;
    0x0000c1ec jalr t9                       |     t9 ();
    0x0000c1f0 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 != 0) {
    0x0000c1f4 bnez v0, 0xc1a4               |         goto label_0;
                                             |     }
    0x0000c1f8 lw t9, -0x7d60(gp)            |     t9 = sym.imp.__isoc99_sscanf;
    0x0000c1fc addiu a2, sp, 0x20            |     a2 = sp + 0x20;
                                             |     /* esilref: '&d' */
    0x0000c200 addiu a1, s6, 0x1708          |     a1 = s6 + 0x1708;
    0x0000c204 addiu a0, sp, 0x27            |     a0 = sp + 0x27;
    0x0000c208 jalr t9                       |     t9 ();
    0x0000c20c lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0000c210 lw v0, 0x20(sp)               |     v0 = *(var_20h_2);
    0x0000c214 move a2, s1                   |     a2 = s1;
    0x0000c218 lw t9, -0x7cdc(gp)            |     t9 = sym.imp.fgets;
    0x0000c21c slt v1, s4, v0                |     v1 = (s4 < v0) ? 1 : 0;
    0x0000c220 addiu a1, zero, 0x10          |     a1 = 0x10;
    0x0000c224 move a0, s0                   |     a0 = s0;
                                             |     if (v1 == 0) {
    0x0000c228 movn s4, v0, v1               |         s4 = v0;
                                             |     }
    0x0000c22c jalr t9                       |     t9 ();
    0x0000c230 lw gp, 0x18(sp)               |     gp = *(var_18h);
                                             |     if (v0 != 0) {
    0x0000c234 bnez v0, 0xc1c0               |         goto label_1;
                                             |     }
                                             | label_3:
    0x0000c238 lw t9, -0x7da8(gp)            |     t9 = sym.imp.fclose;
    0x0000c23c move a0, s1                   |     a0 = s1;
    0x0000c240 jalr t9                       |     t9 ();
    0x0000c244 lw a0, 0x34(sp)               |     a0 = *(var_34h);
    0x0000c248 lw v1, (s5)                   |     v1 = *(s5);
    0x0000c24c lw gp, 0x18(sp)               |     gp = *(var_18h);
    0x0000c250 addiu v0, s4, 1               |     v0 = s4 + 1;
                                             |     if (a0 == v1) {
    0x0000c254 bne a0, v1, 0xc2d4            |         
    0x0000c258 lw ra, 0x54(sp)               |         ra = *(var_54h);
    0x0000c25c lw s6, 0x50(sp)               |         s6 = *(var_50h);
    0x0000c260 lw s5, 0x4c(sp)               |         s5 = *(var_4ch);
    0x0000c264 lw s4, 0x48(sp)               |         s4 = *(var_48h);
    0x0000c268 lw s3, 0x44(sp)               |         s3 = *(var_44h);
    0x0000c26c lw s2, 0x40(sp)               |         s2 = *(var_40h);
    0x0000c270 lw s1, 0x3c(sp)               |         s1 = *(var_3ch);
    0x0000c274 lw s0, 0x38(sp)               |         s0 = *(var_38h);
    0x0000c278 addiu sp, sp, 0x58            |         
    0x0000c27c jr ra                         |         return v0;
                                             | label_2:
    0x0000c280 lw v0, -0x7ccc(gp)            |         v0 = *((gp - 7987));
    0x0000c284 lw t9, -0x7d6c(gp)            |         t9 = sym.imp.__errno_location;
    0x0000c288 lw s1, (v0)                   |         s1 = *(v0);
    0x0000c28c jalr t9                       |         t9 ();
    0x0000c290 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x0000c294 lw t9, -0x7d38(gp)            |         t9 = sym.imp.strerror;
    0x0000c298 lw a0, (v0)                   |         a0 = *(v0);
    0x0000c29c jalr t9                       |         t9 ();
    0x0000c2a0 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x0000c2a4 move a0, s1                   |         a0 = s1;
    0x0000c2a8 sw v0, 0x10(sp)               |         *(var_10h) = v0;
    0x0000c2ac lw a2, -0x7fd4(gp)            |         a2 = *(gp);
    0x0000c2b0 lw t9, -0x7db0(gp)            |         t9 = sym.imp.__fprintf_chk
                                             |         /* esilref: '/proc/stat' */
    0x0000c2b4 addiu a3, s0, 0x1550          |         a3 = s0 + 0x1550;
                                             |         /* str.Cannot_open__s:__s_n */
    0x0000c2b8 addiu a2, a2, 0x155c          |         a2 += 0x155c;
    0x0000c2bc addiu a1, zero, 1             |         a1 = 1;
    0x0000c2c0 jalr t9                       |         t9 ();
    0x0000c2c4 lw gp, 0x18(sp)               |         gp = *(var_18h);
    0x0000c2c8 lw t9, -0x7d40(gp)            |         t9 = sym.imp.exit;
    0x0000c2cc addiu a0, zero, 1             |         a0 = 1;
    0x0000c2d0 jalr t9                       |         t9 ();
                                             |     }
    0x0000c2d4 lw t9, -0x7cf0(gp)            |     t9 = sym.imp.__stack_chk_fail;
    0x0000c2d8 jalr t9                       |     t9 ();
    0x0000c2dc nop                           |     
                                             | }
    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0xae50 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.read_stat_cpu ()             | void read_stat_cpu () {
    0x0000ae50 lui gp, 2                     |     
    0x0000ae54 addiu gp, gp, -0xda0          |     
    0x0000ae58 addu gp, gp, t9               |     gp += t9;
    0x0000ae5c lw v0, -0x7cd8(gp)            |     v0 = *((gp - 7990));
    0x0000ae60 addiu sp, sp, -0x20d0         |     
    0x0000ae64 lw t9, -0x7cc8(gp)            |     t9 = sym.imp.fopen;
    0x0000ae68 sw s5, 0x20bc(sp)             |     *(arg_20bch) = s5;
    0x0000ae6c sw s2, 0x20b0(sp)             |     *(arg_20b0h) = s2;
    0x0000ae70 sw v0, 0x44(sp)               |     *(arg_44h) = v0;
    0x0000ae74 lw s2, -0x7fd4(gp)            |     s2 = *(gp);
    0x0000ae78 lw v0, (v0)                   |     v0 = *(v0);
    0x0000ae7c move s5, a1                   |     s5 = a1;
    0x0000ae80 lw a1, -0x7fd4(gp)            |     a1 = *(gp);
    0x0000ae84 sw gp, 0x38(sp)               |     *(var_38h) = gp;
    0x0000ae88 sw s0, 0x20a8(sp)             |     *(arg_20a8h) = s0;
    0x0000ae8c sw ra, 0x20cc(sp)             |     *(arg_20cch) = ra;
    0x0000ae90 sw fp, 0x20c8(sp)             |     *(arg_20c8h) = fp;
    0x0000ae94 sw s7, 0x20c4(sp)             |     *(arg_20c4h) = s7;
    0x0000ae98 sw s6, 0x20c0(sp)             |     *(arg_20c0h) = s6;
    0x0000ae9c sw s4, 0x20b8(sp)             |     *(arg_20b8h) = s4;
    0x0000aea0 sw s3, 0x20b4(sp)             |     *(arg_20b4h) = s3;
    0x0000aea4 sw s1, 0x20ac(sp)             |     *(arg_20ach) = s1;
    0x0000aea8 move s0, a0                   |     s0 = a0;
    0x0000aeac addiu a1, a1, 0x184c          |     a1 += 0x184c;
                                             |     /* esilref: '/proc/stat' */
    0x0000aeb0 addiu a0, s2, 0x1550          |     a0 = s2 + 0x1550;
    0x0000aeb4 sw v0, 0x20a4(sp)             |     *(arg_20a4h) = v0;
    0x0000aeb8 jalr t9                       |     t9 ();
    0x0000aebc nop                           |     
    0x0000aec0 lw gp, 0x38(sp)               |     gp = *(var_38h);
                                             |     if (v0 == 0) {
    0x0000aec4 beqz v0, 0xb140               |         goto label_7;
                                             |     }
    0x0000aec8 move s1, v0                   |     s1 = v0;
    0x0000aecc lw s2, -0x7fd4(gp)            |     s2 = *(gp);
    0x0000aed0 lw v0, -0x7fd4(gp)            |     v0 = *(gp);
    0x0000aed4 lw s4, -0x7fd4(gp)            |     s4 = *(gp);
    0x0000aed8 lw s6, -0x7fd4(gp)            |     s6 = *(gp);
    0x0000aedc sw v0, 0x40(sp)               |     *(arg_40h) = v0;
    0x0000aee0 move s3, zero                 |     s3 = 0;
    0x0000aee4 addiu s7, sp, 0xa4            |     s7 = sp + 0xa4;
                                             |     /* str.cpu_ */
    0x0000aee8 addiu s2, s2, 0x1570          |     s2 += 0x1570;
                                             |     /* esilref: 'cpu' */
    0x0000aeec addiu s4, s4, 0x16fc          |     s4 += 0x16fc;
    0x0000aef0 addiu fp, sp, 0x50            |     fp = sp + 0x50;
                                             |     /* str._llu__llu__llu__llu__llu__llu__llu__llu__llu__llu */
    0x0000aef4 addiu s6, s6, 0x1578          |     s6 += 0x1578;
                                             |     do {
    0x0000aef8 lw t9, -0x7cdc(gp)            |         t9 = sym.imp.fgets;
                                             | label_0:
    0x0000aefc move a2, s1                   |         a2 = s1;
    0x0000af00 addiu a1, zero, 0x2000        |         a1 = 0x2000;
    0x0000af04 move a0, s7                   |         a0 = s7;
    0x0000af08 jalr t9                       |         t9 ();
    0x0000af0c lw gp, 0x38(sp)               |         gp = *(var_38h);
                                             |         if (v0 == 0) {
    0x0000af10 beqz v0, 0xb048               |             goto label_3;
                                             |         }
                                             | label_1:
    0x0000af14 lw t9, -0x7dbc(gp)            |         t9 = sym.imp.strncmp;
    0x0000af18 addiu a2, zero, 4             |         a2 = 4;
    0x0000af1c move a1, s2                   |         a1 = s2;
    0x0000af20 move a0, s7                   |         a0 = s7;
    0x0000af24 jalr t9                       |         t9 ();
    0x0000af28 lw gp, 0x38(sp)               |         gp = *(var_38h);
                                             |         if (v0 == 0) {
    0x0000af2c beqz v0, 0xb09c               |             goto label_8;
                                             |         }
    0x0000af30 lw t9, -0x7dbc(gp)            |         t9 = sym.imp.strncmp;
    0x0000af34 addiu a2, zero, 3             |         a2 = 3;
    0x0000af38 move a1, s4                   |         a1 = s4;
    0x0000af3c move a0, s7                   |         a0 = s7;
    0x0000af40 jalr t9                       |         t9 ();
    0x0000af44 lw gp, 0x38(sp)               |         gp = *(var_38h);
    0x0000af48 bnez v0, 0xaef8               |         
                                             |     } while (v0 != 0);
    0x0000af4c lw t9, -0x7d64(gp)            |     t9 = sym.imp.memset;
    0x0000af50 addiu a2, zero, 0x50          |     a2 = 0x50;
    0x0000af54 move a1, zero                 |     a1 = 0;
    0x0000af58 move a0, fp                   |     a0 = fp;
    0x0000af5c jalr t9                       |     t9 ();
    0x0000af60 addiu v0, sp, 0x98            |     v0 = sp + 0x98;
    0x0000af64 sw v0, 0x30(sp)               |     *(var_30h) = v0;
    0x0000af68 addiu v0, sp, 0x90            |     v0 = sp + 0x90;
    0x0000af6c sw v0, 0x2c(sp)               |     *(var_2ch) = v0;
    0x0000af70 addiu v0, sp, 0x78            |     v0 = sp + 0x78;
    0x0000af74 sw v0, 0x28(sp)               |     *(var_28h) = v0;
    0x0000af78 addiu v0, sp, 0x88            |     v0 = sp + 0x88;
    0x0000af7c sw v0, 0x24(sp)               |     *(var_24h) = v0;
    0x0000af80 addiu v0, sp, 0x80            |     v0 = sp + 0x80;
    0x0000af84 sw v0, 0x20(sp)               |     *(var_20h_3) = v0;
    0x0000af88 addiu v0, sp, 0x70            |     v0 = sp + 0x70;
    0x0000af8c sw v0, 0x1c(sp)               |     *(var_1ch) = v0;
    0x0000af90 addiu v0, sp, 0x68            |     v0 = sp + 0x68;
    0x0000af94 lw gp, 0x38(sp)               |     gp = *(var_38h);
    0x0000af98 sw v0, 0x18(sp)               |     *(var_18h_2) = v0;
    0x0000af9c addiu v0, sp, 0x60            |     v0 = sp + 0x60;
    0x0000afa0 sw v0, 0x14(sp)               |     *(var_14h) = v0;
    0x0000afa4 addiu v0, sp, 0x58            |     v0 = sp + 0x58;
    0x0000afa8 sw v0, 0x10(sp)               |     *(var_10h) = v0;
    0x0000afac lw v0, 0x40(sp)               |     v0 = *(arg_40h);
    0x0000afb0 lw t9, -0x7d60(gp)            |     t9 = sym.imp.__isoc99_sscanf;
    0x0000afb4 addiu a0, sp, 0xa7            |     a0 = sp + 0xa7;
    0x0000afb8 move a3, fp                   |     a3 = fp;
    0x0000afbc addiu a2, sp, 0x4c            |     a2 = sp + 0x4c;
    0x0000afc0 addiu a1, v0, 0x15ac          |     a1 = v0 + 0x15ac;
    0x0000afc4 jalr t9                       |     t9 ();
    0x0000afc8 lw t4, 0x4c(sp)               |     t4 = *(arg_4ch);
    0x0000afcc addiu a0, t4, 1               |     a0 = t4 + 1;
    0x0000afd0 slt v0, a0, s5                |     v0 = (a0 < s5) ? 1 : 0;
    0x0000afd4 lw gp, 0x38(sp)               |     gp = *(var_38h);
                                             |     if (v0 == 0) {
    0x0000afd8 beqz v0, 0xb12c               |         goto label_9;
                                             |     }
    0x0000afdc sll v0, a0, 2                 |     v0 = a0 << 2;
    0x0000afe0 addu v0, v0, a0               |     v0 += a0;
    0x0000afe4 sll v0, v0, 4                 |     v0 <<= 4;
    0x0000afe8 move v1, fp                   |     v1 = fp;
    0x0000afec addu v0, s0, v0               |     v0 = s0 + v0;
    0x0000aff0 addiu t3, sp, 0xa0            |     t3 = sp + 0xa0;
                                             |     do {
    0x0000aff4 lw t2, (v1)                   |         t2 = *(v1);
    0x0000aff8 lw a3, 4(v1)                  |         a3 = *((v1 + 1));
    0x0000affc lw a2, 8(v1)                  |         a2 = *((v1 + 2));
    0x0000b000 lw a1, 0xc(v1)                |         a1 = *((v1 + 3));
    0x0000b004 addiu v1, v1, 0x10            |         v1 += 0x10;
    0x0000b008 sw t2, (v0)                   |         *(v0) = t2;
    0x0000b00c sw a3, 4(v0)                  |         *((v0 + 1)) = a3;
    0x0000b010 sw a2, 8(v0)                  |         *((v0 + 2)) = a2;
    0x0000b014 sw a1, 0xc(v0)                |         *((v0 + 3)) = a1;
    0x0000b018 addiu v0, v0, 0x10            |         v0 += 0x10;
    0x0000b01c bne v1, t3, 0xaff4            |         
                                             |     } while (v1 != t3);
    0x0000b020 slt a0, a0, s3                |     a0 = (a0 < s3) ? 1 : 0;
    0x0000b024 lw t9, -0x7cdc(gp)            |     t9 = sym.imp.fgets;
                                             |     if (a0 != 0) {
    0x0000b028 bnez a0, 0xaefc               |         goto label_0;
                                             |     }
    0x0000b02c move a2, s1                   |     a2 = s1;
    0x0000b030 addiu a1, zero, 0x2000        |     a1 = 0x2000;
    0x0000b034 move a0, s7                   |     a0 = s7;
    0x0000b038 addiu s3, t4, 2               |     s3 = t4 + 2;
    0x0000b03c jalr t9                       |     t9 ();
    0x0000b040 lw gp, 0x38(sp)               |     gp = *(var_38h);
                                             |     if (v0 != 0) {
    0x0000b044 bnez v0, 0xaf14               |         goto label_1;
                                             |     }
                                             | label_3:
    0x0000b048 lw t9, -0x7da8(gp)            |     t9 = sym.imp.fclose;
                                             | label_2:
    0x0000b04c move a0, s1                   |     a0 = s1;
    0x0000b050 jalr t9                       |     t9 ();
    0x0000b054 lw v0, 0x44(sp)               |     v0 = *(arg_44h);
    0x0000b058 lw a0, 0x20a4(sp)             |     a0 = *(arg_20a4h);
    0x0000b05c lw gp, 0x38(sp)               |     gp = *(var_38h);
    0x0000b060 lw v1, (v0)                   |     v1 = *(v0);
    0x0000b064 move v0, s3                   |     v0 = s3;
                                             |     if (a0 != v1) {
    0x0000b068 bne a0, v1, 0xb134            |         goto label_10;
                                             |     }
    0x0000b06c lw ra, 0x20cc(sp)             |     ra = *(arg_20cch);
    0x0000b070 lw fp, 0x20c8(sp)             |     fp = *(arg_20c8h);
    0x0000b074 lw s7, 0x20c4(sp)             |     s7 = *(arg_20c4h);
    0x0000b078 lw s6, 0x20c0(sp)             |     s6 = *(arg_20c0h);
    0x0000b07c lw s5, 0x20bc(sp)             |     s5 = *(arg_20bch);
    0x0000b080 lw s4, 0x20b8(sp)             |     s4 = *(arg_20b8h);
    0x0000b084 lw s3, 0x20b4(sp)             |     s3 = *(arg_20b4h);
    0x0000b088 lw s2, 0x20b0(sp)             |     s2 = *(arg_20b0h);
    0x0000b08c lw s1, 0x20ac(sp)             |     s1 = *(arg_20ach);
    0x0000b090 lw s0, 0x20a8(sp)             |     s0 = *(arg_20a8h);
    0x0000b094 addiu sp, sp, 0x20d0          |     
    0x0000b098 jr ra                         |     return v0;
                                             | label_8:
    0x0000b09c lw t9, -0x7d64(gp)            |     t9 = sym.imp.memset;
    0x0000b0a0 addiu a2, zero, 0x50          |     a2 = 0x50;
    0x0000b0a4 move a1, zero                 |     a1 = 0;
    0x0000b0a8 move a0, s0                   |     a0 = s0;
    0x0000b0ac jalr t9                       |     t9 ();
    0x0000b0b0 lw gp, 0x38(sp)               |     gp = *(var_38h);
    0x0000b0b4 addiu t3, s0, 0x48            |     t3 = s0 + 0x48;
    0x0000b0b8 addiu t2, s0, 0x40            |     t2 = s0 + 0x40;
    0x0000b0bc lw t9, -0x7d60(gp)            |     t9 = sym.imp.__isoc99_sscanf;
    0x0000b0c0 addiu a3, s0, 0x28            |     a3 = s0 + 0x28;
    0x0000b0c4 addiu a2, s0, 0x38            |     a2 = s0 + 0x38;
    0x0000b0c8 addiu a1, s0, 0x30            |     a1 = s0 + 0x30;
    0x0000b0cc addiu a0, s0, 0x20            |     a0 = s0 + 0x20;
    0x0000b0d0 addiu v1, s0, 0x18            |     v1 = s0 + 0x18;
    0x0000b0d4 addiu v0, s0, 0x10            |     v0 = s0 + 0x10;
    0x0000b0d8 sw a3, 0x24(sp)               |     *(var_24h) = a3;
    0x0000b0dc sw a2, 0x20(sp)               |     *(var_20h_3) = a2;
    0x0000b0e0 sw a1, 0x1c(sp)               |     *(var_1ch) = a1;
    0x0000b0e4 sw a0, 0x18(sp)               |     *(var_18h_2) = a0;
    0x0000b0e8 sw t3, 0x2c(sp)               |     *(var_2ch) = t3;
    0x0000b0ec sw t2, 0x28(sp)               |     *(var_28h) = t2;
    0x0000b0f0 sw v1, 0x14(sp)               |     *(var_14h) = v1;
    0x0000b0f4 sw v0, 0x10(sp)               |     *(var_10h) = v0;
    0x0000b0f8 addiu a3, s0, 8               |     a3 = s0 + 8;
    0x0000b0fc move a2, s0                   |     a2 = s0;
    0x0000b100 move a1, s6                   |     a1 = s6;
    0x0000b104 addiu a0, sp, 0xa9            |     a0 = sp + 0xa9;
    0x0000b108 jalr t9                       |     t9 ();
    0x0000b10c lw gp, 0x38(sp)               |     gp = *(var_38h);
                                             |     if (s3 == 0) {
    0x0000b110 bnez s3, 0xb118               |         
    0x0000b114 addiu s3, zero, 1             |         s3 = 1;
                                             |     }
    0x0000b118 addiu v0, zero, 1             |     v0 = 1;
    0x0000b11c lw t9, -0x7cdc(gp)            |     t9 = sym.imp.fgets;
                                             |     if (s5 == v0) {
    0x0000b120 bnel s5, v0, 0xaefc           |         goto label_0;
                                             |     }
    0x0000b124 lw t9, -0x7da8(gp)            |     t9 = sym.imp.fclose;
    0x0000b128 b 0xb04c                      |     goto label_2;
                                             | label_9:
    0x0000b12c addiu s3, zero, -1            |     s3 = -1;
    0x0000b130 b 0xb048                      |     goto label_3;
                                             | label_10:
    0x0000b134 lw t9, -0x7cf0(gp)            |     t9 = sym.imp.__stack_chk_fail;
    0x0000b138 jalr t9                       |     t9 ();
    0x0000b13c nop                           |     
                                             | label_7:
    0x0000b140 lw v0, -0x7ccc(gp)            |     v0 = *((gp - 7987));
    0x0000b144 lw t9, -0x7d6c(gp)            |     t9 = sym.imp.__errno_location;
    0x0000b148 lw s0, (v0)                   |     s0 = *(v0);
    0x0000b14c jalr t9                       |     t9 ();
    0x0000b150 lw gp, 0x38(sp)               |     gp = *(var_38h);
    0x0000b154 lw t9, -0x7d38(gp)            |     t9 = sym.imp.strerror;
    0x0000b158 lw a0, (v0)                   |     a0 = *(v0);
    0x0000b15c jalr t9                       |     t9 ();
    0x0000b160 lw gp, 0x38(sp)               |     gp = *(var_38h);
    0x0000b164 move a0, s0                   |     a0 = s0;
    0x0000b168 sw v0, 0x10(sp)               |     *(var_10h) = v0;
    0x0000b16c lw a2, -0x7fd4(gp)            |     a2 = *(gp);
    0x0000b170 lw t9, -0x7db0(gp)            |     t9 = sym.imp.__fprintf_chk
                                             |     /* esilref: '/proc/stat' */
    0x0000b174 addiu a3, s2, 0x1550          |     a3 = s2 + 0x1550;
                                             |     /* str.Cannot_open__s:__s_n */
    0x0000b178 addiu a2, a2, 0x155c          |     a2 += 0x155c;
    0x0000b17c addiu a1, zero, 1             |     a1 = 1;
    0x0000b180 jalr t9                       |     t9 ();
    0x0000b184 lw gp, 0x38(sp)               |     gp = *(var_38h);
    0x0000b188 lw t9, -0x7d40(gp)            |     t9 = sym.imp.exit;
    0x0000b18c addiu a0, zero, 2             |     a0 = 2;
    0x0000b190 jalr t9                       |     t9 ();
    0x0000b194 lui gp, 2                     |     
    0x0000b198 addiu gp, gp, -0x10e4         |     
    0x0000b19c addu gp, gp, t9               |     gp += t9;
    0x0000b1a0 lw v0, -0x7cd8(gp)            |     v0 = *((gp - 7990));
    0x0000b1a4 addiu sp, sp, -0x2058         |     
    0x0000b1a8 lw t9, -0x7cc8(gp)            |     t9 = sym.imp.fopen;
    0x0000b1ac sw s4, 0x2040(sp)             |     *(arg_2040h) = s4;
    0x0000b1b0 sw s3, 0x203c(sp)             |     *(arg_203ch) = s3;
    0x0000b1b4 sw v0, 0x1c(sp)               |     *(var_1ch) = v0;
    0x0000b1b8 move s3, a0                   |     s3 = a0;
    0x0000b1bc lw v0, (v0)                   |     v0 = *(v0);
    0x0000b1c0 lw a0, -0x7fd4(gp)            |     a0 = *(gp);
    0x0000b1c4 move s4, a1                   |     s4 = a1;
    0x0000b1c8 lw a1, -0x7fd4(gp)            |     a1 = *(gp);
    0x0000b1cc sw gp, 0x10(sp)               |     *(var_10h) = gp;
    0x0000b1d0 sw ra, 0x2054(sp)             |     *(arg_2054h) = ra;
    0x0000b1d4 sw fp, 0x2050(sp)             |     *(arg_2050h) = fp;
    0x0000b1d8 sw s7, 0x204c(sp)             |     *(arg_204ch) = s7;
    0x0000b1dc sw s6, 0x2048(sp)             |     *(arg_2048h) = s6;
    0x0000b1e0 sw s5, 0x2044(sp)             |     *(arg_2044h) = s5;
    0x0000b1e4 sw s2, 0x2038(sp)             |     *(arg_2038h) = s2;
    0x0000b1e8 sw s1, 0x2034(sp)             |     *(arg_2034h) = s1;
    0x0000b1ec sw s0, 0x2030(sp)             |     *(arg_2030h) = s0;
                                             |     /* esilref: '/proc/stat' */
    0x0000b1f0 addiu a0, a0, 0x1550          |     a0 += 0x1550;
    0x0000b1f4 addiu a1, a1, 0x184c          |     a1 += 0x184c;
    0x0000b1f8 sw v0, 0x202c(sp)             |     *(arg_202ch) = v0;
    0x0000b1fc jalr t9                       |     t9 ();
    0x0000b200 nop                           |     
    0x0000b204 lw gp, 0x10(sp)               |     gp = *(var_10h);
                                             |     if (v0 == 0) {
    0x0000b208 beqz v0, 0xb380               |         goto label_11;
                                             |     }
    0x0000b20c lw s1, -0x7fd4(gp)            |     s1 = *(gp);
    0x0000b210 move s2, v0                   |     s2 = v0;
    0x0000b214 addiu s0, sp, 0x2c            |     s0 = sp + 0x2c;
                                             |     /* str.intr_ */
    0x0000b218 addiu s1, s1, 0x15e4          |     s1 += 0x15e4;
    0x0000b21c b 0xb23c                      |     
                                             |     while (v0 != 0) {
    0x0000b220 lw t9, -0x7dbc(gp)            |         t9 = sym.imp.strncmp;
    0x0000b224 addiu a2, zero, 5             |         a2 = 5;
    0x0000b228 move a1, s1                   |         a1 = s1;
    0x0000b22c move a0, s0                   |         a0 = s0;
    0x0000b230 jalr t9                       |         t9 ();
    0x0000b234 lw gp, 0x10(sp)               |         gp = *(var_10h);
                                             |         if (v0 == 0) {
    0x0000b238 beqz v0, 0xb2b0               |             goto label_12;
                                             |         }
    0x0000b23c lw t9, -0x7cdc(gp)            |         t9 = sym.imp.fgets;
    0x0000b240 move a2, s2                   |         a2 = s2;
    0x0000b244 addiu a1, zero, 0x2000        |         a1 = 0x2000;
    0x0000b248 move a0, s0                   |         a0 = s0;
    0x0000b24c jalr t9                       |         t9 ();
    0x0000b250 lw gp, 0x10(sp)               |         gp = *(var_10h);
    0x0000b254 bnez v0, 0xb220               |         
                                             |     }
    0x0000b258 move s6, zero                 |     s6 = 0;
                                             |     do {
                                             | label_4:
    0x0000b25c lw t9, -0x7da8(gp)            |         t9 = sym.imp.fclose;
    0x0000b260 move a0, s2                   |         a0 = s2;
    0x0000b264 jalr t9                       |         t9 ();
    0x0000b268 lw gp, 0x10(sp)               |         gp = *(var_10h);
                                             | label_6:
    0x0000b26c lw v0, 0x1c(sp)               |         v0 = *(var_1ch);
    0x0000b270 lw a0, 0x202c(sp)             |         a0 = *(arg_202ch);
    0x0000b274 lw v1, (v0)                   |         v1 = *(v0);
    0x0000b278 move v0, s6                   |         v0 = s6;
                                             |         if (a0 != v1) {
    0x0000b27c bne a0, v1, 0xb390            |             goto label_13;
                                             |         }
    0x0000b280 lw ra, 0x2054(sp)             |         ra = *(arg_2054h);
    0x0000b284 lw fp, 0x2050(sp)             |         fp = *(arg_2050h);
    0x0000b288 lw s7, 0x204c(sp)             |         s7 = *(arg_204ch);
    0x0000b28c lw s6, 0x2048(sp)             |         s6 = *(arg_2048h);
    0x0000b290 lw s5, 0x2044(sp)             |         s5 = *(arg_2044h);
    0x0000b294 lw s4, 0x2040(sp)             |         s4 = *(arg_2040h);
    0x0000b298 lw s3, 0x203c(sp)             |         s3 = *(arg_203ch);
    0x0000b29c lw s2, 0x2038(sp)             |         s2 = *(arg_2038h);
    0x0000b2a0 lw s1, 0x2034(sp)             |         s1 = *(arg_2034h);
    0x0000b2a4 lw s0, 0x2030(sp)             |         s0 = *(arg_2030h);
    0x0000b2a8 addiu sp, sp, 0x2058          |         
    0x0000b2ac jr ra                         |         return v0;
                                             | label_12:
    0x0000b2b0 lw a1, -0x7fd4(gp)            |         a1 = *(gp);
    0x0000b2b4 lw t9, -0x7d60(gp)            |         t9 = sym.imp.__isoc99_sscanf;
    0x0000b2b8 addiu s1, sp, 0x31            |         s1 = sp + 0x31;
    0x0000b2bc move a2, s3                   |         a2 = s3;
                                             |         /* esilref: '&llu' */
    0x0000b2c0 addiu a1, a1, 0x15dc          |         a1 += 0x15dc;
    0x0000b2c4 move a0, s1                   |         a0 = s1;
    0x0000b2c8 jalr t9                       |         t9 ();
    0x0000b2cc addiu v0, zero, 1             |         v0 = 1;
    0x0000b2d0 lw gp, 0x10(sp)               |         gp = *(var_10h);
                                             |         if (s4 == v0) {
    0x0000b2d4 beq s4, v0, 0xb388            |             goto label_14;
                                             |         }
    0x0000b2d8 lw s7, -0x7fd4(gp)            |         s7 = *(gp);
    0x0000b2dc lw t9, -0x7cc4(gp)            |         t9 = sym.imp.strcspn;
    0x0000b2e0 addiu a1, s7, 0x15e8          |         a1 = s7 + 0x15e8;
    0x0000b2e4 move a0, s1                   |         a0 = s1;
    0x0000b2e8 jalr t9                       |         t9 ();
    0x0000b2ec lw gp, 0x10(sp)               |         gp = *(var_10h);
    0x0000b2f0 addiu s1, v0, 5               |         s1 = v0 + 5;
    0x0000b2f4 addiu s3, s3, 8               |         s3 += 8;
    0x0000b2f8 lw fp, -0x7fd4(gp)            |         fp = *(gp);
    0x0000b2fc addiu s6, zero, 1             |         s6 = 1;
    0x0000b300 addiu s5, sp, 0x20            |         s5 = sp + 0x20;
                                             |         /* esilref: ' &llu' */
    0x0000b304 addiu fp, fp, 0x15a4          |         fp += 0x15a4;
    0x0000b308 addiu s7, s7, 0x15e8          |         s7 += 0x15e8;
    0x0000b30c b 0xb350                      |         goto label_15;
                                             | label_5:
    0x0000b310 lw v0, 0x20(sp)               |         v0 = *(var_20h_3);
    0x0000b314 lw t9, -0x7cc4(gp)            |         t9 = sym.imp.strcspn;
    0x0000b318 addiu a0, s1, 1               |         a0 = s1 + 1;
    0x0000b31c sw v1, 4(s3)                  |         *((s3 + 1)) = v1;
    0x0000b320 sw v0, (s3)                   |         *(s3) = v0;
    0x0000b324 move a1, s7                   |         a1 = s7;
    0x0000b328 addu a0, s0, a0               |         a0 = s0 + a0;
    0x0000b32c jalr t9                       |         t9 ();
    0x0000b330 addiu v1, v0, 1               |         v1 = v0 + 1;
    0x0000b334 lw gp, 0x10(sp)               |         gp = *(var_10h);
    0x0000b338 addiu s6, s6, 1               |         s6++;
    0x0000b33c addu s1, s1, v1               |         s1 += v1;
    0x0000b340 blez v0, 0xb25c               |         
                                             |     } while (v0 <= 0);
    0x0000b344 sltiu v0, s1, 0x1fff          |     v0 = (s1 < 0x1fff) ? 1 : 0;
    0x0000b348 addiu s3, s3, 8               |     s3 += 8;
                                             |     if (v0 == 0) {
    0x0000b34c beqz v0, 0xb25c               |         goto label_4;
                                             |     }
                                             | label_15:
    0x0000b350 lw t9, -0x7d60(gp)            |     t9 = sym.imp.__isoc99_sscanf;
    0x0000b354 move a2, s5                   |     a2 = s5;
    0x0000b358 move a1, fp                   |     a1 = fp;
    0x0000b35c addu a0, s0, s1               |     a0 = s0 + s1;
    0x0000b360 jalr t9                       |     t9 ();
    0x0000b364 lw gp, 0x10(sp)               |     gp = *(var_10h);
                                             |     if (v0 <= 0) {
    0x0000b368 blez v0, 0xb25c               |         goto label_4;
                                             |     }
    0x0000b36c slt v0, s6, s4                |     v0 = (s6 < s4) ? 1 : 0;
    0x0000b370 lw v1, 0x24(sp)               |     v1 = *(var_24h);
                                             |     if (v0 != 0) {
    0x0000b374 bnez v0, 0xb310               |         goto label_5;
                                             |     }
    0x0000b378 addiu s6, zero, -1            |     s6 = -1;
    0x0000b37c b 0xb25c                      |     goto label_4;
                                             | label_11:
    0x0000b380 move s6, zero                 |     s6 = 0;
    0x0000b384 b 0xb26c                      |     goto label_6;
                                             | label_14:
    0x0000b388 addiu s6, zero, 1             |     s6 = 1;
    0x0000b38c b 0xb25c                      |     goto label_4;
                                             | label_13:
    0x0000b390 lw t9, -0x7cf0(gp)            |     t9 = sym.imp.__stack_chk_fail;
    0x0000b394 jalr t9                       |     t9 ();
    0x0000b398 nop                           |     
                                             | }
    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0xb858 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.read_uptime ()               | void read_uptime () {
    0x0000b858 lui gp, 2                     |     
    0x0000b85c addiu gp, gp, -0x17a8         |     
    0x0000b860 addu gp, gp, t9               |     gp += t9;
    0x0000b864 addiu sp, sp, -0xc0           |     
    0x0000b868 lw a1, -0x7fd4(gp)            |     a1 = *(gp);
    0x0000b86c sw s1, 0xac(sp)               |     *(var_ach_2) = s1;
    0x0000b870 lw s1, -0x7cd8(gp)            |     s1 = *((gp - 7990));
    0x0000b874 sw s2, 0xb0(sp)               |     *(var_b0h_2) = s2;
    0x0000b878 lw s2, -0x7fd4(gp)            |     s2 = *(gp);
    0x0000b87c lw v0, (s1)                   |     v0 = *(s1);
    0x0000b880 lw t9, -0x7cc8(gp)            |     t9 = sym.imp.fopen;
    0x0000b884 sw gp, 0x10(sp)               |     *(var_10h_3) = gp;
    0x0000b888 sw s3, 0xb4(sp)               |     *(var_b4h_2) = s3;
    0x0000b88c sw ra, 0xbc(sp)               |     *(var_bch_2) = ra;
    0x0000b890 sw s4, 0xb8(sp)               |     *(var_b8h_2) = s4;
    0x0000b894 sw s0, 0xa8(sp)               |     *(var_a8h_2) = s0;
    0x0000b898 move s3, a0                   |     s3 = a0;
    0x0000b89c addiu a1, a1, 0x184c          |     a1 += 0x184c;
                                             |     /* str._proc_uptime */
    0x0000b8a0 addiu a0, s2, 0x16c0          |     a0 = s2 + 0x16c0;
    0x0000b8a4 sw v0, 0xa4(sp)               |     *(var_a4h_2) = v0;
    0x0000b8a8 jalr t9                       |     t9 ();
    0x0000b8ac nop                           |     
    0x0000b8b0 lw gp, 0x10(sp)               |     gp = *(var_10h_3);
                                             |     if (v0 != 0) {
    0x0000b8b4 beqz v0, 0xb914               |         
    0x0000b8b8 lw t9, -0x7cdc(gp)            |         t9 = sym.imp.fgets;
    0x0000b8bc addiu s4, sp, 0x24            |         s4 = sp + 0x24;
    0x0000b8c0 move a2, v0                   |         a2 = v0;
    0x0000b8c4 addiu a1, zero, 0x80          |         a1 = 0x80;
    0x0000b8c8 move a0, s4                   |         a0 = s4;
    0x0000b8cc move s0, v0                   |         s0 = v0;
    0x0000b8d0 jalr t9                       |         t9 ();
    0x0000b8d4 lw gp, 0x10(sp)               |         gp = *(var_10h_3);
                                             |         if (v0 != 0) {
    0x0000b8d8 beqz v0, 0xb904               |             
    0x0000b8dc lw a1, -0x7fd4(gp)            |             a1 = *(gp);
    0x0000b8e0 lw t9, -0x7d60(gp)            |             t9 = sym.imp.__isoc99_sscanf;
    0x0000b8e4 addiu a3, sp, 0x20            |             a3 = sp + 0x20;
    0x0000b8e8 addiu a2, sp, 0x1c            |             a2 = sp + 0x1c;
                                             |             /* str._lu._lu */
    0x0000b8ec addiu a1, a1, 0x16d0          |             a1 += 0x16d0;
    0x0000b8f0 move a0, s4                   |             a0 = s4;
    0x0000b8f4 jalr t9                       |             t9 ();
    0x0000b8f8 addiu v1, zero, 2             |             v1 = 2;
    0x0000b8fc lw gp, 0x10(sp)               |             gp = *(var_10h_3);
                                             |             if (v0 == v1) {
    0x0000b900 beq v0, v1, 0xb944            |                 goto label_0;
                                             |             }
                                             |         }
    0x0000b904 lw t9, -0x7da8(gp)            |         t9 = sym.imp.fclose;
    0x0000b908 move a0, s0                   |         a0 = s0;
    0x0000b90c jalr t9                       |         t9 ();
    0x0000b910 lw gp, 0x10(sp)               |         gp = *(var_10h_3);
                                             |     }
    0x0000b914 lw v0, -0x7ccc(gp)            |     v0 = *((gp - 7987));
    0x0000b918 lw a2, -0x7fd4(gp)            |     a2 = *(gp);
    0x0000b91c lw t9, -0x7db0(gp)            |     t9 = sym.imp.__fprintf_chk
    0x0000b920 lw a0, (v0)                   |     a0 = *(v0);
                                             |     /* str._proc_uptime */
    0x0000b924 addiu a3, s2, 0x16c0          |     a3 = s2 + 0x16c0;
                                             |     /* str.Cannot_read__s_n */
    0x0000b928 addiu a2, a2, 0x16d8          |     a2 += 0x16d8;
    0x0000b92c addiu a1, zero, 1             |     a1 = 1;
    0x0000b930 jalr t9                       |     t9 ();
    0x0000b934 lw gp, 0x10(sp)               |     gp = *(var_10h_3);
    0x0000b938 lw t9, -0x7d40(gp)            |     t9 = sym.imp.exit;
    0x0000b93c addiu a0, zero, 2             |     a0 = 2;
    0x0000b940 jalr t9                       |     t9 ();
                                             | label_0:
    0x0000b944 lw v0, 0x20(sp)               |     v0 = *(var_20h);
    0x0000b948 move v1, zero                 |     v1 = 0;
    0x0000b94c mtlo v0                       |     __asm ("mtlo v0");
    0x0000b950 lw a1, 0x1c(sp)               |     a1 = *(var_1ch_2);
    0x0000b954 mthi v1                       |     __asm ("mthi v1");
    0x0000b958 addiu a0, zero, 0x64          |     a0 = 0x64;
    0x0000b95c maddu a1, a0                  |     __asm ("maddu a1, a0");
    0x0000b960 mfhi v1                       |     __asm ("mfhi v1");
    0x0000b964 mflo v0                       |     __asm ("mflo v0");
    0x0000b968 lw t9, -0x7da8(gp)            |     t9 = sym.imp.fclose;
    0x0000b96c move a0, s0                   |     a0 = s0;
    0x0000b970 sw v1, 4(s3)                  |     *((s3 + 1)) = v1;
    0x0000b974 sw v0, (s3)                   |     *(s3) = v0;
    0x0000b978 jalr t9                       |     t9 ();
    0x0000b97c lw v1, 0xa4(sp)               |     v1 = *(var_a4h_2);
    0x0000b980 lw v0, (s1)                   |     v0 = *(s1);
    0x0000b984 lw gp, 0x10(sp)               |     gp = *(var_10h_3);
                                             |     if (v1 == v0) {
    0x0000b988 bne v1, v0, 0xb9ac            |         
    0x0000b98c lw ra, 0xbc(sp)               |         ra = *(var_bch_2);
    0x0000b990 lw s4, 0xb8(sp)               |         s4 = *(var_b8h_2);
    0x0000b994 lw s3, 0xb4(sp)               |         s3 = *(var_b4h_2);
    0x0000b998 lw s2, 0xb0(sp)               |         s2 = *(var_b0h_2);
    0x0000b99c lw s1, 0xac(sp)               |         s1 = *(var_ach_2);
    0x0000b9a0 lw s0, 0xa8(sp)               |         s0 = *(var_a8h_2);
    0x0000b9a4 addiu sp, sp, 0xc0            |         
    0x0000b9a8 jr ra                         |         return v1;
                                             |     }
    0x0000b9ac lw t9, -0x7cf0(gp)            |     t9 = sym.imp.__stack_chk_fail;
    0x0000b9b0 jalr t9                       |     t9 ();
    0x0000b9b4 nop                           |     
    0x0000b9b8 lui gp, 2                     |     
    0x0000b9bc addiu gp, gp, -0x1908         |     
    0x0000b9c0 addu gp, gp, t9               |     gp += t9;
    0x0000b9c4 addiu sp, sp, -0x30           |     
    0x0000b9c8 lw v0, 0x28(a1)               |     v0 = *((a1 + 10));
    0x0000b9cc sw s1, 0x1c(sp)               |     *(var_1ch_3) = s1;
    0x0000b9d0 move s1, a0                   |     s1 = a0;
    0x0000b9d4 lw a0, 0x28(a0)               |     a0 = *((a0 + 10));
    0x0000b9d8 lw t9, -0x7f18(gp)            |     t9 = *(gp);
    0x0000b9dc sw ra, 0x2c(sp)               |     *(var_2ch_2) = ra;
    0x0000b9e0 sw gp, 0x10(sp)               |     *(var_10h_4) = gp;
    0x0000b9e4 sw s4, 0x28(sp)               |     *(var_28h_2) = s4;
    0x0000b9e8 sw s3, 0x24(sp)               |     *(var_24h_2) = s3;
    0x0000b9ec sw s2, 0x20(sp)               |     *(var_20h_2) = s2;
    0x0000b9f0 sw s0, 0x18(sp)               |     *(var_18h) = s0;
    0x0000b9f4 subu a0, a0, v0               |     __asm ("subu a0, a0, v0");
    0x0000b9f8 move s2, a2                   |     s2 = a2;
    0x0000b9fc move s3, a3                   |     s3 = a3;
    0x0000ba00 move s0, a1                   |     s0 = a1;
    0x0000ba04 bal 0x10440                   |     fcn_00010440 ();
    0x0000ba08 lw gp, 0x10(sp)               |     gp = *(var_10h_4);
    0x0000ba0c move a0, s2                   |     a0 = s2;
    0x0000ba10 move a1, s3                   |     a1 = s3;
    0x0000ba14 lw t9, -0x7f34(gp)            |     t9 = *(gp);
    0x0000ba18 move s2, v0                   |     s2 = v0;
    0x0000ba1c move s3, v1                   |     s3 = v1;
    0x0000ba20 bal 0x104e0                   |     fcn_000104e0 ();
    0x0000ba24 lw gp, 0x10(sp)               |     gp = *(var_10h_4);
    0x0000ba28 move a2, v0                   |     a2 = v0;
    0x0000ba2c move a3, v1                   |     a3 = v1;
    0x0000ba30 lw t9, -0x7f30(gp)            |     t9 = *(gp);
    0x0000ba34 move a0, s2                   |     a0 = s2;
    0x0000ba38 move a1, s3                   |     a1 = s3;
    0x0000ba3c bal 0xf440                    |     fcn_0000f440 ();
    0x0000ba40 lw gp, 0x10(sp)               |     gp = *(var_10h_4);
    0x0000ba44 lw s4, 0x40(sp)               |     s4 = *(var_10h_3);
    0x0000ba48 move a1, v1                   |     a1 = v1;
    0x0000ba4c lw a0, -0x7fd4(gp)            |     a0 = *(gp);
    0x0000ba50 lw t9, -0x7f2c(gp)            |     t9 = *(gp);
    0x0000ba54 lw a2, 0x1530(a0)             |     a2 = *((a0 + 1356));
    0x0000ba58 lw a3, 0x1534(a0)             |     a3 = *((a0 + 1357));
    0x0000ba5c move a0, v0                   |     a0 = v0;
    0x0000ba60 bal 0xfea0                    |     fcn_0000fea0 ();
    0x0000ba64 lw a1, (s1)                   |     a1 = *(s1);
    0x0000ba68 lw a0, (s0)                   |     a0 = *(s0);
    0x0000ba6c lw gp, 0x10(sp)               |     gp = *(var_10h_4);
    0x0000ba70 sw v0, (s4)                   |     *(s4) = v0;
    0x0000ba74 sw v1, 4(s4)                  |     *((s4 + 1)) = v1;
    0x0000ba78 lw v0, 4(s1)                  |     v0 = *((s1 + 1));
    0x0000ba7c lw v1, 4(s0)                  |     v1 = *((s0 + 1));
                                             |     if (a1 == a0) {
    0x0000ba80 beq a1, a0, 0xbb7c            |         goto label_1;
                                             |     }
    0x0000ba84 subu a0, a1, a0               |     __asm ("subu a0, a1, a0");
                                             |     do {
    0x0000ba88 lw t9, -0x7f34(gp)            |         t9 = *(gp);
    0x0000ba8c sltu a1, a1, a0               |         a1 = (a1 < a0) ? 1 : 0;
    0x0000ba90 subu v0, v0, v1               |         __asm ("subu v0, v0, v1");
    0x0000ba94 subu a1, v0, a1               |         __asm ("subu a1, v0, a1");
    0x0000ba98 bal 0x104e0                   |         fcn_000104e0 ();
    0x0000ba9c lw a1, 0x20(s0)               |         a1 = *((s0 + 8));
    0x0000baa0 lw a0, 0x20(s1)               |         a0 = *((s1 + 8));
    0x0000baa4 lw a2, 0x24(s1)               |         a2 = *((s1 + 9));
    0x0000baa8 lw gp, 0x10(sp)               |         gp = *(var_10h_4);
    0x0000baac subu a0, a0, a1               |         __asm ("subu a0, a0, a1");
    0x0000bab0 lw a1, 0x24(s0)               |         a1 = *((s0 + 9));
    0x0000bab4 lw a3, 0x38(s1)               |         a3 = *((s1 + 14));
    0x0000bab8 addu a0, a0, a2               |         a0 += a2;
    0x0000babc subu a1, a0, a1               |         __asm ("subu a1, a0, a1");
    0x0000bac0 lw a2, 0x38(s0)               |         a2 = *((s0 + 14));
    0x0000bac4 addu a0, a1, a3               |         a0 = a1 + a3;
    0x0000bac8 lw t9, -0x7f18(gp)            |         t9 = *(gp);
    0x0000bacc subu a0, a0, a2               |         __asm ("subu a0, a0, a2");
    0x0000bad0 move s2, v0                   |         s2 = v0;
    0x0000bad4 move s3, v1                   |         s3 = v1;
    0x0000bad8 bal 0x10440                   |         fcn_00010440 ();
    0x0000badc lw gp, 0x10(sp)               |         gp = *(var_10h_4);
    0x0000bae0 move a2, s2                   |         a2 = s2;
    0x0000bae4 move a3, s3                   |         a3 = s3;
    0x0000bae8 lw t9, -0x7f30(gp)            |         t9 = *(gp);
    0x0000baec move a0, v0                   |         a0 = v0;
    0x0000baf0 move a1, v1                   |         a1 = v1;
    0x0000baf4 bal 0xf440                    |         fcn_0000f440 ();
    0x0000baf8 lw a1, 8(s0)                  |         a1 = *((s0 + 2));
    0x0000bafc lw a0, 8(s1)                  |         a0 = *((s1 + 2));
    0x0000bb00 lw a2, 0x10(s1)               |         a2 = *((s1 + 4));
    0x0000bb04 lw gp, 0x10(sp)               |         gp = *(var_10h_4);
    0x0000bb08 subu a0, a0, a1               |         __asm ("subu a0, a0, a1");
    0x0000bb0c lw a1, 0x10(s0)               |         a1 = *((s0 + 4));
    0x0000bb10 lw a3, 0x18(s1)               |         a3 = *((s1 + 6));
    0x0000bb14 addu a0, a0, a2               |         a0 += a2;
    0x0000bb18 subu a1, a0, a1               |         __asm ("subu a1, a0, a1");
    0x0000bb1c lw a2, 0x18(s0)               |         a2 = *((s0 + 6));
    0x0000bb20 addu a0, a1, a3               |         a0 = a1 + a3;
    0x0000bb24 lw t9, -0x7f18(gp)            |         t9 = *(gp);
    0x0000bb28 subu a0, a0, a2               |         __asm ("subu a0, a0, a2");
    0x0000bb2c sw v0, 8(s4)                  |         *((s4 + 2)) = v0;
    0x0000bb30 sw v1, 0xc(s4)                |         *((s4 + 3)) = v1;
    0x0000bb34 bal 0x10440                   |         fcn_00010440 ();
    0x0000bb38 lw gp, 0x10(sp)               |         gp = *(var_10h_4);
    0x0000bb3c move a2, s2                   |         a2 = s2;
    0x0000bb40 move a3, s3                   |         a3 = s3;
    0x0000bb44 lw t9, -0x7f30(gp)            |         t9 = *(gp);
    0x0000bb48 move a0, v0                   |         a0 = v0;
    0x0000bb4c move a1, v1                   |         a1 = v1;
    0x0000bb50 bal 0xf440                    |         fcn_0000f440 ();
    0x0000bb54 lw ra, 0x2c(sp)               |         ra = *(var_2ch_2);
    0x0000bb58 sw v0, 0x10(s4)               |         *((s4 + 4)) = v0;
    0x0000bb5c sw v1, 0x14(s4)               |         *((s4 + 5)) = v1;
    0x0000bb60 lw s3, 0x24(sp)               |         s3 = *(var_24h_2);
    0x0000bb64 lw s4, 0x28(sp)               |         s4 = *(var_28h_2);
    0x0000bb68 lw s2, 0x20(sp)               |         s2 = *(var_20h_2);
    0x0000bb6c lw s1, 0x1c(sp)               |         s1 = *(var_1ch_3);
    0x0000bb70 lw s0, 0x18(sp)               |         s0 = *(var_18h);
    0x0000bb74 addiu sp, sp, 0x30            |         
    0x0000bb78 jr ra                         |         return v1;
                                             | label_1:
    0x0000bb7c subu a0, a1, a0               |         __asm ("subu a0, a1, a0");
    0x0000bb80 bnel v0, v1, 0xba88           |         
                                             |     } while (v0 == v1);
    0x0000bb84 lw ra, 0x2c(sp)               |     ra = *(var_2ch_2);
    0x0000bb88 move v0, zero                 |     v0 = 0;
    0x0000bb8c move v1, zero                 |     v1 = 0;
    0x0000bb90 sw zero, 8(s4)                |     *((s4 + 2)) = 0;
    0x0000bb94 sw zero, 0xc(s4)              |     *((s4 + 3)) = 0;
    0x0000bb98 sw v0, 0x10(s4)               |     *((s4 + 4)) = v0;
    0x0000bb9c sw v1, 0x14(s4)               |     *((s4 + 5)) = v1;
    0x0000bba0 lw s3, 0x24(sp)               |     s3 = *(var_24h_2);
    0x0000bba4 lw s4, 0x28(sp)               |     s4 = *(var_28h_2);
    0x0000bba8 lw s2, 0x20(sp)               |     s2 = *(var_20h_2);
    0x0000bbac lw s1, 0x1c(sp)               |     s1 = *(var_1ch_3);
    0x0000bbb0 lw s0, 0x18(sp)               |     s0 = *(var_18h);
    0x0000bbb4 addiu sp, sp, 0x30            |     
    0x0000bbb8 jr ra                         |     return v1;
                                             | }
    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0x3068 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) sym.usage ()                 | void usage () {
    0x00003068 lui gp, 2                 |     
    0x0000306c addiu gp, gp, 0x7048      |     
    0x00003070 addu gp, gp, t9           |     gp += t9;
    0x00003074 addiu sp, sp, -0x20       |     
    0x00003078 lw a2, -0x7fd4(gp)        |     a2 = *(gp);
    0x0000307c sw s0, 0x18(sp)           |     *(var_18h) = s0;
    0x00003080 lw s0, -0x7ccc(gp)        |     s0 = *((gp - 7987));
    0x00003084 lw t9, -0x7db0(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00003088 move a3, a0               |     a3 = a0;
    0x0000308c lw a0, (s0)               |     a0 = *(s0);
    0x00003090 sw gp, 0x10(sp)           |     *(var_10h) = gp;
    0x00003094 sw ra, 0x1c(sp)           |     *(var_1ch) = ra;
                                         |     /* str.Usage:__s___options______interval_____count_________e__program___args____n */
    0x00003098 addiu a2, a2, 0xc44       |     a2 += 0xc44;
    0x0000309c addiu a1, zero, 1         |     a1 = 1;
    0x000030a0 jalr t9                   |     t9 ();
    0x000030a4 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x000030a8 lw a3, (s0)               |     a3 = *(s0);
    0x000030ac addiu a2, zero, 0x10c     |     a2 = 0x10c;
    0x000030b0 lw a0, -0x7fd4(gp)        |     a0 = *(gp);
    0x000030b4 lw t9, -0x7d14(gp)        |     t9 = sym.imp.fwrite;
                                         |     /* str.Options_are:_n___d______H______h______I______l______R______r______s______t______U____username______n___u______V______v______w______C__command_______G__process_name____n___p___pid____...___SELF__ALL_______T__TASK__CHILD__ALL____n____dec_0__1__2________human___n */
    0x000030b8 addiu a0, a0, 0xc90       |     a0 += 0xc90;
    0x000030bc addiu a1, zero, 1         |     a1 = 1;
    0x000030c0 jalr t9                   |     t9 ();
    0x000030c4 lw gp, 0x10(sp)           |     gp = *(var_10h);
    0x000030c8 lw t9, -0x7d40(gp)        |     t9 = sym.imp.exit;
    0x000030cc addiu a0, zero, 1         |     a0 = 1;
    0x000030d0 jalr t9                   |     t9 ();
    0x000030d4 lui gp, 2                 |     
    0x000030d8 addiu gp, gp, 0x6fdc      |     
    0x000030dc addu gp, gp, t9           |     gp += t9;
    0x000030e0 lw a0, -0x7fd0(gp)        |     a0 = *(gp);
    0x000030e4 lw t9, -0x7d64(gp)        |     t9 = sym.imp.memset;
    0x000030e8 addiu a2, zero, 0x2110    |     a2 = aav.0x00002110;
    0x000030ec move a1, zero             |     a1 = 0;
    0x000030f0 jr t9                     |     return t9 ();
                                         | }

[*] Function fprintf used 5 times pidstat