[*] Binary protection state of mpstat

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


[*] Function fprintf tear down of mpstat

    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/mpstat @ 0x9370 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) sym.get_proc_cpu_nr ()       | void get_proc_cpu_nr () {
    0x00009370 lui gp, 2                 |     
    0x00009374 addiu gp, gp, -0x22c0     |     
    0x00009378 addu gp, gp, t9           |     gp += t9;
    0x0000937c addiu sp, sp, -0x58       |     
    0x00009380 lw a1, -0x7fd4(gp)        |     a1 = *((gp - 8181));
    0x00009384 sw s5, 0x4c(sp)           |     *(var_4ch) = s5;
    0x00009388 lw s5, -0x7d3c(gp)        |     s5 = *((gp - 8015));
    0x0000938c sw s0, 0x38(sp)           |     *(var_38h) = s0;
    0x00009390 lw s0, -0x7fd4(gp)        |     s0 = *((gp - 8181));
    0x00009394 lw v0, (s5)               |     v0 = *(s5);
    0x00009398 lw t9, -0x7d2c(gp)        |     t9 = sym.imp.fopen;
    0x0000939c sw gp, 0x18(sp)           |     *(var_18h) = gp;
    0x000093a0 sw ra, 0x54(sp)           |     *(var_54h) = ra;
    0x000093a4 sw s6, 0x50(sp)           |     *(var_50h) = s6;
    0x000093a8 sw s4, 0x48(sp)           |     *(var_48h) = s4;
    0x000093ac sw s3, 0x44(sp)           |     *(var_44h) = s3;
    0x000093b0 sw s2, 0x40(sp)           |     *(var_40h) = s2;
    0x000093b4 sw s1, 0x3c(sp)           |     *(var_3ch) = s1;
    0x000093b8 addiu a1, a1, -0x1d44     |     a1 += -0x1d44;
    0x000093bc addiu a0, s0, -0x2018     |     a0 = s0 + -0x2018;
    0x000093c0 sw v0, 0x34(sp)           |     *(var_34h) = v0;
    0x000093c4 jalr t9                   |     t9 ();
    0x000093c8 nop                       |     
    0x000093cc lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 == 0) {
    0x000093d0 beqz v0, 0x94d0           |         goto label_2;
                                         |     }
    0x000093d4 lw s2, -0x7fd4(gp)        |     s2 = *((gp - 8181));
    0x000093d8 lw s3, -0x7fd4(gp)        |     s3 = *((gp - 8181));
    0x000093dc lw s6, -0x7fd4(gp)        |     s6 = *((gp - 8181));
    0x000093e0 move s1, v0               |     s1 = v0;
    0x000093e4 addiu s4, zero, -1        |     s4 = -1;
    0x000093e8 addiu s0, sp, 0x24        |     s0 = sp + 0x24;
    0x000093ec addiu s2, s2, -0x1ff8     |     s2 += -0x1ff8;
    0x000093f0 addiu s3, s3, -0x25a0     |     s3 += -0x25a0;
                                         |     do {
                                         | label_0:
    0x000093f4 lw t9, -0x7d40(gp)        |         t9 = sym.imp.fgets;
    0x000093f8 move a2, s1               |         a2 = s1;
    0x000093fc addiu a1, zero, 0x10      |         a1 = 0x10;
    0x00009400 move a0, s0               |         a0 = s0;
    0x00009404 jalr t9                   |         t9 ();
    0x00009408 lw gp, 0x18(sp)           |         gp = *(var_18h);
                                         |         if (v0 == 0) {
    0x0000940c beqz v0, 0x9488           |             goto label_3;
                                         |         }
                                         | label_1:
    0x00009410 lw t9, -0x7dfc(gp)        |         t9 = sym.imp.strncmp;
    0x00009414 addiu a2, zero, 4         |         a2 = 4;
    0x00009418 move a1, s2               |         a1 = s2;
    0x0000941c move a0, s0               |         a0 = s0;
    0x00009420 jalr t9                   |         t9 ();
    0x00009424 lw gp, 0x18(sp)           |         gp = *(var_18h);
    0x00009428 beqz v0, 0x93f4           |         
                                         |     } while (v0 == 0);
    0x0000942c lw t9, -0x7dfc(gp)        |     t9 = sym.imp.strncmp;
    0x00009430 addiu a2, zero, 3         |     a2 = 3;
    0x00009434 move a1, s3               |     a1 = s3;
    0x00009438 move a0, s0               |     a0 = s0;
    0x0000943c jalr t9                   |     t9 ();
    0x00009440 lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 != 0) {
    0x00009444 bnez v0, 0x93f4           |         goto label_0;
                                         |     }
    0x00009448 lw t9, -0x7dac(gp)        |     t9 = sym.imp.__isoc99_sscanf;
    0x0000944c addiu a2, sp, 0x20        |     a2 = sp + 0x20;
    0x00009450 addiu a1, s6, -0x24f4     |     a1 = s6 + -0x24f4;
    0x00009454 addiu a0, sp, 0x27        |     a0 = sp + 0x27;
    0x00009458 jalr t9                   |     t9 ();
    0x0000945c lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00009460 lw v0, 0x20(sp)           |     v0 = *(var_20h_2);
    0x00009464 move a2, s1               |     a2 = s1;
    0x00009468 lw t9, -0x7d40(gp)        |     t9 = sym.imp.fgets;
    0x0000946c slt v1, s4, v0            |     v1 = (s4 < v0) ? 1 : 0;
    0x00009470 addiu a1, zero, 0x10      |     a1 = 0x10;
    0x00009474 move a0, s0               |     a0 = s0;
                                         |     if (v1 == 0) {
    0x00009478 movn s4, v0, v1           |         s4 = v0;
                                         |     }
    0x0000947c jalr t9                   |     t9 ();
    0x00009480 lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 != 0) {
    0x00009484 bnez v0, 0x9410           |         goto label_1;
                                         |     }
                                         | label_3:
    0x00009488 lw t9, -0x7de8(gp)        |     t9 = sym.imp.fclose;
    0x0000948c move a0, s1               |     a0 = s1;
    0x00009490 jalr t9                   |     t9 ();
    0x00009494 lw a0, 0x34(sp)           |     a0 = *(var_34h);
    0x00009498 lw v1, (s5)               |     v1 = *(s5);
    0x0000949c lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x000094a0 addiu v0, s4, 1           |     v0 = s4 + 1;
                                         |     if (a0 == v1) {
    0x000094a4 bne a0, v1, 0x9524        |         
    0x000094a8 lw ra, 0x54(sp)           |         ra = *(var_54h);
    0x000094ac lw s6, 0x50(sp)           |         s6 = *(var_50h);
    0x000094b0 lw s5, 0x4c(sp)           |         s5 = *(var_4ch);
    0x000094b4 lw s4, 0x48(sp)           |         s4 = *(var_48h);
    0x000094b8 lw s3, 0x44(sp)           |         s3 = *(var_44h);
    0x000094bc lw s2, 0x40(sp)           |         s2 = *(var_40h);
    0x000094c0 lw s1, 0x3c(sp)           |         s1 = *(var_3ch);
    0x000094c4 lw s0, 0x38(sp)           |         s0 = *(var_38h);
    0x000094c8 addiu sp, sp, 0x58        |         
    0x000094cc jr ra                     |         return v0;
                                         | label_2:
    0x000094d0 lw v0, -0x7d30(gp)        |         v0 = *(gp);
    0x000094d4 lw t9, -0x7db8(gp)        |         t9 = sym.imp.__errno_location;
    0x000094d8 lw s1, (v0)               |         s1 = *(v0);
    0x000094dc jalr t9                   |         t9 ();
    0x000094e0 lw gp, 0x18(sp)           |         gp = *(var_18h);
    0x000094e4 lw t9, -0x7d84(gp)        |         t9 = sym.imp.strerror;
    0x000094e8 lw a0, (v0)               |         a0 = *(v0);
    0x000094ec jalr t9                   |         t9 ();
    0x000094f0 lw gp, 0x18(sp)           |         gp = *(var_18h);
    0x000094f4 move a0, s1               |         a0 = s1;
    0x000094f8 sw v0, 0x10(sp)           |         *(var_10h) = v0;
    0x000094fc lw a2, -0x7fd4(gp)        |         a2 = *((gp - 8181));
    0x00009500 lw t9, -0x7df0(gp)        |         t9 = sym.imp.__fprintf_chk
    0x00009504 addiu a3, s0, -0x2018     |         a3 = s0 + -0x2018;
    0x00009508 addiu a2, a2, -0x200c     |         a2 += -0x200c;
    0x0000950c addiu a1, zero, 1         |         a1 = 1;
    0x00009510 jalr t9                   |         t9 ();
    0x00009514 lw gp, 0x18(sp)           |         gp = *(var_18h);
    0x00009518 lw t9, -0x7d8c(gp)        |         t9 = sym.imp.exit;
    0x0000951c addiu a0, zero, 1         |         a0 = 1;
    0x00009520 jalr t9                   |         t9 ();
                                         |     }
    0x00009524 lw t9, -0x7d50(gp)        |     t9 = sym.imp.__stack_chk_fail;
    0x00009528 jalr t9                   |     t9 ();
    0x0000952c nop                       |     
                                         | }
    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/mpstat @ 0x80a0 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) sym.read_stat_cpu ()         | void read_stat_cpu () {
    0x000080a0 lui gp, 2                 |     
    0x000080a4 addiu gp, gp, -0xff0      |     
    0x000080a8 addu gp, gp, t9           |     gp += t9;
    0x000080ac lw v0, -0x7d3c(gp)        |     v0 = *((gp - 8015));
    0x000080b0 addiu sp, sp, -0x20d0     |     
    0x000080b4 lw t9, -0x7d2c(gp)        |     t9 = sym.imp.fopen;
    0x000080b8 sw s5, 0x20bc(sp)         |     *(arg_20bch) = s5;
    0x000080bc sw s2, 0x20b0(sp)         |     *(arg_20b0h) = s2;
    0x000080c0 sw v0, 0x44(sp)           |     *(arg_44h) = v0;
    0x000080c4 lw s2, -0x7fd4(gp)        |     s2 = *((gp - 8181));
    0x000080c8 lw v0, (v0)               |     v0 = *(v0);
    0x000080cc move s5, a1               |     s5 = a1;
    0x000080d0 lw a1, -0x7fd4(gp)        |     a1 = *((gp - 8181));
    0x000080d4 sw gp, 0x38(sp)           |     *(arg_38h) = gp;
    0x000080d8 sw s0, 0x20a8(sp)         |     *(arg_20a8h) = s0;
    0x000080dc sw ra, 0x20cc(sp)         |     *(arg_20cch) = ra;
    0x000080e0 sw fp, 0x20c8(sp)         |     *(arg_20c8h) = fp;
    0x000080e4 sw s7, 0x20c4(sp)         |     *(arg_20c4h) = s7;
    0x000080e8 sw s6, 0x20c0(sp)         |     *(arg_20c0h) = s6;
    0x000080ec sw s4, 0x20b8(sp)         |     *(arg_20b8h) = s4;
    0x000080f0 sw s3, 0x20b4(sp)         |     *(arg_20b4h) = s3;
    0x000080f4 sw s1, 0x20ac(sp)         |     *(arg_20ach) = s1;
    0x000080f8 move s0, a0               |     s0 = a0;
    0x000080fc addiu a1, a1, -0x1d44     |     a1 += -0x1d44;
    0x00008100 addiu a0, s2, -0x2018     |     a0 = s2 + -0x2018;
    0x00008104 sw v0, 0x20a4(sp)         |     *(arg_20a4h) = v0;
    0x00008108 jalr t9                   |     t9 ();
    0x0000810c nop                       |     
    0x00008110 lw gp, 0x38(sp)           |     gp = *(arg_38h);
                                         |     if (v0 == 0) {
    0x00008114 beqz v0, 0x8390           |         goto label_4;
                                         |     }
    0x00008118 move s1, v0               |     s1 = v0;
    0x0000811c lw s2, -0x7fd4(gp)        |     s2 = *((gp - 8181));
    0x00008120 lw v0, -0x7fd4(gp)        |     v0 = *((gp - 8181));
    0x00008124 lw s4, -0x7fd4(gp)        |     s4 = *((gp - 8181));
    0x00008128 lw s6, -0x7fd4(gp)        |     s6 = *((gp - 8181));
    0x0000812c sw v0, 0x40(sp)           |     *(arg_40h) = v0;
    0x00008130 move s3, zero             |     s3 = 0;
    0x00008134 addiu s7, sp, 0xa4        |     s7 = sp + 0xa4;
    0x00008138 addiu s2, s2, -0x1ff8     |     s2 += -0x1ff8;
    0x0000813c addiu s4, s4, -0x25a0     |     s4 += -0x25a0;
    0x00008140 addiu fp, sp, 0x50        |     fp = sp + 0x50;
    0x00008144 addiu s6, s6, -0x1ff0     |     s6 += -0x1ff0;
                                         |     do {
    0x00008148 lw t9, -0x7d40(gp)        |         t9 = sym.imp.fgets;
                                         | label_0:
    0x0000814c move a2, s1               |         a2 = s1;
    0x00008150 addiu a1, zero, 0x2000    |         a1 = main;
    0x00008154 move a0, s7               |         a0 = s7;
    0x00008158 jalr t9                   |         t9 ();
    0x0000815c lw gp, 0x38(sp)           |         gp = *(arg_38h);
                                         |         if (v0 == 0) {
    0x00008160 beqz v0, 0x8298           |             goto label_3;
                                         |         }
                                         | label_1:
    0x00008164 lw t9, -0x7dfc(gp)        |         t9 = sym.imp.strncmp;
    0x00008168 addiu a2, zero, 4         |         a2 = 4;
    0x0000816c move a1, s2               |         a1 = s2;
    0x00008170 move a0, s7               |         a0 = s7;
    0x00008174 jalr t9                   |         t9 ();
    0x00008178 lw gp, 0x38(sp)           |         gp = *(arg_38h);
                                         |         if (v0 == 0) {
    0x0000817c beqz v0, 0x82ec           |             goto label_5;
                                         |         }
    0x00008180 lw t9, -0x7dfc(gp)        |         t9 = sym.imp.strncmp;
    0x00008184 addiu a2, zero, 3         |         a2 = 3;
    0x00008188 move a1, s4               |         a1 = s4;
    0x0000818c move a0, s7               |         a0 = s7;
    0x00008190 jalr t9                   |         t9 ();
    0x00008194 lw gp, 0x38(sp)           |         gp = *(arg_38h);
    0x00008198 bnez v0, 0x8148           |         
                                         |     } while (v0 != 0);
    0x0000819c lw t9, -0x7db0(gp)        |     t9 = sym.imp.memset;
    0x000081a0 addiu a2, zero, 0x50      |     a2 = 0x50;
    0x000081a4 move a1, zero             |     a1 = 0;
    0x000081a8 move a0, fp               |     a0 = fp;
    0x000081ac jalr t9                   |     t9 ();
    0x000081b0 addiu v0, sp, 0x98        |     v0 = sp + 0x98;
    0x000081b4 sw v0, 0x30(sp)           |     *(arg_30h) = v0;
    0x000081b8 addiu v0, sp, 0x90        |     v0 = sp + 0x90;
    0x000081bc sw v0, 0x2c(sp)           |     *(arg_2ch) = v0;
    0x000081c0 addiu v0, sp, 0x78        |     v0 = sp + 0x78;
    0x000081c4 sw v0, 0x28(sp)           |     *(arg_28h) = v0;
    0x000081c8 addiu v0, sp, 0x88        |     v0 = sp + 0x88;
    0x000081cc sw v0, 0x24(sp)           |     *(arg_24h) = v0;
    0x000081d0 addiu v0, sp, 0x80        |     v0 = sp + 0x80;
    0x000081d4 sw v0, 0x20(sp)           |     *(arg_20h) = v0;
    0x000081d8 addiu v0, sp, 0x70        |     v0 = sp + 0x70;
    0x000081dc sw v0, 0x1c(sp)           |     *(arg_1ch) = v0;
    0x000081e0 addiu v0, sp, 0x68        |     v0 = sp + 0x68;
    0x000081e4 lw gp, 0x38(sp)           |     gp = *(arg_38h);
    0x000081e8 sw v0, 0x18(sp)           |     *(arg_18h) = v0;
    0x000081ec addiu v0, sp, 0x60        |     v0 = sp + 0x60;
    0x000081f0 sw v0, 0x14(sp)           |     *(arg_14h) = v0;
    0x000081f4 addiu v0, sp, 0x58        |     v0 = sp + 0x58;
    0x000081f8 sw v0, 0x10(sp)           |     *(arg_10h) = v0;
    0x000081fc lw v0, 0x40(sp)           |     v0 = *(arg_40h);
    0x00008200 lw t9, -0x7dac(gp)        |     t9 = sym.imp.__isoc99_sscanf;
    0x00008204 addiu a0, sp, 0xa7        |     a0 = sp + 0xa7;
    0x00008208 move a3, fp               |     a3 = fp;
    0x0000820c addiu a2, sp, 0x4c        |     a2 = sp + 0x4c;
    0x00008210 addiu a1, v0, -0x1fbc     |     a1 = v0 + -sym._init;
    0x00008214 jalr t9                   |     t9 ();
    0x00008218 lw t4, 0x4c(sp)           |     t4 = *(arg_4ch);
    0x0000821c addiu a0, t4, 1           |     a0 = t4 + 1;
    0x00008220 slt v0, a0, s5            |     v0 = (a0 < s5) ? 1 : 0;
    0x00008224 lw gp, 0x38(sp)           |     gp = *(arg_38h);
                                         |     if (v0 == 0) {
    0x00008228 beqz v0, 0x837c           |         goto label_6;
                                         |     }
    0x0000822c sll v0, a0, 2             |     v0 = a0 << 2;
    0x00008230 addu v0, v0, a0           |     v0 += a0;
    0x00008234 sll v0, v0, 4             |     v0 <<= 4;
    0x00008238 move v1, fp               |     v1 = fp;
    0x0000823c addu v0, s0, v0           |     v0 = s0 + v0;
    0x00008240 addiu t3, sp, 0xa0        |     t3 = sp + 0xa0;
                                         |     do {
    0x00008244 lw t2, (v1)               |         t2 = *(v1);
    0x00008248 lw a3, 4(v1)              |         a3 = *((v1 + 1));
    0x0000824c lw a2, 8(v1)              |         a2 = *((v1 + 2));
    0x00008250 lw a1, 0xc(v1)            |         a1 = *((v1 + 3));
    0x00008254 addiu v1, v1, 0x10        |         v1 += 0x10;
    0x00008258 sw t2, (v0)               |         *(v0) = t2;
    0x0000825c sw a3, 4(v0)              |         *((v0 + 1)) = a3;
    0x00008260 sw a2, 8(v0)              |         *((v0 + 2)) = a2;
    0x00008264 sw a1, 0xc(v0)            |         *((v0 + 3)) = a1;
    0x00008268 addiu v0, v0, 0x10        |         v0 += 0x10;
    0x0000826c bne v1, t3, 0x8244        |         
                                         |     } while (v1 != t3);
    0x00008270 slt a0, a0, s3            |     a0 = (a0 < s3) ? 1 : 0;
    0x00008274 lw t9, -0x7d40(gp)        |     t9 = sym.imp.fgets;
                                         |     if (a0 != 0) {
    0x00008278 bnez a0, 0x814c           |         goto label_0;
                                         |     }
    0x0000827c move a2, s1               |     a2 = s1;
    0x00008280 addiu a1, zero, 0x2000    |     a1 = main;
    0x00008284 move a0, s7               |     a0 = s7;
    0x00008288 addiu s3, t4, 2           |     s3 = t4 + 2;
    0x0000828c jalr t9                   |     t9 ();
    0x00008290 lw gp, 0x38(sp)           |     gp = *(arg_38h);
                                         |     if (v0 != 0) {
    0x00008294 bnez v0, 0x8164           |         goto label_1;
                                         |     }
                                         | label_3:
    0x00008298 lw t9, -0x7de8(gp)        |     t9 = sym.imp.fclose;
                                         | label_2:
    0x0000829c move a0, s1               |     a0 = s1;
    0x000082a0 jalr t9                   |     t9 ();
    0x000082a4 lw v0, 0x44(sp)           |     v0 = *(arg_44h);
    0x000082a8 lw a0, 0x20a4(sp)         |     a0 = *(arg_20a4h);
    0x000082ac lw gp, 0x38(sp)           |     gp = *(arg_38h);
    0x000082b0 lw v1, (v0)               |     v1 = *(v0);
    0x000082b4 move v0, s3               |     v0 = s3;
                                         |     if (a0 != v1) {
    0x000082b8 bne a0, v1, 0x8384        |         goto label_7;
                                         |     }
    0x000082bc lw ra, 0x20cc(sp)         |     ra = *(arg_20cch);
    0x000082c0 lw fp, 0x20c8(sp)         |     fp = *(arg_20c8h);
    0x000082c4 lw s7, 0x20c4(sp)         |     s7 = *(arg_20c4h);
    0x000082c8 lw s6, 0x20c0(sp)         |     s6 = *(arg_20c0h);
    0x000082cc lw s5, 0x20bc(sp)         |     s5 = *(arg_20bch);
    0x000082d0 lw s4, 0x20b8(sp)         |     s4 = *(arg_20b8h);
    0x000082d4 lw s3, 0x20b4(sp)         |     s3 = *(arg_20b4h);
    0x000082d8 lw s2, 0x20b0(sp)         |     s2 = *(arg_20b0h);
    0x000082dc lw s1, 0x20ac(sp)         |     s1 = *(arg_20ach);
    0x000082e0 lw s0, 0x20a8(sp)         |     s0 = *(arg_20a8h);
    0x000082e4 addiu sp, sp, 0x20d0      |     
    0x000082e8 jr ra                     |     return v0;
                                         | label_5:
    0x000082ec lw t9, -0x7db0(gp)        |     t9 = sym.imp.memset;
    0x000082f0 addiu a2, zero, 0x50      |     a2 = 0x50;
    0x000082f4 move a1, zero             |     a1 = 0;
    0x000082f8 move a0, s0               |     a0 = s0;
    0x000082fc jalr t9                   |     t9 ();
    0x00008300 lw gp, 0x38(sp)           |     gp = *(arg_38h);
    0x00008304 addiu t3, s0, 0x48        |     t3 = s0 + 0x48;
    0x00008308 addiu t2, s0, 0x40        |     t2 = s0 + 0x40;
    0x0000830c lw t9, -0x7dac(gp)        |     t9 = sym.imp.__isoc99_sscanf;
    0x00008310 addiu a3, s0, 0x28        |     a3 = s0 + 0x28;
    0x00008314 addiu a2, s0, 0x38        |     a2 = s0 + 0x38;
    0x00008318 addiu a1, s0, 0x30        |     a1 = s0 + 0x30;
    0x0000831c addiu a0, s0, 0x20        |     a0 = s0 + 0x20;
    0x00008320 addiu v1, s0, 0x18        |     v1 = s0 + 0x18;
    0x00008324 addiu v0, s0, 0x10        |     v0 = s0 + 0x10;
    0x00008328 sw a3, 0x24(sp)           |     *(arg_24h) = a3;
    0x0000832c sw a2, 0x20(sp)           |     *(arg_20h) = a2;
    0x00008330 sw a1, 0x1c(sp)           |     *(arg_1ch) = a1;
    0x00008334 sw a0, 0x18(sp)           |     *(arg_18h) = a0;
    0x00008338 sw t3, 0x2c(sp)           |     *(arg_2ch) = t3;
    0x0000833c sw t2, 0x28(sp)           |     *(arg_28h) = t2;
    0x00008340 sw v1, 0x14(sp)           |     *(arg_14h) = v1;
    0x00008344 sw v0, 0x10(sp)           |     *(arg_10h) = v0;
    0x00008348 addiu a3, s0, 8           |     a3 = s0 + 8;
    0x0000834c move a2, s0               |     a2 = s0;
    0x00008350 move a1, s6               |     a1 = s6;
    0x00008354 addiu a0, sp, 0xa9        |     a0 = sp + 0xa9;
    0x00008358 jalr t9                   |     t9 ();
    0x0000835c lw gp, 0x38(sp)           |     gp = *(arg_38h);
                                         |     if (s3 == 0) {
    0x00008360 bnez s3, 0x8368           |         
    0x00008364 addiu s3, zero, 1         |         s3 = 1;
                                         |     }
    0x00008368 addiu v0, zero, 1         |     v0 = 1;
    0x0000836c lw t9, -0x7d40(gp)        |     t9 = sym.imp.fgets;
                                         |     if (s5 == v0) {
    0x00008370 bnel s5, v0, 0x814c       |         goto label_0;
                                         |     }
    0x00008374 lw t9, -0x7de8(gp)        |     t9 = sym.imp.fclose;
    0x00008378 b 0x829c                  |     goto label_2;
                                         | label_6:
    0x0000837c addiu s3, zero, -1        |     s3 = -1;
    0x00008380 b 0x8298                  |     goto label_3;
                                         | label_7:
    0x00008384 lw t9, -0x7d50(gp)        |     t9 = sym.imp.__stack_chk_fail;
    0x00008388 jalr t9                   |     t9 ();
    0x0000838c nop                       |     
                                         | label_4:
    0x00008390 lw v0, -0x7d30(gp)        |     v0 = *(gp);
    0x00008394 lw t9, -0x7db8(gp)        |     t9 = sym.imp.__errno_location;
    0x00008398 lw s0, (v0)               |     s0 = *(v0);
    0x0000839c jalr t9                   |     t9 ();
    0x000083a0 lw gp, 0x38(sp)           |     gp = *(arg_38h);
    0x000083a4 lw t9, -0x7d84(gp)        |     t9 = sym.imp.strerror;
    0x000083a8 lw a0, (v0)               |     a0 = *(v0);
    0x000083ac jalr t9                   |     t9 ();
    0x000083b0 lw gp, 0x38(sp)           |     gp = *(arg_38h);
    0x000083b4 move a0, s0               |     a0 = s0;
    0x000083b8 sw v0, 0x10(sp)           |     *(arg_10h) = v0;
    0x000083bc lw a2, -0x7fd4(gp)        |     a2 = *((gp - 8181));
    0x000083c0 lw t9, -0x7df0(gp)        |     t9 = sym.imp.__fprintf_chk
    0x000083c4 addiu a3, s2, -0x2018     |     a3 = s2 + -0x2018;
    0x000083c8 addiu a2, a2, -0x200c     |     a2 += -0x200c;
    0x000083cc addiu a1, zero, 1         |     a1 = 1;
    0x000083d0 jalr t9                   |     t9 ();
    0x000083d4 lw gp, 0x38(sp)           |     gp = *(arg_38h);
    0x000083d8 lw t9, -0x7d8c(gp)        |     t9 = sym.imp.exit;
    0x000083dc addiu a0, zero, 2         |     a0 = 2;
    0x000083e0 jalr t9                   |     return t9 ();
                                         | }
    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/mpstat @ 0x8aa8 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) sym.read_uptime ()           | void read_uptime () {
    0x00008aa8 lui gp, 2                 |     
    0x00008aac addiu gp, gp, -0x19f8     |     
    0x00008ab0 addu gp, gp, t9           |     gp += t9;
    0x00008ab4 addiu sp, sp, -0xc0       |     
    0x00008ab8 lw a1, -0x7fd4(gp)        |     a1 = *((gp - 8181));
    0x00008abc sw s1, 0xac(sp)           |     *(var_ach_2) = s1;
    0x00008ac0 lw s1, -0x7d3c(gp)        |     s1 = *((gp - 8015));
    0x00008ac4 sw s2, 0xb0(sp)           |     *(var_b0h_2) = s2;
    0x00008ac8 lw s2, -0x7fd4(gp)        |     s2 = *((gp - 8181));
    0x00008acc lw v0, (s1)               |     v0 = *(s1);
    0x00008ad0 lw t9, -0x7d2c(gp)        |     t9 = sym.imp.fopen;
    0x00008ad4 sw gp, 0x10(sp)           |     *(var_10h_2) = gp;
    0x00008ad8 sw s3, 0xb4(sp)           |     *(var_b4h_2) = s3;
    0x00008adc sw ra, 0xbc(sp)           |     *(var_bch_2) = ra;
    0x00008ae0 sw s4, 0xb8(sp)           |     *(var_b8h_2) = s4;
    0x00008ae4 sw s0, 0xa8(sp)           |     *(var_a8h_2) = s0;
    0x00008ae8 move s3, a0               |     s3 = a0;
    0x00008aec addiu a1, a1, -0x1d44     |     a1 += -0x1d44;
    0x00008af0 addiu a0, s2, -0x1ea8     |     a0 = s2 + -0x1ea8;
    0x00008af4 sw v0, 0xa4(sp)           |     *(var_a4h_2) = v0;
    0x00008af8 jalr t9                   |     t9 ();
    0x00008afc nop                       |     
    0x00008b00 lw gp, 0x10(sp)           |     gp = *(var_10h_2);
                                         |     if (v0 != 0) {
    0x00008b04 beqz v0, 0x8b64           |         
    0x00008b08 lw t9, -0x7d40(gp)        |         t9 = sym.imp.fgets;
    0x00008b0c addiu s4, sp, 0x24        |         s4 = sp + 0x24;
    0x00008b10 move a2, v0               |         a2 = v0;
    0x00008b14 addiu a1, zero, 0x80      |         a1 = 0x80;
    0x00008b18 move a0, s4               |         a0 = s4;
    0x00008b1c move s0, v0               |         s0 = v0;
    0x00008b20 jalr t9                   |         t9 ();
    0x00008b24 lw gp, 0x10(sp)           |         gp = *(var_10h_2);
                                         |         if (v0 != 0) {
    0x00008b28 beqz v0, 0x8b54           |             
    0x00008b2c lw a1, -0x7fd4(gp)        |             a1 = *((gp - 8181));
    0x00008b30 lw t9, -0x7dac(gp)        |             t9 = sym.imp.__isoc99_sscanf;
    0x00008b34 addiu a3, sp, 0x20        |             a3 = sp + 0x20;
    0x00008b38 addiu a2, sp, 0x1c        |             a2 = sp + 0x1c;
    0x00008b3c addiu a1, a1, -0x1e98     |             a1 += -0x1e98;
    0x00008b40 move a0, s4               |             a0 = s4;
    0x00008b44 jalr t9                   |             t9 ();
    0x00008b48 addiu v1, zero, 2         |             v1 = 2;
    0x00008b4c lw gp, 0x10(sp)           |             gp = *(var_10h_2);
                                         |             if (v0 == v1) {
    0x00008b50 beq v0, v1, 0x8b94        |                 goto label_0;
                                         |             }
                                         |         }
    0x00008b54 lw t9, -0x7de8(gp)        |         t9 = sym.imp.fclose;
    0x00008b58 move a0, s0               |         a0 = s0;
    0x00008b5c jalr t9                   |         t9 ();
    0x00008b60 lw gp, 0x10(sp)           |         gp = *(var_10h_2);
                                         |     }
    0x00008b64 lw v0, -0x7d30(gp)        |     v0 = *(gp);
    0x00008b68 lw a2, -0x7fd4(gp)        |     a2 = *((gp - 8181));
    0x00008b6c lw t9, -0x7df0(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00008b70 lw a0, (v0)               |     a0 = *(v0);
    0x00008b74 addiu a3, s2, -0x1ea8     |     a3 = s2 + -0x1ea8;
    0x00008b78 addiu a2, a2, -0x1e90     |     a2 += -0x1e90;
    0x00008b7c addiu a1, zero, 1         |     a1 = 1;
    0x00008b80 jalr t9                   |     t9 ();
    0x00008b84 lw gp, 0x10(sp)           |     gp = *(var_10h_2);
    0x00008b88 lw t9, -0x7d8c(gp)        |     t9 = sym.imp.exit;
    0x00008b8c addiu a0, zero, 2         |     a0 = 2;
    0x00008b90 jalr t9                   |     t9 ();
                                         | label_0:
    0x00008b94 lw v0, 0x20(sp)           |     v0 = *(var_20h);
    0x00008b98 move v1, zero             |     v1 = 0;
    0x00008b9c mtlo v0                   |     __asm ("mtlo v0");
    0x00008ba0 lw a1, 0x1c(sp)           |     a1 = *(var_1ch);
    0x00008ba4 mthi v1                   |     __asm ("mthi v1");
    0x00008ba8 addiu a0, zero, 0x64      |     a0 = 0x64;
    0x00008bac maddu a1, a0              |     __asm ("maddu a1, a0");
    0x00008bb0 mfhi v1                   |     __asm ("mfhi v1");
    0x00008bb4 mflo v0                   |     __asm ("mflo v0");
    0x00008bb8 lw t9, -0x7de8(gp)        |     t9 = sym.imp.fclose;
    0x00008bbc move a0, s0               |     a0 = s0;
    0x00008bc0 sw v1, 4(s3)              |     *((s3 + 1)) = v1;
    0x00008bc4 sw v0, (s3)               |     *(s3) = v0;
    0x00008bc8 jalr t9                   |     t9 ();
    0x00008bcc lw v1, 0xa4(sp)           |     v1 = *(var_a4h_2);
    0x00008bd0 lw v0, (s1)               |     v0 = *(s1);
    0x00008bd4 lw gp, 0x10(sp)           |     gp = *(var_10h_2);
                                         |     if (v1 == v0) {
    0x00008bd8 bne v1, v0, 0x8bfc        |         
    0x00008bdc lw ra, 0xbc(sp)           |         ra = *(var_bch_2);
    0x00008be0 lw s4, 0xb8(sp)           |         s4 = *(var_b8h_2);
    0x00008be4 lw s3, 0xb4(sp)           |         s3 = *(var_b4h_2);
    0x00008be8 lw s2, 0xb0(sp)           |         s2 = *(var_b0h_2);
    0x00008bec lw s1, 0xac(sp)           |         s1 = *(var_ach_2);
    0x00008bf0 lw s0, 0xa8(sp)           |         s0 = *(var_a8h_2);
    0x00008bf4 addiu sp, sp, 0xc0        |         
    0x00008bf8 jr ra                     |         return v1;
                                         |     }
    0x00008bfc lw t9, -0x7d50(gp)        |     t9 = sym.imp.__stack_chk_fail;
    0x00008c00 jalr t9                   |     t9 ();
    0x00008c04 nop                       |     
    0x00008c08 lui gp, 2                 |     
    0x00008c0c addiu gp, gp, -0x1b58     |     
    0x00008c10 addu gp, gp, t9           |     gp += t9;
    0x00008c14 addiu sp, sp, -0x30       |     
    0x00008c18 lw v0, 0x28(a1)           |     v0 = *((a1 + 10));
    0x00008c1c sw s1, 0x1c(sp)           |     *(var_1ch_2) = s1;
    0x00008c20 move s1, a0               |     s1 = a0;
    0x00008c24 lw a0, 0x28(a0)           |     a0 = *((a0 + 10));
    0x00008c28 lw t9, -0x7f54(gp)        |     t9 = *(gp);
    0x00008c2c sw ra, 0x2c(sp)           |     *(var_2ch) = ra;
    0x00008c30 sw gp, 0x10(sp)           |     *(var_10h_3) = gp;
    0x00008c34 sw s4, 0x28(sp)           |     *(var_28h) = s4;
    0x00008c38 sw s3, 0x24(sp)           |     *(var_24h) = s3;
    0x00008c3c sw s2, 0x20(sp)           |     *(var_20h_2) = s2;
    0x00008c40 sw s0, 0x18(sp)           |     *(var_18h) = s0;
    0x00008c44 subu a0, a0, v0           |     __asm ("subu a0, a0, v0");
    0x00008c48 move s2, a2               |     s2 = a2;
    0x00008c4c move s3, a3               |     s3 = a3;
    0x00008c50 move s0, a1               |     s0 = a1;
    0x00008c54 bal 0xd230                |     fcn_0000d230 ();
    0x00008c58 lw gp, 0x10(sp)           |     gp = *(var_10h_3);
    0x00008c5c move a0, s2               |     a0 = s2;
    0x00008c60 move a1, s3               |     a1 = s3;
    0x00008c64 lw t9, -0x7f68(gp)        |     t9 = *(gp);
    0x00008c68 move s2, v0               |     s2 = v0;
    0x00008c6c move s3, v1               |     s3 = v1;
    0x00008c70 bal 0xd2d0                |     fcn_0000d2d0 ();
    0x00008c74 lw gp, 0x10(sp)           |     gp = *(var_10h_3);
    0x00008c78 move a2, v0               |     a2 = v0;
    0x00008c7c move a3, v1               |     a3 = v1;
    0x00008c80 lw t9, -0x7f64(gp)        |     t9 = *(gp);
    0x00008c84 move a0, s2               |     a0 = s2;
    0x00008c88 move a1, s3               |     a1 = s3;
    0x00008c8c bal 0xc230                |     fcn_0000c230 ();
    0x00008c90 lw gp, 0x10(sp)           |     gp = *(var_10h_3);
    0x00008c94 lw s4, 0x40(sp)           |     s4 = *(var_10h_2);
    0x00008c98 move a1, v1               |     a1 = v1;
    0x00008c9c lw a0, -0x7fd4(gp)        |     a0 = *((gp - 8181));
    0x00008ca0 lw t9, -0x7f60(gp)        |     t9 = *(gp);
    0x00008ca4 lw a2, -0x2020(a0)        |     a2 = *((a0 - 2056));
    0x00008ca8 lw a3, -0x201c(a0)        |     a3 = *((a0 - 2055));
    0x00008cac move a0, v0               |     a0 = v0;
    0x00008cb0 bal 0xcc90                |     fcn_0000cc90 ();
    0x00008cb4 lw a1, (s1)               |     a1 = *(s1);
    0x00008cb8 lw a0, (s0)               |     a0 = *(s0);
    0x00008cbc lw gp, 0x10(sp)           |     gp = *(var_10h_3);
    0x00008cc0 sw v0, (s4)               |     *(s4) = v0;
    0x00008cc4 sw v1, 4(s4)              |     *((s4 + 1)) = v1;
    0x00008cc8 lw v0, 4(s1)              |     v0 = *((s1 + 1));
    0x00008ccc lw v1, 4(s0)              |     v1 = *((s0 + 1));
                                         |     if (a1 == a0) {
    0x00008cd0 beq a1, a0, 0x8dcc        |         goto label_1;
                                         |     }
    0x00008cd4 subu a0, a1, a0           |     __asm ("subu a0, a1, a0");
                                         |     do {
    0x00008cd8 lw t9, -0x7f68(gp)        |         t9 = *(gp);
    0x00008cdc sltu a1, a1, a0           |         a1 = (a1 < a0) ? 1 : 0;
    0x00008ce0 subu v0, v0, v1           |         __asm ("subu v0, v0, v1");
    0x00008ce4 subu a1, v0, a1           |         __asm ("subu a1, v0, a1");
    0x00008ce8 bal 0xd2d0                |         fcn_0000d2d0 ();
    0x00008cec lw a1, 0x20(s0)           |         a1 = *((s0 + 8));
    0x00008cf0 lw a0, 0x20(s1)           |         a0 = *((s1 + 8));
    0x00008cf4 lw a2, 0x24(s1)           |         a2 = *((s1 + 9));
    0x00008cf8 lw gp, 0x10(sp)           |         gp = *(var_10h_3);
    0x00008cfc subu a0, a0, a1           |         __asm ("subu a0, a0, a1");
    0x00008d00 lw a1, 0x24(s0)           |         a1 = *((s0 + 9));
    0x00008d04 lw a3, 0x38(s1)           |         a3 = *((s1 + 14));
    0x00008d08 addu a0, a0, a2           |         a0 += a2;
    0x00008d0c subu a1, a0, a1           |         __asm ("subu a1, a0, a1");
    0x00008d10 lw a2, 0x38(s0)           |         a2 = *((s0 + 14));
    0x00008d14 addu a0, a1, a3           |         a0 = a1 + a3;
    0x00008d18 lw t9, -0x7f54(gp)        |         t9 = *(gp);
    0x00008d1c subu a0, a0, a2           |         __asm ("subu a0, a0, a2");
    0x00008d20 move s2, v0               |         s2 = v0;
    0x00008d24 move s3, v1               |         s3 = v1;
    0x00008d28 bal 0xd230                |         fcn_0000d230 ();
    0x00008d2c lw gp, 0x10(sp)           |         gp = *(var_10h_3);
    0x00008d30 move a2, s2               |         a2 = s2;
    0x00008d34 move a3, s3               |         a3 = s3;
    0x00008d38 lw t9, -0x7f64(gp)        |         t9 = *(gp);
    0x00008d3c move a0, v0               |         a0 = v0;
    0x00008d40 move a1, v1               |         a1 = v1;
    0x00008d44 bal 0xc230                |         fcn_0000c230 ();
    0x00008d48 lw a1, 8(s0)              |         a1 = *((s0 + 2));
    0x00008d4c lw a0, 8(s1)              |         a0 = *((s1 + 2));
    0x00008d50 lw a2, 0x10(s1)           |         a2 = *((s1 + 4));
    0x00008d54 lw gp, 0x10(sp)           |         gp = *(var_10h_3);
    0x00008d58 subu a0, a0, a1           |         __asm ("subu a0, a0, a1");
    0x00008d5c lw a1, 0x10(s0)           |         a1 = *((s0 + 4));
    0x00008d60 lw a3, 0x18(s1)           |         a3 = *((s1 + 6));
    0x00008d64 addu a0, a0, a2           |         a0 += a2;
    0x00008d68 subu a1, a0, a1           |         __asm ("subu a1, a0, a1");
    0x00008d6c lw a2, 0x18(s0)           |         a2 = *((s0 + 6));
    0x00008d70 addu a0, a1, a3           |         a0 = a1 + a3;
    0x00008d74 lw t9, -0x7f54(gp)        |         t9 = *(gp);
    0x00008d78 subu a0, a0, a2           |         __asm ("subu a0, a0, a2");
    0x00008d7c sw v0, 8(s4)              |         *((s4 + 2)) = v0;
    0x00008d80 sw v1, 0xc(s4)            |         *((s4 + 3)) = v1;
    0x00008d84 bal 0xd230                |         fcn_0000d230 ();
    0x00008d88 lw gp, 0x10(sp)           |         gp = *(var_10h_3);
    0x00008d8c move a2, s2               |         a2 = s2;
    0x00008d90 move a3, s3               |         a3 = s3;
    0x00008d94 lw t9, -0x7f64(gp)        |         t9 = *(gp);
    0x00008d98 move a0, v0               |         a0 = v0;
    0x00008d9c move a1, v1               |         a1 = v1;
    0x00008da0 bal 0xc230                |         fcn_0000c230 ();
    0x00008da4 lw ra, 0x2c(sp)           |         ra = *(var_2ch);
    0x00008da8 sw v0, 0x10(s4)           |         *((s4 + 4)) = v0;
    0x00008dac sw v1, 0x14(s4)           |         *((s4 + 5)) = v1;
    0x00008db0 lw s3, 0x24(sp)           |         s3 = *(var_24h);
    0x00008db4 lw s4, 0x28(sp)           |         s4 = *(var_28h);
    0x00008db8 lw s2, 0x20(sp)           |         s2 = *(var_20h_2);
    0x00008dbc lw s1, 0x1c(sp)           |         s1 = *(var_1ch_2);
    0x00008dc0 lw s0, 0x18(sp)           |         s0 = *(var_18h);
    0x00008dc4 addiu sp, sp, 0x30        |         
    0x00008dc8 jr ra                     |         return v1;
                                         | label_1:
    0x00008dcc subu a0, a1, a0           |         __asm ("subu a0, a1, a0");
    0x00008dd0 bnel v0, v1, 0x8cd8       |         
                                         |     } while (v0 == v1);
    0x00008dd4 lw ra, 0x2c(sp)           |     ra = *(var_2ch);
    0x00008dd8 move v0, zero             |     v0 = 0;
    0x00008ddc move v1, zero             |     v1 = 0;
    0x00008de0 sw zero, 8(s4)            |     *((s4 + 2)) = 0;
    0x00008de4 sw zero, 0xc(s4)          |     *((s4 + 3)) = 0;
    0x00008de8 sw v0, 0x10(s4)           |     *((s4 + 4)) = v0;
    0x00008dec sw v1, 0x14(s4)           |     *((s4 + 5)) = v1;
    0x00008df0 lw s3, 0x24(sp)           |     s3 = *(var_24h);
    0x00008df4 lw s4, 0x28(sp)           |     s4 = *(var_28h);
    0x00008df8 lw s2, 0x20(sp)           |     s2 = *(var_20h_2);
    0x00008dfc lw s1, 0x1c(sp)           |     s1 = *(var_1ch_2);
    0x00008e00 lw s0, 0x18(sp)           |     s0 = *(var_18h);
    0x00008e04 addiu sp, sp, 0x30        |     
    0x00008e08 jr ra                     |     return v1;
                                         | }
    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/mpstat @ 0x2a48 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.usage ()                     | void usage () {
    0x00002a48 lui gp, 2                     |     
    0x00002a4c addiu gp, gp, 0x4668          |     
    0x00002a50 addu gp, gp, t9               |     gp += t9;
    0x00002a54 addiu sp, sp, -0x20           |     
    0x00002a58 lw a2, -0x7fd4(gp)            |     a2 = *((gp - 8181));
    0x00002a5c sw s0, 0x18(sp)               |     *(var_18h) = s0;
    0x00002a60 lw s0, -0x7d30(gp)            |     s0 = *(gp);
    0x00002a64 lw t9, -0x7df0(gp)            |     t9 = sym.imp.__fprintf_chk
    0x00002a68 move a3, a0                   |     a3 = a0;
    0x00002a6c lw a0, (s0)                   |     a0 = *(s0);
    0x00002a70 sw gp, 0x10(sp)               |     *(var_10h) = gp;
    0x00002a74 sw ra, 0x1c(sp)               |     *(var_1ch) = ra;
    0x00002a78 addiu a2, a2, -0x269c         |     a2 += -0x269c;
    0x00002a7c addiu a1, zero, 1             |     a1 = 1;
    0x00002a80 jalr t9                       |     t9 ();
    0x00002a84 lw gp, 0x10(sp)               |     gp = *(var_10h);
    0x00002a88 lw a3, (s0)                   |     a3 = *(s0);
    0x00002a8c addiu a2, zero, 0xa8          |     a2 = 0xa8;
    0x00002a90 lw a0, -0x7fd4(gp)            |     a0 = *((gp - 8181));
    0x00002a94 lw t9, -0x7d70(gp)            |     t9 = sym.imp.fwrite;
    0x00002a98 addiu a0, a0, -0x2668         |     a0 += -0x2668;
    0x00002a9c addiu a1, zero, 1             |     a1 = 1;
    0x00002aa0 jalr t9                       |     t9 ();
    0x00002aa4 lw gp, 0x10(sp)               |     gp = *(var_10h);
    0x00002aa8 lw t9, -0x7d8c(gp)            |     t9 = sym.imp.exit;
    0x00002aac addiu a0, zero, 1             |     a0 = 1;
    0x00002ab0 jalr t9                       |     return t9 ();
                                             | }

[*] Function fprintf used 5 times mpstat