[*] Binary protection state of pidstat
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function sprintf tear down of pidstat
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0x3fc0 */
| #include <stdint.h>
|
; (fcn) sym.read_proc_pid_cmdline () | void read_proc_pid_cmdline () {
0x00003fc0 lui gp, 2 |
0x00003fc4 addiu gp, gp, 0x60f0 |
0x00003fc8 addu gp, gp, t9 | gp += t9;
0x00003fcc addiu sp, sp, -0x10c0 |
0x00003fd0 lw t9, -0x7de4(gp) | t9 = sym.imp.__sprintf_chk
0x00003fd4 sw s3, 0x10b4(sp) | *(var_10b4h) = s3;
0x00003fd8 lw s3, -0x7cd8(gp) | s3 = *((gp - 7990));
0x00003fdc sw gp, 0x18(sp) | *(var_18h_5) = gp;
0x00003fe0 sw s4, 0x10b8(sp) | *(var_10b8h) = s4;
0x00003fe4 lw v0, (s3) | v0 = *(s3);
0x00003fe8 sw s0, 0x10a8(sp) | *(var_10a8h) = s0;
0x00003fec sw ra, 0x10bc(sp) | *(var_10bch) = ra;
0x00003ff0 sw s2, 0x10b0(sp) | *(var_10b0h) = s2;
0x00003ff4 sw s1, 0x10ac(sp) | *(var_10ach) = s1;
0x00003ff8 move s4, a1 | s4 = a1;
0x00003ffc sw v0, 0x10a4(sp) | *(var_10a4h) = v0;
0x00004000 addiu s0, sp, 0x24 | s0 = sp + 0x24;
| if (a2 == 0) {
0x00004004 beqz a2, 0x410c | goto label_2;
| }
0x00004008 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x0000400c sw a0, 0x14(sp) | *(var_14h_3) = a0;
0x00004010 sw a2, 0x10(sp) | *(var_10h_6) = a2;
| /* str._proc__u_task__u_cmdline */
0x00004014 addiu a3, a3, 0xfcc | a3 += 0xfcc;
0x00004018 addiu a2, zero, 0x80 | a2 = 0x80;
0x0000401c addiu a1, zero, 1 | a1 = 1;
0x00004020 move a0, s0 | a0 = s0;
0x00004024 jalr t9 | t9 ();
0x00004028 lw gp, 0x18(sp) | gp = *(var_18h_5);
| label_0:
0x0000402c lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00004030 lw t9, -0x7cc8(gp) | t9 = sym.imp.fopen;
0x00004034 addiu a1, a1, 0x184c | a1 += 0x184c;
0x00004038 move a0, s0 | a0 = s0;
0x0000403c jalr t9 | t9 ();
0x00004040 move s2, v0 | s2 = v0;
0x00004044 lw gp, 0x18(sp) | gp = *(var_18h_5);
| if (v0 == 0) {
0x00004048 beqz v0, 0x413c | goto label_3;
| }
0x0000404c lw t9, -0x7d64(gp) | t9 = sym.imp.memset;
0x00004050 addiu s1, sp, 0xa4 | s1 = sp + 0xa4;
0x00004054 addiu a2, zero, 0x1000 | a2 = aav.0x00001000;
0x00004058 move a1, zero | a1 = 0;
0x0000405c move a0, s1 | a0 = s1;
0x00004060 jalr t9 | t9 ();
0x00004064 lw gp, 0x18(sp) | gp = *(var_18h_5);
0x00004068 move a3, s2 | a3 = s2;
0x0000406c addiu a2, zero, 0xfff | a2 = 0xfff;
0x00004070 lw t9, -0x7d1c(gp) | t9 = sym.imp.fread;
0x00004074 addiu a1, zero, 1 | a1 = 1;
0x00004078 move a0, s1 | a0 = s1;
0x0000407c jalr t9 | t9 ();
0x00004080 lw gp, 0x18(sp) | gp = *(var_18h_5);
0x00004084 move s0, v0 | s0 = v0;
0x00004088 lw t9, -0x7da8(gp) | t9 = sym.imp.fclose;
0x0000408c move a0, s2 | a0 = s2;
0x00004090 jalr t9 | t9 ();
0x00004094 lw gp, 0x18(sp) | gp = *(var_18h_5);
| if (s0 == 0) {
0x00004098 beqz s0, 0x4130 | goto label_4;
| }
0x0000409c move v1, s1 | v1 = s1;
0x000040a0 addu v0, s1, s0 | v0 = s1 + s0;
0x000040a4 addiu a1, zero, 0x20 | a1 = 0x20;
0x000040a8 lb a0, (v1) | a0 = *(v1);
| if (a0 != 0) {
| do {
0x000040ac beql a0, zero, 0x40b4 |
0x000040b0 sb a1, (v1) | *(v1) = a1;
| }
0x000040b4 addiu v1, v1, 1 | v1++;
0x000040b8 lb a0, (v1) | a0 = *(v1);
0x000040bc bnel v1, v0, 0x40ac |
| } while (v1 == v0);
0x000040c0 lw t9, -0x7d70(gp) | t9 = sym.imp.strncpy;
0x000040c4 addiu a2, zero, 0xfff | a2 = 0xfff;
0x000040c8 move a1, s1 | a1 = s1;
0x000040cc addiu a0, s4, 0x1104 | a0 = s4 + 0x1104;
0x000040d0 jalr t9 | t9 ();
0x000040d4 lw gp, 0x18(sp) | gp = *(var_18h_5);
0x000040d8 move v0, zero | v0 = 0;
0x000040dc sb zero, 0x2103(s4) | *((s4 + 8451)) = 0;
| do {
| label_1:
0x000040e0 lw a0, 0x10a4(sp) | a0 = *(var_10a4h);
0x000040e4 lw v1, (s3) | v1 = *(s3);
0x000040e8 lw ra, 0x10bc(sp) | ra = *(var_10bch);
| if (a0 != v1) {
0x000040ec bne a0, v1, 0x4144 | goto label_5;
| }
0x000040f0 lw s4, 0x10b8(sp) | s4 = *(var_10b8h);
0x000040f4 lw s3, 0x10b4(sp) | s3 = *(var_10b4h);
0x000040f8 lw s2, 0x10b0(sp) | s2 = *(var_10b0h);
0x000040fc lw s1, 0x10ac(sp) | s1 = *(var_10ach);
0x00004100 lw s0, 0x10a8(sp) | s0 = *(var_10a8h);
0x00004104 addiu sp, sp, 0x10c0 |
0x00004108 jr ra | return v0;
| label_2:
0x0000410c lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00004110 sw a0, 0x10(sp) | *(var_10h_6) = a0;
| /* str._proc__u_cmdline */
0x00004114 addiu a3, a3, 0xfe8 | a3 += 0xfe8;
0x00004118 addiu a2, zero, 0x80 | a2 = 0x80;
0x0000411c addiu a1, zero, 1 | a1 = 1;
0x00004120 move a0, s0 | a0 = s0;
0x00004124 jalr t9 | t9 ();
0x00004128 lw gp, 0x18(sp) | gp = *(var_18h_5);
0x0000412c b 0x402c | goto label_0;
| label_4:
0x00004130 sb zero, 0x1104(s4) | *((s4 + 4356)) = 0;
0x00004134 move v0, zero | v0 = 0;
0x00004138 b 0x40e0 |
| } while (1);
| label_3:
0x0000413c addiu v0, zero, 1 | v0 = 1;
0x00004140 b 0x40e0 | goto label_1;
| label_5:
0x00004144 lw t9, -0x7cf0(gp) | t9 = sym.imp.__stack_chk_fail;
0x00004148 jalr t9 | t9 ();
0x0000414c nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0x43a8 */
| #include <stdint.h>
|
; (fcn) sym.read_proc_pid_fd () | void read_proc_pid_fd () {
0x000043a8 lui gp, 2 |
0x000043ac addiu gp, gp, 0x5d08 |
0x000043b0 addu gp, gp, t9 | gp += t9;
0x000043b4 addiu sp, sp, -0xc8 |
0x000043b8 lw t9, -0x7de4(gp) | t9 = sym.imp.__sprintf_chk
0x000043bc sw s3, 0xb8(sp) | *(var_b8h_2) = s3;
0x000043c0 lw s3, -0x7cd8(gp) | s3 = *((gp - 7990));
0x000043c4 sw gp, 0x18(sp) | *(var_18h_7) = gp;
0x000043c8 sw s4, 0xbc(sp) | *(var_bch_2) = s4;
0x000043cc lw v0, (s3) | v0 = *(s3);
0x000043d0 sw s2, 0xb4(sp) | *(var_b4h_2) = s2;
0x000043d4 sw s1, 0xb0(sp) | *(var_b0h_2) = s1;
0x000043d8 sw s0, 0xac(sp) | *(var_ach_3) = s0;
0x000043dc sw ra, 0xc4(sp) | *(var_c4h_2) = ra;
0x000043e0 sw s5, 0xc0(sp) | *(var_c0h_2) = s5;
0x000043e4 move s2, a2 | s2 = a2;
0x000043e8 move s4, a0 | s4 = a0;
0x000043ec move s1, a1 | s1 = a1;
0x000043f0 sw v0, 0xa4(sp) | *(var_a4h_2) = v0;
0x000043f4 addiu s0, sp, 0x24 | s0 = sp + 0x24;
| if (a2 == 0) {
0x000043f8 beqz a2, 0x44f0 | goto label_3;
| }
0x000043fc lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00004400 sw a0, 0x14(sp) | *(var_14h) = a0;
0x00004404 sw a2, 0x10(sp) | *(var_10h_8) = a2;
0x00004408 move a0, s0 | a0 = s0;
| /* str._proc__u_task__u_fd */
0x0000440c addiu a3, a3, 0x1050 | a3 += 0x1050;
0x00004410 addiu a2, zero, 0x80 | a2 = 0x80;
0x00004414 addiu a1, zero, 1 | a1 = 1;
0x00004418 jalr t9 | t9 ();
0x0000441c lw gp, 0x18(sp) | gp = *(var_18h_7);
0x00004420 lw t9, -0x7dd4(gp) | t9 = sym.imp.opendir;
0x00004424 move a0, s0 | a0 = s0;
0x00004428 jalr t9 | t9 ();
0x0000442c move s0, v0 | s0 = v0;
0x00004430 lw gp, 0x18(sp) | gp = *(var_18h_7);
| if (v0 == 0) {
0x00004434 beqz v0, 0x4528 | goto label_4;
| }
| label_1:
0x00004438 sw zero, 0x100(s1) | *(s1) = 0;
0x0000443c b 0x446c |
| while (v0 != 0) {
0x00004440 lw t9, -0x7ddc(gp) | t9 = sym.imp.__ctype_b_loc;
0x00004444 jalr t9 | t9 ();
0x00004448 nop |
0x0000444c lb v1, 0xb(s5) | v1 = *((s5 + 11));
0x00004450 lw v0, (v0) | v0 = *(v0);
0x00004454 sll v1, v1, 1 | v1 <<= 1;
0x00004458 addu v0, v0, v1 | v0 += v1;
0x0000445c lhu v0, (v0) | v0 = *(v0);
0x00004460 andi v0, v0, 0x800 | v0 &= 0x800;
0x00004464 lw gp, 0x18(sp) | gp = *(var_18h_7);
| if (v0 != 0) {
0x00004468 bnez v0, 0x44e0 | goto label_5;
| }
| label_0:
0x0000446c lw t9, -0x7d98(gp) | t9 = sym.imp.readdir;
0x00004470 move a0, s0 | a0 = s0;
0x00004474 jalr t9 | t9 ();
0x00004478 move s5, v0 | s5 = v0;
0x0000447c lw gp, 0x18(sp) | gp = *(var_18h_7);
0x00004480 bnez v0, 0x4440 |
| }
0x00004484 lw t9, -0x7dcc(gp) | t9 = sym.imp.closedir;
0x00004488 move a0, s0 | a0 = s0;
0x0000448c jalr t9 | t9 ();
0x00004490 lw v0, 0xf4(s1) | v0 = *((s1 + 61));
0x00004494 addiu v1, zero, -3 | v1 = -3;
0x00004498 and v0, v0, v1 | v0 &= v1;
0x0000449c lw gp, 0x18(sp) | gp = *(var_18h_7);
0x000044a0 sw s4, 0xc8(s1) | *((s1 + 50)) = s4;
0x000044a4 sw s2, 0xcc(s1) | *((s1 + 51)) = s2;
0x000044a8 sw v0, 0xf4(s1) | *((s1 + 61)) = v0;
| label_2:
0x000044ac lw a0, 0xa4(sp) | a0 = *(var_a4h_2);
0x000044b0 lw v1, (s3) | v1 = *(s3);
0x000044b4 move v0, zero | v0 = 0;
| if (a0 != v1) {
0x000044b8 bne a0, v1, 0x4538 | goto label_6;
| }
0x000044bc lw ra, 0xc4(sp) | ra = *(var_c4h_2);
0x000044c0 lw s5, 0xc0(sp) | s5 = *(var_c0h_2);
0x000044c4 lw s4, 0xbc(sp) | s4 = *(var_bch_2);
0x000044c8 lw s3, 0xb8(sp) | s3 = *(var_b8h_2);
0x000044cc lw s2, 0xb4(sp) | s2 = *(var_b4h_2);
0x000044d0 lw s1, 0xb0(sp) | s1 = *(var_b0h_2);
0x000044d4 lw s0, 0xac(sp) | s0 = *(var_ach_3);
0x000044d8 addiu sp, sp, 0xc8 |
0x000044dc jr ra | return v0;
| label_5:
0x000044e0 lw v0, 0x100(s1) | v0 = *(s1);
0x000044e4 addiu v0, v0, 1 | v0++;
0x000044e8 sw v0, 0x100(s1) | *(s1) = v0;
0x000044ec b 0x446c | goto label_0;
| label_3:
0x000044f0 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x000044f4 sw a0, 0x10(sp) | *(var_10h_8) = a0;
| /* str._proc__u_fd */
0x000044f8 addiu a3, a3, 0x1064 | a3 += 0x1064;
0x000044fc move a0, s0 | a0 = s0;
0x00004500 addiu a2, zero, 0x80 | a2 = 0x80;
0x00004504 addiu a1, zero, 1 | a1 = 1;
0x00004508 jalr t9 | t9 ();
0x0000450c lw gp, 0x18(sp) | gp = *(var_18h_7);
0x00004510 lw t9, -0x7dd4(gp) | t9 = sym.imp.opendir;
0x00004514 move a0, s0 | a0 = s0;
0x00004518 jalr t9 | t9 ();
0x0000451c move s0, v0 | s0 = v0;
0x00004520 lw gp, 0x18(sp) | gp = *(var_18h_7);
| if (v0 != 0) {
0x00004524 bnez v0, 0x4438 | goto label_1;
| }
| label_4:
0x00004528 lw v0, 0xf4(s1) | v0 = *((s1 + 61));
0x0000452c ori v0, v0, 2 | v0 |= 2;
0x00004530 sw v0, 0xf4(s1) | *((s1 + 61)) = v0;
0x00004534 b 0x44ac | goto label_2;
| label_6:
0x00004538 lw t9, -0x7cf0(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000453c jalr t9 | t9 ();
0x00004540 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0x4150 */
| #include <stdint.h>
|
; (fcn) sym.read_proc_pid_io () | void read_proc_pid_io () {
0x00004150 lui gp, 2 |
0x00004154 addiu gp, gp, 0x5f60 |
0x00004158 addu gp, gp, t9 | gp += t9;
0x0000415c addiu sp, sp, -0x1d8 |
0x00004160 lw t9, -0x7de4(gp) | t9 = sym.imp.__sprintf_chk
0x00004164 sw s7, 0x1cc(sp) | *(var_1cch_3) = s7;
0x00004168 lw s7, -0x7cd8(gp) | s7 = *((gp - 7990));
0x0000416c sw gp, 0x18(sp) | *(var_18h_6) = gp;
0x00004170 sw s6, 0x1c8(sp) | *(var_1c8h_3) = s6;
0x00004174 lw v0, (s7) | v0 = *(s7);
0x00004178 sw s1, 0x1b4(sp) | *(var_1b4h_3) = s1;
0x0000417c sw s0, 0x1b0(sp) | *(var_1b0h_3) = s0;
0x00004180 sw ra, 0x1d4(sp) | *(var_1d4h_2) = ra;
0x00004184 sw fp, 0x1d0(sp) | *(var_1d0h_2) = fp;
0x00004188 sw s5, 0x1c4(sp) | *(var_1c4h_3) = s5;
0x0000418c sw s4, 0x1c0(sp) | *(var_1c0h_3) = s4;
0x00004190 sw s3, 0x1bc(sp) | *(var_1bch_3) = s3;
0x00004194 sw s2, 0x1b8(sp) | *(var_1b8h_3) = s2;
0x00004198 move s6, a2 | s6 = a2;
0x0000419c sw a0, 0x1d8(sp) | *(var_1d8h_2) = a0;
0x000041a0 move s1, a1 | s1 = a1;
0x000041a4 sw v0, 0x1ac(sp) | *(var_1ach_3) = v0;
0x000041a8 addiu s0, sp, 0x2c | s0 = sp + 0x2c;
| if (a2 == 0) {
0x000041ac beqz a2, 0x4364 | goto label_3;
| }
0x000041b0 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x000041b4 sw a0, 0x14(sp) | *(var_14h_2) = a0;
0x000041b8 sw a2, 0x10(sp) | *(var_10h_7) = a2;
| /* str._proc__u_task__u_io */
0x000041bc addiu a3, a3, 0xffc | a3 += 0xffc;
0x000041c0 addiu a2, zero, 0x80 | a2 = 0x80;
0x000041c4 addiu a1, zero, 1 | a1 = 1;
0x000041c8 move a0, s0 | a0 = s0;
0x000041cc jalr t9 | t9 ();
0x000041d0 lw gp, 0x18(sp) | gp = *(var_18h_6);
| label_2:
0x000041d4 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x000041d8 lw t9, -0x7cc8(gp) | t9 = sym.imp.fopen;
0x000041dc move a0, s0 | a0 = s0;
0x000041e0 addiu a1, a1, 0x184c | a1 += 0x184c;
0x000041e4 jalr t9 | t9 ();
0x000041e8 move s0, v0 | s0 = v0;
0x000041ec lw gp, 0x18(sp) | gp = *(var_18h_6);
| if (v0 == 0) {
0x000041f0 beqz v0, 0x438c | goto label_4;
| }
0x000041f4 lw s2, -0x7fd4(gp) | s2 = *(gp);
0x000041f8 lw s4, -0x7fd4(gp) | s4 = *(gp);
0x000041fc lw s3, -0x7fd4(gp) | s3 = *(gp);
0x00004200 addiu v0, s1, 0x10 | v0 = s1 + 0x10;
0x00004204 lw s5, -0x7fd4(gp) | s5 = *(gp);
0x00004208 addiu fp, sp, 0xac | fp = sp + 0xac;
| /* str.read_bytes: */
0x0000420c addiu s2, s2, 0x101c | s2 += 0x101c;
| /* str.write_bytes: */
0x00004210 addiu s4, s4, 0x1028 | s4 += 0x1028;
0x00004214 sw v0, 0x24(sp) | *(var_24h_6) = v0;
| /* esilref: '&llu' */
0x00004218 addiu s3, s3, 0x15dc | s3 += 0x15dc;
| do {
| label_1:
0x0000421c lw t9, -0x7cdc(gp) | t9 = sym.imp.fgets;
0x00004220 move a2, s0 | a2 = s0;
0x00004224 addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x00004228 move a0, fp | a0 = fp;
0x0000422c jalr t9 | t9 ();
0x00004230 lw gp, 0x18(sp) | gp = *(var_18h_6);
| if (v0 == 0) {
0x00004234 beqz v0, 0x42c0 | goto label_5;
| }
| label_0:
0x00004238 lw t9, -0x7dbc(gp) | t9 = sym.imp.strncmp;
0x0000423c addiu a2, zero, 0xb | a2 = 0xb;
0x00004240 move a1, s2 | a1 = s2;
0x00004244 move a0, fp | a0 = fp;
0x00004248 jalr t9 | t9 ();
0x0000424c lw gp, 0x18(sp) | gp = *(var_18h_6);
| if (v0 == 0) {
0x00004250 beqz v0, 0x432c | goto label_6;
| }
0x00004254 lw t9, -0x7dbc(gp) | t9 = sym.imp.strncmp;
0x00004258 addiu a2, zero, 0xc | a2 = 0xc;
0x0000425c move a1, s4 | a1 = s4;
0x00004260 move a0, fp | a0 = fp;
0x00004264 jalr t9 | t9 ();
0x00004268 lw gp, 0x18(sp) | gp = *(var_18h_6);
| if (v0 == 0) {
0x0000426c beqz v0, 0x4348 | goto label_7;
| }
0x00004270 lw t9, -0x7dbc(gp) | t9 = sym.imp.strncmp;
0x00004274 addiu a2, zero, 0x16 | a2 = 0x16;
| /* str.cancelled_write_bytes: */
0x00004278 addiu a1, s5, 0x1038 | a1 = s5 + 0x1038;
0x0000427c move a0, fp | a0 = fp;
0x00004280 jalr t9 | t9 ();
0x00004284 lw gp, 0x18(sp) | gp = *(var_18h_6);
0x00004288 bnez v0, 0x421c |
| } while (v0 != 0);
0x0000428c lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00004290 lw a2, 0x24(sp) | a2 = *(var_24h_6);
0x00004294 move a1, s3 | a1 = s3;
0x00004298 addiu a0, sp, 0xc3 | a0 = sp + 0xc3;
0x0000429c jalr t9 | t9 ();
0x000042a0 lw gp, 0x18(sp) | gp = *(var_18h_6);
0x000042a4 move a2, s0 | a2 = s0;
0x000042a8 addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x000042ac lw t9, -0x7cdc(gp) | t9 = sym.imp.fgets;
0x000042b0 move a0, fp | a0 = fp;
0x000042b4 jalr t9 | t9 ();
0x000042b8 lw gp, 0x18(sp) | gp = *(var_18h_6);
| if (v0 != 0) {
0x000042bc bnez v0, 0x4238 | goto label_0;
| }
| label_5:
0x000042c0 lw t9, -0x7da8(gp) | t9 = sym.imp.fclose;
0x000042c4 move a0, s0 | a0 = s0;
0x000042c8 jalr t9 | t9 ();
0x000042cc lw v0, 0xf4(s1) | v0 = *((s1 + 61));
0x000042d0 addiu v1, zero, -2 | v1 = -2;
0x000042d4 and v0, v0, v1 | v0 &= v1;
0x000042d8 lw v1, 0x1d8(sp) | v1 = *(var_1d8h_2);
0x000042dc lw gp, 0x18(sp) | gp = *(var_18h_6);
0x000042e0 sw v1, 0xc8(s1) | *((s1 + 50)) = v1;
0x000042e4 sw s6, 0xcc(s1) | *((s1 + 51)) = s6;
0x000042e8 nop |
| do {
0x000042ec lw a0, 0x1ac(sp) | a0 = *(var_1ach_3);
0x000042f0 lw v1, (s7) | v1 = *(s7);
0x000042f4 move v0, zero | v0 = 0;
| if (a0 != v1) {
0x000042f8 bne a0, v1, 0x439c | goto label_8;
| }
0x000042fc lw ra, 0x1d4(sp) | ra = *(var_1d4h_2);
0x00004300 lw fp, 0x1d0(sp) | fp = *(var_1d0h_2);
0x00004304 lw s7, 0x1cc(sp) | s7 = *(var_1cch_3);
0x00004308 lw s6, 0x1c8(sp) | s6 = *(var_1c8h_3);
0x0000430c lw s5, 0x1c4(sp) | s5 = *(var_1c4h_3);
0x00004310 lw s4, 0x1c0(sp) | s4 = *(var_1c0h_3);
0x00004314 lw s3, 0x1bc(sp) | s3 = *(var_1bch_3);
0x00004318 lw s2, 0x1b8(sp) | s2 = *(var_1b8h_3);
0x0000431c lw s1, 0x1b4(sp) | s1 = *(var_1b4h_3);
0x00004320 lw s0, 0x1b0(sp) | s0 = *(var_1b0h_3);
0x00004324 addiu sp, sp, 0x1d8 |
0x00004328 jr ra | return v0;
| label_6:
0x0000432c lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00004330 move a2, s1 | a2 = s1;
0x00004334 move a1, s3 | a1 = s3;
0x00004338 addiu a0, sp, 0xb8 | a0 = sp + 0xb8;
0x0000433c jalr t9 | t9 ();
0x00004340 lw gp, 0x18(sp) | gp = *(var_18h_6);
0x00004344 b 0x421c | goto label_1;
| label_7:
0x00004348 lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x0000434c addiu a2, s1, 8 | a2 = s1 + 8;
0x00004350 move a1, s3 | a1 = s3;
0x00004354 addiu a0, sp, 0xb9 | a0 = sp + 0xb9;
0x00004358 jalr t9 | t9 ();
0x0000435c lw gp, 0x18(sp) | gp = *(var_18h_6);
0x00004360 b 0x421c | goto label_1;
| label_3:
0x00004364 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00004368 lw v0, 0x1d8(sp) | v0 = *(var_1d8h_2);
| /* str._proc__u_io */
0x0000436c addiu a3, a3, 0x1010 | a3 += aav.0x00001010;
0x00004370 sw v0, 0x10(sp) | *(var_10h_7) = v0;
0x00004374 addiu a2, zero, 0x80 | a2 = 0x80;
0x00004378 addiu a1, zero, 1 | a1 = 1;
0x0000437c move a0, s0 | a0 = s0;
0x00004380 jalr t9 | t9 ();
0x00004384 lw gp, 0x18(sp) | gp = *(var_18h_6);
0x00004388 b 0x41d4 | goto label_2;
| label_4:
0x0000438c lw v0, 0xf4(s1) | v0 = *((s1 + 61));
0x00004390 ori v0, v0, 1 | v0 |= 1;
0x00004394 sw v0, 0xf4(s1) | *((s1 + 61)) = v0;
0x00004398 b 0x42ec |
| } while (1);
| label_8:
0x0000439c lw t9, -0x7cf0(gp) | t9 = sym.imp.__stack_chk_fail;
0x000043a0 jalr t9 | t9 ();
0x000043a4 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0x3894 */
| #include <stdint.h>
|
; (fcn) sym.read_proc_pid_sched () | void read_proc_pid_sched () {
0x00003894 lui gp, 2 |
0x00003898 addiu gp, gp, 0x681c |
0x0000389c addu gp, gp, t9 | gp += t9;
0x000038a0 addiu sp, sp, -0xd0 |
0x000038a4 move v1, zero | v1 = 0;
0x000038a8 sw s3, 0xbc(sp) | *(var_bch) = s3;
0x000038ac lw s3, -0x7cd8(gp) | s3 = *((gp - 7990));
0x000038b0 sw gp, 0x18(sp) | *(var_18h_2) = gp;
0x000038b4 sw s4, 0xc0(sp) | *(var_c0h) = s4;
0x000038b8 lw v0, (s3) | v0 = *(s3);
0x000038bc sw s2, 0xb8(sp) | *(var_b8h) = s2;
0x000038c0 sw v0, 0xac(sp) | *(var_ach_2) = v0;
0x000038c4 move v0, zero | v0 = 0;
0x000038c8 sw s1, 0xb4(sp) | *(var_b4h) = s1;
0x000038cc sw s0, 0xb0(sp) | *(var_b0h) = s0;
0x000038d0 sw ra, 0xcc(sp) | *(var_cch) = ra;
0x000038d4 sw s6, 0xc8(sp) | *(var_c8h) = s6;
0x000038d8 sw s5, 0xc4(sp) | *(var_c4h) = s5;
0x000038dc move s1, a3 | s1 = a3;
0x000038e0 move s2, a0 | s2 = a0;
0x000038e4 move s0, a1 | s0 = a1;
0x000038e8 sw v0, 0x20(sp) | *(var_20h) = v0;
0x000038ec sw v1, 0x24(sp) | *(var_24h) = v1;
0x000038f0 lw t9, -0x7de4(gp) | t9 = sym.imp.__sprintf_chk
0x000038f4 addiu s4, sp, 0x2c | s4 = sp + 0x2c;
| if (a3 == 0) {
0x000038f8 beqz a3, 0x39c0 | goto label_2;
| }
0x000038fc sw a3, 0x10(sp) | *(var_10h_3) = a3;
0x00003900 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00003904 sw a0, 0x14(sp) | *(var_14h_6) = a0;
| /* str._proc__u_task__u_schedstat */
0x00003908 addiu a3, a3, 0xecc | a3 += 0xecc;
0x0000390c addiu a2, zero, 0x80 | a2 = 0x80;
0x00003910 addiu a1, zero, 1 | a1 = 1;
0x00003914 move a0, s4 | a0 = s4;
0x00003918 jalr t9 | t9 ();
0x0000391c lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003920 move a1, zero | a1 = 0;
0x00003924 lw t9, -0x7d48(gp) | t9 = sym.imp.open;
0x00003928 move a0, s4 | a0 = s4;
0x0000392c jalr t9 | t9 ();
0x00003930 move s6, v0 | s6 = v0;
0x00003934 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 >= 0) {
0x00003938 bgez v0, 0x39fc | goto label_3;
| }
| do {
| label_0:
0x0000393c lw v0, -0x7fa0(gp) | v0 = *(gp);
0x00003940 lw a0, 0x20(sp) | a0 = *(var_20h);
0x00003944 lw v1, 0x24(sp) | v1 = *(var_24h);
0x00003948 lw v0, (v0) | v0 = *(v0);
0x0000394c lw t9, -0x7f9c(gp) | t9 = *(gp);
0x00003950 multu a0, v0 | __asm ("multu a0, v0");
0x00003954 mfhi a1 | __asm ("mfhi a1");
0x00003958 mflo a0 | __asm ("mflo a0");
0x0000395c mul a2, v1, v0 | __asm ("mul a2, v1, v0");
0x00003960 move a3, zero | a3 = 0;
0x00003964 addu a1, a2, a1 | a1 = a2 + a1;
0x00003968 lui a2, 0x3b9a | a2 = 0x3b9aca00;
0x0000396c ori a2, a2, 0xca00 |
0x00003970 bal 0xefe0 | fcn_0000efe0 ();
0x00003974 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003978 sw v0, 0xa0(s0) | *((s0 + 40)) = v0;
0x0000397c sw v1, 0xa4(s0) | *((s0 + 41)) = v1;
0x00003980 sw s2, 0xc8(s0) | *((s0 + 50)) = s2;
0x00003984 sw s1, 0xcc(s0) | *((s0 + 51)) = s1;
0x00003988 addiu v0, zero, 1 | v0 = 1;
| label_1:
0x0000398c lw a0, 0xac(sp) | a0 = *(var_ach_2);
0x00003990 lw v1, (s3) | v1 = *(s3);
0x00003994 lw ra, 0xcc(sp) | ra = *(var_cch);
| if (a0 != v1) {
0x00003998 bne a0, v1, 0x3aac | goto label_4;
| }
0x0000399c lw s6, 0xc8(sp) | s6 = *(var_c8h);
0x000039a0 lw s5, 0xc4(sp) | s5 = *(var_c4h);
0x000039a4 lw s4, 0xc0(sp) | s4 = *(var_c0h);
0x000039a8 lw s3, 0xbc(sp) | s3 = *(var_bch);
0x000039ac lw s2, 0xb8(sp) | s2 = *(var_b8h);
0x000039b0 lw s1, 0xb4(sp) | s1 = *(var_b4h);
0x000039b4 lw s0, 0xb0(sp) | s0 = *(var_b0h);
0x000039b8 addiu sp, sp, 0xd0 |
0x000039bc jr ra | return v0;
| label_2:
0x000039c0 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x000039c4 sw a0, 0x10(sp) | *(var_10h_3) = a0;
| /* str._proc__u_schedstat */
0x000039c8 addiu a3, a3, 0xee8 | a3 += 0xee8;
0x000039cc addiu a2, zero, 0x80 | a2 = 0x80;
0x000039d0 addiu a1, zero, 1 | a1 = 1;
0x000039d4 move a0, s4 | a0 = s4;
0x000039d8 jalr t9 | t9 ();
0x000039dc lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000039e0 move a1, zero | a1 = 0;
0x000039e4 lw t9, -0x7d48(gp) | t9 = sym.imp.open;
0x000039e8 move a0, s4 | a0 = s4;
0x000039ec jalr t9 | t9 ();
0x000039f0 move s6, v0 | s6 = v0;
0x000039f4 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x000039f8 bltz v0, 0x393c |
| } while (v0 < 0);
| label_3:
0x000039fc lw s4, -0x7fa8(gp) | s4 = *((gp - 8170));
0x00003a00 lw t9, -0x7cb4(gp) | t9 = sym.imp.read;
0x00003a04 addiu a2, zero, 0x400 | a2 = aav.0x00000400;
0x00003a08 addiu a1, s4, 0x24a0 | a1 = s4 + 0x24a0;
0x00003a0c move a0, v0 | a0 = v0;
0x00003a10 jalr t9 | t9 ();
0x00003a14 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003a18 move s5, v0 | s5 = v0;
0x00003a1c lw t9, -0x7dc8(gp) | t9 = sym.imp.close;
0x00003a20 move a0, s6 | a0 = s6;
0x00003a24 jalr t9 | t9 ();
0x00003a28 lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (s5 <= 0) {
0x00003a2c blez s5, 0x393c | goto label_0;
| }
0x00003a30 addiu a0, s4, 0x24a0 | a0 = s4 + 0x24a0;
0x00003a34 addu s5, s5, a0 | s5 += a0;
0x00003a38 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00003a3c lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00003a40 addiu a2, sp, 0x20 | a2 = sp + 0x20;
| /* str._u__llu__d_n */
0x00003a44 addiu a1, a1, 0xefc | a1 += 0xefc;
0x00003a48 sb zero, (s5) | *(s5) = 0;
0x00003a4c jalr t9 | t9 ();
0x00003a50 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003a54 lw a0, 0x20(sp) | a0 = *(var_20h);
0x00003a58 lw a2, 0x24(sp) | a2 = *(var_24h);
0x00003a5c lw v1, -0x7fa0(gp) | v1 = *(gp);
0x00003a60 lw t9, -0x7f9c(gp) | t9 = *(gp);
0x00003a64 move s4, v0 | s4 = v0;
0x00003a68 lw v1, (v1) | v1 = *(v1);
0x00003a6c multu a0, v1 | __asm ("multu a0, v1");
0x00003a70 mfhi a1 | __asm ("mfhi a1");
0x00003a74 mflo a0 | __asm ("mflo a0");
0x00003a78 mul a3, a2, v1 | __asm ("mul a3, a2, v1");
0x00003a7c lui a2, 0x3b9a | a2 = 0x3b9aca00;
0x00003a80 ori a2, a2, 0xca00 |
0x00003a84 addu a1, a3, a1 | a1 = a3 + a1;
0x00003a88 move a3, zero | a3 = 0;
0x00003a8c bal 0xefe0 | fcn_0000efe0 ();
0x00003a90 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00003a94 sw v0, 0xa0(s0) | *((s0 + 40)) = v0;
0x00003a98 sw v1, 0xa4(s0) | *((s0 + 41)) = v1;
0x00003a9c sw s2, 0xc8(s0) | *((s0 + 50)) = s2;
0x00003aa0 sw s1, 0xcc(s0) | *((s0 + 51)) = s1;
0x00003aa4 slti v0, s4, 1 | v0 = (s4 < 1) ? 1 : 0;
0x00003aa8 b 0x398c | goto label_1;
| label_4:
0x00003aac lw t9, -0x7cf0(gp) | t9 = sym.imp.__stack_chk_fail;
0x00003ab0 jalr t9 | t9 ();
0x00003ab4 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0x3d40 */
| #include <stdint.h>
|
; (fcn) sym.read_proc_pid_smap () | void read_proc_pid_smap () {
0x00003d40 lui gp, 2 |
0x00003d44 addiu gp, gp, 0x6370 |
0x00003d48 addu gp, gp, t9 | gp += t9;
0x00003d4c addiu sp, sp, -0x1d0 |
0x00003d50 lw t9, -0x7de4(gp) | t9 = sym.imp.__sprintf_chk
0x00003d54 sw s5, 0x1c0(sp) | *(var_1c0h_2) = s5;
0x00003d58 lw s5, -0x7cd8(gp) | s5 = *((gp - 7990));
0x00003d5c sw gp, 0x18(sp) | *(var_18h_4) = gp;
0x00003d60 sw s6, 0x1c4(sp) | *(var_1c4h_2) = s6;
0x00003d64 lw v0, (s5) | v0 = *(s5);
0x00003d68 sw s4, 0x1bc(sp) | *(var_1bch_2) = s4;
0x00003d6c sw s3, 0x1b8(sp) | *(var_1b8h_2) = s3;
0x00003d70 sw s0, 0x1ac(sp) | *(var_1ach_2) = s0;
0x00003d74 sw ra, 0x1cc(sp) | *(var_1cch_2) = ra;
0x00003d78 sw s7, 0x1c8(sp) | *(var_1c8h_2) = s7;
0x00003d7c sw s2, 0x1b4(sp) | *(var_1b4h_2) = s2;
0x00003d80 sw s1, 0x1b0(sp) | *(var_1b0h_2) = s1;
0x00003d84 move s4, a2 | s4 = a2;
0x00003d88 move s6, a0 | s6 = a0;
0x00003d8c move s3, a1 | s3 = a1;
0x00003d90 sw v0, 0x1a4(sp) | *(var_1a4h) = v0;
0x00003d94 addiu s0, sp, 0x24 | s0 = sp + 0x24;
| if (a2 == 0) {
0x00003d98 beqz a2, 0x3f40 | goto label_4;
| }
0x00003d9c lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00003da0 sw a0, 0x14(sp) | *(var_14h_4) = a0;
0x00003da4 sw a2, 0x10(sp) | *(var_10h_5) = a2;
| /* str._proc__u_task__u_smaps */
0x00003da8 addiu a3, a3, 0xf84 | a3 += 0xf84;
0x00003dac addiu a2, zero, 0x80 | a2 = 0x80;
0x00003db0 addiu a1, zero, 1 | a1 = 1;
0x00003db4 move a0, s0 | a0 = s0;
0x00003db8 jalr t9 | t9 ();
0x00003dbc lw gp, 0x18(sp) | gp = *(var_18h_4);
| label_0:
0x00003dc0 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00003dc4 lw t9, -0x7cc8(gp) | t9 = sym.imp.fopen;
| /* esilref: 'rt' */
0x00003dc8 addiu a1, a1, 0xfac | a1 += 0xfac;
0x00003dcc move a0, s0 | a0 = s0;
0x00003dd0 jalr t9 | t9 ();
0x00003dd4 move s1, v0 | s1 = v0;
0x00003dd8 lw gp, 0x18(sp) | gp = *(var_18h_4);
| if (v0 == 0) {
0x00003ddc beqz v0, 0x3f64 | goto label_5;
| }
0x00003de0 lw t9, -0x7cdc(gp) | t9 = sym.imp.fgets;
0x00003de4 addiu s0, sp, 0xa4 | s0 = sp + 0xa4;
0x00003de8 move a2, v0 | a2 = v0;
0x00003dec addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x00003df0 move a0, s0 | a0 = s0;
0x00003df4 jalr t9 | t9 ();
0x00003df8 lw gp, 0x18(sp) | gp = *(var_18h_4);
| if (v0 == 0) {
0x00003dfc beqz v0, 0x3eec | goto label_6;
| }
0x00003e00 lw a1, -0x7fd4(gp) | a1 = *(gp);
| /* str._stack_ */
0x00003e04 addiu s2, a1, 0xfb0 | s2 = a1 + 0xfb0;
| label_3:
0x00003e08 lw t9, -0x7ca8(gp) | t9 = sym.imp.strstr;
0x00003e0c move a1, s2 | a1 = s2;
0x00003e10 move a0, s0 | a0 = s0;
0x00003e14 jalr t9 | t9 ();
0x00003e18 lw gp, 0x18(sp) | gp = *(var_18h_4);
| if (v0 == 0) {
0x00003e1c beqz v0, 0x3f90 | goto label_7;
| }
0x00003e20 lw t9, -0x7cdc(gp) | t9 = sym.imp.fgets;
0x00003e24 move a2, s1 | a2 = s1;
0x00003e28 addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x00003e2c move a0, s0 | a0 = s0;
0x00003e30 jalr t9 | t9 ();
0x00003e34 lw gp, 0x18(sp) | gp = *(var_18h_4);
| if (v0 == 0) {
0x00003e38 beqz v0, 0x3eec | goto label_6;
| }
0x00003e3c lw s2, -0x7fd4(gp) | s2 = *(gp);
| /* str.Size: */
0x00003e40 addiu s2, s2, 0xfb8 | s2 += 0xfb8;
| label_1:
0x00003e44 lw t9, -0x7ca8(gp) | t9 = sym.imp.strstr;
0x00003e48 move a1, s2 | a1 = s2;
0x00003e4c move a0, s0 | a0 = s0;
0x00003e50 jalr t9 | t9 ();
0x00003e54 lw gp, 0x18(sp) | gp = *(var_18h_4);
| if (v0 == 0) {
0x00003e58 beqz v0, 0x3f6c | goto label_8;
| }
0x00003e5c lw s7, -0x7fd4(gp) | s7 = *(gp);
0x00003e60 lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00003e64 addiu a2, s3, 0xc0 | a2 = s3 + 0xc0;
| /* esilref: '&lu' */
0x00003e68 addiu a1, s7, 0x16d4 | a1 = s7 + 0x16d4;
0x00003e6c addiu a0, sp, 0xaa | a0 = sp + 0xaa;
0x00003e70 jalr t9 | t9 ();
0x00003e74 lw gp, 0x18(sp) | gp = *(var_18h_4);
0x00003e78 move a2, s1 | a2 = s1;
0x00003e7c addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x00003e80 lw t9, -0x7cdc(gp) | t9 = sym.imp.fgets;
0x00003e84 move a0, s0 | a0 = s0;
0x00003e88 jalr t9 | t9 ();
0x00003e8c lw gp, 0x18(sp) | gp = *(var_18h_4);
| if (v0 == 0) {
0x00003e90 beqz v0, 0x3eec | goto label_6;
| }
0x00003e94 lw s2, -0x7fd4(gp) | s2 = *(gp);
| /* str.Referenced: */
0x00003e98 addiu s2, s2, 0xfc0 | s2 += 0xfc0;
0x00003e9c b 0x3ebc |
| while (v0 == 0) {
0x00003ea0 lw t9, -0x7cdc(gp) | t9 = sym.imp.fgets;
0x00003ea4 move a2, s1 | a2 = s1;
0x00003ea8 addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x00003eac move a0, s0 | a0 = s0;
0x00003eb0 jalr t9 | t9 ();
0x00003eb4 lw gp, 0x18(sp) | gp = *(var_18h_4);
| if (v0 == 0) {
0x00003eb8 beqz v0, 0x3eec | goto label_6;
| }
0x00003ebc lw t9, -0x7ca8(gp) | t9 = sym.imp.strstr;
0x00003ec0 move a1, s2 | a1 = s2;
0x00003ec4 move a0, s0 | a0 = s0;
0x00003ec8 jalr t9 | t9 ();
0x00003ecc lw gp, 0x18(sp) | gp = *(var_18h_4);
0x00003ed0 beqz v0, 0x3ea0 |
| }
0x00003ed4 lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00003ed8 addiu a2, s3, 0xc4 | a2 = s3 + 0xc4;
| /* esilref: '&lu' */
0x00003edc addiu a1, s7, 0x16d4 | a1 = s7 + 0x16d4;
0x00003ee0 addiu a0, sp, 0xb0 | a0 = sp + 0xb0;
0x00003ee4 jalr t9 | t9 ();
0x00003ee8 lw gp, 0x18(sp) | gp = *(var_18h_4);
| label_6:
0x00003eec lw t9, -0x7da8(gp) | t9 = sym.imp.fclose;
| label_2:
0x00003ef0 move a0, s1 | a0 = s1;
0x00003ef4 jalr t9 | t9 ();
0x00003ef8 lw gp, 0x18(sp) | gp = *(var_18h_4);
0x00003efc move v0, zero | v0 = 0;
0x00003f00 sw s6, 0xc8(s3) | *((s3 + 50)) = s6;
0x00003f04 sw s4, 0xcc(s3) | *((s3 + 51)) = s4;
| do {
0x00003f08 lw a0, 0x1a4(sp) | a0 = *(var_1a4h);
0x00003f0c lw v1, (s5) | v1 = *(s5);
0x00003f10 lw ra, 0x1cc(sp) | ra = *(var_1cch_2);
| if (a0 != v1) {
0x00003f14 bne a0, v1, 0x3fb4 | goto label_9;
| }
0x00003f18 lw s7, 0x1c8(sp) | s7 = *(var_1c8h_2);
0x00003f1c lw s6, 0x1c4(sp) | s6 = *(var_1c4h_2);
0x00003f20 lw s5, 0x1c0(sp) | s5 = *(var_1c0h_2);
0x00003f24 lw s4, 0x1bc(sp) | s4 = *(var_1bch_2);
0x00003f28 lw s3, 0x1b8(sp) | s3 = *(var_1b8h_2);
0x00003f2c lw s2, 0x1b4(sp) | s2 = *(var_1b4h_2);
0x00003f30 lw s1, 0x1b0(sp) | s1 = *(var_1b0h_2);
0x00003f34 lw s0, 0x1ac(sp) | s0 = *(var_1ach_2);
0x00003f38 addiu sp, sp, 0x1d0 |
0x00003f3c jr ra | return v0;
| label_4:
0x00003f40 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00003f44 sw a0, 0x10(sp) | *(var_10h_5) = a0;
| /* str._proc__u_smaps */
0x00003f48 addiu a3, a3, 0xf9c | a3 += 0xf9c;
0x00003f4c addiu a2, zero, 0x80 | a2 = 0x80;
0x00003f50 addiu a1, zero, 1 | a1 = 1;
0x00003f54 move a0, s0 | a0 = s0;
0x00003f58 jalr t9 | t9 ();
0x00003f5c lw gp, 0x18(sp) | gp = *(var_18h_4);
0x00003f60 b 0x3dc0 | goto label_0;
| label_5:
0x00003f64 addiu v0, zero, 1 | v0 = 1;
0x00003f68 b 0x3f08 |
| } while (1);
| label_8:
0x00003f6c lw t9, -0x7cdc(gp) | t9 = sym.imp.fgets;
0x00003f70 move a2, s1 | a2 = s1;
0x00003f74 addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x00003f78 move a0, s0 | a0 = s0;
0x00003f7c jalr t9 | t9 ();
0x00003f80 lw gp, 0x18(sp) | gp = *(var_18h_4);
| if (v0 != 0) {
0x00003f84 bnez v0, 0x3e44 | goto label_1;
| }
0x00003f88 lw t9, -0x7da8(gp) | t9 = sym.imp.fclose;
0x00003f8c b 0x3ef0 | goto label_2;
| label_7:
0x00003f90 lw t9, -0x7cdc(gp) | t9 = sym.imp.fgets;
0x00003f94 move a2, s1 | a2 = s1;
0x00003f98 addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x00003f9c move a0, s0 | a0 = s0;
0x00003fa0 jalr t9 | t9 ();
0x00003fa4 lw gp, 0x18(sp) | gp = *(var_18h_4);
| if (v0 != 0) {
0x00003fa8 bnez v0, 0x3e08 | goto label_3;
| }
0x00003fac lw t9, -0x7da8(gp) | t9 = sym.imp.fclose;
0x00003fb0 b 0x3ef0 | goto label_2;
| label_9:
0x00003fb4 lw t9, -0x7cf0(gp) | t9 = sym.imp.__stack_chk_fail;
0x00003fb8 jalr t9 | t9 ();
0x00003fbc nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0x35bc */
| #include <stdint.h>
|
; (fcn) sym.read_proc_pid_stat () | void read_proc_pid_stat () {
0x000035bc lui gp, 2 |
0x000035c0 addiu gp, gp, 0x6af4 |
0x000035c4 addu gp, gp, t9 | gp += t9;
0x000035c8 addiu sp, sp, -0x108 |
0x000035cc lw t9, -0x7de4(gp) | t9 = sym.imp.__sprintf_chk
0x000035d0 sw s2, 0xec(sp) | *(var_ech) = s2;
0x000035d4 lw s2, -0x7cd8(gp) | s2 = *((gp - 7990));
0x000035d8 sw gp, 0x50(sp) | *(var_50h) = gp;
0x000035dc sw s6, 0xfc(sp) | *(var_fch) = s6;
0x000035e0 lw v0, (s2) | v0 = *(s2);
0x000035e4 sw s5, 0xf8(sp) | *(var_f8h) = s5;
0x000035e8 sw s4, 0xf4(sp) | *(var_f4h) = s4;
0x000035ec sw s1, 0xe8(sp) | *(var_e8h) = s1;
0x000035f0 sw s0, 0xe4(sp) | *(var_e4h) = s0;
0x000035f4 sw ra, 0x104(sp) | *(var_104h) = ra;
0x000035f8 sw s7, 0x100(sp) | *(var_100h) = s7;
0x000035fc sw s3, 0xf0(sp) | *(var_f0h) = s3;
0x00003600 move s4, a3 | s4 = a3;
0x00003604 move s5, a0 | s5 = a0;
0x00003608 move s0, a1 | s0 = a1;
0x0000360c move s6, a2 | s6 = a2;
0x00003610 sw v0, 0xdc(sp) | *(var_dch) = v0;
0x00003614 addiu s1, sp, 0x5c | s1 = sp + 0x5c;
| if (a3 == 0) {
0x00003618 beqz a3, 0x371c | goto label_2;
| }
0x0000361c sw a3, 0x10(sp) | *(var_10h_2) = a3;
0x00003620 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00003624 sw a0, 0x14(sp) | *(var_14h_7) = a0;
| /* str._proc__u_task__u_stat */
0x00003628 addiu a3, a3, 0xdf0 | a3 += 0xdf0;
0x0000362c addiu a2, zero, 0x80 | a2 = 0x80;
0x00003630 addiu a1, zero, 1 | a1 = 1;
0x00003634 move a0, s1 | a0 = s1;
0x00003638 jalr t9 | t9 ();
0x0000363c lw gp, 0x50(sp) | gp = *(var_50h);
| do {
0x00003640 lw t9, -0x7d48(gp) | t9 = sym.imp.open;
0x00003644 move a0, s1 | a0 = s1;
0x00003648 move a1, zero | a1 = 0;
0x0000364c jalr t9 | t9 ();
0x00003650 move s1, v0 | s1 = v0;
0x00003654 lw gp, 0x50(sp) | gp = *(var_50h);
| if (v0 >= 0) {
0x00003658 bltz v0, 0x36e0 |
0x0000365c lw s3, -0x7fa8(gp) | s3 = *((gp - 8170));
0x00003660 lw t9, -0x7cb4(gp) | t9 = sym.imp.read;
0x00003664 addiu a2, zero, 0x400 | a2 = aav.0x00000400;
0x00003668 addiu a1, s3, 0x28a4 | a1 = s3 + 0x28a4;
0x0000366c move a0, v0 | a0 = v0;
0x00003670 jalr t9 | t9 ();
0x00003674 lw gp, 0x50(sp) | gp = *(var_50h);
0x00003678 move s7, v0 | s7 = v0;
0x0000367c lw t9, -0x7dc8(gp) | t9 = sym.imp.close;
0x00003680 move a0, s1 | a0 = s1;
0x00003684 jalr t9 | t9 ();
0x00003688 lw gp, 0x50(sp) | gp = *(var_50h);
| if (s7 <= 0) {
0x0000368c blez s7, 0x36e0 | goto label_0;
| }
0x00003690 addiu a0, s3, 0x28a4 | a0 = s3 + 0x28a4;
0x00003694 addu s7, s7, a0 | s7 += a0;
0x00003698 lw t9, -0x7d50(gp) | t9 = sym.imp.strchr;
0x0000369c addiu a1, zero, 0x28 | a1 = 0x28;
0x000036a0 sb zero, (s7) | *(s7) = 0;
0x000036a4 jalr t9 | t9 ();
0x000036a8 lw gp, 0x50(sp) | gp = *(var_50h);
| if (v0 == 0) {
0x000036ac beqz v0, 0x36e0 | goto label_0;
| }
0x000036b0 lw t9, -0x7d9c(gp) | t9 = sym.imp.strrchr;
0x000036b4 addiu s1, v0, 1 | s1 = v0 + 1;
0x000036b8 addiu a1, zero, 0x29 | a1 = 0x29;
0x000036bc move a0, s1 | a0 = s1;
0x000036c0 jalr t9 | t9 ();
0x000036c4 move s7, v0 | s7 = v0;
0x000036c8 lw gp, 0x50(sp) | gp = *(var_50h);
| if (v0 == 0) {
0x000036cc beqz v0, 0x36e0 | goto label_0;
| }
0x000036d0 subu s3, v0, s1 | __asm ("subu s3, v0, s1");
0x000036d4 slti v0, s3, 0x1000 | v0 = (s3 < aav.0x00001000) ? 1 : 0;
0x000036d8 lw t9, -0x7cd4(gp) | t9 = sym.imp.memcpy;
| if (v0 != 0) {
0x000036dc bnez v0, 0x3740 | goto label_3;
| }
| }
| label_0:
0x000036e0 addiu v0, zero, 1 | v0 = 1;
| label_1:
0x000036e4 lw a0, 0xdc(sp) | a0 = *(var_dch);
0x000036e8 lw v1, (s2) | v1 = *(s2);
0x000036ec lw ra, 0x104(sp) | ra = *(var_104h);
| if (a0 != v1) {
0x000036f0 bne a0, v1, 0x3888 | goto label_4;
| }
0x000036f4 lw s7, 0x100(sp) | s7 = *(var_100h);
0x000036f8 lw s6, 0xfc(sp) | s6 = *(var_fch);
0x000036fc lw s5, 0xf8(sp) | s5 = *(var_f8h);
0x00003700 lw s4, 0xf4(sp) | s4 = *(var_f4h);
0x00003704 lw s3, 0xf0(sp) | s3 = *(var_f0h);
0x00003708 lw s2, 0xec(sp) | s2 = *(var_ech);
0x0000370c lw s1, 0xe8(sp) | s1 = *(var_e8h);
0x00003710 lw s0, 0xe4(sp) | s0 = *(var_e4h);
0x00003714 addiu sp, sp, 0x108 |
0x00003718 jr ra | return v0;
| label_2:
0x0000371c lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00003720 sw a0, 0x10(sp) | *(var_10h_2) = a0;
| /* str._proc__u_stat */
0x00003724 addiu a3, a3, 0xe08 | a3 += 0xe08;
0x00003728 addiu a2, zero, 0x80 | a2 = 0x80;
0x0000372c addiu a1, zero, 1 | a1 = 1;
0x00003730 move a0, s1 | a0 = s1;
0x00003734 jalr t9 | t9 ();
0x00003738 lw gp, 0x50(sp) | gp = *(var_50h);
0x0000373c b 0x3640 |
| } while (1);
| label_3:
0x00003740 move a2, s3 | a2 = s3;
0x00003744 move a1, s1 | a1 = s1;
0x00003748 addiu a0, s0, 0x104 | a0 = s0 + 0x104;
0x0000374c jalr t9 | t9 ();
0x00003750 lw gp, 0x50(sp) | gp = *(var_50h);
0x00003754 addu s3, s0, s3 | s3 = s0 + s3;
0x00003758 addiu a1, s0, 0x80 | a1 = s0 + 0x80;
0x0000375c sb zero, 0x104(s3) | *((s3 + 260)) = 0;
0x00003760 sw a1, 0x1c(sp) | *(var_1ch_2) = a1;
0x00003764 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00003768 addiu v1, s0, 0x68 | v1 = s0 + 0x68;
0x0000376c lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00003770 addiu t7, s0, 0x98 | t7 = s0 + 0x98;
0x00003774 addiu t6, s0, 0x90 | t6 = s0 + 0x90;
0x00003778 addiu t5, s0, 0x48 | t5 = s0 + 0x48;
0x0000377c addiu t4, s0, 0xf0 | t4 = s0 + 0xf0;
0x00003780 addiu t3, s0, 0xec | t3 = s0 + 0xec;
0x00003784 addiu t2, s0, 0xe8 | t2 = s0 + 0xe8;
0x00003788 addiu t1, s0, 0xb0 | t1 = s0 + 0xb0;
0x0000378c addiu t0, s0, 0xa8 | t0 = s0 + 0xa8;
0x00003790 addiu a3, s0, 0x88 | a3 = s0 + 0x88;
0x00003794 addiu a2, s0, 0x78 | a2 = s0 + 0x78;
0x00003798 addiu a0, s0, 0x70 | a0 = s0 + 0x70;
0x0000379c addiu v0, s0, 0x60 | v0 = s0 + 0x60;
0x000037a0 sw a3, 0x24(sp) | *(var_24h_8) = a3;
0x000037a4 sw a2, 0x20(sp) | *(var_20h_3) = a2;
0x000037a8 sw a0, 0x18(sp) | *(var_18h_9) = a0;
0x000037ac sw v1, 0x14(sp) | *(var_14h_7) = v1;
0x000037b0 sw t7, 0x48(sp) | *(var_48h) = t7;
0x000037b4 sw t6, 0x44(sp) | *(var_44h) = t6;
0x000037b8 sw t5, 0x40(sp) | *(var_40h) = t5;
0x000037bc sw t4, 0x3c(sp) | *(var_3ch) = t4;
0x000037c0 sw t3, 0x38(sp) | *(var_38h) = t3;
0x000037c4 sw t2, 0x34(sp) | *(var_34h) = t2;
0x000037c8 sw t1, 0x30(sp) | *(var_30h_2) = t1;
0x000037cc sw t0, 0x2c(sp) | *(var_2ch_5) = t0;
0x000037d0 sw s6, 0x28(sp) | *(var_28h_2) = s6;
0x000037d4 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x000037d8 addiu a3, s0, 0x58 | a3 = s0 + 0x58;
0x000037dc addiu a2, s0, 0x50 | a2 = s0 + 0x50;
| /* str._s__d__d__d__d__d__u__llu__llu__llu__llu__llu__llu__lld__lld__d__d__u__u__d__llu__llu__u__u__u__u__u__u__u__u__u__u__u__u__u__u__u__u__u__llu__llu__lld_n */
0x000037e0 addiu a1, a1, 0xe18 | a1 += 0xe18;
0x000037e4 addiu a0, s7, 2 | a0 = s7 + 2;
0x000037e8 jalr t9 | t9 ();
0x000037ec slti v1, v0, 0xf | v1 = (v0 < 0xf) ? 1 : 0;
0x000037f0 lw gp, 0x50(sp) | gp = *(var_50h);
| if (v1 != 0) {
0x000037f4 bnez v1, 0x36e0 | goto label_0;
| }
0x000037f8 slti v0, v0, 0x11 | v0 = (v0 < 0x11) ? 1 : 0;
0x000037fc lw v1, -0x7fa4(gp) | v1 = *(gp);
| if (v0 != 0) {
0x00003800 beqz v0, 0x3820 |
0x00003804 move v0, zero | v0 = 0;
0x00003808 move v1, zero | v1 = 0;
0x0000380c sw v0, 0x98(s0) | *((s0 + 38)) = v0;
0x00003810 sw v1, 0x9c(s0) | *((s0 + 39)) = v1;
0x00003814 sw v0, 0x90(s0) | *((s0 + 36)) = v0;
0x00003818 sw v1, 0x94(s0) | *((s0 + 37)) = v1;
0x0000381c lw v1, -0x7fa4(gp) | v1 = *(gp);
| }
0x00003820 lw a0, 0xb0(s0) | a0 = *((s0 + 44));
0x00003824 lw v0, 0xb4(s0) | v0 = *((s0 + 45));
0x00003828 lw a3, (v1) | a3 = *(v1);
0x0000382c lw a2, 0xac(s0) | a2 = *((s0 + 43));
0x00003830 nor a1, zero, a3 | __asm ("nor a1, zero, a3");
0x00003834 lw v1, 0xa8(s0) | v1 = *((s0 + 42));
0x00003838 srl t0, a0, 1 | t0 = a0 >> 1;
0x0000383c srlv t0, t0, a1 | t0 >>= a1;
0x00003840 sllv v0, v0, a3 | v0 <<= a3;
0x00003844 andi a1, a3, 0x20 | a1 = a3 & 0x20;
0x00003848 sllv a0, a0, a3 | a0 <<= a3;
0x0000384c srl v1, v1, 0xa | v1 >>= 0xa;
0x00003850 sll a3, a2, 0x16 | a3 = a2 << 0x16;
0x00003854 or v0, v0, t0 | v0 |= t0;
| if (a1 == 0) {
0x00003858 movn v0, a0, a1 | v0 = a0;
| }
0x0000385c or v1, v1, a3 | v1 |= a3;
0x00003860 srl a2, a2, 0xa | a2 >>= 0xa;
| if (a1 == 0) {
0x00003864 movn a0, zero, a1 | a0 = 0;
| }
0x00003868 sw v0, 0xb4(s0) | *((s0 + 45)) = v0;
0x0000386c sw v1, 0xa8(s0) | *((s0 + 42)) = v1;
0x00003870 sw a2, 0xac(s0) | *((s0 + 43)) = a2;
0x00003874 sw a0, 0xb0(s0) | *((s0 + 44)) = a0;
0x00003878 sw s5, 0xc8(s0) | *((s0 + 50)) = s5;
0x0000387c sw s4, 0xcc(s0) | *((s0 + 51)) = s4;
0x00003880 move v0, zero | v0 = 0;
0x00003884 b 0x36e4 | goto label_1;
| label_4:
0x00003888 lw t9, -0x7cf0(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000388c jalr t9 | t9 ();
0x00003890 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0x3ab8 */
| #include <stdint.h>
|
; (fcn) sym.read_proc_pid_status () | void read_proc_pid_status () {
0x00003ab8 lui gp, 2 |
0x00003abc addiu gp, gp, 0x65f8 |
0x00003ac0 addu gp, gp, t9 | gp += t9;
0x00003ac4 addiu sp, sp, -0x1d8 |
0x00003ac8 lw t9, -0x7de4(gp) | t9 = sym.imp.__sprintf_chk
0x00003acc sw s7, 0x1cc(sp) | *(var_1cch) = s7;
0x00003ad0 lw s7, -0x7cd8(gp) | s7 = *((gp - 7990));
0x00003ad4 sw gp, 0x18(sp) | *(var_18h_3) = gp;
0x00003ad8 sw s6, 0x1c8(sp) | *(var_1c8h) = s6;
0x00003adc lw v0, (s7) | v0 = *(s7);
0x00003ae0 sw s2, 0x1b8(sp) | *(var_1b8h) = s2;
0x00003ae4 sw s0, 0x1b0(sp) | *(var_1b0h) = s0;
0x00003ae8 sw ra, 0x1d4(sp) | *(var_1d4h) = ra;
0x00003aec sw fp, 0x1d0(sp) | *(var_1d0h) = fp;
0x00003af0 sw s5, 0x1c4(sp) | *(var_1c4h) = s5;
0x00003af4 sw s4, 0x1c0(sp) | *(var_1c0h) = s4;
0x00003af8 sw s3, 0x1bc(sp) | *(var_1bch) = s3;
0x00003afc sw s1, 0x1b4(sp) | *(var_1b4h) = s1;
0x00003b00 move s6, a2 | s6 = a2;
0x00003b04 sw a0, 0x1d8(sp) | *(var_1d8h) = a0;
0x00003b08 move s2, a1 | s2 = a1;
0x00003b0c sw v0, 0x1ac(sp) | *(var_1ach) = v0;
0x00003b10 addiu s0, sp, 0x2c | s0 = sp + 0x2c;
| if (a2 == 0) {
0x00003b14 beqz a2, 0x3d04 | goto label_3;
| }
0x00003b18 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00003b1c sw a0, 0x14(sp) | *(var_14h_5) = a0;
0x00003b20 sw a2, 0x10(sp) | *(var_10h_4) = a2;
| /* str._proc__u_task__u_status */
0x00003b24 addiu a3, a3, 0xf0c | a3 += 0xf0c;
0x00003b28 addiu a2, zero, 0x80 | a2 = 0x80;
0x00003b2c addiu a1, zero, 1 | a1 = 1;
0x00003b30 move a0, s0 | a0 = s0;
0x00003b34 jalr t9 | t9 ();
0x00003b38 lw gp, 0x18(sp) | gp = *(var_18h_3);
| label_2:
0x00003b3c lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00003b40 lw t9, -0x7cc8(gp) | t9 = sym.imp.fopen;
0x00003b44 move a0, s0 | a0 = s0;
0x00003b48 addiu a1, a1, 0x184c | a1 += 0x184c;
0x00003b4c jalr t9 | t9 ();
0x00003b50 move s0, v0 | s0 = v0;
0x00003b54 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003b58 beqz v0, 0x3d2c | goto label_4;
| }
0x00003b5c lw s1, -0x7fd4(gp) | s1 = *(gp);
0x00003b60 lw s3, -0x7fd4(gp) | s3 = *(gp);
0x00003b64 lw s4, -0x7fd4(gp) | s4 = *(gp);
0x00003b68 lw v0, -0x7fd4(gp) | v0 = *(gp);
0x00003b6c lw s5, -0x7fd4(gp) | s5 = *(gp);
0x00003b70 addiu fp, sp, 0xac | fp = sp + 0xac;
| /* str.Uid: */
0x00003b74 addiu s1, s1, 0xf34 | s1 += 0xf34;
| /* str.Threads: */
0x00003b78 addiu s3, s3, 0xf40 | s3 += 0xf40;
| /* str.nonvoluntary_ctxt_switches: */
0x00003b7c addiu s4, s4, 0xf68 | s4 += 0xf68;
0x00003b80 sw v0, 0x24(sp) | *(var_24h_7) = v0;
| do {
| label_1:
0x00003b84 lw t9, -0x7cdc(gp) | t9 = sym.imp.fgets;
0x00003b88 move a2, s0 | a2 = s0;
0x00003b8c addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x00003b90 move a0, fp | a0 = fp;
0x00003b94 jalr t9 | t9 ();
0x00003b98 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003b9c beqz v0, 0x3c48 | goto label_5;
| }
| label_0:
0x00003ba0 lw t9, -0x7dbc(gp) | t9 = sym.imp.strncmp;
0x00003ba4 addiu a2, zero, 4 | a2 = 4;
0x00003ba8 move a1, s1 | a1 = s1;
0x00003bac move a0, fp | a0 = fp;
0x00003bb0 jalr t9 | t9 ();
0x00003bb4 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003bb8 beqz v0, 0x3ca4 | goto label_6;
| }
0x00003bbc lw t9, -0x7dbc(gp) | t9 = sym.imp.strncmp;
0x00003bc0 addiu a2, zero, 8 | a2 = 8;
0x00003bc4 move a1, s3 | a1 = s3;
0x00003bc8 move a0, fp | a0 = fp;
0x00003bcc jalr t9 | t9 ();
0x00003bd0 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003bd4 beqz v0, 0x3cc4 | goto label_7;
| }
0x00003bd8 lw t9, -0x7dbc(gp) | t9 = sym.imp.strncmp;
0x00003bdc addiu a2, zero, 0x18 | a2 = 0x18;
| /* str.voluntary_ctxt_switches: */
0x00003be0 addiu a1, s5, 0xf4c | a1 = s5 + 0xf4c;
0x00003be4 move a0, fp | a0 = fp;
0x00003be8 jalr t9 | t9 ();
0x00003bec lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003bf0 beqz v0, 0x3ce4 | goto label_8;
| }
0x00003bf4 lw t9, -0x7dbc(gp) | t9 = sym.imp.strncmp;
0x00003bf8 addiu a2, zero, 0x1b | a2 = 0x1b;
0x00003bfc move a1, s4 | a1 = s4;
0x00003c00 move a0, fp | a0 = fp;
0x00003c04 jalr t9 | t9 ();
0x00003c08 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003c0c bnez v0, 0x3b84 |
| } while (v0 != 0);
0x00003c10 lw v0, 0x24(sp) | v0 = *(var_24h_7);
0x00003c14 lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00003c18 addiu a2, s2, 0xbc | a2 = s2 + 0xbc;
0x00003c1c addiu a1, v0, 0x16d4 | a1 = v0 + 0x16d4;
0x00003c20 addiu a0, sp, 0xc8 | a0 = sp + 0xc8;
0x00003c24 jalr t9 | t9 ();
0x00003c28 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003c2c move a2, s0 | a2 = s0;
0x00003c30 addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x00003c34 lw t9, -0x7cdc(gp) | t9 = sym.imp.fgets;
0x00003c38 move a0, fp | a0 = fp;
0x00003c3c jalr t9 | t9 ();
0x00003c40 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 != 0) {
0x00003c44 bnez v0, 0x3ba0 | goto label_0;
| }
| label_5:
0x00003c48 lw t9, -0x7da8(gp) | t9 = sym.imp.fclose;
0x00003c4c move a0, s0 | a0 = s0;
0x00003c50 jalr t9 | t9 ();
0x00003c54 lw v0, 0x1d8(sp) | v0 = *(var_1d8h);
0x00003c58 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003c5c sw v0, 0xc8(s2) | *((s2 + 50)) = v0;
0x00003c60 sw s6, 0xcc(s2) | *((s2 + 51)) = s6;
0x00003c64 move v0, zero | v0 = 0;
| do {
0x00003c68 lw a0, 0x1ac(sp) | a0 = *(var_1ach);
0x00003c6c lw v1, (s7) | v1 = *(s7);
0x00003c70 lw ra, 0x1d4(sp) | ra = *(var_1d4h);
| if (a0 != v1) {
0x00003c74 bne a0, v1, 0x3d34 | goto label_9;
| }
0x00003c78 lw fp, 0x1d0(sp) | fp = *(var_1d0h);
0x00003c7c lw s7, 0x1cc(sp) | s7 = *(var_1cch);
0x00003c80 lw s6, 0x1c8(sp) | s6 = *(var_1c8h);
0x00003c84 lw s5, 0x1c4(sp) | s5 = *(var_1c4h);
0x00003c88 lw s4, 0x1c0(sp) | s4 = *(var_1c0h);
0x00003c8c lw s3, 0x1bc(sp) | s3 = *(var_1bch);
0x00003c90 lw s2, 0x1b8(sp) | s2 = *(var_1b8h);
0x00003c94 lw s1, 0x1b4(sp) | s1 = *(var_1b4h);
0x00003c98 lw s0, 0x1b0(sp) | s0 = *(var_1b0h);
0x00003c9c addiu sp, sp, 0x1d8 |
0x00003ca0 jr ra | return v0;
| label_6:
0x00003ca4 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00003ca8 lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00003cac addiu a2, s2, 0xf8 | a2 = s2 + 0xf8;
| /* esilref: '&u' */
0x00003cb0 invalid |
0x00003cb4 addiu a0, sp, 0xb1 | a0 = sp + 0xb1;
0x00003cb8 jalr t9 | t9 ();
0x00003cbc lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003cc0 b 0x3b84 | goto label_1;
| label_7:
0x00003cc4 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00003cc8 lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00003ccc addiu a2, s2, 0xfc | a2 = s2 + 0xfc;
| /* esilref: '&u' */
0x00003cd0 addiu a1, a1, 0xf3c | a1 += 0xf3c;
0x00003cd4 addiu a0, sp, 0xb5 | a0 = sp + 0xb5;
0x00003cd8 jalr t9 | t9 ();
0x00003cdc lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003ce0 b 0x3b84 | goto label_1;
| label_8:
0x00003ce4 lw v0, 0x24(sp) | v0 = *(var_24h_7);
0x00003ce8 lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00003cec addiu a2, s2, 0xb8 | a2 = s2 + 0xb8;
0x00003cf0 addiu a1, v0, 0x16d4 | a1 = v0 + 0x16d4;
0x00003cf4 addiu a0, sp, 0xc5 | a0 = sp + 0xc5;
0x00003cf8 jalr t9 | t9 ();
0x00003cfc lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003d00 b 0x3b84 | goto label_1;
| label_3:
0x00003d04 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00003d08 lw v0, 0x1d8(sp) | v0 = *(var_1d8h);
| /* str._proc__u_status */
0x00003d0c addiu a3, a3, 0xf24 | a3 += 0xf24;
0x00003d10 sw v0, 0x10(sp) | *(var_10h_4) = v0;
0x00003d14 addiu a2, zero, 0x80 | a2 = 0x80;
0x00003d18 addiu a1, zero, 1 | a1 = 1;
0x00003d1c move a0, s0 | a0 = s0;
0x00003d20 jalr t9 | t9 ();
0x00003d24 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003d28 b 0x3b3c | goto label_2;
| label_4:
0x00003d2c addiu v0, zero, 1 | v0 = 1;
0x00003d30 b 0x3c68 |
| } while (1);
| label_9:
0x00003d34 lw t9, -0x7cf0(gp) | t9 = sym.imp.__stack_chk_fail;
0x00003d38 jalr t9 | t9 ();
0x00003d3c nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0x3ab8 */
| #include <stdint.h>
|
; (fcn) sym.read_proc_pid_status () | void read_proc_pid_status () {
0x00003ab8 lui gp, 2 |
0x00003abc addiu gp, gp, 0x65f8 |
0x00003ac0 addu gp, gp, t9 | gp += t9;
0x00003ac4 addiu sp, sp, -0x1d8 |
0x00003ac8 lw t9, -0x7de4(gp) | t9 = sym.imp.__sprintf_chk
0x00003acc sw s7, 0x1cc(sp) | *(var_1cch) = s7;
0x00003ad0 lw s7, -0x7cd8(gp) | s7 = *((gp - 7990));
0x00003ad4 sw gp, 0x18(sp) | *(var_18h_3) = gp;
0x00003ad8 sw s6, 0x1c8(sp) | *(var_1c8h) = s6;
0x00003adc lw v0, (s7) | v0 = *(s7);
0x00003ae0 sw s2, 0x1b8(sp) | *(var_1b8h) = s2;
0x00003ae4 sw s0, 0x1b0(sp) | *(var_1b0h) = s0;
0x00003ae8 sw ra, 0x1d4(sp) | *(var_1d4h) = ra;
0x00003aec sw fp, 0x1d0(sp) | *(var_1d0h) = fp;
0x00003af0 sw s5, 0x1c4(sp) | *(var_1c4h) = s5;
0x00003af4 sw s4, 0x1c0(sp) | *(var_1c0h) = s4;
0x00003af8 sw s3, 0x1bc(sp) | *(var_1bch) = s3;
0x00003afc sw s1, 0x1b4(sp) | *(var_1b4h) = s1;
0x00003b00 move s6, a2 | s6 = a2;
0x00003b04 sw a0, 0x1d8(sp) | *(var_1d8h) = a0;
0x00003b08 move s2, a1 | s2 = a1;
0x00003b0c sw v0, 0x1ac(sp) | *(var_1ach) = v0;
0x00003b10 addiu s0, sp, 0x2c | s0 = sp + 0x2c;
| if (a2 == 0) {
0x00003b14 beqz a2, 0x3d04 | goto label_3;
| }
0x00003b18 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00003b1c sw a0, 0x14(sp) | *(var_14h_5) = a0;
0x00003b20 sw a2, 0x10(sp) | *(var_10h_4) = a2;
| /* str._proc__u_task__u_status */
0x00003b24 addiu a3, a3, 0xf0c | a3 += 0xf0c;
0x00003b28 addiu a2, zero, 0x80 | a2 = 0x80;
0x00003b2c addiu a1, zero, 1 | a1 = 1;
0x00003b30 move a0, s0 | a0 = s0;
0x00003b34 jalr t9 | t9 ();
0x00003b38 lw gp, 0x18(sp) | gp = *(var_18h_3);
| label_2:
0x00003b3c lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00003b40 lw t9, -0x7cc8(gp) | t9 = sym.imp.fopen;
0x00003b44 move a0, s0 | a0 = s0;
0x00003b48 addiu a1, a1, 0x184c | a1 += 0x184c;
0x00003b4c jalr t9 | t9 ();
0x00003b50 move s0, v0 | s0 = v0;
0x00003b54 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003b58 beqz v0, 0x3d2c | goto label_4;
| }
0x00003b5c lw s1, -0x7fd4(gp) | s1 = *(gp);
0x00003b60 lw s3, -0x7fd4(gp) | s3 = *(gp);
0x00003b64 lw s4, -0x7fd4(gp) | s4 = *(gp);
0x00003b68 lw v0, -0x7fd4(gp) | v0 = *(gp);
0x00003b6c lw s5, -0x7fd4(gp) | s5 = *(gp);
0x00003b70 addiu fp, sp, 0xac | fp = sp + 0xac;
| /* str.Uid: */
0x00003b74 addiu s1, s1, 0xf34 | s1 += 0xf34;
| /* str.Threads: */
0x00003b78 addiu s3, s3, 0xf40 | s3 += 0xf40;
| /* str.nonvoluntary_ctxt_switches: */
0x00003b7c addiu s4, s4, 0xf68 | s4 += 0xf68;
0x00003b80 sw v0, 0x24(sp) | *(var_24h_7) = v0;
| do {
| label_1:
0x00003b84 lw t9, -0x7cdc(gp) | t9 = sym.imp.fgets;
0x00003b88 move a2, s0 | a2 = s0;
0x00003b8c addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x00003b90 move a0, fp | a0 = fp;
0x00003b94 jalr t9 | t9 ();
0x00003b98 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003b9c beqz v0, 0x3c48 | goto label_5;
| }
| label_0:
0x00003ba0 lw t9, -0x7dbc(gp) | t9 = sym.imp.strncmp;
0x00003ba4 addiu a2, zero, 4 | a2 = 4;
0x00003ba8 move a1, s1 | a1 = s1;
0x00003bac move a0, fp | a0 = fp;
0x00003bb0 jalr t9 | t9 ();
0x00003bb4 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003bb8 beqz v0, 0x3ca4 | goto label_6;
| }
0x00003bbc lw t9, -0x7dbc(gp) | t9 = sym.imp.strncmp;
0x00003bc0 addiu a2, zero, 8 | a2 = 8;
0x00003bc4 move a1, s3 | a1 = s3;
0x00003bc8 move a0, fp | a0 = fp;
0x00003bcc jalr t9 | t9 ();
0x00003bd0 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003bd4 beqz v0, 0x3cc4 | goto label_7;
| }
0x00003bd8 lw t9, -0x7dbc(gp) | t9 = sym.imp.strncmp;
0x00003bdc addiu a2, zero, 0x18 | a2 = 0x18;
| /* str.voluntary_ctxt_switches: */
0x00003be0 addiu a1, s5, 0xf4c | a1 = s5 + 0xf4c;
0x00003be4 move a0, fp | a0 = fp;
0x00003be8 jalr t9 | t9 ();
0x00003bec lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 == 0) {
0x00003bf0 beqz v0, 0x3ce4 | goto label_8;
| }
0x00003bf4 lw t9, -0x7dbc(gp) | t9 = sym.imp.strncmp;
0x00003bf8 addiu a2, zero, 0x1b | a2 = 0x1b;
0x00003bfc move a1, s4 | a1 = s4;
0x00003c00 move a0, fp | a0 = fp;
0x00003c04 jalr t9 | t9 ();
0x00003c08 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003c0c bnez v0, 0x3b84 |
| } while (v0 != 0);
0x00003c10 lw v0, 0x24(sp) | v0 = *(var_24h_7);
0x00003c14 lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00003c18 addiu a2, s2, 0xbc | a2 = s2 + 0xbc;
0x00003c1c addiu a1, v0, 0x16d4 | a1 = v0 + 0x16d4;
0x00003c20 addiu a0, sp, 0xc8 | a0 = sp + 0xc8;
0x00003c24 jalr t9 | t9 ();
0x00003c28 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003c2c move a2, s0 | a2 = s0;
0x00003c30 addiu a1, zero, 0x100 | a1 = aav.0x00000100;
0x00003c34 lw t9, -0x7cdc(gp) | t9 = sym.imp.fgets;
0x00003c38 move a0, fp | a0 = fp;
0x00003c3c jalr t9 | t9 ();
0x00003c40 lw gp, 0x18(sp) | gp = *(var_18h_3);
| if (v0 != 0) {
0x00003c44 bnez v0, 0x3ba0 | goto label_0;
| }
| label_5:
0x00003c48 lw t9, -0x7da8(gp) | t9 = sym.imp.fclose;
0x00003c4c move a0, s0 | a0 = s0;
0x00003c50 jalr t9 | t9 ();
0x00003c54 lw v0, 0x1d8(sp) | v0 = *(var_1d8h);
0x00003c58 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003c5c sw v0, 0xc8(s2) | *((s2 + 50)) = v0;
0x00003c60 sw s6, 0xcc(s2) | *((s2 + 51)) = s6;
0x00003c64 move v0, zero | v0 = 0;
| do {
0x00003c68 lw a0, 0x1ac(sp) | a0 = *(var_1ach);
0x00003c6c lw v1, (s7) | v1 = *(s7);
0x00003c70 lw ra, 0x1d4(sp) | ra = *(var_1d4h);
| if (a0 != v1) {
0x00003c74 bne a0, v1, 0x3d34 | goto label_9;
| }
0x00003c78 lw fp, 0x1d0(sp) | fp = *(var_1d0h);
0x00003c7c lw s7, 0x1cc(sp) | s7 = *(var_1cch);
0x00003c80 lw s6, 0x1c8(sp) | s6 = *(var_1c8h);
0x00003c84 lw s5, 0x1c4(sp) | s5 = *(var_1c4h);
0x00003c88 lw s4, 0x1c0(sp) | s4 = *(var_1c0h);
0x00003c8c lw s3, 0x1bc(sp) | s3 = *(var_1bch);
0x00003c90 lw s2, 0x1b8(sp) | s2 = *(var_1b8h);
0x00003c94 lw s1, 0x1b4(sp) | s1 = *(var_1b4h);
0x00003c98 lw s0, 0x1b0(sp) | s0 = *(var_1b0h);
0x00003c9c addiu sp, sp, 0x1d8 |
0x00003ca0 jr ra | return v0;
| label_6:
0x00003ca4 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00003ca8 lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00003cac addiu a2, s2, 0xf8 | a2 = s2 + 0xf8;
| /* esilref: '&u' */
0x00003cb0 invalid |
0x00003cb4 addiu a0, sp, 0xb1 | a0 = sp + 0xb1;
0x00003cb8 jalr t9 | t9 ();
0x00003cbc lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003cc0 b 0x3b84 | goto label_1;
| label_7:
0x00003cc4 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00003cc8 lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00003ccc addiu a2, s2, 0xfc | a2 = s2 + 0xfc;
| /* esilref: '&u' */
0x00003cd0 addiu a1, a1, 0xf3c | a1 += 0xf3c;
0x00003cd4 addiu a0, sp, 0xb5 | a0 = sp + 0xb5;
0x00003cd8 jalr t9 | t9 ();
0x00003cdc lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003ce0 b 0x3b84 | goto label_1;
| label_8:
0x00003ce4 lw v0, 0x24(sp) | v0 = *(var_24h_7);
0x00003ce8 lw t9, -0x7d60(gp) | t9 = sym.imp.__isoc99_sscanf;
0x00003cec addiu a2, s2, 0xb8 | a2 = s2 + 0xb8;
0x00003cf0 addiu a1, v0, 0x16d4 | a1 = v0 + 0x16d4;
0x00003cf4 addiu a0, sp, 0xc5 | a0 = sp + 0xc5;
0x00003cf8 jalr t9 | t9 ();
0x00003cfc lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003d00 b 0x3b84 | goto label_1;
| label_3:
0x00003d04 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00003d08 lw v0, 0x1d8(sp) | v0 = *(var_1d8h);
| /* str._proc__u_status */
0x00003d0c addiu a3, a3, 0xf24 | a3 += 0xf24;
0x00003d10 sw v0, 0x10(sp) | *(var_10h_4) = v0;
0x00003d14 addiu a2, zero, 0x80 | a2 = 0x80;
0x00003d18 addiu a1, zero, 1 | a1 = 1;
0x00003d1c move a0, s0 | a0 = s0;
0x00003d20 jalr t9 | t9 ();
0x00003d24 lw gp, 0x18(sp) | gp = *(var_18h_3);
0x00003d28 b 0x3b3c | goto label_2;
| label_4:
0x00003d2c addiu v0, zero, 1 | v0 = 1;
0x00003d30 b 0x3c68 |
| } while (1);
| label_9:
0x00003d34 lw t9, -0x7cf0(gp) | t9 = sym.imp.__stack_chk_fail;
0x00003d38 jalr t9 | t9 ();
0x00003d3c nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0x4a28 */
| #include <stdint.h>
|
; (fcn) sym.read_task_stats () | void read_task_stats () {
0x00004a28 lui gp, 2 |
0x00004a2c addiu gp, gp, 0x5688 |
0x00004a30 addu gp, gp, t9 | gp += t9;
0x00004a34 addiu sp, sp, -0xd0 |
0x00004a38 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x00004a3c sw s5, 0xc0(sp) | *(var_c0h) = s5;
0x00004a40 lw s5, -0x7cd8(gp) | s5 = *((gp - 7990));
0x00004a44 lw t9, -0x7de4(gp) | t9 = sym.imp.__sprintf_chk
0x00004a48 sw s3, 0xb8(sp) | *(var_b8h) = s3;
0x00004a4c lw v0, (s5) | v0 = *(s5);
0x00004a50 sw s1, 0xb0(sp) | *(var_b0h) = s1;
0x00004a54 move s3, a1 | s3 = a1;
0x00004a58 addiu s1, sp, 0x24 | s1 = sp + 0x24;
0x00004a5c sw gp, 0x18(sp) | *(var_18h) = gp;
0x00004a60 sw ra, 0xcc(sp) | *(var_cch) = ra;
0x00004a64 sw s2, 0xb4(sp) | *(var_b4h) = s2;
0x00004a68 sw s0, 0xac(sp) | *(var_ach) = s0;
| /* str._proc__u_task */
0x00004a6c addiu a3, a3, 0x1080 | a3 += 0x1080;
0x00004a70 addiu a1, zero, 1 | a1 = 1;
0x00004a74 sw s7, 0xc8(sp) | *(var_c8h) = s7;
0x00004a78 sw s6, 0xc4(sp) | *(var_c4h) = s6;
0x00004a7c sw s4, 0xbc(sp) | *(var_bch) = s4;
0x00004a80 move s2, a0 | s2 = a0;
0x00004a84 move s0, a2 | s0 = a2;
0x00004a88 move a0, s1 | a0 = s1;
0x00004a8c addiu a2, zero, 0x80 | a2 = 0x80;
0x00004a90 sw s3, 0x10(sp) | *(var_10h) = s3;
0x00004a94 sw v0, 0xa4(sp) | *(var_a4h) = v0;
0x00004a98 jalr t9 | t9 ();
0x00004a9c nop |
0x00004aa0 lw gp, 0x18(sp) | gp = *(var_18h);
0x00004aa4 lw t9, -0x7dd4(gp) | t9 = sym.imp.opendir;
0x00004aa8 move a0, s1 | a0 = s1;
0x00004aac jalr t9 | t9 ();
0x00004ab0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004ab4 beqz v0, 0x4ba4 | goto label_2;
| }
0x00004ab8 move s1, v0 | s1 = v0;
0x00004abc lw v0, -0x7fc8(gp) | v0 = *(gp);
0x00004ac0 sll s2, s2, 2 | s2 <<= 2;
0x00004ac4 addu s2, v0, s2 | s2 = v0 + s2;
0x00004ac8 addiu s7, sp, 0x20 | s7 = sp + 0x20;
| label_1:
0x00004acc lw s4, -0x7f64(gp) | s4 = sym.read_pid_stats;
| do {
0x00004ad0 lw t9, -0x7d98(gp) | t9 = sym.imp.readdir;
| label_0:
0x00004ad4 move a0, s1 | a0 = s1;
0x00004ad8 jalr t9 | t9 ();
0x00004adc move s6, v0 | s6 = v0;
0x00004ae0 lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 == 0) {
0x00004ae4 beqz v0, 0x4b94 | goto label_3;
| }
0x00004ae8 lw t9, -0x7ddc(gp) | t9 = sym.imp.__ctype_b_loc;
0x00004aec jalr t9 | t9 ();
0x00004af0 nop |
0x00004af4 lb v1, 0xb(s6) | v1 = *((s6 + 11));
0x00004af8 lw v0, (v0) | v0 = *(v0);
0x00004afc sll v1, v1, 1 | v1 <<= 1;
0x00004b00 addu v0, v0, v1 | v0 += v1;
0x00004b04 lhu v0, (v0) | v0 = *(v0);
0x00004b08 andi v0, v0, 0x800 | v0 &= 0x800;
0x00004b0c lw gp, 0x18(sp) | gp = *(var_18h);
0x00004b10 beqz v0, 0x4ad0 |
| } while (v0 == 0);
0x00004b14 lw v0, (s0) | v0 = *(s0);
0x00004b18 addiu a0, s6, 0xb | a0 = s6 + 0xb;
0x00004b1c addiu a3, v0, 1 | a3 = v0 + 1;
0x00004b20 addiu s6, zero, 0x2110 | s6 = aav.0x00002110;
0x00004b24 lw v1, (s2) | v1 = *(s2);
0x00004b28 sw a3, (s0) | *(s0) = a3;
0x00004b2c mul a3, v0, s6 | __asm ("mul a3, v0, s6");
0x00004b30 lw t9, -0x7dc4(gp) | t9 = sym.imp.strtol;
0x00004b34 addiu a2, zero, 0xa | a2 = 0xa;
0x00004b38 move a1, zero | a1 = 0;
0x00004b3c addu s6, a3, v1 | s6 = a3 + v1;
0x00004b40 jalr t9 | t9 ();
0x00004b44 move a0, v0 | a0 = v0;
0x00004b48 move a3, s3 | a3 = s3;
0x00004b4c move a2, s7 | a2 = s7;
0x00004b50 move t9, s4 | t9 = s4;
0x00004b54 move a1, s6 | a1 = s6;
0x00004b58 bal 0x4544 | sym_read_pid_stats ();
0x00004b5c lw gp, 0x18(sp) | gp = *(var_18h);
| if (v0 != 0) {
0x00004b60 beqz v0, 0x4b68 |
0x00004b64 sw zero, 0xc8(s6) | *((s6 + 50)) = 0;
| }
0x00004b68 lw v1, -0x7fc4(gp) | v1 = *(gp);
0x00004b6c lw v0, (s0) | v0 = *(s0);
0x00004b70 lw v1, (v1) | v1 = *(v1);
0x00004b74 sltu v0, v0, v1 | v0 = (v0 < v1) ? 1 : 0;
0x00004b78 lw t9, -0x7d98(gp) | t9 = sym.imp.readdir;
| if (v0 != 0) {
0x00004b7c bnez v0, 0x4ad4 | goto label_0;
| }
0x00004b80 lw t9, -0x7f60(gp) | t9 = sym.realloc_pid;
0x00004b84 bal 0x31e8 | sym_realloc_pid ();
0x00004b88 nop |
0x00004b8c lw gp, 0x18(sp) | gp = *(var_18h);
0x00004b90 b 0x4acc | goto label_1;
| label_3:
0x00004b94 lw t9, -0x7dcc(gp) | t9 = sym.imp.closedir;
0x00004b98 move a0, s1 | a0 = s1;
0x00004b9c jalr t9 | t9 ();
0x00004ba0 lw gp, 0x18(sp) | gp = *(var_18h);
| label_2:
0x00004ba4 lw v1, 0xa4(sp) | v1 = *(var_a4h);
0x00004ba8 lw v0, (s5) | v0 = *(s5);
0x00004bac lw ra, 0xcc(sp) | ra = *(var_cch);
| if (v1 == v0) {
0x00004bb0 bne v1, v0, 0x4bdc |
0x00004bb4 lw s7, 0xc8(sp) | s7 = *(var_c8h);
0x00004bb8 lw s6, 0xc4(sp) | s6 = *(var_c4h);
0x00004bbc lw s5, 0xc0(sp) | s5 = *(var_c0h);
0x00004bc0 lw s4, 0xbc(sp) | s4 = *(var_bch);
0x00004bc4 lw s3, 0xb8(sp) | s3 = *(var_b8h);
0x00004bc8 lw s2, 0xb4(sp) | s2 = *(var_b4h);
0x00004bcc lw s1, 0xb0(sp) | s1 = *(var_b0h);
0x00004bd0 lw s0, 0xac(sp) | s0 = *(var_ach);
0x00004bd4 addiu sp, sp, 0xd0 |
0x00004bd8 jr ra | return v1;
| }
0x00004bdc lw t9, -0x7cf0(gp) | t9 = sym.imp.__stack_chk_fail;
0x00004be0 jalr t9 | t9 ();
0x00004be4 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0x8fa0 */
| #include <stdint.h>
|
; (fcn) sym.write_pid_io_stats () | void write_pid_io_stats () {
0x00008fa0 lui gp, 2 |
0x00008fa4 addiu gp, gp, 0x1110 |
0x00008fa8 addu gp, gp, t9 | gp += t9;
0x00008fac lw v0, -0x7cd8(gp) | v0 = *((gp - 7990));
0x00008fb0 addiu sp, sp, -0xd0 |
0x00008fb4 sw s6, 0xc0(sp) | *(var_c0h) = s6;
0x00008fb8 sw v0, 0x70(sp) | *(var_70h_2) = v0;
0x00008fbc move s6, a0 | s6 = a0;
0x00008fc0 lw v0, (v0) | v0 = *(v0);
0x00008fc4 lw a0, 0xe4(sp) | a0 = *(var_e4h);
0x00008fc8 sw gp, 0x28(sp) | *(var_28h) = gp;
0x00008fcc sw fp, 0xc8(sp) | *(var_c8h) = fp;
0x00008fd0 sw s7, 0xc4(sp) | *(var_c4h) = s7;
0x00008fd4 sw ra, 0xcc(sp) | *(var_cch) = ra;
0x00008fd8 sw s5, 0xbc(sp) | *(var_bch) = s5;
0x00008fdc sw s4, 0xb8(sp) | *(var_b8h) = s4;
0x00008fe0 sw s3, 0xb4(sp) | *(var_b4h) = s3;
0x00008fe4 sw s2, 0xb0(sp) | *(var_b0h) = s2;
0x00008fe8 sw s1, 0xac(sp) | *(var_ach) = s1;
0x00008fec sw s0, 0xa8(sp) | *(var_a8h) = s0;
0x00008ff0 move fp, a1 | fp = a1;
0x00008ff4 move s7, a3 | s7 = a3;
0x00008ff8 lw v1, 0xe0(sp) | v1 = *(var_e0h);
0x00008ffc sw a0, 0x4c(sp) | *(var_4ch_2) = a0;
0x00009000 sw v0, 0xa4(sp) | *(var_a4h) = v0;
0x00009004 lw s0, -0x7fbc(gp) | s0 = *(gp);
| if (a2 != 0) {
0x00009008 bnez a2, 0x94ec | goto label_7;
| }
| label_5:
0x0000900c lw s1, -0x7fc4(gp) | s1 = *(gp);
0x00009010 lw v0, (s1) | v0 = *(s1);
0x00009014 lw a0, -0x7fd4(gp) | a0 = *(gp);
| if (v0 == 0) {
0x00009018 beqz v0, 0x94a4 | goto label_8;
| }
0x0000901c lw v0, -0x7f38(gp) | v0 = sym.get_pid_to_display;
0x00009020 sw v0, 0x34(sp) | *(var_34h_2) = v0;
0x00009024 lw v0, -0x7fd4(gp) | v0 = *(gp);
0x00009028 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x0000902c sw v0, 0x58(sp) | *(var_58h) = v0;
0x00009030 lw v0, -0x7fd4(gp) | v0 = *(gp);
0x00009034 sw a0, 0x48(sp) | *(var_48h) = a0;
0x00009038 sw a1, 0x5c(sp) | *(var_5ch_3) = a1;
0x0000903c lw v1, 0x1544(v0) | v1 = *((v0 + 1361));
0x00009040 lw v0, 0x1540(v0) | v0 = *((v0 + 1360));
0x00009044 sw v1, 0x6c(sp) | *(var_6ch_3) = v1;
0x00009048 sw v0, 0x68(sp) | *(var_68h_3) = v0;
0x0000904c lw v0, -0x7fd4(gp) | v0 = *(gp);
0x00009050 lw v1, 0x1534(a0) | v1 = *((a0 + 1357));
0x00009054 sw v0, 0x74(sp) | *(var_74h_3) = v0;
0x00009058 lw v0, 0x1530(a0) | v0 = *((a0 + 1356));
0x0000905c sw v1, 0x54(sp) | *(var_54h) = v1;
0x00009060 sw v0, 0x50(sp) | *(var_50h) = v0;
0x00009064 lw v1, 0x153c(a1) | v1 = *((a1 + 1359));
0x00009068 lw v0, 0x1538(a1) | v0 = *((a1 + 1358));
0x0000906c sw v1, 0x64(sp) | *(var_64h_3) = v1;
0x00009070 sw v0, 0x60(sp) | *(var_60h_3) = v0;
0x00009074 move s2, zero | s2 = 0;
0x00009078 move s0, zero | s0 = 0;
0x0000907c addiu s5, sp, 0x80 | s5 = sp + 0x80;
0x00009080 addiu s4, sp, 0x7c | s4 = sp + 0x7c;
0x00009084 b 0x9118 | goto label_9;
| label_1:
0x00009088 lw t9, -0x7f34(gp) | t9 = *(gp);
0x0000908c bal 0x104e0 | fcn_000104e0 ();
0x00009090 nop |
0x00009094 lw gp, 0x28(sp) | gp = *(var_28h);
0x00009098 lw a0, 0xe4(s2) | a0 = *((s2 + 57));
0x0000909c move s2, v0 | s2 = v0;
0x000090a0 lw t9, -0x7f18(gp) | t9 = *(gp);
0x000090a4 move s3, v1 | s3 = v1;
0x000090a8 bal 0x10440 | fcn_00010440 ();
0x000090ac lw gp, 0x28(sp) | gp = *(var_28h);
0x000090b0 move a2, v0 | a2 = v0;
0x000090b4 move a3, v1 | a3 = v1;
0x000090b8 lw t9, -0x7f30(gp) | t9 = *(gp);
0x000090bc move a0, s2 | a0 = s2;
0x000090c0 move a1, s3 | a1 = s3;
0x000090c4 bal 0xf440 | fcn_0000f440 ();
0x000090c8 lw gp, 0x28(sp) | gp = *(var_28h);
0x000090cc sw v0, 0x10(sp) | *(var_98h) = v0;
0x000090d0 sw v1, 0x14(sp) | *(var_14h) = v1;
0x000090d4 lw t9, -0x7f20(gp) | t9 = sym.cprintf_f;
0x000090d8 move a3, zero | a3 = 0;
0x000090dc addiu a2, zero, 7 | a2 = 7;
0x000090e0 addiu a1, zero, 1 | a1 = 1;
0x000090e4 addiu a0, zero, -1 | a0 = -1;
0x000090e8 bal 0xe518 | sym_cprintf_f ();
0x000090ec lw gp, 0x28(sp) | gp = *(var_28h);
| label_2:
0x000090f0 lw t9, -0x7f1c(gp) | t9 = sym.print_comm;
0x000090f4 lw a0, 0x7c(sp) | a0 = *(var_7ch_3);
0x000090f8 addiu s2, zero, 1 | s2 = 1;
0x000090fc bal 0x34b4 | sym_print_comm ();
0x00009100 lw gp, 0x28(sp) | gp = *(var_28h);
| do {
| label_0:
0x00009104 lw v0, (s1) | v0 = *(s1);
0x00009108 addiu s0, s0, 1 | s0++;
0x0000910c sltu v0, s0, v0 | v0 = (s0 < v0) ? 1 : 0;
0x00009110 lw v0, 0x70(sp) | v0 = *(var_70h_2);
| if (v0 == 0) {
0x00009114 beqz v0, 0x94ac | goto label_10;
| }
| label_9:
0x00009118 lw t9, 0x34(sp) | t9 = *(var_34h_2);
0x0000911c sw s5, 0x18(sp) | *(var_18h) = s5;
0x00009120 sw s4, 0x14(sp) | *(var_14h) = s4;
0x00009124 sw zero, 0x10(sp) | *(var_98h) = 0;
0x00009128 addiu a3, zero, 4 | a3 = 4;
0x0000912c move a2, s0 | a2 = s0;
0x00009130 move a1, fp | a1 = fp;
0x00009134 move a0, s6 | a0 = s6;
0x00009138 jalr t9 | t9 ();
0x0000913c lw gp, 0x28(sp) | gp = *(var_28h);
0x00009140 beqz v0, 0x9104 |
| } while (v0 == 0);
0x00009144 lw v1, 0x80(sp) | v1 = *(var_80h_3);
| if (s7 == 0) {
0x00009148 bnez s7, 0x915c |
0x0000914c lw a0, 0x7c(sp) | a0 = *(var_7ch_3);
0x00009150 lw v1, 0xe4(v1) | v1 = *((v1 + 57));
0x00009154 addiu v1, v1, 1 | v1++;
0x00009158 sw v1, 0xe4(a0) | *((a0 + 57)) = v1;
| }
0x0000915c lw v0, 0x58(sp) | v0 = *(var_58h);
| if (v0 < 0) {
0x00009160 bltz v0, 0x9104 | goto label_0;
| }
0x00009164 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
0x00009168 lw a2, 0x4c(sp) | a2 = *(var_4ch_2);
0x0000916c addiu a1, v0, 0x10c8 | a1 = v0 + 0x10c8;
0x00009170 addiu a0, zero, 1 | a0 = 1;
0x00009174 lw s2, 0x7c(sp) | s2 = *(var_7ch_3);
0x00009178 jalr t9 | t9 ();
0x0000917c lw gp, 0x28(sp) | gp = *(var_28h);
0x00009180 move a0, s2 | a0 = s2;
0x00009184 lw t9, -0x7f3c(gp) | t9 = sym.__print_line_id;
0x00009188 addiu a1, zero, 0x2d | a1 = 0x2d;
0x0000918c bal 0x57d0 | sym_print_line_id ();
0x00009190 lw s2, 0x7c(sp) | s2 = *(var_7ch_3);
0x00009194 lw v0, 0xf4(s2) | v0 = *((s2 + 61));
0x00009198 andi v0, v0, 1 | v0 &= 1;
0x0000919c lw gp, 0x28(sp) | gp = *(var_28h);
| if (v0 != 0) {
0x000091a0 bnez v0, 0x9440 | goto label_11;
| }
0x000091a4 lw s3, 0x80(sp) | s3 = *(var_80h_3);
0x000091a8 lw t9, -0x7f34(gp) | t9 = *(gp);
0x000091ac lw a0, 0xe8(sp) | a0 = *(var_e8h);
0x000091b0 lw a1, 0xec(sp) | a1 = *(var_ech);
0x000091b4 bal 0x104e0 | fcn_000104e0 ();
0x000091b8 lw a1, (s2) | a1 = *(s2);
0x000091bc lw gp, 0x28(sp) | gp = *(var_28h);
0x000091c0 lw a0, (s3) | a0 = *(s3);
0x000091c4 lw a3, 4(s3) | a3 = *((s3 + 1));
0x000091c8 lw a2, 4(s2) | a2 = *((s2 + 1));
0x000091cc subu a0, a1, a0 | __asm ("subu a0, a1, a0");
0x000091d0 subu a2, a2, a3 | __asm ("subu a2, a2, a3");
0x000091d4 sltu a1, a1, a0 | a1 = (a1 < a0) ? 1 : 0;
0x000091d8 lw t9, -0x7f34(gp) | t9 = *(gp);
0x000091dc subu a1, a2, a1 | __asm ("subu a1, a2, a1");
0x000091e0 sw v0, 0x38(sp) | *(var_38h_2) = v0;
0x000091e4 sw v1, 0x3c(sp) | *(var_3ch) = v1;
0x000091e8 bal 0x104e0 | fcn_000104e0 ();
0x000091ec lw gp, 0x28(sp) | gp = *(var_28h);
0x000091f0 lw a2, 0x38(sp) | a2 = *(var_38h_2);
0x000091f4 lw a3, 0x3c(sp) | a3 = *(var_3ch);
0x000091f8 lw t9, -0x7f30(gp) | t9 = *(gp);
0x000091fc move a0, v0 | a0 = v0;
0x00009200 move a1, v1 | a1 = v1;
0x00009204 bal 0xf440 | fcn_0000f440 ();
0x00009208 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000920c lw a2, 0x50(sp) | a2 = *(var_50h);
0x00009210 lw a3, 0x54(sp) | a3 = *(var_54h);
0x00009214 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x00009218 move a0, v0 | a0 = v0;
0x0000921c move a1, v1 | a1 = v1;
0x00009220 bal 0xfea0 | fcn_0000fea0 ();
0x00009224 lw a1, 8(s2) | a1 = *((s2 + 2));
0x00009228 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000922c lw a0, 8(s3) | a0 = *((s3 + 2));
0x00009230 lw a3, 0xc(s3) | a3 = *((s3 + 3));
0x00009234 lw a2, 0xc(s2) | a2 = *((s2 + 3));
0x00009238 subu a0, a1, a0 | __asm ("subu a0, a1, a0");
0x0000923c subu a2, a2, a3 | __asm ("subu a2, a2, a3");
0x00009240 sltu a1, a1, a0 | a1 = (a1 < a0) ? 1 : 0;
0x00009244 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00009248 subu a1, a2, a1 | __asm ("subu a1, a2, a1");
0x0000924c sw v0, 0x40(sp) | *(var_40h) = v0;
0x00009250 sw v1, 0x44(sp) | *(var_44h) = v1;
0x00009254 bal 0x104e0 | fcn_000104e0 ();
0x00009258 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000925c lw a2, 0x38(sp) | a2 = *(var_38h_2);
0x00009260 lw a3, 0x3c(sp) | a3 = *(var_3ch);
0x00009264 lw t9, -0x7f30(gp) | t9 = *(gp);
0x00009268 move a0, v0 | a0 = v0;
0x0000926c move a1, v1 | a1 = v1;
0x00009270 bal 0xf440 | fcn_0000f440 ();
0x00009274 lw a0, 0x48(sp) | a0 = *(var_48h);
0x00009278 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000927c move a1, v1 | a1 = v1;
0x00009280 lw a2, 0x1530(a0) | a2 = *((a0 + 1356));
0x00009284 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x00009288 lw a3, 0x1534(a0) | a3 = *((a0 + 1357));
0x0000928c move a0, v0 | a0 = v0;
0x00009290 bal 0xfea0 | fcn_0000fea0 ();
0x00009294 lw a1, 0x10(s2) | a1 = *((s2 + 4));
0x00009298 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000929c lw a0, 0x10(s3) | a0 = *((s3 + 4));
0x000092a0 lw a3, 0x14(s3) | a3 = *((s3 + 5));
0x000092a4 lw a2, 0x14(s2) | a2 = *((s2 + 5));
0x000092a8 subu a0, a1, a0 | __asm ("subu a0, a1, a0");
0x000092ac subu a2, a2, a3 | __asm ("subu a2, a2, a3");
0x000092b0 sltu a1, a1, a0 | a1 = (a1 < a0) ? 1 : 0;
0x000092b4 lw t9, -0x7f34(gp) | t9 = *(gp);
0x000092b8 subu a1, a2, a1 | __asm ("subu a1, a2, a1");
0x000092bc move s2, v0 | s2 = v0;
0x000092c0 move s3, v1 | s3 = v1;
0x000092c4 bal 0x104e0 | fcn_000104e0 ();
0x000092c8 lw gp, 0x28(sp) | gp = *(var_28h);
0x000092cc lw a2, 0x38(sp) | a2 = *(var_38h_2);
0x000092d0 lw a3, 0x3c(sp) | a3 = *(var_3ch);
0x000092d4 lw t9, -0x7f30(gp) | t9 = *(gp);
0x000092d8 move a0, v0 | a0 = v0;
0x000092dc move a1, v1 | a1 = v1;
0x000092e0 bal 0xf440 | fcn_0000f440 ();
0x000092e4 lw a0, 0x48(sp) | a0 = *(var_48h);
0x000092e8 lw gp, 0x28(sp) | gp = *(var_28h);
0x000092ec move a1, v1 | a1 = v1;
0x000092f0 lw a2, 0x1530(a0) | a2 = *((a0 + 1356));
0x000092f4 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x000092f8 lw a3, 0x1534(a0) | a3 = *((a0 + 1357));
0x000092fc move a0, v0 | a0 = v0;
0x00009300 bal 0xfea0 | fcn_0000fea0 ();
0x00009304 lw gp, 0x28(sp) | gp = *(var_28h);
0x00009308 move t2, v0 | t2 = v0;
0x0000930c move t3, v1 | t3 = v1;
0x00009310 lw v0, -0x7fbc(gp) | v0 = *(gp);
0x00009314 lw t0, 0x40(sp) | t0 = *(var_40h);
0x00009318 lw v0, (v0) | v0 = *(v0);
0x0000931c andi v0, v0, 0x800 | v0 &= 0x800;
0x00009320 lw t1, 0x44(sp) | t1 = *(var_44h);
| if (v0 != 0) {
0x00009324 bnez v0, 0x9438 | goto label_12;
| }
0x00009328 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x0000932c lw a2, 0x60(sp) | a2 = *(var_60h_3);
0x00009330 lw a3, 0x64(sp) | a3 = *(var_64h_3);
0x00009334 move a0, t0 | a0 = t0;
0x00009338 move a1, t1 | a1 = t1;
0x0000933c sw t2, 0x40(sp) | *(var_40h) = t2;
0x00009340 sw v1, 0x44(sp) | *(var_44h) = v1;
0x00009344 bal 0xfea0 | fcn_0000fea0 ();
0x00009348 lw a0, 0x5c(sp) | a0 = *(var_5ch_3);
0x0000934c lw gp, 0x28(sp) | gp = *(var_28h);
0x00009350 move a1, s3 | a1 = s3;
0x00009354 lw a2, 0x1538(a0) | a2 = *((a0 + 1358));
0x00009358 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x0000935c lw a3, 0x153c(a0) | a3 = *((a0 + 1359));
0x00009360 sw v0, 0x38(sp) | *(var_38h_2) = v0;
0x00009364 move a0, s2 | a0 = s2;
0x00009368 sw v1, 0x3c(sp) | *(var_3ch) = v1;
0x0000936c bal 0xfea0 | fcn_0000fea0 ();
0x00009370 lw a0, 0x5c(sp) | a0 = *(var_5ch_3);
0x00009374 lw gp, 0x28(sp) | gp = *(var_28h);
0x00009378 lw t2, 0x40(sp) | t2 = *(var_40h);
0x0000937c lw t3, 0x44(sp) | t3 = *(var_44h);
0x00009380 lw a2, 0x1538(a0) | a2 = *((a0 + 1358));
0x00009384 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x00009388 lw a3, 0x153c(a0) | a3 = *((a0 + 1359));
0x0000938c move a1, t3 | a1 = t3;
0x00009390 move a0, t2 | a0 = t2;
0x00009394 move s2, v0 | s2 = v0;
0x00009398 move s3, v1 | s3 = v1;
0x0000939c bal 0xfea0 | fcn_0000fea0 ();
0x000093a0 lw gp, 0x28(sp) | gp = *(var_28h);
0x000093a4 lw t0, 0x38(sp) | t0 = *(var_38h_2);
0x000093a8 lw t1, 0x3c(sp) | t1 = *(var_3ch);
0x000093ac move t2, v0 | t2 = v0;
0x000093b0 move t3, v1 | t3 = v1;
0x000093b4 addiu a0, zero, -1 | a0 = -1;
| label_3:
0x000093b8 lw t9, -0x7f20(gp) | t9 = sym.cprintf_f;
0x000093bc sw t2, 0x20(sp) | *(var_20h_3) = t2;
0x000093c0 sw t3, 0x24(sp) | *(var_24h) = t3;
0x000093c4 sw s2, 0x18(sp) | *(var_18h) = s2;
0x000093c8 sw s3, 0x1c(sp) | *(var_1ch) = s3;
0x000093cc sw t0, 0x10(sp) | *(var_98h) = t0;
0x000093d0 sw t1, 0x14(sp) | *(var_14h) = t1;
0x000093d4 addiu a3, zero, 2 | a3 = 2;
0x000093d8 addiu a2, zero, 9 | a2 = 9;
0x000093dc addiu a1, zero, 3 | a1 = 3;
0x000093e0 bal 0xe518 | sym_cprintf_f ();
0x000093e4 lw gp, 0x28(sp) | gp = *(var_28h);
| label_4:
0x000093e8 lw s2, 0x7c(sp) | s2 = *(var_7ch_3);
0x000093ec lw v1, 0x80(sp) | v1 = *(var_80h_3);
0x000093f0 lw v0, 0x48(s2) | v0 = *((s2 + 18));
0x000093f4 lw a0, 0x48(v1) | a0 = *((v1 + 18));
0x000093f8 lw a1, 0x4c(s2) | a1 = *((s2 + 19));
0x000093fc lw v1, 0x4c(v1) | v1 = *((v1 + 19));
0x00009400 subu a0, v0, a0 | __asm ("subu a0, v0, a0");
0x00009404 sltu v0, v0, a0 | v0 = (v0 < a0) ? 1 : 0;
0x00009408 subu a1, a1, v1 | __asm ("subu a1, a1, v1");
0x0000940c subu a1, a1, v0 | __asm ("subu a1, a1, v0");
| if (s7 != 0) {
0x00009410 bnez s7, 0x9088 | goto label_1;
| }
0x00009414 lw t9, -0x7f24(gp) | t9 = sym.cprintf_u64;
0x00009418 sw a0, 0x10(sp) | *(var_98h) = a0;
0x0000941c sw a1, 0x14(sp) | *(var_14h) = a1;
0x00009420 addiu a2, zero, 7 | a2 = 7;
0x00009424 addiu a1, zero, 1 | a1 = 1;
0x00009428 addiu a0, zero, -1 | a0 = -1;
0x0000942c bal 0xe240 | sym_cprintf_u64 ();
0x00009430 lw gp, 0x28(sp) | gp = *(var_28h);
0x00009434 b 0x90f0 | goto label_2;
| label_12:
0x00009438 addiu a0, zero, 1 | a0 = 1;
0x0000943c b 0x93b8 | goto label_3;
| label_11:
0x00009440 lw v0, 0x74(sp) | v0 = *(var_74h_3);
0x00009444 lw v1, 0x6c(sp) | v1 = *(var_6ch_3);
0x00009448 addiu a3, v0, 0x1220 | a3 = v0 + 0x1220;
0x0000944c lw v0, 0x68(sp) | v0 = *(var_68h_3);
0x00009450 lw t9, -0x7de4(gp) | t9 = sym.imp.__sprintf_chk
0x00009454 addiu s2, sp, 0x84 | s2 = sp + 0x84;
0x00009458 addiu a2, zero, 0x20 | a2 = 0x20;
0x0000945c addiu a1, zero, 1 | a1 = 1;
0x00009460 move a0, s2 | a0 = s2;
0x00009464 sw v1, 0x24(sp) | *(var_24h) = v1;
0x00009468 sw v1, 0x1c(sp) | *(var_1ch) = v1;
0x0000946c sw v1, 0x14(sp) | *(var_14h) = v1;
0x00009470 sw v0, 0x20(sp) | *(var_20h_3) = v0;
0x00009474 sw v0, 0x18(sp) | *(var_18h) = v0;
0x00009478 sw v0, 0x10(sp) | *(var_98h) = v0;
0x0000947c jalr t9 | t9 ();
0x00009480 lw gp, 0x28(sp) | gp = *(var_28h);
0x00009484 move a2, s2 | a2 = s2;
0x00009488 addiu a0, zero, 4 | a0 = 4;
0x0000948c lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00009490 lw t9, -0x7fb4(gp) | t9 = sym.cprintf_s;
| /* esilref: '&s' */
0x00009494 addiu a1, a1, 0x1234 | a1 += 0x1234;
0x00009498 bal 0xeb78 | sym_cprintf_s ();
0x0000949c lw gp, 0x28(sp) | gp = *(var_28h);
0x000094a0 b 0x93e8 | goto label_4;
| label_8:
0x000094a4 move s2, zero | s2 = 0;
0x000094a8 lw v0, 0x70(sp) | v0 = *(var_70h_2);
| label_10:
0x000094ac lw a0, 0xa4(sp) | a0 = *(var_a4h);
0x000094b0 lw v1, (v0) | v1 = *(v0);
0x000094b4 move v0, s2 | v0 = s2;
| if (a0 != v1) {
0x000094b8 bne a0, v1, 0x95a4 | goto label_13;
| }
0x000094bc lw ra, 0xcc(sp) | ra = *(var_cch);
0x000094c0 lw fp, 0xc8(sp) | fp = *(var_c8h);
0x000094c4 lw s7, 0xc4(sp) | s7 = *(var_c4h);
0x000094c8 lw s6, 0xc0(sp) | s6 = *(var_c0h);
0x000094cc lw s5, 0xbc(sp) | s5 = *(var_bch);
0x000094d0 lw s4, 0xb8(sp) | s4 = *(var_b8h);
0x000094d4 lw s3, 0xb4(sp) | s3 = *(var_b4h);
0x000094d8 lw s2, 0xb0(sp) | s2 = *(var_b0h);
0x000094dc lw s1, 0xac(sp) | s1 = *(var_ach);
0x000094e0 lw s0, 0xa8(sp) | s0 = *(var_a8h);
0x000094e4 addiu sp, sp, 0xd0 |
0x000094e8 jr ra | return v0;
| label_7:
0x000094ec lw a1, -0x7fd4(gp) | a1 = *(gp);
0x000094f0 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
0x000094f4 move a2, v1 | a2 = v1;
| /* str._n__11s */
0x000094f8 addiu a1, a1, 0x10fc | a1 += 0x10fc;
0x000094fc addiu a0, zero, 1 | a0 = 1;
0x00009500 jalr t9 | t9 ();
0x00009504 lw gp, 0x28(sp) | gp = *(var_28h);
0x00009508 lw v0, (s0) | v0 = *(s0);
0x0000950c andi v0, v0, 0x100 | v0 &= aav.0x00000100;
0x00009510 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
| if (v0 != 0) {
0x00009514 bnez v0, 0x9568 | goto label_14;
| }
0x00009518 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x0000951c addiu a0, zero, 1 | a0 = 1;
| /* str.___UID */
0x00009520 addiu a1, a1, 0x1110 | a1 += 0x1110;
0x00009524 jalr t9 | t9 ();
0x00009528 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000952c lw v0, (s0) | v0 = *(s0);
0x00009530 andi v0, v0, 0x20 | v0 &= 0x20;
0x00009534 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
| if (v0 == 0) {
0x00009538 beqz v0, 0x958c | goto label_15;
| }
| do {
0x0000953c lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00009540 addiu a0, zero, 1 | a0 = 1;
| /* str.______TGID_______TID */
0x00009544 addiu a1, a1, 0x1118 | a1 += 0x1118;
0x00009548 jalr t9 | t9 ();
0x0000954c lw gp, 0x28(sp) | gp = *(var_28h);
| label_6:
0x00009550 lw a0, -0x7fd4(gp) | a0 = *(gp);
0x00009554 lw t9, -0x7d34(gp) | t9 = sym.imp.puts;
| /* str.___kB_rd_s___kB_wr_s_kB_ccwr_s_iodelay__Command */
0x00009558 addiu a0, a0, 0x1368 | a0 += 0x1368;
0x0000955c jalr t9 | t9 ();
0x00009560 lw gp, 0x28(sp) | gp = *(var_28h);
0x00009564 b 0x900c | goto label_5;
| label_14:
0x00009568 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x0000956c addiu a0, zero, 1 | a0 = 1;
| /* str._____USER */
0x00009570 addiu a1, a1, 0x1104 | a1 += 0x1104;
0x00009574 jalr t9 | t9 ();
0x00009578 lw gp, 0x28(sp) | gp = *(var_28h);
0x0000957c lw v0, (s0) | v0 = *(s0);
0x00009580 andi v0, v0, 0x20 | v0 &= 0x20;
0x00009584 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
0x00009588 bnez v0, 0x953c |
| } while (v0 != 0);
| label_15:
0x0000958c lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00009590 addiu a0, zero, 1 | a0 = 1;
| /* str._______PID */
0x00009594 addiu a1, a1, 0x1130 | a1 += 0x1130;
0x00009598 jalr t9 | t9 ();
0x0000959c lw gp, 0x28(sp) | gp = *(var_28h);
0x000095a0 b 0x9550 | goto label_6;
| label_13:
0x000095a4 lw t9, -0x7cf0(gp) | t9 = sym.imp.__stack_chk_fail;
0x000095a8 jalr t9 | t9 ();
0x000095ac nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/pidstat @ 0x599c */
| #include <stdint.h>
|
; (fcn) sym.write_pid_task_all_stats () | void write_pid_task_all_stats () {
0x0000599c lui gp, 2 |
0x000059a0 addiu gp, gp, 0x4714 |
0x000059a4 addu gp, gp, t9 | gp += t9;
0x000059a8 addiu sp, sp, -0x120 |
0x000059ac lw v0, -0x7cd8(gp) | v0 = *((gp - 7990));
0x000059b0 lw v1, 0x130(sp) | v1 = *(arg_130h);
0x000059b4 sw v0, 0xb0(sp) | *(var_b0h) = v0;
0x000059b8 sw v1, 0x78(sp) | *(var_78h) = v1;
0x000059bc lw v1, 0x138(sp) | v1 = *(arg_138h);
0x000059c0 lw v0, (v0) | v0 = *(v0);
0x000059c4 sw v1, 0x6c(sp) | *(var_6ch) = v1;
0x000059c8 lw v1, 0x13c(sp) | v1 = *(arg_13ch);
0x000059cc sw gp, 0x38(sp) | *(var_38h) = gp;
0x000059d0 sw ra, 0x11c(sp) | *(var_11ch) = ra;
0x000059d4 sw fp, 0x118(sp) | *(var_118h) = fp;
0x000059d8 sw s7, 0x114(sp) | *(var_114h) = s7;
0x000059dc sw s6, 0x110(sp) | *(var_110h) = s6;
0x000059e0 sw s5, 0x10c(sp) | *(var_10ch) = s5;
0x000059e4 sw s4, 0x108(sp) | *(var_108h) = s4;
0x000059e8 sw s3, 0x104(sp) | *(var_104h) = s3;
0x000059ec sw s2, 0x100(sp) | *(var_100h) = s2;
0x000059f0 sw s1, 0xfc(sp) | *(var_fch) = s1;
0x000059f4 sw s0, 0xf8(sp) | *(var_f8h) = s0;
0x000059f8 sw a0, 0x120(sp) | *(arg_120h) = a0;
0x000059fc sw a1, 0x124(sp) | *(arg_124h) = a1;
0x00005a00 sw v1, 0x70(sp) | *(var_70h) = v1;
0x00005a04 sw v0, 0xf4(sp) | *(var_f4h) = v0;
0x00005a08 lw s5, -0x7fc4(gp) | s5 = *(gp);
| if (a2 != 0) {
0x00005a0c bnez a2, 0x673c | goto label_19;
| }
0x00005a10 lw v0, (s5) | v0 = *(s5);
0x00005a14 move s0, zero | s0 = 0;
| if (v0 == 0) {
0x00005a18 beqz v0, 0x6248 | goto label_9;
| }
0x00005a1c lw v0, -0x7f38(gp) | v0 = sym.get_pid_to_display;
| label_8:
0x00005a20 lw fp, -0x7fd4(gp) | fp = *(gp);
0x00005a24 sw v0, 0x4c(sp) | *(var_4ch) = v0;
0x00005a28 lw v0, -0x7fd4(gp) | v0 = *(gp);
0x00005a2c lw v1, 0x1534(fp) | v1 = *(arg_1534h);
0x00005a30 sw v0, 0x7c(sp) | *(var_7ch) = v0;
0x00005a34 lw v0, -0x7fd4(gp) | v0 = *(gp);
0x00005a38 lw a0, -0x7fd4(gp) | a0 = *(gp);
0x00005a3c sw v0, 0xa4(sp) | *(var_a4h) = v0;
0x00005a40 lw v0, 0x1530(fp) | v0 = *(arg_1530h);
0x00005a44 sw v1, 0xac(sp) | *(var_ach) = v1;
0x00005a48 sw v0, 0xa8(sp) | *(var_a8h) = v0;
0x00005a4c lw v0, -0x7fd4(gp) | v0 = *(gp);
0x00005a50 lw s4, -0x7fc0(gp) | s4 = *(gp);
0x00005a54 sw a0, 0xb4(sp) | *(var_b4h) = a0;
0x00005a58 lw v1, 0x1544(v0) | v1 = *((v0 + 1361));
0x00005a5c lw v0, 0x1540(v0) | v0 = *((v0 + 1360));
0x00005a60 sw v1, 0xc4(sp) | *(var_c4h) = v1;
0x00005a64 sw v0, 0xc0(sp) | *(var_c0h) = v0;
0x00005a68 lw v0, 0x1538(a0) | v0 = *((a0 + 1358));
0x00005a6c lw v1, 0x153c(a0) | v1 = *((a0 + 1359));
0x00005a70 sw v0, 0xb8(sp) | *(var_b8h) = v0;
0x00005a74 addiu v0, sp, 0xd0 | v0 = sp + 0xd0;
0x00005a78 sw v0, 0x54(sp) | *(var_54h) = v0;
0x00005a7c addiu v0, sp, 0xcc | v0 = sp + 0xcc;
0x00005a80 sw v1, 0xbc(sp) | *(var_bch) = v1;
0x00005a84 move s0, zero | s0 = 0;
0x00005a88 move s6, zero | s6 = 0;
0x00005a8c sw v0, 0x50(sp) | *(var_50h) = v0;
0x00005a90 lw v0, 0x54(sp) | v0 = *(var_54h);
| do {
0x00005a94 lw a3, (s4) | a3 = *(s4);
0x00005a98 sw v0, 0x18(sp) | *(var_18h) = v0;
0x00005a9c lw v0, 0x50(sp) | v0 = *(var_50h);
0x00005aa0 lw a1, 0x124(sp) | a1 = *(arg_124h);
0x00005aa4 sw v0, 0x14(sp) | *(var_14h) = v0;
0x00005aa8 lw a0, 0x120(sp) | a0 = *(arg_120h);
0x00005aac addiu v0, zero, 1 | v0 = 1;
0x00005ab0 lw t9, 0x4c(sp) | t9 = *(var_4ch);
0x00005ab4 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00005ab8 move a2, s6 | a2 = s6;
0x00005abc jalr t9 | t9 ();
0x00005ac0 lw gp, 0x38(sp) | gp = *(var_38h);
| if (v0 > 0) {
0x00005ac4 blez v0, 0x6234 |
0x00005ac8 lw v0, 0x7c(sp) | v0 = *(var_7ch);
0x00005acc lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
0x00005ad0 lw a2, 0x78(sp) | a2 = *(var_78h);
0x00005ad4 addiu a1, v0, 0x10c8 | a1 = v0 + 0x10c8;
0x00005ad8 addiu a0, zero, 1 | a0 = 1;
0x00005adc lw s0, 0xcc(sp) | s0 = *(var_cch);
0x00005ae0 jalr t9 | t9 ();
0x00005ae4 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005ae8 addiu a1, zero, 0x2d | a1 = 0x2d;
0x00005aec lw t9, -0x7f3c(gp) | t9 = sym.__print_line_id;
0x00005af0 move a0, s0 | a0 = s0;
0x00005af4 bal 0x57d0 | sym_print_line_id ();
0x00005af8 lw v0, (s4) | v0 = *(s4);
0x00005afc andi v1, v0, 1 | v1 = v0 & 1;
0x00005b00 lw gp, 0x38(sp) | gp = *(var_38h);
| if (v1 != 0) {
0x00005b04 beqz v1, 0x5f08 |
0x00005b08 lw v0, -0x7fa0(gp) | v0 = *(gp);
0x00005b0c lw s7, 0xcc(sp) | s7 = *(var_cch);
0x00005b10 lw v1, 0x6c(sp) | v1 = *(var_6ch);
0x00005b14 lw v0, (v0) | v0 = *(v0);
0x00005b18 lw t0, 0x94(s7) | t0 = *((s7 + 37));
0x00005b1c multu v0, v1 | __asm ("multu v0, v1");
0x00005b20 lw a2, 0x70(sp) | a2 = *(var_70h);
0x00005b24 lw v1, 0x74(s7) | v1 = *((s7 + 29));
0x00005b28 mflo a0 | __asm ("mflo a0");
0x00005b2c subu t1, v1, t0 | __asm ("subu t1, v1, t0");
0x00005b30 mfhi a1 | __asm ("mfhi a1");
0x00005b34 lw s1, 0x70(s7) | s1 = *((s7 + 28));
0x00005b38 mul a3, a2, v0 | __asm ("mul a3, a2, v0");
0x00005b3c lw s2, 0x90(s7) | s2 = *((s7 + 36));
0x00005b40 sw v1, 0x8c(sp) | *(var_8ch_6) = v1;
0x00005b44 lw v1, -0x7fbc(gp) | v1 = *(gp);
0x00005b48 subu t2, s1, s2 | __asm ("subu t2, s1, s2");
0x00005b4c lw s3, 0xd0(sp) | s3 = *(var_d0h);
0x00005b50 sltu v0, s1, t2 | v0 = (s1 < t2) ? 1 : 0;
0x00005b54 lw v1, (v1) | v1 = *(v1);
0x00005b58 lw t9, -0x7f9c(gp) | t9 = *(gp);
0x00005b5c subu t1, t1, v0 | __asm ("subu t1, t1, v0");
0x00005b60 sw t0, 0x90(sp) | *(var_90h_6) = t0;
0x00005b64 addu a1, a3, a1 | a1 = a3 + a1;
0x00005b68 sw t1, 0x40(sp) | *(var_40h_6) = t1;
0x00005b6c move a3, zero | a3 = 0;
0x00005b70 addiu a2, zero, 0x64 | a2 = 0x64;
0x00005b74 sw t2, 0x80(sp) | *(var_80h_5) = t2;
0x00005b78 sw v1, 0x74(sp) | *(var_74h_7) = v1;
0x00005b7c lw s0, 0x70(s3) | s0 = *((s3 + 28));
0x00005b80 bal 0xefe0 | fcn_0000efe0 ();
0x00005b84 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005b88 lw a0, 0x90(s3) | a0 = *((s3 + 36));
0x00005b8c lw a1, 0x74(s3) | a1 = *((s3 + 29));
0x00005b90 lw a2, 0x94(s3) | a2 = *((s3 + 37));
0x00005b94 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00005b98 sw a0, 0x58(sp) | *(var_58h_6) = a0;
0x00005b9c sw a1, 0x68(sp) | *(var_68h_7) = a1;
0x00005ba0 sw a2, 0x60(sp) | *(var_60h_6) = a2;
0x00005ba4 move a0, v0 | a0 = v0;
0x00005ba8 move a1, v1 | a1 = v1;
0x00005bac bal 0x104e0 | fcn_000104e0 ();
0x00005bb0 lw a0, 0x58(sp) | a0 = *(var_58h_6);
0x00005bb4 lw t0, 0x60(sp) | t0 = *(var_60h_6);
0x00005bb8 subu a1, s0, a0 | __asm ("subu a1, s0, a0");
0x00005bbc lw a0, 0x68(sp) | a0 = *(var_68h_7);
0x00005bc0 sltu a2, s0, a1 | a2 = (s0 < a1) ? 1 : 0;
0x00005bc4 lw t1, 0x40(sp) | t1 = *(var_40h_6);
0x00005bc8 subu a0, a0, t0 | __asm ("subu a0, a0, t0");
0x00005bcc lw a3, 0x74(sp) | a3 = *(var_74h_7);
0x00005bd0 subu a0, a0, a2 | __asm ("subu a0, a0, a2");
0x00005bd4 ext a3, a3, 0xb, 1 | __asm ("ext a3, a3, 0xb, 1");
0x00005bd8 sltu a2, t1, a0 | a2 = (t1 < a0) ? 1 : 0;
0x00005bdc lw gp, 0x38(sp) | gp = *(var_38h);
0x00005be0 sw a3, 0x88(sp) | *(var_88h_4) = a3;
0x00005be4 sw v0, 0x40(sp) | *(var_40h_6) = v0;
0x00005be8 sw v1, 0x44(sp) | *(var_44h_6) = v1;
| if (a2 != 0) {
0x00005bec bnez a2, 0x628c | goto label_20;
| }
0x00005bf0 lw t2, 0x80(sp) | t2 = *(var_80h_5);
| if (a0 == t1) {
0x00005bf4 bne a0, t1, 0x5c04 |
0x00005bf8 sltu a1, t2, a1 | a1 = (t2 < a1) ? 1 : 0;
0x00005bfc sw zero, 0x80(sp) | *(var_80h_5) = 0;
| if (a1 == 0) {
0x00005c00 bnel a1, zero, 0x6290 | goto label_21;
| }
| }
0x00005c04 lw v0, 0x68(sp) | v0 = *(var_68h_7);
0x00005c08 subu a1, t2, s0 | __asm ("subu a1, t2, s0");
0x00005c0c subu t1, t1, v0 | __asm ("subu t1, t1, v0");
0x00005c10 lw v0, 0x58(sp) | v0 = *(var_58h_6);
0x00005c14 sltu t2, t2, a1 | t2 = (t2 < a1) ? 1 : 0;
0x00005c18 addu a0, a1, v0 | a0 = a1 + v0;
0x00005c1c lw v0, 0x60(sp) | v0 = *(var_60h_6);
0x00005c20 subu t1, t1, t2 | __asm ("subu t1, t1, t2");
0x00005c24 addu t1, t1, v0 | t1 += v0;
0x00005c28 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00005c2c sltu a1, a0, a1 | a1 = (a0 < a1) ? 1 : 0;
0x00005c30 addu a1, a1, t1 | a1 += t1;
0x00005c34 bal 0x104e0 | fcn_000104e0 ();
0x00005c38 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005c3c lw a2, 0x40(sp) | a2 = *(var_40h_6);
0x00005c40 lw a3, 0x44(sp) | a3 = *(var_44h_6);
0x00005c44 lw t9, -0x7f30(gp) | t9 = *(gp);
0x00005c48 move a0, v0 | a0 = v0;
0x00005c4c move a1, v1 | a1 = v1;
0x00005c50 bal 0xf440 | fcn_0000f440 ();
0x00005c54 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005c58 lw a2, 0x1530(fp) | a2 = *(arg_1530h);
0x00005c5c lw a3, 0x1534(fp) | a3 = *(arg_1534h);
0x00005c60 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x00005c64 move a0, v0 | a0 = v0;
0x00005c68 move a1, v1 | a1 = v1;
0x00005c6c bal 0xfea0 | fcn_0000fea0 ();
0x00005c70 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005c74 sw v0, 0x80(sp) | *(var_80h_5) = v0;
0x00005c78 sw v1, 0x84(sp) | *(var_84h_6) = v1;
| label_0:
0x00005c7c lw t1, 0x80(s7) | t1 = *((s7 + 32));
0x00005c80 lw t2, 0x80(s3) | t2 = *((s3 + 32));
0x00005c84 lw t3, 0x84(s3) | t3 = *((s3 + 33));
0x00005c88 lw t4, 0x84(s7) | t4 = *((s7 + 33));
0x00005c8c subu a0, t1, t2 | __asm ("subu a0, t1, t2");
0x00005c90 sltu v0, t1, a0 | v0 = (t1 < a0) ? 1 : 0;
0x00005c94 subu a1, t4, t3 | __asm ("subu a1, t4, t3");
0x00005c98 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00005c9c sw t2, 0xa0(sp) | *(var_a0h_4) = t2;
0x00005ca0 sw t1, 0x9c(sp) | *(var_9ch_5) = t1;
0x00005ca4 sw t3, 0x98(sp) | *(var_98h_5) = t3;
0x00005ca8 sw t4, 0x94(sp) | *(var_94h_7) = t4;
0x00005cac subu a1, a1, v0 | __asm ("subu a1, a1, v0");
0x00005cb0 bal 0x104e0 | fcn_000104e0 ();
0x00005cb4 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005cb8 lw a2, 0x40(sp) | a2 = *(var_40h_6);
0x00005cbc lw a3, 0x44(sp) | a3 = *(var_44h_6);
0x00005cc0 lw t9, -0x7f30(gp) | t9 = *(gp);
0x00005cc4 move a0, v0 | a0 = v0;
0x00005cc8 move a1, v1 | a1 = v1;
0x00005ccc bal 0xf440 | fcn_0000f440 ();
0x00005cd0 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005cd4 lw a3, 0x1534(fp) | a3 = *(arg_1534h);
0x00005cd8 lw a2, 0x1530(fp) | a2 = *(arg_1530h);
0x00005cdc lw t9, -0x7f2c(gp) | t9 = *(gp);
0x00005ce0 move a0, v0 | a0 = v0;
0x00005ce4 move a1, v1 | a1 = v1;
0x00005ce8 bal 0xfea0 | fcn_0000fea0 ();
0x00005cec lw gp, 0x38(sp) | gp = *(var_38h);
0x00005cf0 lw a0, 0x58(sp) | a0 = *(var_58h_6);
0x00005cf4 lw a2, 0x60(sp) | a2 = *(var_60h_6);
0x00005cf8 lw a1, 0x90(sp) | a1 = *(var_90h_6);
0x00005cfc subu a0, s2, a0 | __asm ("subu a0, s2, a0");
0x00005d00 sltu s2, s2, a0 | s2 = (s2 < a0) ? 1 : 0;
0x00005d04 subu a1, a1, a2 | __asm ("subu a1, a1, a2");
0x00005d08 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00005d0c subu a1, a1, s2 | __asm ("subu a1, a1, s2");
0x00005d10 sw v0, 0x58(sp) | *(var_58h_6) = v0;
0x00005d14 sw v1, 0x5c(sp) | *(var_5ch_7) = v1;
0x00005d18 bal 0x104e0 | fcn_000104e0 ();
0x00005d1c lw gp, 0x38(sp) | gp = *(var_38h);
0x00005d20 lw a2, 0x40(sp) | a2 = *(var_40h_6);
0x00005d24 lw a3, 0x44(sp) | a3 = *(var_44h_6);
0x00005d28 lw t9, -0x7f30(gp) | t9 = *(gp);
0x00005d2c move a0, v0 | a0 = v0;
0x00005d30 move a1, v1 | a1 = v1;
0x00005d34 bal 0xf440 | fcn_0000f440 ();
0x00005d38 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005d3c lw a2, 0x1530(fp) | a2 = *(arg_1530h);
0x00005d40 lw a3, 0x1534(fp) | a3 = *(arg_1534h);
0x00005d44 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x00005d48 move a0, v0 | a0 = v0;
0x00005d4c move a1, v1 | a1 = v1;
0x00005d50 bal 0xfea0 | fcn_0000fea0 ();
0x00005d54 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005d58 lw a3, 0xa0(s7) | a3 = *((s7 + 40));
0x00005d5c lw a0, 0xa0(s3) | a0 = *((s3 + 40));
0x00005d60 lw a2, 0xa4(s7) | a2 = *((s7 + 41));
0x00005d64 lw a1, 0xa4(s3) | a1 = *((s3 + 41));
0x00005d68 subu a0, a3, a0 | __asm ("subu a0, a3, a0");
0x00005d6c sltu a3, a3, a0 | a3 = (a3 < a0) ? 1 : 0;
0x00005d70 subu a1, a2, a1 | __asm ("subu a1, a2, a1");
0x00005d74 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00005d78 subu a1, a1, a3 | __asm ("subu a1, a1, a3");
0x00005d7c sw v0, 0x60(sp) | *(var_60h_6) = v0;
0x00005d80 sw v1, 0x64(sp) | *(var_64h_7) = v1;
0x00005d84 bal 0x104e0 | fcn_000104e0 ();
0x00005d88 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005d8c lw a2, 0x40(sp) | a2 = *(var_40h_6);
0x00005d90 lw a3, 0x44(sp) | a3 = *(var_44h_6);
0x00005d94 lw t9, -0x7f30(gp) | t9 = *(gp);
0x00005d98 move a0, v0 | a0 = v0;
0x00005d9c move a1, v1 | a1 = v1;
0x00005da0 bal 0xf440 | fcn_0000f440 ();
0x00005da4 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005da8 lw a2, 0x1530(fp) | a2 = *(arg_1530h);
0x00005dac lw a3, 0x1534(fp) | a3 = *(arg_1534h);
0x00005db0 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x00005db4 move a0, v0 | a0 = v0;
0x00005db8 move a1, v1 | a1 = v1;
0x00005dbc bal 0xfea0 | fcn_0000fea0 ();
0x00005dc0 lw t1, 0x9c(sp) | t1 = *(var_9ch_5);
0x00005dc4 lw a1, 0x8c(sp) | a1 = *(var_8ch_6);
0x00005dc8 addu a0, s1, t1 | a0 = s1 + t1;
0x00005dcc lw t4, 0x94(sp) | t4 = *(var_94h_7);
0x00005dd0 subu s0, a0, s0 | __asm ("subu s0, a0, s0");
0x00005dd4 sltu t0, a0, s1 | t0 = (a0 < s1) ? 1 : 0;
0x00005dd8 addu t1, a1, t4 | t1 = a1 + t4;
0x00005ddc sltu a1, a0, s0 | a1 = (a0 < s0) ? 1 : 0;
0x00005de0 lw a0, 0x68(sp) | a0 = *(var_68h_7);
0x00005de4 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005de8 addu t1, t0, t1 | t1 = t0 + t1;
0x00005dec lw t2, 0xa0(sp) | t2 = *(var_a0h_4);
0x00005df0 subu t1, t1, a0 | __asm ("subu t1, t1, a0");
0x00005df4 lw t3, 0x98(sp) | t3 = *(var_98h_5);
0x00005df8 subu a0, s0, t2 | __asm ("subu a0, s0, t2");
0x00005dfc subu t1, t1, a1 | __asm ("subu t1, t1, a1");
0x00005e00 sltu s0, s0, a0 | s0 = (s0 < a0) ? 1 : 0;
0x00005e04 subu t3, t1, t3 | __asm ("subu t3, t1, t3");
0x00005e08 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00005e0c subu a1, t3, s0 | __asm ("subu a1, t3, s0");
0x00005e10 move s1, v1 | s1 = v1;
0x00005e14 move s0, v0 | s0 = v0;
0x00005e18 bal 0x104e0 | fcn_000104e0 ();
0x00005e1c lw a0, 0x74(sp) | a0 = *(var_74h_7);
0x00005e20 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005e24 andi a0, a0, 4 | a0 &= 4;
0x00005e28 move s2, v0 | s2 = v0;
0x00005e2c move s3, v1 | s3 = v1;
| if (a0 == 0) {
0x00005e30 beqz a0, 0x665c | goto label_22;
| }
0x00005e34 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00005e38 lw a0, 0x140(sp) | a0 = *(arg_140h);
0x00005e3c lw a1, 0x144(sp) | a1 = *(arg_144h);
0x00005e40 bal 0x104e0 | fcn_000104e0 ();
0x00005e44 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005e48 move a2, v0 | a2 = v0;
0x00005e4c move a3, v1 | a3 = v1;
0x00005e50 lw t9, -0x7f30(gp) | t9 = *(gp);
| label_4:
0x00005e54 move a0, s2 | a0 = s2;
0x00005e58 move a1, s3 | a1 = s3;
0x00005e5c bal 0xf440 | fcn_0000f440 ();
0x00005e60 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005e64 lw a2, 0x1530(fp) | a2 = *(arg_1530h);
0x00005e68 lw a3, 0x1534(fp) | a3 = *(arg_1534h);
0x00005e6c lw t9, -0x7f2c(gp) | t9 = *(gp);
0x00005e70 move a0, v0 | a0 = v0;
0x00005e74 move a1, v1 | a1 = v1;
0x00005e78 bal 0xfea0 | fcn_0000fea0 ();
0x00005e7c sw v0, 0x30(sp) | *(var_30h_4) = v0;
0x00005e80 sw v1, 0x34(sp) | *(var_34h_6) = v1;
0x00005e84 lw v0, 0x60(sp) | v0 = *(var_60h_6);
0x00005e88 lw v1, 0x64(sp) | v1 = *(var_64h_7);
0x00005e8c lw gp, 0x38(sp) | gp = *(var_38h);
0x00005e90 sw v0, 0x20(sp) | *(var_20h_6) = v0;
0x00005e94 sw v1, 0x24(sp) | *(var_24h_3) = v1;
0x00005e98 lw v0, 0x58(sp) | v0 = *(var_58h_6);
0x00005e9c lw v1, 0x5c(sp) | v1 = *(var_5ch_7);
0x00005ea0 sw v0, 0x18(sp) | *(var_18h) = v0;
0x00005ea4 sw v1, 0x1c(sp) | *(var_1ch_4) = v1;
0x00005ea8 lw v0, 0x80(sp) | v0 = *(var_80h_5);
0x00005eac lw zero, 0x84(t8) | 0 = *((t8 + 33));
0x00005eb0 lw a0, 0x88(sp) | a0 = *(var_88h_4);
0x00005eb4 lw t9, -0x7f28(gp) | t9 = sym.cprintf_pc;
0x00005eb8 addiu a3, zero, 2 | a3 = 2;
0x00005ebc addiu a2, zero, 7 | a2 = 7;
0x00005ec0 addiu a1, zero, 5 | a1 = 5;
0x00005ec4 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00005ec8 sw v1, 0x14(sp) | *(var_14h) = v1;
0x00005ecc sw s0, 0x28(sp) | *(var_28h_5) = s0;
0x00005ed0 sw s1, 0x2c(sp) | *(var_2ch_4) = s1;
0x00005ed4 bal 0xe7b4 | sym_cprintf_pc ();
0x00005ed8 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005edc lw v0, 0xcc(sp) | v0 = *(var_cch);
0x00005ee0 move a0, zero | a0 = 0;
0x00005ee4 lw a2, -0x7fd4(gp) | a2 = *(gp);
0x00005ee8 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00005eec lw t9, -0x7f40(gp) | t9 = sym.cprintf_in;
0x00005ef0 lw a3, 0xe8(v0) | a3 = *((v0 + 58));
0x00005ef4 addiu a2, a2, 0xd9c | a2 += 0xd9c;
| /* str.____3d */
0x00005ef8 addiu a1, a1, 0x1218 | a1 += 0x1218;
0x00005efc bal 0xea90 | sym_cprintf_in ();
0x00005f00 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005f04 lw v0, (s4) | v0 = *(s4);
| }
0x00005f08 andi v1, v0, 2 | v1 = v0 & 2;
0x00005f0c lw s7, 0xcc(sp) | s7 = *(var_cch);
| if (v1 != 0) {
0x00005f10 bnez v1, 0x644c | goto label_23;
| }
| label_3:
0x00005f14 andi v1, v0, 0x10 | v1 = v0 & 0x10;
0x00005f18 andi v1, v0, 4 | v1 = v0 & 4;
| if (v1 != 0) {
0x00005f1c beqz v1, 0x5f70 |
0x00005f20 lw v0, -0x7fbc(gp) | v0 = *(gp);
0x00005f24 lw v1, 0xc4(s7) | v1 = *((s7 + 49));
0x00005f28 sw zero, 0x1c(sp) | *(var_1ch_4) = 0;
0x00005f2c lw v0, (v0) | v0 = *(v0);
0x00005f30 sw v1, 0x18(sp) | *(var_18h) = v1;
0x00005f34 lw v1, 0xc0(s7) | v1 = *((s7 + 48));
0x00005f38 andi v0, v0, 0x800 | v0 &= 0x800;
0x00005f3c lw t9, -0x7f24(gp) | t9 = sym.cprintf_u64;
0x00005f40 sw v1, 0x10(sp) | *(var_10h) = v1;
0x00005f44 addiu a0, zero, 2 | a0 = 2;
0x00005f48 addiu v1, zero, -1 | v1 = -1;
| if (v0 != 0) {
0x00005f4c movz a0, v1, v0 | a0 = v1;
| }
0x00005f50 sw zero, 0x14(sp) | *(var_14h) = 0;
0x00005f54 addiu a2, zero, 7 | a2 = 7;
0x00005f58 addiu a1, zero, 2 | a1 = 2;
0x00005f5c bal 0xe240 | sym_cprintf_u64 ();
0x00005f60 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005f64 lw v0, (s4) | v0 = *(s4);
0x00005f68 lw s7, 0xcc(sp) | s7 = *(var_cch);
0x00005f6c andi v1, v0, 4 | v1 = v0 & 4;
| }
0x00005f70 andi v1, v0, 8 | v1 = v0 & 8;
| if (v1 != 0) {
0x00005f74 beqz v1, 0x6200 |
0x00005f78 lw v0, 0xf4(s7) | v0 = *((s7 + 61));
0x00005f7c andi v0, v0, 1 | v0 &= 1;
0x00005f80 lw t9, -0x7f34(gp) | t9 = *(gp);
| if (v0 != 0) {
0x00005f84 bnez v0, 0x6680 | goto label_24;
| }
0x00005f88 lw s0, 0xd0(sp) | s0 = *(var_d0h);
0x00005f8c lw a0, 0x6c(sp) | a0 = *(var_6ch);
0x00005f90 lw a1, 0x70(sp) | a1 = *(var_70h);
0x00005f94 bal 0x104e0 | fcn_000104e0 ();
0x00005f98 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005f9c lw a1, (s7) | a1 = *(s7);
0x00005fa0 lw a0, (s0) | a0 = *(s0);
0x00005fa4 lw a3, 4(s0) | a3 = *((s0 + 1));
0x00005fa8 lw a2, 4(s7) | a2 = *((s7 + 1));
0x00005fac subu a0, a1, a0 | __asm ("subu a0, a1, a0");
0x00005fb0 subu a2, a2, a3 | __asm ("subu a2, a2, a3");
0x00005fb4 sltu a1, a1, a0 | a1 = (a1 < a0) ? 1 : 0;
0x00005fb8 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00005fbc subu a1, a2, a1 | __asm ("subu a1, a2, a1");
0x00005fc0 move s2, v0 | s2 = v0;
0x00005fc4 move s3, v1 | s3 = v1;
0x00005fc8 bal 0x104e0 | fcn_000104e0 ();
0x00005fcc lw gp, 0x38(sp) | gp = *(var_38h);
0x00005fd0 move a2, s2 | a2 = s2;
0x00005fd4 move a3, s3 | a3 = s3;
0x00005fd8 lw t9, -0x7f30(gp) | t9 = *(gp);
0x00005fdc move a0, v0 | a0 = v0;
0x00005fe0 move a1, v1 | a1 = v1;
0x00005fe4 bal 0xf440 | fcn_0000f440 ();
0x00005fe8 lw gp, 0x38(sp) | gp = *(var_38h);
0x00005fec lw a2, 0x1530(fp) | a2 = *(arg_1530h);
0x00005ff0 lw a3, 0x1534(fp) | a3 = *(arg_1534h);
0x00005ff4 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x00005ff8 move a0, v0 | a0 = v0;
0x00005ffc move a1, v1 | a1 = v1;
0x00006000 bal 0xfea0 | fcn_0000fea0 ();
0x00006004 lw gp, 0x38(sp) | gp = *(var_38h);
0x00006008 lw a1, 8(s7) | a1 = *((s7 + 2));
0x0000600c lw a0, 8(s0) | a0 = *((s0 + 2));
0x00006010 lw a3, 0xc(s0) | a3 = *((s0 + 3));
0x00006014 lw a2, 0xc(s7) | a2 = *((s7 + 3));
0x00006018 subu a0, a1, a0 | __asm ("subu a0, a1, a0");
0x0000601c subu a2, a2, a3 | __asm ("subu a2, a2, a3");
0x00006020 sltu a1, a1, a0 | a1 = (a1 < a0) ? 1 : 0;
0x00006024 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00006028 subu a1, a2, a1 | __asm ("subu a1, a2, a1");
0x0000602c sw v0, 0x40(sp) | *(var_40h_6) = v0;
0x00006030 sw v1, 0x44(sp) | *(var_44h_6) = v1;
0x00006034 bal 0x104e0 | fcn_000104e0 ();
0x00006038 lw gp, 0x38(sp) | gp = *(var_38h);
0x0000603c move a2, s2 | a2 = s2;
0x00006040 move a3, s3 | a3 = s3;
0x00006044 lw t9, -0x7f30(gp) | t9 = *(gp);
0x00006048 move a0, v0 | a0 = v0;
0x0000604c move a1, v1 | a1 = v1;
0x00006050 bal 0xf440 | fcn_0000f440 ();
0x00006054 lw gp, 0x38(sp) | gp = *(var_38h);
0x00006058 lw a2, 0x1530(fp) | a2 = *(arg_1530h);
0x0000605c lw a3, 0x1534(fp) | a3 = *(arg_1534h);
0x00006060 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x00006064 move a0, v0 | a0 = v0;
0x00006068 move a1, v1 | a1 = v1;
0x0000606c bal 0xfea0 | fcn_0000fea0 ();
0x00006070 lw gp, 0x38(sp) | gp = *(var_38h);
0x00006074 lw a1, 0x10(s7) | a1 = *((s7 + 4));
0x00006078 lw a0, 0x10(s0) | a0 = *((s0 + 4));
0x0000607c lw a3, 0x14(s0) | a3 = *((s0 + 5));
0x00006080 lw a2, 0x14(s7) | a2 = *((s7 + 5));
0x00006084 subu a0, a1, a0 | __asm ("subu a0, a1, a0");
0x00006088 subu a2, a2, a3 | __asm ("subu a2, a2, a3");
0x0000608c sltu a1, a1, a0 | a1 = (a1 < a0) ? 1 : 0;
0x00006090 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00006094 subu a1, a2, a1 | __asm ("subu a1, a2, a1");
0x00006098 move s0, v0 | s0 = v0;
0x0000609c move s1, v1 | s1 = v1;
0x000060a0 bal 0x104e0 | fcn_000104e0 ();
0x000060a4 lw gp, 0x38(sp) | gp = *(var_38h);
0x000060a8 move a2, s2 | a2 = s2;
0x000060ac move a3, s3 | a3 = s3;
0x000060b0 lw t9, -0x7f30(gp) | t9 = *(gp);
0x000060b4 move a0, v0 | a0 = v0;
0x000060b8 move a1, v1 | a1 = v1;
0x000060bc bal 0xf440 | fcn_0000f440 ();
0x000060c0 lw gp, 0x38(sp) | gp = *(var_38h);
0x000060c4 lw a2, 0x1530(fp) | a2 = *(arg_1530h);
0x000060c8 lw a3, 0x1534(fp) | a3 = *(arg_1534h);
0x000060cc lw t9, -0x7f2c(gp) | t9 = *(gp);
0x000060d0 move a0, v0 | a0 = v0;
0x000060d4 move a1, v1 | a1 = v1;
0x000060d8 bal 0xfea0 | fcn_0000fea0 ();
0x000060dc lw gp, 0x38(sp) | gp = *(var_38h);
0x000060e0 move s2, v0 | s2 = v0;
0x000060e4 move s3, v1 | s3 = v1;
0x000060e8 lw v0, -0x7fbc(gp) | v0 = *(gp);
0x000060ec lw t0, 0x40(sp) | t0 = *(var_40h_6);
0x000060f0 lw v0, (v0) | v0 = *(v0);
0x000060f4 andi v0, v0, 0x800 | v0 &= 0x800;
0x000060f8 lw t1, 0x44(sp) | t1 = *(var_44h_6);
| if (v0 != 0) {
0x000060fc bnez v0, 0x666c | goto label_25;
| }
0x00006100 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x00006104 lw a2, 0xb8(sp) | a2 = *(var_b8h);
0x00006108 lw a3, 0xbc(sp) | a3 = *(var_bch);
0x0000610c move a0, t0 | a0 = t0;
0x00006110 move a1, t1 | a1 = t1;
0x00006114 bal 0xfea0 | fcn_0000fea0 ();
0x00006118 lw s7, 0xb4(sp) | s7 = *(var_b4h);
0x0000611c lw gp, 0x38(sp) | gp = *(var_38h);
0x00006120 move a0, s0 | a0 = s0;
0x00006124 lw a2, 0x1538(s7) | a2 = *((s7 + 1358));
0x00006128 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x0000612c lw a3, 0x153c(s7) | a3 = *((s7 + 1359));
0x00006130 move a1, s1 | a1 = s1;
0x00006134 sw v0, 0x40(sp) | *(var_40h_6) = v0;
0x00006138 sw v1, 0x44(sp) | *(var_44h_6) = v1;
0x0000613c bal 0xfea0 | fcn_0000fea0 ();
0x00006140 lw gp, 0x38(sp) | gp = *(var_38h);
0x00006144 lw a2, 0x1538(s7) | a2 = *((s7 + 1358));
0x00006148 lw a3, 0x153c(s7) | a3 = *((s7 + 1359));
0x0000614c lw t9, -0x7f2c(gp) | t9 = *(gp);
0x00006150 move a0, s2 | a0 = s2;
0x00006154 move a1, s3 | a1 = s3;
0x00006158 move s0, v0 | s0 = v0;
0x0000615c move s1, v1 | s1 = v1;
0x00006160 bal 0xfea0 | fcn_0000fea0 ();
0x00006164 lw gp, 0x38(sp) | gp = *(var_38h);
0x00006168 lw t0, 0x40(sp) | t0 = *(var_40h_6);
0x0000616c lw t1, 0x44(sp) | t1 = *(var_44h_6);
0x00006170 move s2, v0 | s2 = v0;
0x00006174 move s3, v1 | s3 = v1;
0x00006178 addiu a0, zero, -1 | a0 = -1;
| label_5:
0x0000617c lw t9, -0x7f20(gp) | t9 = sym.cprintf_f;
0x00006180 sw s2, 0x20(sp) | *(var_20h_6) = s2;
0x00006184 sw s3, 0x24(sp) | *(var_24h_3) = s3;
0x00006188 sw s0, 0x18(sp) | *(var_18h) = s0;
0x0000618c sw s1, 0x1c(sp) | *(var_1ch_4) = s1;
0x00006190 sw t0, 0x10(sp) | *(var_10h) = t0;
0x00006194 sw t1, 0x14(sp) | *(var_14h) = t1;
0x00006198 addiu a3, zero, 2 | a3 = 2;
0x0000619c addiu a2, zero, 9 | a2 = 9;
0x000061a0 addiu a1, zero, 3 | a1 = 3;
0x000061a4 bal 0xe518 | sym_cprintf_f ();
0x000061a8 lw gp, 0x38(sp) | gp = *(var_38h);
| label_6:
0x000061ac lw v0, 0xcc(sp) | v0 = *(var_cch);
0x000061b0 lw a1, 0xd0(sp) | a1 = *(var_d0h);
0x000061b4 lw t9, -0x7f24(gp) | t9 = sym.cprintf_u64;
0x000061b8 lw a0, 0x48(v0) | a0 = *((v0 + 18));
0x000061bc lw v1, 0x48(a1) | v1 = *((a1 + 18));
0x000061c0 lw v0, 0x4c(v0) | v0 = *((v0 + 19));
0x000061c4 lw a1, 0x4c(a1) | a1 = *((a1 + 19));
0x000061c8 subu v1, a0, v1 | __asm ("subu v1, a0, v1");
0x000061cc sltu a0, a0, v1 | a0 = (a0 < v1) ? 1 : 0;
0x000061d0 subu v0, v0, a1 | __asm ("subu v0, v0, a1");
0x000061d4 subu v0, v0, a0 | __asm ("subu v0, v0, a0");
0x000061d8 sw v0, 0x14(sp) | *(var_14h) = v0;
0x000061dc sw v1, 0x10(sp) | *(var_10h) = v1;
0x000061e0 addiu a2, zero, 7 | a2 = 7;
0x000061e4 addiu a1, zero, 1 | a1 = 1;
0x000061e8 addiu a0, zero, -1 | a0 = -1;
0x000061ec bal 0xe240 | sym_cprintf_u64 ();
0x000061f0 lw gp, 0x38(sp) | gp = *(var_38h);
0x000061f4 lw v0, (s4) | v0 = *(s4);
0x000061f8 lw s7, 0xcc(sp) | s7 = *(var_cch);
0x000061fc andi v1, v0, 8 | v1 = v0 & 8;
| }
0x00006200 lw t9, -0x7f34(gp) | t9 = *(gp);
| if (v1 == 0) {
0x00006204 bnel v1, zero, 0x6358 | goto label_26;
| }
| label_2:
0x00006208 andi v1, v0, 0x20 | v1 = v0 & 0x20;
0x0000620c lw v0, 0xfc(s7) | v0 = *((s7 + 63));
| if (v1 == 0) {
0x00006210 bnel v1, zero, 0x62fc | goto label_27;
| }
| label_1:
0x00006214 andi v0, v0, 0x40 | v0 &= 0x40;
0x00006218 lw v0, 0xec(s7) | v0 = *((s7 + 59));
| if (v0 == 0) {
0x0000621c bnel v0, zero, 0x6298 | goto label_28;
| }
| label_7:
0x00006220 lw t9, -0x7f1c(gp) | t9 = sym.print_comm;
0x00006224 move a0, s7 | a0 = s7;
0x00006228 bal 0x34b4 | sym_print_comm ();
0x0000622c lw gp, 0x38(sp) | gp = *(var_38h);
0x00006230 addiu s0, zero, 1 | s0 = 1;
| }
0x00006234 lw v0, (s5) | v0 = *(s5);
0x00006238 addiu s6, s6, 1 | s6++;
0x0000623c sltu v0, s6, v0 | v0 = (s6 < v0) ? 1 : 0;
0x00006240 lw v0, 0x54(sp) | v0 = *(var_54h);
0x00006244 bnel v0, zero, 0x5a94 |
| } while (v0 == 0);
| label_9:
0x00006248 lw v0, 0xb0(sp) | v0 = *(var_b0h);
0x0000624c lw a0, 0xf4(sp) | a0 = *(var_f4h);
0x00006250 lw v1, (v0) | v1 = *(v0);
0x00006254 move v0, s0 | v0 = s0;
| if (a0 != v1) {
0x00006258 bne a0, v1, 0x69a4 | goto label_29;
| }
0x0000625c lw ra, 0x11c(sp) | ra = *(var_11ch);
0x00006260 lw fp, 0x118(sp) | fp = *(var_118h);
0x00006264 lw s7, 0x114(sp) | s7 = *(var_114h);
0x00006268 lw s6, 0x110(sp) | s6 = *(var_110h);
0x0000626c lw s5, 0x10c(sp) | s5 = *(var_10ch);
0x00006270 lw s4, 0x108(sp) | s4 = *(var_108h);
0x00006274 lw s3, 0x104(sp) | s3 = *(var_104h);
0x00006278 lw s2, 0x100(sp) | s2 = *(var_100h);
0x0000627c lw s1, 0xfc(sp) | s1 = *(var_fch);
0x00006280 lw s0, 0xf8(sp) | s0 = *(var_f8h);
0x00006284 addiu sp, sp, 0x120 |
0x00006288 jr ra | return v0;
| label_20:
0x0000628c sw zero, 0x80(sp) | *(var_80h_5) = 0;
| label_21:
0x00006290 sw zero, 0x84(sp) | *(var_84h_6) = 0;
0x00006294 b 0x5c7c | goto label_0;
| label_28:
0x00006298 lw t9, -0x7f24(gp) | t9 = sym.cprintf_u64;
0x0000629c sw v0, 0x10(sp) | *(var_10h) = v0;
0x000062a0 sw zero, 0x14(sp) | *(var_14h) = 0;
0x000062a4 addiu a2, zero, 4 | a2 = 4;
0x000062a8 addiu a1, zero, 1 | a1 = 1;
0x000062ac addiu a0, zero, -1 | a0 = -1;
0x000062b0 bal 0xe240 | sym_cprintf_u64 ();
0x000062b4 lw v0, 0xcc(sp) | v0 = *(var_cch);
0x000062b8 lw v0, 0xf0(v0) | v0 = *((v0 + 60));
0x000062bc lw gp, 0x38(sp) | gp = *(var_38h);
| if (v0 == 0) {
0x000062c0 beqz v0, 0x66e4 | goto label_30;
| }
0x000062c4 addiu v1, zero, 1 | v1 = 1;
0x000062c8 addiu v1, zero, 2 | v1 = 2;
| if (v0 == v1) {
0x000062cc beq v0, v1, 0x682c | goto label_31;
| }
0x000062d0 addiu v1, zero, 3 | v1 = 3;
| if (v0 == v1) {
0x000062d4 beq v0, v1, 0x6838 | goto label_32;
| }
0x000062d8 addiu v1, zero, 5 | v1 = 5;
| if (v0 == v1) {
0x000062dc beq v0, v1, 0x6990 | goto label_33;
| }
0x000062e0 addiu v1, zero, 6 | v1 = 6;
| if (v0 == v1) {
0x000062e4 beq v0, v1, 0x6984 | goto label_34;
| }
| if (v0 == v1) {
0x000062e8 beql v0, v1, 0x699c | goto label_35;
| }
0x000062ec lw a2, -0x7fd4(gp) | a2 = *(gp);
0x000062f0 lw a2, -0x7fd4(gp) | a2 = *(gp);
0x000062f4 addiu a2, a2, 0x1868 | a2 += 0x1868;
0x000062f8 b 0x66ec | goto label_10;
| label_27:
0x000062fc lw t9, -0x7f24(gp) | t9 = sym.cprintf_u64;
0x00006300 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00006304 sw zero, 0x14(sp) | *(var_14h) = 0;
0x00006308 addiu a2, zero, 7 | a2 = 7;
0x0000630c addiu a1, zero, 1 | a1 = 1;
0x00006310 addiu a0, zero, -1 | a0 = -1;
0x00006314 bal 0xe240 | sym_cprintf_u64 ();
0x00006318 lw v1, 0xcc(sp) | v1 = *(var_cch);
0x0000631c lw v0, 0xf4(v1) | v0 = *((v1 + 61));
0x00006320 andi v0, v0, 2 | v0 &= 2;
0x00006324 lw gp, 0x38(sp) | gp = *(var_38h);
| if (v0 == 0) {
0x00006328 beqz v0, 0x670c | goto label_36;
| }
0x0000632c lw a2, -0x7fd4(gp) | a2 = *(gp);
0x00006330 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00006334 lw t9, -0x7fb4(gp) | t9 = sym.cprintf_s;
| /* esilref: '-1' */
0x00006338 addiu a2, a2, 0x1238 | a2 += 0x1238;
| /* str.__7s */
0x0000633c addiu a1, a1, 0x123c | a1 += 0x123c;
0x00006340 addiu a0, zero, 4 | a0 = 4;
0x00006344 bal 0xeb78 | sym_cprintf_s ();
0x00006348 lw gp, 0x38(sp) | gp = *(var_38h);
0x0000634c lw v0, (s4) | v0 = *(s4);
0x00006350 lw s7, 0xcc(sp) | s7 = *(var_cch);
0x00006354 b 0x6214 | goto label_1;
| label_26:
0x00006358 lw a1, 0x70(sp) | a1 = *(var_70h);
0x0000635c lw a0, 0x6c(sp) | a0 = *(var_6ch);
0x00006360 lw s2, 0xd0(sp) | s2 = *(var_d0h);
0x00006364 bal 0x104e0 | fcn_000104e0 ();
0x00006368 lw gp, 0x38(sp) | gp = *(var_38h);
0x0000636c lw a1, 0xbc(s7) | a1 = *((s7 + 47));
0x00006370 lw a0, 0xbc(s2) | a0 = *((s2 + 47));
0x00006374 lw t9, -0x7f18(gp) | t9 = *(gp);
0x00006378 subu a0, a1, a0 | __asm ("subu a0, a1, a0");
0x0000637c move s0, v0 | s0 = v0;
0x00006380 move s1, v1 | s1 = v1;
0x00006384 bal 0x10440 | fcn_00010440 ();
0x00006388 lw gp, 0x38(sp) | gp = *(var_38h);
0x0000638c move a2, s0 | a2 = s0;
0x00006390 move a3, s1 | a3 = s1;
0x00006394 lw t9, -0x7f30(gp) | t9 = *(gp);
0x00006398 move a0, v0 | a0 = v0;
0x0000639c move a1, v1 | a1 = v1;
0x000063a0 bal 0xf440 | fcn_0000f440 ();
0x000063a4 lw gp, 0x38(sp) | gp = *(var_38h);
0x000063a8 lw a2, 0xa8(sp) | a2 = *(var_a8h);
0x000063ac lw a3, 0xac(sp) | a3 = *(var_ach);
0x000063b0 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x000063b4 move a1, v1 | a1 = v1;
0x000063b8 move a0, v0 | a0 = v0;
0x000063bc bal 0xfea0 | fcn_0000fea0 ();
0x000063c0 lw gp, 0x38(sp) | gp = *(var_38h);
0x000063c4 sw v0, 0x18(sp) | *(var_18h) = v0;
0x000063c8 sw v1, 0x1c(sp) | *(var_1ch_4) = v1;
0x000063cc lw a0, 0xb8(s7) | a0 = *((s7 + 46));
0x000063d0 lw v0, 0xb8(s2) | v0 = *((s2 + 46));
0x000063d4 lw t9, -0x7f18(gp) | t9 = *(gp);
0x000063d8 subu a0, a0, v0 | __asm ("subu a0, a0, v0");
0x000063dc bal 0x10440 | fcn_00010440 ();
0x000063e0 lw gp, 0x38(sp) | gp = *(var_38h);
0x000063e4 move a2, s0 | a2 = s0;
0x000063e8 move a3, s1 | a3 = s1;
0x000063ec lw t9, -0x7f30(gp) | t9 = *(gp);
0x000063f0 move a0, v0 | a0 = v0;
0x000063f4 move a1, v1 | a1 = v1;
0x000063f8 bal 0xf440 | fcn_0000f440 ();
0x000063fc lw gp, 0x38(sp) | gp = *(var_38h);
0x00006400 lw a2, 0x1530(fp) | a2 = *(arg_1530h);
0x00006404 lw a3, 0x1534(fp) | a3 = *(arg_1534h);
0x00006408 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x0000640c move a0, v0 | a0 = v0;
0x00006410 move a1, v1 | a1 = v1;
0x00006414 bal 0xfea0 | fcn_0000fea0 ();
0x00006418 lw gp, 0x38(sp) | gp = *(var_38h);
0x0000641c sw v0, 0x10(sp) | *(var_10h) = v0;
0x00006420 sw v1, 0x14(sp) | *(var_14h) = v1;
0x00006424 lw t9, -0x7f20(gp) | t9 = sym.cprintf_f;
0x00006428 addiu a3, zero, 2 | a3 = 2;
0x0000642c addiu a2, zero, 9 | a2 = 9;
0x00006430 addiu a1, zero, 2 | a1 = 2;
0x00006434 addiu a0, zero, -1 | a0 = -1;
0x00006438 bal 0xe518 | sym_cprintf_f ();
0x0000643c lw gp, 0x38(sp) | gp = *(var_38h);
0x00006440 lw v0, (s4) | v0 = *(s4);
0x00006444 lw s7, 0xcc(sp) | s7 = *(var_cch);
0x00006448 b 0x6208 | goto label_2;
| label_23:
0x0000644c lw s2, 0xd0(sp) | s2 = *(var_d0h);
0x00006450 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00006454 lw a0, 0x6c(sp) | a0 = *(var_6ch);
0x00006458 lw a1, 0x70(sp) | a1 = *(var_70h);
0x0000645c bal 0x104e0 | fcn_000104e0 ();
0x00006460 lw gp, 0x38(sp) | gp = *(var_38h);
0x00006464 lw a1, 0x60(s7) | a1 = *((s7 + 24));
0x00006468 lw a0, 0x60(s2) | a0 = *((s2 + 24));
0x0000646c lw a3, 0x64(s2) | a3 = *((s2 + 25));
0x00006470 lw a2, 0x64(s7) | a2 = *((s7 + 25));
0x00006474 subu a0, a1, a0 | __asm ("subu a0, a1, a0");
0x00006478 subu a2, a2, a3 | __asm ("subu a2, a2, a3");
0x0000647c sltu a1, a1, a0 | a1 = (a1 < a0) ? 1 : 0;
0x00006480 lw t9, -0x7f34(gp) | t9 = *(gp);
0x00006484 subu a1, a2, a1 | __asm ("subu a1, a2, a1");
0x00006488 move s0, v0 | s0 = v0;
0x0000648c move s1, v1 | s1 = v1;
0x00006490 bal 0x104e0 | fcn_000104e0 ();
0x00006494 lw gp, 0x38(sp) | gp = *(var_38h);
0x00006498 move a2, s0 | a2 = s0;
0x0000649c move a3, s1 | a3 = s1;
0x000064a0 lw t9, -0x7f30(gp) | t9 = *(gp);
0x000064a4 move a0, v0 | a0 = v0;
0x000064a8 move a1, v1 | a1 = v1;
0x000064ac bal 0xf440 | fcn_0000f440 ();
0x000064b0 lw gp, 0x38(sp) | gp = *(var_38h);
0x000064b4 lw a2, 0x1530(fp) | a2 = *(arg_1530h);
0x000064b8 lw a3, 0x1534(fp) | a3 = *(arg_1534h);
0x000064bc lw t9, -0x7f2c(gp) | t9 = *(gp);
0x000064c0 move a0, v0 | a0 = v0;
0x000064c4 move a1, v1 | a1 = v1;
0x000064c8 bal 0xfea0 | fcn_0000fea0 ();
0x000064cc sw v0, 0x18(sp) | *(var_18h) = v0;
0x000064d0 sw v1, 0x1c(sp) | *(var_1ch_4) = v1;
0x000064d4 lw gp, 0x38(sp) | gp = *(var_38h);
0x000064d8 lw a1, 0x50(s7) | a1 = *((s7 + 20));
0x000064dc lw a0, 0x50(s2) | a0 = *((s2 + 20));
0x000064e0 lw v0, 0x54(s7) | v0 = *((s7 + 21));
0x000064e4 lw v1, 0x54(s2) | v1 = *((s2 + 21));
0x000064e8 subu a0, a1, a0 | __asm ("subu a0, a1, a0");
0x000064ec sltu a1, a1, a0 | a1 = (a1 < a0) ? 1 : 0;
0x000064f0 lw t9, -0x7f34(gp) | t9 = *(gp);
0x000064f4 subu v0, v0, v1 | __asm ("subu v0, v0, v1");
0x000064f8 subu a1, v0, a1 | __asm ("subu a1, v0, a1");
0x000064fc bal 0x104e0 | fcn_000104e0 ();
0x00006500 lw gp, 0x38(sp) | gp = *(var_38h);
0x00006504 move a2, s0 | a2 = s0;
0x00006508 move a3, s1 | a3 = s1;
0x0000650c lw t9, -0x7f30(gp) | t9 = *(gp);
0x00006510 move a0, v0 | a0 = v0;
0x00006514 move a1, v1 | a1 = v1;
0x00006518 bal 0xf440 | fcn_0000f440 ();
0x0000651c lw gp, 0x38(sp) | gp = *(var_38h);
0x00006520 lw a2, 0x1530(fp) | a2 = *(arg_1530h);
0x00006524 lw a3, 0x1534(fp) | a3 = *(arg_1534h);
0x00006528 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x0000652c move a0, v0 | a0 = v0;
0x00006530 move a1, v1 | a1 = v1;
0x00006534 bal 0xfea0 | fcn_0000fea0 ();
0x00006538 lw gp, 0x38(sp) | gp = *(var_38h);
0x0000653c sw v0, 0x10(sp) | *(var_10h) = v0;
0x00006540 sw v1, 0x14(sp) | *(var_14h) = v1;
0x00006544 lw t9, -0x7f20(gp) | t9 = sym.cprintf_f;
0x00006548 addiu a3, zero, 2 | a3 = 2;
0x0000654c addiu a2, zero, 9 | a2 = 9;
0x00006550 addiu a1, zero, 2 | a1 = 2;
0x00006554 addiu a0, zero, -1 | a0 = -1;
0x00006558 bal 0xe518 | sym_cprintf_f ();
0x0000655c lw gp, 0x38(sp) | gp = *(var_38h);
0x00006560 lw v1, 0xcc(sp) | v1 = *(var_cch);
0x00006564 addiu a2, zero, 7 | a2 = 7;
0x00006568 lw s0, -0x7fbc(gp) | s0 = *(gp);
0x0000656c lw a0, 0xb0(v1) | a0 = *((v1 + 44));
0x00006570 lw a1, 0xb4(v1) | a1 = *((v1 + 45));
0x00006574 lw v0, (s0) | v0 = *(s0);
0x00006578 sw a0, 0x18(sp) | *(var_18h) = a0;
0x0000657c sw a1, 0x1c(sp) | *(var_1ch_4) = a1;
0x00006580 lw a0, 0xa8(v1) | a0 = *((v1 + 42));
0x00006584 lw a1, 0xac(v1) | a1 = *((v1 + 43));
0x00006588 andi v0, v0, 0x800 | v0 &= 0x800;
0x0000658c lw t9, -0x7f24(gp) | t9 = sym.cprintf_u64;
0x00006590 sw a0, 0x10(sp) | *(var_10h) = a0;
0x00006594 addiu v1, zero, -1 | v1 = -1;
0x00006598 addiu a0, zero, 2 | a0 = 2;
0x0000659c sw a1, 0x14(sp) | *(var_14h) = a1;
| if (v0 != 0) {
0x000065a0 movz a0, v1, v0 | a0 = v1;
| }
0x000065a4 addiu a1, zero, 2 | a1 = 2;
0x000065a8 bal 0xe240 | sym_cprintf_u64 ();
0x000065ac lw gp, 0x38(sp) | gp = *(var_38h);
0x000065b0 lw s0, (s0) | s0 = *(s0);
0x000065b4 lw v0, -0x7fac(gp) | v0 = *(gp);
0x000065b8 lw s1, (v0) | s1 = *(v0);
0x000065bc ext s0, s0, 0xb, 1 | __asm ("ext s0, s0, 0xb, 1");
| if (s1 == 0) {
0x000065c0 beqz s1, 0x6674 | goto label_37;
| }
0x000065c4 lw v0, 0xcc(sp) | v0 = *(var_cch);
0x000065c8 lw t9, -0x7f34(gp) | t9 = *(gp);
0x000065cc lw a1, 0xb4(v0) | a1 = *((v0 + 45));
0x000065d0 lw a0, 0xb0(v0) | a0 = *((v0 + 44));
0x000065d4 bal 0x104e0 | fcn_000104e0 ();
0x000065d8 lw gp, 0x38(sp) | gp = *(var_38h);
0x000065dc move a0, s1 | a0 = s1;
0x000065e0 move s2, v0 | s2 = v0;
0x000065e4 lw t9, -0x7f18(gp) | t9 = *(gp);
0x000065e8 move s3, v1 | s3 = v1;
0x000065ec bal 0x10440 | fcn_00010440 ();
0x000065f0 lw gp, 0x38(sp) | gp = *(var_38h);
0x000065f4 move a2, v0 | a2 = v0;
0x000065f8 move a3, v1 | a3 = v1;
0x000065fc lw t9, -0x7f30(gp) | t9 = *(gp);
0x00006600 move a0, s2 | a0 = s2;
0x00006604 move a1, s3 | a1 = s3;
0x00006608 bal 0xf440 | fcn_0000f440 ();
0x0000660c lw gp, 0x38(sp) | gp = *(var_38h);
0x00006610 lw a2, 0x1530(fp) | a2 = *(arg_1530h);
0x00006614 lw a3, 0x1534(fp) | a3 = *(arg_1534h);
0x00006618 lw t9, -0x7f2c(gp) | t9 = *(gp);
0x0000661c move a0, v0 | a0 = v0;
0x00006620 move a1, v1 | a1 = v1;
0x00006624 bal 0xfea0 | fcn_0000fea0 ();
0x00006628 lw gp, 0x38(sp) | gp = *(var_38h);
| do {
0x0000662c lw t9, -0x7f28(gp) | t9 = sym.cprintf_pc;
0x00006630 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00006634 sw v1, 0x14(sp) | *(var_14h) = v1;
0x00006638 addiu a3, zero, 2 | a3 = 2;
0x0000663c addiu a2, zero, 6 | a2 = 6;
0x00006640 addiu a1, zero, 1 | a1 = 1;
0x00006644 move a0, s0 | a0 = s0;
0x00006648 bal 0xe7b4 | sym_cprintf_pc ();
0x0000664c lw gp, 0x38(sp) | gp = *(var_38h);
0x00006650 lw v0, (s4) | v0 = *(s4);
0x00006654 lw s7, 0xcc(sp) | s7 = *(var_cch);
0x00006658 b 0x5f14 | goto label_3;
| label_22:
0x0000665c lw t9, -0x7f30(gp) | t9 = *(gp);
0x00006660 lw a2, 0x40(sp) | a2 = *(var_40h_6);
0x00006664 lw a3, 0x44(sp) | a3 = *(var_44h_6);
0x00006668 b 0x5e54 | goto label_4;
| label_25:
0x0000666c addiu a0, zero, 1 | a0 = 1;
0x00006670 b 0x617c | goto label_5;
| label_37:
0x00006674 move v0, zero | v0 = 0;
0x00006678 move v1, zero | v1 = 0;
0x0000667c b 0x662c |
| } while (1);
| label_24:
0x00006680 lw v1, 0xc4(sp) | v1 = *(var_c4h);
0x00006684 lw v0, 0xc0(sp) | v0 = *(var_c0h);
0x00006688 lw a3, -0x7fd4(gp) | a3 = *(gp);
0x0000668c lw t9, -0x7de4(gp) | t9 = sym.imp.__sprintf_chk
0x00006690 addiu s0, sp, 0xd4 | s0 = sp + 0xd4;
| /* str.__9.2f__9.2f__9.2f */
0x00006694 addiu a3, a3, 0x1220 | a3 += 0x1220;
0x00006698 addiu a2, zero, 0x20 | a2 = 0x20;
0x0000669c addiu a1, zero, 1 | a1 = 1;
0x000066a0 move a0, s0 | a0 = s0;
0x000066a4 sw v1, 0x24(sp) | *(var_24h_3) = v1;
0x000066a8 sw v1, 0x1c(sp) | *(var_1ch_4) = v1;
0x000066ac sw v1, 0x14(sp) | *(var_14h) = v1;
0x000066b0 movf zero, zero, fcc0 | __asm ("movf zero, zero, fcc0");
0x000066b4 sw v0, 0x18(sp) | *(var_18h) = v0;
0x000066b8 sw v0, 0x10(sp) | *(var_10h) = v0;
0x000066bc jalr t9 | t9 ();
0x000066c0 lw gp, 0x38(sp) | gp = *(var_38h);
0x000066c4 move a2, s0 | a2 = s0;
0x000066c8 addiu a0, zero, 4 | a0 = 4;
0x000066cc lw a1, -0x7fd4(gp) | a1 = *(gp);
0x000066d0 lw t9, -0x7fb4(gp) | t9 = sym.cprintf_s;
| /* esilref: '&s' */
0x000066d4 addiu a1, a1, 0x1234 | a1 += 0x1234;
0x000066d8 bal 0xeb78 | sym_cprintf_s ();
0x000066dc lw gp, 0x38(sp) | gp = *(var_38h);
0x000066e0 b 0x61ac | goto label_6;
| label_30:
0x000066e4 lw a2, -0x7fd4(gp) | a2 = *(gp);
| /* str.NORMAL */
0x000066e8 addiu a2, a2, 0x10f0 | a2 += 0x10f0;
| label_10:
0x000066ec lw v0, 0xa4(sp) | v0 = *(var_a4h);
0x000066f0 lw t9, -0x7fb4(gp) | t9 = sym.cprintf_s;
0x000066f4 addiu a1, v0, 0x1244 | a1 = v0 + 0x1244;
0x000066f8 addiu a0, zero, 1 | a0 = 1;
0x000066fc bal 0xeb78 | sym_cprintf_s ();
0x00006700 lw gp, 0x38(sp) | gp = *(var_38h);
0x00006704 lw s7, 0xcc(sp) | s7 = *(var_cch);
0x00006708 b 0x6220 | goto label_7;
| label_36:
0x0000670c lw v0, 0x100(v1) | v0 = *(v1);
0x00006710 lw t9, -0x7f24(gp) | t9 = sym.cprintf_u64;
0x00006714 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00006718 sw zero, 0x14(sp) | *(var_14h) = 0;
0x0000671c addiu a2, zero, 7 | a2 = 7;
0x00006720 addiu a1, zero, 1 | a1 = 1;
0x00006724 addiu a0, zero, -1 | a0 = -1;
0x00006728 bal 0xe240 | sym_cprintf_u64 ();
0x0000672c lw gp, 0x38(sp) | gp = *(var_38h);
0x00006730 lw v0, (s4) | v0 = *(s4);
0x00006734 lw s7, 0xcc(sp) | s7 = *(var_cch);
0x00006738 b 0x6214 | goto label_1;
| label_19:
0x0000673c lw s0, -0x7fbc(gp) | s0 = *(gp);
0x00006740 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00006744 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
0x00006748 move a2, a3 | a2 = a3;
| /* str._n__11s */
0x0000674c addiu a1, a1, 0x10fc | a1 += 0x10fc;
0x00006750 addiu a0, zero, 1 | a0 = 1;
0x00006754 jalr t9 | t9 ();
0x00006758 lw gp, 0x38(sp) | gp = *(var_38h);
0x0000675c lw v0, (s0) | v0 = *(s0);
0x00006760 andi v0, v0, 0x100 | v0 &= aav.0x00000100;
0x00006764 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
| if (v0 != 0) {
0x00006768 bnez v0, 0x6844 | goto label_38;
| }
0x0000676c lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00006770 addiu a0, zero, 1 | a0 = 1;
| /* str.___UID */
0x00006774 addiu a1, a1, 0x1110 | a1 += 0x1110;
0x00006778 jalr t9 | t9 ();
0x0000677c lw gp, 0x38(sp) | gp = *(var_38h);
0x00006780 lw v0, (s0) | v0 = *(s0);
0x00006784 andi v0, v0, 0x20 | v0 &= 0x20;
0x00006788 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
| if (v0 == 0) {
0x0000678c beqz v0, 0x6868 | goto label_39;
| }
| label_11:
0x00006790 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00006794 addiu a0, zero, 1 | a0 = 1;
| /* str.______TGID_______TID */
0x00006798 addiu a1, a1, 0x1118 | a1 += 0x1118;
0x0000679c jalr t9 | t9 ();
0x000067a0 lw gp, 0x38(sp) | gp = *(var_38h);
0x000067a4 lw s4, -0x7fc0(gp) | s4 = *(gp);
0x000067a8 lw v0, (s4) | v0 = *(s4);
0x000067ac andi v1, v0, 1 | v1 = v0 & 1;
0x000067b0 lw a1, -0x7fd4(gp) | a1 = *(gp);
| if (v1 == 0) {
0x000067b4 bnel v1, zero, 0x6894 | goto label_40;
| }
0x000067b8 andi v1, v0, 2 | v1 = v0 & 2;
| label_12:
0x000067bc lw a1, -0x7fd4(gp) | a1 = *(gp);
| if (v1 == 0) {
0x000067c0 bnel v1, zero, 0x68b8 | goto label_41;
| }
| label_13:
0x000067c4 andi v1, v0, 0x10 | v1 = v0 & 0x10;
0x000067c8 lw a1, -0x7fd4(gp) | a1 = *(gp);
| if (v1 == 0) {
0x000067cc bnel v1, zero, 0x68dc | goto label_42;
| }
| label_14:
0x000067d0 andi v1, v0, 4 | v1 = v0 & 4;
0x000067d4 lw a1, -0x7fd4(gp) | a1 = *(gp);
| if (v1 == 0) {
0x000067d8 bnel v1, zero, 0x6900 | goto label_43;
| }
| label_15:
0x000067dc andi v1, v0, 8 | v1 = v0 & 8;
0x000067e0 lw a1, -0x7fd4(gp) | a1 = *(gp);
| if (v1 == 0) {
0x000067e4 bnel v1, zero, 0x6924 | goto label_44;
| }
| label_16:
0x000067e8 andi v1, v0, 0x20 | v1 = v0 & 0x20;
0x000067ec lw a1, -0x7fd4(gp) | a1 = *(gp);
| if (v1 != 0) {
0x000067f0 bnez v1, 0x6948 | goto label_45;
| }
| label_17:
0x000067f4 andi v0, v0, 0x40 | v0 &= 0x40;
0x000067f8 lw a1, -0x7fd4(gp) | a1 = *(gp);
| if (v0 != 0) {
0x000067fc bnez v0, 0x696c | goto label_46;
| }
| label_18:
0x00006800 lw a0, -0x7fd4(gp) | a0 = *(gp);
0x00006804 lw t9, -0x7d34(gp) | t9 = sym.imp.puts;
| /* esilref: ' Command' */
0x00006808 addiu a0, a0, 0x135c | a0 += 0x135c;
0x0000680c jalr t9 | t9 ();
0x00006810 lw gp, 0x38(sp) | gp = *(var_38h);
0x00006814 lw s5, -0x7fc4(gp) | s5 = *(gp);
0x00006818 lw v0, (s5) | v0 = *(s5);
0x0000681c lw v0, -0x7f38(gp) | v0 = sym.get_pid_to_display;
| if (v0 == 0) {
0x00006820 bnel v0, zero, 0x5a20 | goto label_8;
| }
0x00006824 move s0, zero | s0 = 0;
0x00006828 b 0x6248 | goto label_9;
| label_31:
0x0000682c lw a2, -0x7fd4(gp) | a2 = *(gp);
| /* str.FIFO */
0x00006830 addiu a2, a2, 0x10d8 | a2 += 0x10d8;
0x00006834 b 0x66ec | goto label_10;
| label_32:
0x00006838 lw a2, -0x7fd4(gp) | a2 = *(gp);
| /* esilref: 'RR' */
0x0000683c addiu a2, a2, 0x10f8 | a2 += 0x10f8;
0x00006840 b 0x66ec | goto label_10;
| label_38:
0x00006844 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x00006848 addiu a0, zero, 1 | a0 = 1;
| /* str._____USER */
0x0000684c addiu a1, a1, 0x1104 | a1 += 0x1104;
0x00006850 jalr t9 | t9 ();
0x00006854 lw gp, 0x38(sp) | gp = *(var_38h);
0x00006858 lw v0, (s0) | v0 = *(s0);
0x0000685c andi v0, v0, 0x20 | v0 &= 0x20;
0x00006860 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
| if (v0 != 0) {
0x00006864 bnez v0, 0x6790 | goto label_11;
| }
| label_39:
0x00006868 lw a1, -0x7fd4(gp) | a1 = *(gp);
0x0000686c addiu a0, zero, 1 | a0 = 1;
| /* str._______PID */
0x00006870 addiu a1, a1, 0x1130 | a1 += 0x1130;
0x00006874 jalr t9 | t9 ();
0x00006878 lw gp, 0x38(sp) | gp = *(var_38h);
0x0000687c lw s4, -0x7fc0(gp) | s4 = *(gp);
0x00006880 lw v0, (s4) | v0 = *(s4);
0x00006884 andi v1, v0, 1 | v1 = v0 & 1;
0x00006888 andi v1, v0, 2 | v1 = v0 & 2;
| if (v1 == 0) {
0x0000688c beqz v1, 0x67bc | goto label_12;
| }
0x00006890 lw a1, -0x7fd4(gp) | a1 = *(gp);
| label_40:
0x00006894 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
| /* str.______usr___system____guest_____wait______CPU___CPU */
0x00006898 addiu a1, a1, 0x113c | a1 += 0x113c;
0x0000689c addiu a0, zero, 1 | a0 = 1;
0x000068a0 jalr t9 | t9 ();
0x000068a4 lw v0, (s4) | v0 = *(s4);
0x000068a8 andi v1, v0, 2 | v1 = v0 & 2;
0x000068ac lw gp, 0x38(sp) | gp = *(var_38h);
| if (v1 == 0) {
0x000068b0 beqz v1, 0x67c4 | goto label_13;
| }
0x000068b4 lw a1, -0x7fd4(gp) | a1 = *(gp);
| label_41:
0x000068b8 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
| /* str.__minflt_s__majflt_s_____VSZ_____RSS_____MEM */
0x000068bc addiu a1, a1, 0x1170 | a1 += 0x1170;
0x000068c0 addiu a0, zero, 1 | a0 = 1;
0x000068c4 jalr t9 | t9 ();
0x000068c8 lw v0, (s4) | v0 = *(s4);
0x000068cc andi v1, v0, 0x10 | v1 = v0 & 0x10;
0x000068d0 lw gp, 0x38(sp) | gp = *(var_38h);
| if (v1 == 0) {
0x000068d4 beqz v1, 0x67d0 | goto label_14;
| }
0x000068d8 lw a1, -0x7fd4(gp) | a1 = *(gp);
| label_42:
0x000068dc lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
| /* str._StkSize__StkRef */
0x000068e0 addiu a1, a1, 0x11a0 | a1 += 0x11a0;
0x000068e4 addiu a0, zero, 1 | a0 = 1;
0x000068e8 jalr t9 | t9 ();
0x000068ec lw v0, (s4) | v0 = *(s4);
0x000068f0 andi v1, v0, 4 | v1 = v0 & 4;
0x000068f4 lw gp, 0x38(sp) | gp = *(var_38h);
| if (v1 == 0) {
0x000068f8 beqz v1, 0x67dc | goto label_15;
| }
0x000068fc lw a1, -0x7fd4(gp) | a1 = *(gp);
| label_43:
0x00006900 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
| /* str.___kB_rd_s___kB_wr_s_kB_ccwr_s_iodelay */
0x00006904 addiu a1, a1, 0x11b4 | a1 += 0x11b4;
0x00006908 addiu a0, zero, 1 | a0 = 1;
0x0000690c jalr t9 | t9 ();
0x00006910 lw v0, (s4) | v0 = *(s4);
0x00006914 andi v1, v0, 8 | v1 = v0 & 8;
0x00006918 lw gp, 0x38(sp) | gp = *(var_38h);
| if (v1 == 0) {
0x0000691c beqz v1, 0x67e8 | goto label_16;
| }
0x00006920 lw a1, -0x7fd4(gp) | a1 = *(gp);
| label_44:
0x00006924 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
| /* str.___cswch_s_nvcswch_s */
0x00006928 addiu a1, a1, 0x11dc | a1 += 0x11dc;
0x0000692c addiu a0, zero, 1 | a0 = 1;
0x00006930 jalr t9 | t9 ();
0x00006934 lw v0, (s4) | v0 = *(s4);
0x00006938 andi v1, v0, 0x20 | v1 = v0 & 0x20;
0x0000693c lw gp, 0x38(sp) | gp = *(var_38h);
| if (v1 == 0) {
0x00006940 beqz v1, 0x67f4 | goto label_17;
| }
0x00006944 lw a1, -0x7fd4(gp) | a1 = *(gp);
| label_45:
0x00006948 lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
| /* str._threads___fd_nr */
0x0000694c addiu a1, a1, 0x11f4 | a1 += 0x11f4;
0x00006950 addiu a0, zero, 1 | a0 = 1;
0x00006954 jalr t9 | t9 ();
0x00006958 lw v0, (s4) | v0 = *(s4);
0x0000695c andi v0, v0, 0x40 | v0 &= 0x40;
0x00006960 lw gp, 0x38(sp) | gp = *(var_38h);
| if (v0 == 0) {
0x00006964 beqz v0, 0x6800 | goto label_18;
| }
0x00006968 lw a1, -0x7fd4(gp) | a1 = *(gp);
| label_46:
0x0000696c lw t9, -0x7d8c(gp) | t9 = sym.imp.__printf_chk;
| /* str._prio_policy */
0x00006970 addiu a1, a1, 0x1208 | a1 += 0x1208;
0x00006974 addiu a0, zero, 1 | a0 = 1;
0x00006978 jalr t9 | t9 ();
0x0000697c lw gp, 0x38(sp) | gp = *(var_38h);
0x00006980 b 0x6800 | goto label_18;
| label_34:
0x00006984 lw a2, -0x7fd4(gp) | a2 = *(gp);
| /* str.IDLE */
0x00006988 addiu a2, a2, 0x10e0 | a2 += 0x10e0;
0x0000698c b 0x66ec | goto label_10;
| label_33:
0x00006990 lw a2, -0x7fd4(gp) | a2 = *(gp);
| /* str.BATCH */
0x00006994 addiu a2, a2, 0x10d0 | a2 += 0x10d0;
0x00006998 b 0x66ec | goto label_10;
| /* str.DEADLN */
| label_35:
0x0000699c addiu a2, a2, 0x10e8 | a2 += 0x10e8;
0x000069a0 b 0x66ec | goto label_10;
| label_29:
0x000069a4 lw t9, -0x7cf0(gp) | t9 = sym.imp.__stack_chk_fail;
0x000069a8 jalr t9 | t9 ();
0x000069ac nop |
| }
[*] Function sprintf used 12 times pidstat