[*] Binary protection state of scsi_id
Full RELRO Canary found NX disabled PIE enabled RPATH No RUNPATH No Symbols
[*] Function printf tear down of scsi_id
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/udev/scsi_id @ 0x522c */
| #include <stdint.h>
|
; (fcn) fcn.0000522c () | void fcn_0000522c () {
0x0000522c lui gp, 3 |
0x00005230 addiu gp, gp, -0x600c |
0x00005234 addu gp, gp, t9 | gp += t9;
0x00005238 addiu sp, sp, -0x188 |
0x0000523c addiu v1, zero, 0x100 | v1 = 0x100;
0x00005240 sw s1, 0x164(sp) | *(var_164h_2) = s1;
0x00005244 lw s1, -0x7c7c(gp) | s1 = *((gp - 7967));
0x00005248 sw ra, 0x184(sp) | *(var_184h_2) = ra;
0x0000524c sw gp, 0x28(sp) | *(var_28h_2) = gp;
0x00005250 sw fp, 0x180(sp) | *(var_180h_2) = fp;
0x00005254 sw s6, 0x178(sp) | *(var_178h_2) = s6;
0x00005258 sw s5, 0x174(sp) | *(var_174h_2) = s5;
0x0000525c sw s4, 0x170(sp) | *(var_170h_2) = s4;
0x00005260 sw s3, 0x16c(sp) | *(var_16ch_2) = s3;
0x00005264 sw s2, 0x168(sp) | *(var_168h_2) = s2;
0x00005268 sw s0, 0x160(sp) | *(var_160h) = s0;
0x0000526c sw s7, 0x17c(sp) | *(var_17ch_2) = s7;
0x00005270 lw v0, (s1) | v0 = *(s1);
0x00005274 lw t9, -0x7fb8(gp) | t9 = *((gp - 8174));
0x00005278 sw v1, 0x10(sp) | *(var_10h_2) = v1;
0x0000527c lw v1, 0x1a4(sp) | v1 = *(var_1a4h);
0x00005280 move s4, a3 | s4 = a3;
0x00005284 lw a3, 0x19c(sp) | a3 = *(var_19ch);
0x00005288 sw v1, 0x30(sp) | *(var_30h_2) = v1;
0x0000528c addiu t9, t9, 0x4fec | t9 += fcn.00004fec;
0x00005290 move s3, a2 | s3 = a2;
0x00005294 sw v0, 0x15c(sp) | *(var_15ch) = v0;
0x00005298 move a2, zero | a2 = 0;
0x0000529c move s2, a0 | s2 = a0;
0x000052a0 move fp, a1 | fp = a1;
0x000052a4 lw s6, 0x1a0(sp) | s6 = *(var_1a0h);
0x000052a8 lw s5, 0x1a8(sp) | s5 = *(var_1a8h);
0x000052ac bal 0x4fec | fcn_00004fec ();
0x000052b0 lw gp, 0x28(sp) | gp = *(var_28h_2);
0x000052b4 addiu s0, sp, 0x5c | s0 = sp + 0x5c;
0x000052b8 addiu a2, zero, 0xfe | a2 = 0xfe;
0x000052bc lw t9, -0x7d1c(gp) | t9 = sym.imp.memset;
0x000052c0 move a1, zero | a1 = 0;
0x000052c4 move a0, s0 | a0 = s0;
0x000052c8 jalr t9 | t9 ();
0x000052cc lw gp, 0x28(sp) | gp = *(var_28h_2);
0x000052d0 sw s0, 0x10(sp) | *(var_10h_2) = s0;
0x000052d4 addiu a3, zero, 0x83 | a3 = 0x83;
0x000052d8 lw t9, -0x7fb8(gp) | t9 = *((gp - 8174));
0x000052dc addiu a2, zero, 1 | a2 = 1;
0x000052e0 move a1, fp | a1 = fp;
0x000052e4 addiu t9, t9, 0x4a38 | t9 += fcn.00004a38;
0x000052e8 move a0, s2 | a0 = s2;
0x000052ec bal 0x4a38 | fcn_00004a38 ();
0x000052f0 lw gp, 0x28(sp) | gp = *(var_28h_2);
| if (v0 < 0) {
0x000052f4 bltz v0, 0x54e0 | goto label_2;
| }
0x000052f8 lbu v1, 0x5d(sp) | v1 = *(var_5dh);
0x000052fc addiu v0, zero, 0x83 | v0 = 0x83;
0x00005300 lw t9, -0x7fc8(gp) | t9 = sym.log_get_max_level_realm;
| if (v1 != v0) {
0x00005304 bne v1, v0, 0x54cc | goto label_13;
| }
0x00005308 lbu v0, 0x62(sp) | v0 = *(var_62h_2);
0x0000530c lbu fp, 0x5f(sp) | fp = *(var_5fh);
| if (v0 != 0) {
0x00005310 bnez v0, 0x56e0 | goto label_14;
| }
0x00005314 lw t0, -0x7fdc(gp) | t0 = *(gp);
0x00005318 lw t1, -0x7fdc(gp) | t1 = *(gp);
0x0000531c addiu s7, t0, 0x3afc | s7 = t0 + 0x3afc;
0x00005320 addiu v0, s7, 0x27 | v0 = s7 + 0x27;
0x00005324 sw v0, 0x34(sp) | *(var_34h_2) = v0;
0x00005328 lw v0, -0x7fb8(gp) | v0 = *((gp - 8174));
0x0000532c lbu a1, 0x5e(sp) | a1 = *(var_5eh);
0x00005330 addiu v0, v0, 0x46e4 | v0 += fcn.000046e4;
0x00005334 sw v0, 0x40(sp) | *(var_40h) = v0;
0x00005338 lw v0, -0x7fdc(gp) | v0 = *(gp);
| /* str.0123456789abcdef */
0x0000533c addiu t1, t1, 0x3ae8 | t1 += 0x3ae8;
| /* str.check_fill_0x83_id */
0x00005340 addiu v0, v0, 0x3a08 | v0 += 0x3a08;
0x00005344 sw v0, 0x44(sp) | *(var_44h_2) = v0;
0x00005348 sll v0, a1, 8 | v0 = a1 << 8;
| label_3:
0x0000534c negu v0, v0 | __asm ("negu v0, v0");
0x00005350 addiu v1, zero, 4 | v1 = 4;
| if (v0 == fp) {
0x00005354 beq v0, fp, 0x55f0 | goto label_15;
| }
0x00005358 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000535c sw v0, 0x38(sp) | *(var_38h_2) = v0;
0x00005360 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00005364 sw v0, 0x3c(sp) | *(var_3ch_2) = v0;
0x00005368 addu fp, s0, v1 | fp = s0 + v1;
| label_1:
0x0000536c addiu a3, zero, 0x10 | a3 = 0x10;
0x00005370 lbu v0, 1(fp) | v0 = *(arg_1h);
0x00005374 andi a0, v0, 0x30 | a0 = v0 & 0x30;
| if (a0 == a3) {
0x00005378 beql a0, a3, 0x5608 | goto label_16;
| }
0x0000537c lbu a0, (s7) | a0 = *(s7);
0x00005380 addiu v0, sp, 0x160 | v0 = sp + aav.0x00000160;
| if (a0 == 0) {
0x00005384 bnel a0, zero, 0x55c4 | goto label_17;
| }
0x00005388 lbu a0, (s7) | a0 = *(s7);
0x0000538c andi v0, v0, 0xf | v0 &= 0xf;
| label_4:
0x00005390 addiu v0, sp, 0x160 | v0 = sp + aav.0x00000160;
| if (v0 != a0) {
0x00005394 bne v0, a0, 0x55c4 | goto label_17;
| }
0x00005398 lbu v0, 1(s7) | v0 = *((s7 + 1));
0x0000539c addiu a3, zero, 0xff | a3 = 0xff;
| if (v0 != a3) {
0x000053a0 beql v0, a3, 0x53bc |
0x000053a4 lbu a3, (fp) | a3 = *(fp);
0x000053a8 lbu a3, 4(fp) | a3 = *(arg_4h);
0x000053ac srl a3, a3, 4 | a3 >>= 4;
0x000053b0 addiu v0, sp, 0x160 | v0 = sp + aav.0x00000160;
| if (v0 != a3) {
0x000053b4 bne v0, a3, 0x55c4 | goto label_17;
| }
0x000053b8 lbu a3, (fp) | a3 = *(fp);
| }
0x000053bc lbu v0, 2(s7) | v0 = *((s7 + 2));
0x000053c0 andi a3, a3, 0xf | a3 &= 0xf;
0x000053c4 addiu v0, sp, 0x160 | v0 = sp + aav.0x00000160;
| if (v0 != a3) {
0x000053c8 bne v0, a3, 0x55c4 | goto label_17;
| }
0x000053cc addiu v0, zero, 2 | v0 = 2;
0x000053d0 lbu t2, 3(fp) | t2 = *(arg_3h);
| if (a3 == v0) {
0x000053d4 beq a3, v0, 0x56d8 | goto label_18;
| }
0x000053d8 sll t3, t2, 1 | t3 = t2 << 1;
| label_8:
0x000053dc lw v0, 0x198(sp) | v0 = *(var_10h);
| if (a0 == 0) {
0x000053e0 beqz a0, 0x5520 | goto label_19;
| }
0x000053e4 addiu t3, t3, 2 | t3 += 2;
0x000053e8 slt v0, v0, t3 | v0 = (v0 < t3) ? 1 : 0;
0x000053ec addiu v0, zero, 5 | v0 = 5;
| if (v0 != 0) {
0x000053f0 bnez v0, 0x5530 | goto label_20;
| }
0x000053f4 addu a0, t1, a0 | a0 = t1 + a0;
| if (a0 != v0) {
0x000053f8 bnel a0, v0, 0x5408 |
0x000053fc lbu v0, 7(fp) | v0 = *(arg_7h);
| if (s5 == 0) {
0x00005400 bnel s5, zero, 0x5818 | goto label_21;
| }
0x00005404 addu a0, t1, a0 | a0 = t1 + a0;
| }
| label_0:
0x00005408 lbu v0, (a0) | v0 = *(a0);
0x0000540c sb v0, (s3) | *(s3) = v0;
0x00005410 lbu v0, (s7) | v0 = *(s7);
0x00005414 lw t9, 0x40(sp) | t9 = *(var_40h);
| if (v0 == 0) {
0x00005418 beqz v0, 0x57ac | goto label_22;
| }
| label_9:
0x0000541c lw t9, -0x7cfc(gp) | t9 = sym.imp.strlen;
0x00005420 sw t2, 0x38(sp) | *(var_38h_2) = t2;
0x00005424 sw a3, 0x34(sp) | *(var_34h_2) = a3;
0x00005428 sw t1, 0x3c(sp) | *(var_3ch_2) = t1;
0x0000542c move a0, s3 | a0 = s3;
0x00005430 jalr t9 | t9 ();
0x00005434 lw t2, 0x38(sp) | t2 = *(var_38h_2);
0x00005438 lw a3, 0x34(sp) | a3 = *(var_34h_2);
0x0000543c addiu v1, zero, 2 | v1 = 2;
0x00005440 move s0, v0 | s0 = v0;
0x00005444 lw gp, 0x28(sp) | gp = *(var_28h_2);
0x00005448 addiu v0, t2, 3 | v0 = t2 + 3;
| if (a3 == v1) {
0x0000544c beq a3, v1, 0x57e0 | goto label_23;
| }
0x00005450 addiu v1, zero, 3 | v1 = 3;
0x00005454 lw t1, 0x3c(sp) | t1 = *(var_3ch_2);
| if (v0 == v1) {
0x00005458 beq v0, v1, 0x54a0 | goto label_10;
| }
0x0000545c addiu v1, s0, 1 | v1 = s0 + 1;
0x00005460 addu a1, fp, t2 | a1 = fp + t2;
0x00005464 addiu a2, fp, 4 | a2 = fp + 4;
0x00005468 addu v1, s3, v1 | v1 = s3 + v1;
0x0000546c addiu a1, a1, 4 | a1 += 4;
| do {
0x00005470 lbu v0, (a2) | v0 = *(a2);
0x00005474 addiu a2, a2, 1 | a2++;
0x00005478 srl a0, v0, 4 | a0 = v0 >> 4;
0x0000547c andi v0, v0, 0xf | v0 &= 0xf;
0x00005480 addu a0, t1, a0 | a0 = t1 + a0;
0x00005484 addu v0, t1, v0 | v0 = t1 + v0;
0x00005488 lbu a0, (a0) | a0 = *(a0);
0x0000548c lbu v0, (v0) | v0 = *(v0);
0x00005490 sb a0, -1(v1) | *((v1 - 1)) = a0;
0x00005494 sb v0, (v1) | *(v1) = v0;
0x00005498 addiu v1, v1, 2 | v1 += 2;
0x0000549c bne a1, a2, 0x5470 |
| } while (a1 != a2);
| label_10:
0x000054a0 addu s2, s3, s0 | s2 = s3 + s0;
0x000054a4 lw t9, -0x7cbc(gp) | t9 = sym.imp.strcpy;
| label_11:
0x000054a8 move a1, s2 | a1 = s2;
0x000054ac move a0, s4 | a0 = s4;
0x000054b0 jalr t9 | t9 ();
0x000054b4 lbu v1, (s7) | v1 = *(s7);
0x000054b8 addiu v0, zero, 3 | v0 = 3;
0x000054bc lw gp, 0x28(sp) | gp = *(var_28h_2);
| if (v1 == v0) {
0x000054c0 beq v1, v0, 0x5694 | goto label_24;
| }
| label_7:
0x000054c4 move v0, zero | v0 = 0;
0x000054c8 b 0x54e4 | goto label_6;
| label_13:
0x000054cc addiu a0, zero, 1 | a0 = 1;
0x000054d0 bal 0xba34 | sym_log_get_max_level_realm ();
0x000054d4 slti v0, v0, 7 | v0 = (v0 < 7) ? 1 : 0;
0x000054d8 lw gp, 0x28(sp) | gp = *(var_28h_2);
| if (v0 == 0) {
0x000054dc beqz v0, 0x564c | goto label_25;
| }
| label_2:
0x000054e0 addiu v0, zero, 1 | v0 = 1;
| label_6:
0x000054e4 lw a0, 0x15c(sp) | a0 = *(var_15ch);
0x000054e8 lw v1, (s1) | v1 = *(s1);
0x000054ec lw ra, 0x184(sp) | ra = *(var_184h_2);
| if (a0 != v1) {
0x000054f0 bne a0, v1, 0x5870 | goto label_26;
| }
0x000054f4 lw fp, 0x180(sp) | fp = *(var_180h_2);
0x000054f8 lw s7, 0x17c(sp) | s7 = *(var_17ch_2);
0x000054fc lw s6, 0x178(sp) | s6 = *(var_178h_2);
0x00005500 lw s5, 0x174(sp) | s5 = *(var_174h_2);
0x00005504 lw s4, 0x170(sp) | s4 = *(var_170h_2);
0x00005508 lw s3, 0x16c(sp) | s3 = *(var_16ch_2);
0x0000550c lw s2, 0x168(sp) | s2 = *(var_168h_2);
0x00005510 lw s1, 0x164(sp) | s1 = *(var_164h_2);
0x00005514 lw s0, 0x160(sp) | s0 = *(var_160h);
0x00005518 addiu sp, sp, 0x188 |
0x0000551c jr ra | return v1;
| label_19:
0x00005520 addiu t3, t3, 0x1a | t3 += 0x1a;
0x00005524 slt v0, v0, t3 | v0 = (v0 < t3) ? 1 : 0;
0x00005528 addu a0, t1, a0 | a0 = t1 + a0;
| if (v0 == 0) {
0x0000552c beqz v0, 0x5408 | goto label_0;
| }
| label_20:
0x00005530 lw t9, -0x7fc8(gp) | t9 = sym.log_get_max_level_realm;
0x00005534 sw t1, 0x54(sp) | *(var_54h) = t1;
0x00005538 sw a1, 0x50(sp) | *(var_50h) = a1;
0x0000553c sw t3, 0x4c(sp) | *(var_4ch_2) = t3;
0x00005540 sw v1, 0x48(sp) | *(var_48h_2) = v1;
0x00005544 addiu a0, zero, 1 | a0 = 1;
0x00005548 bal 0xba34 | sym_log_get_max_level_realm ();
0x0000554c slti v0, v0, 7 | v0 = (v0 < 7) ? 1 : 0;
0x00005550 lw gp, 0x28(sp) | gp = *(var_28h_2);
0x00005554 lw v1, 0x48(sp) | v1 = *(var_48h_2);
0x00005558 lw t3, 0x4c(sp) | t3 = *(var_4ch_2);
0x0000555c lw a1, 0x50(sp) | a1 = *(var_50h);
0x00005560 lw t1, 0x54(sp) | t1 = *(var_54h);
| if (v0 == 0) {
0x00005564 bnez v0, 0x55c0 |
0x00005568 lw v0, 0x38(sp) | v0 = *(var_38h_2);
0x0000556c lw v1, 0x198(sp) | v1 = *(var_10h);
0x00005570 addiu v0, v0, 0x38d8 | v0 += 0x38d8;
0x00005574 sw v0, 0x14(sp) | *(var_14h) = v0;
0x00005578 lw v0, 0x44(sp) | v0 = *(var_44h_2);
0x0000557c lw t9, -0x7fc0(gp) | t9 = sym.log_internal_realm;
0x00005580 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00005584 lw v0, 0x3c(sp) | v0 = *(var_3ch_2);
0x00005588 addiu a0, s2, 0x40 | a0 = s2 + 0x40;
0x0000558c sw t1, 0x4c(sp) | *(var_4ch_2) = t1;
0x00005590 sw v1, 0x1c(sp) | *(var_1ch) = v1;
0x00005594 sw a0, 0x18(sp) | *(var_18h) = a0;
0x00005598 move a1, zero | a1 = 0;
0x0000559c sw t3, 0x20(sp) | *(var_20h_2) = t3;
0x000055a0 addiu a3, zero, 0x1dc | a3 = aav.0x000001dc;
0x000055a4 addiu a2, v0, 0x3693 | a2 = v0 + 0x3693;
0x000055a8 addiu a0, zero, 0x407 | a0 = 0x407;
0x000055ac bal 0xaf78 | sym_log_internal_realm ();
0x000055b0 lw gp, 0x28(sp) | gp = *(var_28h_2);
0x000055b4 lbu a1, 0x5e(sp) | a1 = *(var_5eh);
0x000055b8 lw v1, 0x48(sp) | v1 = *(var_48h_2);
0x000055bc lw t1, 0x4c(sp) | t1 = *(var_4ch_2);
| }
| label_12:
0x000055c0 addiu v0, sp, 0x160 | v0 = sp + aav.0x00000160;
| label_17:
0x000055c4 addu v0, v0, v1 | v0 += v1;
0x000055c8 lbu a0, 0x5f(sp) | a0 = *(var_5fh);
0x000055cc lbu a2, -0x101(v0) | a2 = *((v0 - 257));
0x000055d0 addiu a0, a0, 3 | a0 += 3;
0x000055d4 sll v0, a1, 8 | v0 = a1 << 8;
0x000055d8 addiu a2, a2, 4 | a2 += 4;
0x000055dc addu v1, v1, a2 | v1 += a2;
0x000055e0 addu v0, v0, a0 | v0 += a0;
0x000055e4 sltu v0, v0, v1 | v0 = (v0 < v1) ? 1 : 0;
| if (v0 == 0) {
0x000055e8 beql v0, zero, 0x536c | goto label_1;
| }
0x000055ec addu fp, s0, v1 | fp = s0 + v1;
| label_15:
0x000055f0 lw v0, 0x34(sp) | v0 = *(var_34h_2);
| label_5:
0x000055f4 addiu s7, s7, 3 | s7 += 3;
0x000055f8 lbu fp, 0x5f(sp) | fp = *(var_5fh);
| if (v0 == s7) {
0x000055fc beq v0, s7, 0x54e0 | goto label_2;
| }
0x00005600 sll v0, a1, 8 | v0 = a1 << 8;
0x00005604 b 0x534c | goto label_3;
| label_16:
0x00005608 addiu a3, zero, 5 | a3 = 5;
0x0000560c andi v0, v0, 0xf | v0 &= 0xf;
| if (a0 == a3) {
0x00005610 beq a0, a3, 0x5390 | goto label_4;
| }
0x00005614 addiu v0, sp, 0x160 | v0 = sp + aav.0x00000160;
0x00005618 addu v0, v0, v1 | v0 += v1;
0x0000561c lbu a0, 0x5f(sp) | a0 = *(var_5fh);
0x00005620 lbu a2, -0x101(v0) | a2 = *((v0 - 257));
0x00005624 addiu a0, a0, 3 | a0 += 3;
0x00005628 sll v0, a1, 8 | v0 = a1 << 8;
0x0000562c addiu a2, a2, 4 | a2 += 4;
0x00005630 addu v1, v1, a2 | v1 += a2;
0x00005634 addu v0, v0, a0 | v0 += a0;
0x00005638 sltu v0, v0, v1 | v0 = (v0 < v1) ? 1 : 0;
| if (v0 == 0) {
0x0000563c beql v0, zero, 0x536c | goto label_1;
| }
0x00005640 addu fp, s0, v1 | fp = s0 + v1;
0x00005644 lw v0, 0x34(sp) | v0 = *(var_34h_2);
0x00005648 b 0x55f4 | goto label_5;
| label_25:
0x0000564c lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00005650 lw a2, -0x7fdc(gp) | a2 = *(gp);
| /* str._s:_Invalid_page_0x83 */
0x00005654 addiu v0, v0, 0x38fc | v0 += 0x38fc;
0x00005658 sw v0, 0x14(sp) | *(var_14h) = v0;
0x0000565c lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00005660 lw t9, -0x7fc0(gp) | t9 = sym.log_internal_realm;
| /* str.do_scsi_page83_inquiry */
0x00005664 addiu v0, v0, 0x3a1c | v0 += 0x3a1c;
0x00005668 addiu s2, s2, 0x40 | s2 += 0x40;
0x0000566c sw s2, 0x18(sp) | *(var_18h) = s2;
0x00005670 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00005674 addiu a3, zero, 0x23a | a3 = 0x23a;
| /* esilref: 'src/udev/scsi_id/scsi_serial.c' */
0x00005678 addiu a2, a2, 0x3693 | a2 += 0x3693;
0x0000567c move a1, zero | a1 = 0;
0x00005680 addiu a0, zero, 0x407 | a0 = 0x407;
0x00005684 bal 0xaf78 | sym_log_internal_realm ();
0x00005688 lw gp, 0x28(sp) | gp = *(var_28h_2);
0x0000568c addiu v0, zero, 1 | v0 = 1;
0x00005690 b 0x54e4 | goto label_6;
| label_24:
0x00005694 lw t9, -0x7d38(gp) | t9 = sym.imp.strncpy;
| if (s6 == 0) {
0x00005698 beqz s6, 0x54c4 | goto label_7;
| }
0x0000569c move a0, s6 | a0 = s6;
0x000056a0 addiu a2, zero, 0x10 | a2 = 0x10;
0x000056a4 move a1, s2 | a1 = s2;
0x000056a8 jalr t9 | t9 ();
0x000056ac lw a0, 0x30(sp) | a0 = *(var_30h_2);
0x000056b0 lw gp, 0x28(sp) | gp = *(var_28h_2);
| if (a0 == 0) {
0x000056b4 beqz a0, 0x54c4 | goto label_7;
| }
0x000056b8 lw t9, -0x7d38(gp) | t9 = sym.imp.strncpy;
0x000056bc addiu a1, s0, 0x10 | a1 = s0 + 0x10;
0x000056c0 addiu a2, zero, 0x10 | a2 = 0x10;
0x000056c4 addu a1, s3, a1 | a1 = s3 + a1;
0x000056c8 jalr t9 | t9 ();
0x000056cc lw gp, 0x28(sp) | gp = *(var_28h_2);
0x000056d0 move v0, zero | v0 = 0;
0x000056d4 b 0x54e4 | goto label_6;
| label_18:
0x000056d8 move t3, t2 | t3 = t2;
0x000056dc b 0x53dc | goto label_8;
| label_14:
0x000056e0 lw t9, -0x7cfc(gp) | t9 = sym.imp.strlen;
0x000056e4 addiu v0, zero, 0x33 | v0 = 0x33;
0x000056e8 sb v0, (s3) | *(s3) = v0;
0x000056ec move a0, s3 | a0 = s3;
0x000056f0 jalr t9 | t9 ();
0x000056f4 lw gp, 0x28(sp) | gp = *(var_28h_2);
| if (fp == 0) {
0x000056f8 beqz fp, 0x5780 | goto label_27;
| }
0x000056fc lw v1, 0x198(sp) | v1 = *(var_10h);
0x00005700 addiu v1, v1, -3 | v1 += -3;
0x00005704 slt v1, v0, v1 | v1 = (v0 < v1) ? 1 : 0;
0x00005708 lw v1, 0x198(sp) | v1 = *(var_10h);
| if (v1 == 0) {
0x0000570c beqz v1, 0x5780 | goto label_27;
| }
0x00005710 addiu a1, zero, -2 | a1 = -2;
0x00005714 addiu a0, v1, -4 | a0 = v1 + -4;
0x00005718 subu a0, a0, v0 | __asm ("subu a0, a0, v0");
0x0000571c addiu a3, s3, 3 | a3 = s3 + 3;
0x00005720 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x00005724 addiu v1, v0, 1 | v1 = v0 + 1;
0x00005728 and a0, a0, a1 | a0 &= a1;
0x0000572c addu a3, a3, v0 | a3 += v0;
0x00005730 addiu v0, sp, 0x5f | v0 = sp + 0x5f;
0x00005734 addiu a1, sp, 0x60 | a1 = sp + 0x60;
0x00005738 addu v1, s3, v1 | v1 = s3 + v1;
0x0000573c addu fp, v0, fp | fp = v0 + fp;
0x00005740 addu a3, a0, a3 | a3 = a0 + a3;
| /* str.0123456789abcdef */
0x00005744 addiu a2, a2, 0x3ae8 | a2 += 0x3ae8;
0x00005748 b 0x5758 |
| while (a1 != fp) {
0x0000574c addiu v1, v1, 2 | v1 += 2;
0x00005750 addiu a1, a1, 1 | a1++;
| if (a3 == v1) {
0x00005754 beq a3, v1, 0x5780 | goto label_27;
| }
0x00005758 lbu v0, (a1) | v0 = *(a1);
0x0000575c srl a0, v0, 4 | a0 = v0 >> 4;
0x00005760 andi v0, v0, 0xf | v0 &= 0xf;
0x00005764 addu a0, a2, a0 | a0 = a2 + a0;
0x00005768 addu v0, a2, v0 | v0 = a2 + v0;
0x0000576c lbu a0, (a0) | a0 = *(a0);
0x00005770 lbu v0, (v0) | v0 = *(v0);
0x00005774 sb a0, -1(v1) | *((v1 - 1)) = a0;
0x00005778 sb v0, (v1) | *(v1) = v0;
0x0000577c bne a1, fp, 0x574c |
| }
| label_27:
0x00005780 lw v0, 0x198(sp) | v0 = *(var_10h);
0x00005784 lw t9, -0x7d38(gp) | t9 = sym.imp.strncpy;
0x00005788 addiu a2, v0, -1 | a2 = v0 + -1;
0x0000578c addu v0, s3, a2 | v0 = s3 + a2;
0x00005790 move a1, s3 | a1 = s3;
0x00005794 sb zero, (v0) | *(v0) = 0;
0x00005798 move a0, s4 | a0 = s4;
0x0000579c jalr t9 | t9 ();
0x000057a0 lw gp, 0x28(sp) | gp = *(var_28h_2);
0x000057a4 move v0, zero | v0 = 0;
0x000057a8 b 0x54e4 | goto label_6;
| label_22:
0x000057ac sw t1, 0x4c(sp) | *(var_4ch_2) = t1;
0x000057b0 sw v1, 0x48(sp) | *(var_48h_2) = v1;
0x000057b4 addiu a1, s3, 1 | a1 = s3 + 1;
0x000057b8 move a0, s2 | a0 = s2;
0x000057bc jalr t9 | t9 ();
0x000057c0 lw gp, 0x28(sp) | gp = *(var_28h_2);
0x000057c4 lw v1, 0x48(sp) | v1 = *(var_48h_2);
0x000057c8 lw t1, 0x4c(sp) | t1 = *(var_4ch_2);
| if (v0 < 0) {
0x000057cc bltz v0, 0x5868 | goto label_28;
| }
0x000057d0 lbu a3, (fp) | a3 = *(fp);
0x000057d4 lbu t2, 3(fp) | t2 = *(arg_3h);
0x000057d8 andi a3, a3, 0xf | a3 &= 0xf;
0x000057dc b 0x541c | goto label_9;
| label_23:
0x000057e0 addiu v1, zero, 3 | v1 = 3;
0x000057e4 addu s2, s3, s0 | s2 = s3 + s0;
| if (v0 == v1) {
0x000057e8 beq v0, v1, 0x54a0 | goto label_10;
| }
0x000057ec addu a0, fp, t2 | a0 = fp + t2;
0x000057f0 addiu a2, fp, 4 | a2 = fp + 4;
0x000057f4 move v0, s2 | v0 = s2;
0x000057f8 addiu a0, a0, 4 | a0 += 4;
| do {
0x000057fc lbu v1, (a2) | v1 = *(a2);
0x00005800 addiu a2, a2, 1 | a2++;
0x00005804 sb v1, (v0) | *(v0) = v1;
0x00005808 addiu v0, v0, 1 | v0++;
0x0000580c bne a0, a2, 0x57fc |
| } while (a0 != a2);
0x00005810 lw t9, -0x7cbc(gp) | t9 = sym.imp.strcpy;
0x00005814 b 0x54a8 | goto label_11;
| label_21:
0x00005818 lbu a0, 6(fp) | a0 = *(arg_6h);
0x0000581c sll v0, v0, 8 | v0 <<= 8;
0x00005820 or v0, v0, a0 | v0 |= a0;
0x00005824 lw a3, -0x7fdc(gp) | a3 = *(gp);
0x00005828 wsbh v0, v0 | __asm ("wsbh v0, v0");
0x0000582c lw t9, -0x7dcc(gp) | t9 = sym.imp.__sprintf_chk
0x00005830 andi v0, v0, 0xffff | v0 &= 0xffff;
0x00005834 sw t1, 0x4c(sp) | *(var_4ch_2) = t1;
0x00005838 sw v1, 0x48(sp) | *(var_48h_2) = v1;
0x0000583c addiu a1, zero, 1 | a1 = 1;
0x00005840 sw v0, 0x10(sp) | *(var_10h_2) = v0;
| /* esilref: '&x' */
0x00005844 addiu a3, a3, 0x3864 | a3 += 0x3864;
0x00005848 addiu a2, zero, -1 | a2 = -1;
0x0000584c move a0, s5 | a0 = s5;
0x00005850 jalr t9 | t9 ();
0x00005854 lw gp, 0x28(sp) | gp = *(var_28h_2);
0x00005858 lbu a1, 0x5e(sp) | a1 = *(var_5eh);
0x0000585c lw v1, 0x48(sp) | v1 = *(var_48h_2);
0x00005860 lw t1, 0x4c(sp) | t1 = *(var_4ch_2);
0x00005864 b 0x55c0 | goto label_12;
| label_28:
0x00005868 lbu a1, 0x5e(sp) | a1 = *(var_5eh);
0x0000586c b 0x55c0 | goto label_12;
| label_26:
0x00005870 lw t9, -0x7c94(gp) | t9 = sym.imp.__stack_chk_fail;
0x00005874 jalr t9 | t9 ();
0x00005878 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/udev/scsi_id @ 0x587c */
| #include <stdint.h>
|
; (fcn) fcn.0000587c () | void fcn_0000587c () {
0x0000587c lui gp, 3 |
0x00005880 addiu gp, gp, -0x665c |
0x00005884 addu gp, gp, t9 | gp += t9;
0x00005888 addiu sp, sp, -0x1e8 |
0x0000588c lw t9, -0x7d04(gp) | t9 = sym.imp.open64;
0x00005890 sw s2, 0x1d8(sp) | *(var_1d8h) = s2;
0x00005894 lw s2, -0x7c7c(gp) | s2 = *((gp - 7967));
0x00005898 sw gp, 0x20(sp) | *(var_20h) = gp;
0x0000589c sw s4, 0x1e0(sp) | *(var_1e0h) = s4;
0x000058a0 sw s0, 0x1d0(sp) | *(var_1d0h) = s0;
0x000058a4 sw ra, 0x1e4(sp) | *(var_1e4h) = ra;
0x000058a8 sw s3, 0x1dc(sp) | *(var_1dch) = s3;
0x000058ac sw s1, 0x1d4(sp) | *(var_1d4h) = s1;
0x000058b0 lw v0, (s2) | v0 = *(s2);
0x000058b4 move s4, a1 | s4 = a1;
0x000058b8 lui a1, 8 | a1 = 0x80000;
0x000058bc move s0, a0 | s0 = a0;
0x000058c0 addiu a1, a1, 0x80 | a1 += 0x80;
0x000058c4 move a0, s4 | a0 = s4;
0x000058c8 sw v0, 0x1cc(sp) | *(var_1cch) = v0;
0x000058cc jalr t9 | t9 ();
0x000058d0 nop |
0x000058d4 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 < 0) {
0x000058d8 bltz v0, 0x5a80 | goto label_2;
| }
0x000058dc lw t9, -0x7cac(gp) | t9 = sym.imp.__fxstat64;
0x000058e0 addiu a2, sp, 0x28 | a2 = sp + 0x28;
0x000058e4 move a1, v0 | a1 = v0;
0x000058e8 addiu a0, zero, 3 | a0 = 3;
0x000058ec move s1, v0 | s1 = v0;
0x000058f0 jalr t9 | t9 ();
0x000058f4 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 < 0) {
0x000058f8 bltz v0, 0x5a60 | goto label_3;
| }
0x000058fc lw v0, 0x50(sp) | v0 = *(var_50h);
0x00005900 addiu a1, zero, -0x100 | a1 = -0x100;
0x00005904 srl v1, v0, 0xc | v1 = v0 >> 0xc;
0x00005908 andi a0, v0, 0xff | a0 = v0 & 0xff;
0x0000590c lw a3, -0x7fdc(gp) | a3 = *(gp);
0x00005910 and v1, v1, a1 | v1 &= a1;
0x00005914 or v1, v1, a0 | v1 |= a0;
0x00005918 lw t9, -0x7dcc(gp) | t9 = sym.imp.__sprintf_chk
0x0000591c ext v0, v0, 8, 0xc | __asm ("ext v0, v0, 8, 0xc");
| /* str._d:_d */
0x00005920 addiu a3, a3, 0x394c | a3 += 0x394c;
0x00005924 addiu a2, zero, 0x40 | a2 = 0x40;
0x00005928 addiu a1, zero, 1 | a1 = 1;
0x0000592c addiu a0, s0, 0x40 | a0 = s0 + 0x40;
0x00005930 sw v1, 0x14(sp) | *(var_14h) = v1;
0x00005934 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00005938 jalr t9 | t9 ();
0x0000593c lw gp, 0x20(sp) | gp = *(var_20h);
0x00005940 addiu v1, sp, 0xcc | v1 = sp + 0xcc;
0x00005944 move a0, v1 | a0 = v1;
0x00005948 lw t9, -0x7d1c(gp) | t9 = sym.imp.memset;
0x0000594c addiu a2, zero, 0xfe | a2 = 0xfe;
0x00005950 move a1, zero | a1 = 0;
0x00005954 jalr t9 | t9 ();
0x00005958 lw gp, 0x20(sp) | gp = *(var_20h);
0x0000595c sw v0, 0x10(sp) | *(var_10h) = v0;
0x00005960 move a3, zero | a3 = 0;
0x00005964 lw t9, -0x7fb8(gp) | t9 = *((gp - 8174));
0x00005968 move a2, zero | a2 = 0;
0x0000596c move a1, s1 | a1 = s1;
0x00005970 addiu t9, t9, 0x4a38 | t9 += fcn.00004a38;
0x00005974 move a0, s0 | a0 = s0;
0x00005978 bal 0x4a38 | fcn_00004a38 ();
0x0000597c move s3, v0 | s3 = v0;
0x00005980 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 < 0) {
0x00005984 bltz v0, 0x5a20 | goto label_1;
| }
0x00005988 lw v1, 0xd4(sp) | v1 = *(var_d4h);
0x0000598c lw v0, 0xd8(sp) | v0 = *(var_d8h);
0x00005990 swl v1, 3(s0) | __asm ("swl v1, 3(s0)");
0x00005994 swr v1, (s0) | __asm ("swr v1, (s0)");
0x00005998 swl v0, 7(s0) | __asm ("swl v0, 7(s0)");
0x0000599c lw a0, 0xdc(sp) | a0 = *(var_dch);
0x000059a0 swr v0, 4(s0) | __asm ("swr v0, 4(s0)");
0x000059a4 addiu v0, s0, 9 | v0 = s0 + 9;
0x000059a8 sb zero, 8(s0) | *((s0 + 8)) = 0;
0x000059ac swl a0, 3(v0) | __asm ("swl a0, 3(v0)");
0x000059b0 lw a1, 0xe0(sp) | a1 = *(var_e0h);
0x000059b4 swr a0, (v0) | __asm ("swr a0, (v0)");
0x000059b8 swl a1, 7(v0) | __asm ("swl a1, 7(v0)");
0x000059bc lw a0, 0xe4(sp) | a0 = *(var_e4h);
0x000059c0 swr a1, 4(v0) | __asm ("swr a1, 4(v0)");
0x000059c4 lw a1, 0xe8(sp) | a1 = *(var_e8h);
0x000059c8 swl a0, 0xb(v0) | __asm ("swl a0, 0xb(v0)");
0x000059cc swr a0, 8(v0) | __asm ("swr a0, 8(v0)");
0x000059d0 swl a1, 0xf(v0) | __asm ("swl a1, 0xf(v0)");
0x000059d4 lw a0, 0xec(sp) | a0 = *(var_ech);
0x000059d8 lbu v1, 0xcc(sp) | v1 = *(var_cch);
0x000059dc swr a1, 0xc(v0) | __asm ("swr a1, 0xc(v0)");
0x000059e0 lw a3, -0x7fdc(gp) | a3 = *(gp);
0x000059e4 addiu v0, s0, 0x1a | v0 = s0 + 0x1a;
0x000059e8 sb zero, 0x19(s0) | *((s0 + 25)) = 0;
0x000059ec lw t9, -0x7dcc(gp) | t9 = sym.imp.__sprintf_chk
0x000059f0 swl a0, 0x1d(s0) | __asm ("swl a0, 0x1d(s0)");
0x000059f4 andi v1, v1, 0x1f | v1 &= 0x1f;
0x000059f8 swr a0, (v0) | __asm ("swr a0, (v0)");
| /* esilref: '&x' */
0x000059fc addiu a3, a3, 0x3864 | a3 += 0x3864;
0x00005a00 sw v1, 0x10(sp) | *(var_10h) = v1;
0x00005a04 addiu a2, zero, 0x21 | a2 = 0x21;
0x00005a08 sb zero, 0x1e(s0) | *((s0 + 30)) = 0;
0x00005a0c addiu a1, zero, 1 | a1 = 1;
0x00005a10 addiu a0, s0, 0x1f | a0 = s0 + 0x1f;
0x00005a14 jalr t9 | t9 ();
0x00005a18 lw gp, 0x20(sp) | gp = *(var_20h);
0x00005a1c move s3, zero | s3 = 0;
| do {
| label_1:
0x00005a20 lw t9, -0x7dbc(gp) | t9 = sym.imp.close;
0x00005a24 move a0, s1 | a0 = s1;
0x00005a28 jalr t9 | t9 ();
0x00005a2c lw gp, 0x20(sp) | gp = *(var_20h);
| label_0:
0x00005a30 lw a0, 0x1cc(sp) | a0 = *(var_1cch);
0x00005a34 lw v1, (s2) | v1 = *(s2);
0x00005a38 move v0, s3 | v0 = s3;
| if (a0 != v1) {
0x00005a3c bne a0, v1, 0x5b40 | goto label_4;
| }
0x00005a40 lw ra, 0x1e4(sp) | ra = *(var_1e4h);
0x00005a44 lw s4, 0x1e0(sp) | s4 = *(var_1e0h);
0x00005a48 lw s3, 0x1dc(sp) | s3 = *(var_1dch);
0x00005a4c lw s2, 0x1d8(sp) | s2 = *(var_1d8h);
0x00005a50 lw s1, 0x1d4(sp) | s1 = *(var_1d4h);
0x00005a54 lw s0, 0x1d0(sp) | s0 = *(var_1d0h);
0x00005a58 addiu sp, sp, 0x1e8 |
0x00005a5c jr ra | return v0;
| label_3:
0x00005a60 lw t9, -0x7fc8(gp) | t9 = sym.log_get_max_level_realm;
0x00005a64 addiu a0, zero, 1 | a0 = 1;
0x00005a68 bal 0xba34 | sym_log_get_max_level_realm ();
0x00005a6c slti v0, v0, 7 | v0 = (v0 < 7) ? 1 : 0;
0x00005a70 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 == 0) {
0x00005a74 beqz v0, 0x5aa0 | goto label_5;
| }
0x00005a78 addiu s3, zero, 2 | s3 = 2;
0x00005a7c b 0x5a20 |
| } while (1);
| label_2:
0x00005a80 lw t9, -0x7fc8(gp) | t9 = sym.log_get_max_level_realm;
0x00005a84 addiu a0, zero, 1 | a0 = 1;
0x00005a88 bal 0xba34 | sym_log_get_max_level_realm ();
0x00005a8c slti v0, v0, 7 | v0 = (v0 < 7) ? 1 : 0;
0x00005a90 lw gp, 0x20(sp) | gp = *(var_20h);
| if (v0 != 0) {
0x00005a94 beqz v0, 0x5af0 |
0x00005a98 addiu s3, zero, 1 | s3 = 1;
0x00005a9c b 0x5a30 | goto label_0;
| label_5:
0x00005aa0 lw t9, -0x7d2c(gp) | t9 = sym.imp.__errno_location;
0x00005aa4 addiu s3, zero, 2 | s3 = 2;
0x00005aa8 jalr t9 | t9 ();
0x00005aac lw gp, 0x20(sp) | gp = *(var_20h);
0x00005ab0 lw a1, (v0) | a1 = *(v0);
0x00005ab4 sw s4, 0x18(sp) | *(var_18h) = s4;
0x00005ab8 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00005abc lw a2, -0x7fdc(gp) | a2 = *(gp);
| /* str.scsi_id:_cannot_stat__s:__m */
0x00005ac0 addiu v0, v0, 0x3930 | v0 += 0x3930;
0x00005ac4 sw v0, 0x14(sp) | *(var_14h) = v0;
0x00005ac8 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00005acc lw t9, -0x7fc0(gp) | t9 = sym.log_internal_realm;
| /* str.scsi_std_inquiry */
0x00005ad0 addiu v0, v0, 0x3ad4 | v0 += 0x3ad4;
0x00005ad4 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00005ad8 addiu a3, zero, 0x2f6 | a3 = 0x2f6;
| /* esilref: 'src/udev/scsi_id/scsi_serial.c' */
0x00005adc addiu a2, a2, 0x3693 | a2 += 0x3693;
0x00005ae0 addiu a0, zero, 0x407 | a0 = 0x407;
0x00005ae4 bal 0xaf78 | sym_log_internal_realm ();
0x00005ae8 lw gp, 0x20(sp) | gp = *(var_20h);
0x00005aec b 0x5a20 | goto label_1;
| }
0x00005af0 lw t9, -0x7d2c(gp) | t9 = sym.imp.__errno_location;
0x00005af4 addiu s3, zero, 1 | s3 = 1;
0x00005af8 jalr t9 | t9 ();
0x00005afc lw gp, 0x20(sp) | gp = *(var_20h);
0x00005b00 lw a1, (v0) | a1 = *(v0);
0x00005b04 sw s4, 0x18(sp) | *(var_18h) = s4;
0x00005b08 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00005b0c lw a2, -0x7fdc(gp) | a2 = *(gp);
| /* str.scsi_id:_cannot_open__s:__m */
0x00005b10 addiu v0, v0, 0x3914 | v0 += 0x3914;
0x00005b14 sw v0, 0x14(sp) | *(var_14h) = v0;
0x00005b18 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00005b1c lw t9, -0x7fc0(gp) | t9 = sym.log_internal_realm;
| /* str.scsi_std_inquiry */
0x00005b20 addiu v0, v0, 0x3ad4 | v0 += 0x3ad4;
0x00005b24 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00005b28 addiu a3, zero, 0x2f1 | a3 = 0x2f1;
| /* esilref: 'src/udev/scsi_id/scsi_serial.c' */
0x00005b2c addiu a2, a2, 0x3693 | a2 += 0x3693;
0x00005b30 addiu a0, zero, 0x407 | a0 = 0x407;
0x00005b34 bal 0xaf78 | sym_log_internal_realm ();
0x00005b38 lw gp, 0x20(sp) | gp = *(var_20h);
0x00005b3c b 0x5a30 | goto label_0;
| label_4:
0x00005b40 lw t9, -0x7c94(gp) | t9 = sym.imp.__stack_chk_fail;
0x00005b44 jalr t9 | t9 ();
0x00005b48 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/udev/scsi_id @ 0x11e34 */
| #include <stdint.h>
|
; (fcn) sym.encode_devnode_name () | void encode_devnode_name () {
0x00011e34 lui gp, 2 |
0x00011e38 addiu gp, gp, -0x2c14 |
0x00011e3c addu gp, gp, t9 | gp += t9;
| if (a0 == 0) {
0x00011e40 beqz a0, 0x1200c | goto label_2;
| }
0x00011e44 nop |
| if (a1 == 0) {
0x00011e48 beqz a1, 0x1200c | goto label_2;
| }
0x00011e4c nop |
0x00011e50 addiu sp, sp, -0x48 |
0x00011e54 sw s6, 0x38(sp) | *(var_38h_2) = s6;
0x00011e58 sw s5, 0x34(sp) | *(var_34h_2) = s5;
0x00011e5c sw s4, 0x30(sp) | *(var_30h_2) = s4;
0x00011e60 sw gp, 0x18(sp) | *(var_18h_2) = gp;
0x00011e64 sw ra, 0x44(sp) | *(var_44h_2) = ra;
0x00011e68 sw fp, 0x40(sp) | *(var_40h_2) = fp;
0x00011e6c sw s7, 0x3c(sp) | *(var_3ch_2) = s7;
0x00011e70 sw s3, 0x2c(sp) | *(var_2ch_2) = s3;
0x00011e74 sw s2, 0x28(sp) | *(var_28h_2) = s2;
0x00011e78 sw s1, 0x24(sp) | *(var_24h_2) = s1;
0x00011e7c sw s0, 0x20(sp) | *(var_20h_2) = s0;
0x00011e80 lb v0, (a0) | v0 = *(a0);
0x00011e84 move s6, a2 | s6 = a2;
0x00011e88 move s5, a1 | s5 = a1;
0x00011e8c move s4, a0 | s4 = a0;
| if (v0 == 0) {
0x00011e90 beqz v0, 0x12004 | goto label_3;
| }
0x00011e94 lw fp, -0x7fdc(gp) | fp = *(gp);
0x00011e98 move s1, a0 | s1 = a0;
0x00011e9c move s3, zero | s3 = 0;
0x00011ea0 move s0, zero | s0 = 0;
0x00011ea4 addiu s7, zero, 0x5c | s7 = 0x5c;
| /* str.x_02x */
0x00011ea8 addiu fp, fp, 0x5eb0 | fp += 0x5eb0;
0x00011eac b 0x11ef4 |
| while (v0 == 0) {
0x00011eb0 subu v0, s6, s3 | __asm ("subu v0, s6, s3");
0x00011eb4 sltu v0, v0, s2 | v0 = (v0 < s2) ? 1 : 0;
0x00011eb8 lw t9, -0x7c78(gp) | t9 = sym.imp.memcpy;
| if (v0 != 0) {
0x00011ebc bnez v0, 0x11fd0 | goto label_4;
| }
0x00011ec0 addu a0, s5, s3 | a0 = s5 + s3;
0x00011ec4 move a2, s2 | a2 = s2;
0x00011ec8 move a1, s1 | a1 = s1;
0x00011ecc jalr t9 | t9 ();
0x00011ed0 addiu s0, s0, -1 | s0 += -1;
0x00011ed4 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00011ed8 addu s3, s3, s2 | s3 += s2;
0x00011edc addu s0, s2, s0 | s0 = s2 + s0;
| label_1:
0x00011ee0 addiu s0, s0, 1 | s0++;
0x00011ee4 addu s1, s4, s0 | s1 = s4 + s0;
0x00011ee8 lb v0, (s1) | v0 = *(s1);
| if (v0 == 0) {
0x00011eec beqz v0, 0x11f58 | goto label_5;
| }
0x00011ef0 nop |
| label_0:
0x00011ef4 lw t9, -0x7e3c(gp) | t9 = sym.utf8_encoded_valid_unichar;
0x00011ef8 addiu a1, zero, -1 | a1 = -1;
0x00011efc move a0, s1 | a0 = s1;
0x00011f00 bal 0xfd30 | sym_utf8_encoded_valid_unichar ();
0x00011f04 move s2, v0 | s2 = v0;
0x00011f08 slti v0, v0, 2 | v0 = (v0 < 2) ? 1 : 0;
0x00011f0c lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00011f10 beqz v0, 0x11eb0 |
| }
0x00011f14 lb a0, (s1) | a0 = *(s1);
0x00011f18 subu v0, s6, s3 | __asm ("subu v0, s6, s3");
| if (a0 == s7) {
0x00011f1c beq a0, s7, 0x11f9c | goto label_6;
| }
0x00011f20 lw t9, -0x7e08(gp) | t9 = sym.whitelisted_char_for_devnode;
0x00011f24 move a1, zero | a1 = 0;
0x00011f28 bal 0x11d80 | sym_whitelisted_char_for_devnode ();
0x00011f2c lw gp, 0x18(sp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x00011f30 beqz v0, 0x11f98 | goto label_7;
| }
0x00011f34 addu v0, s5, s3 | v0 = s5 + s3;
| if (s6 == s3) {
0x00011f38 beq s6, s3, 0x11fd0 | goto label_4;
| }
0x00011f3c lb v1, (s1) | v1 = *(s1);
0x00011f40 addiu s0, s0, 1 | s0++;
0x00011f44 addu s1, s4, s0 | s1 = s4 + s0;
0x00011f48 sb v1, (v0) | *(v0) = v1;
0x00011f4c lb v0, (s1) | v0 = *(s1);
0x00011f50 addiu s3, s3, 1 | s3++;
| if (v0 != 0) {
0x00011f54 bnez v0, 0x11ef4 | goto label_0;
| }
| do {
| label_5:
0x00011f58 addu s3, s5, s3 | s3 = s5 + s3;
| if (s6 != s3) {
0x00011f5c beq s6, s3, 0x11fd0 |
0x00011f60 move v0, zero | v0 = 0;
0x00011f64 sb zero, (s3) | *(s3) = 0;
0x00011f68 lw ra, 0x44(sp) | ra = *(var_44h_2);
0x00011f6c lw fp, 0x40(sp) | fp = *(var_40h_2);
0x00011f70 lw s7, 0x3c(sp) | s7 = *(var_3ch_2);
0x00011f74 lw s6, 0x38(sp) | s6 = *(var_38h_2);
0x00011f78 lw s5, 0x34(sp) | s5 = *(var_34h_2);
0x00011f7c lw s4, 0x30(sp) | s4 = *(var_30h_2);
0x00011f80 lw s3, 0x2c(sp) | s3 = *(var_2ch_2);
0x00011f84 lw s2, 0x28(sp) | s2 = *(var_28h_2);
0x00011f88 lw s1, 0x24(sp) | s1 = *(var_24h_2);
0x00011f8c lw s0, 0x20(sp) | s0 = *(var_20h_2);
0x00011f90 addiu sp, sp, 0x48 |
0x00011f94 jr ra | return v0;
| label_7:
0x00011f98 subu v0, s6, s3 | __asm ("subu v0, s6, s3");
| label_6:
0x00011f9c sltiu v0, v0, 4 | v0 = (v0 < 4) ? 1 : 0;
0x00011fa0 lw t9, -0x7dcc(gp) | t9 = sym.imp.__sprintf_chk
| if (v0 != 0) {
0x00011fa4 bnez v0, 0x11fd0 | goto label_4;
| }
0x00011fa8 lbu v0, (s1) | v0 = *(s1);
0x00011fac addu a0, s5, s3 | a0 = s5 + s3;
0x00011fb0 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00011fb4 move a3, fp | a3 = fp;
0x00011fb8 addiu a2, zero, -1 | a2 = -1;
0x00011fbc addiu a1, zero, 1 | a1 = 1;
0x00011fc0 jalr t9 | t9 ();
0x00011fc4 addiu s3, s3, 4 | s3 += 4;
0x00011fc8 lw gp, 0x18(sp) | gp = *(var_18h_2);
0x00011fcc b 0x11ee0 | goto label_1;
| }
| label_4:
0x00011fd0 lw ra, 0x44(sp) | ra = *(var_44h_2);
0x00011fd4 lw fp, 0x40(sp) | fp = *(var_40h_2);
0x00011fd8 lw s7, 0x3c(sp) | s7 = *(var_3ch_2);
0x00011fdc lw s6, 0x38(sp) | s6 = *(var_38h_2);
0x00011fe0 lw s5, 0x34(sp) | s5 = *(var_34h_2);
0x00011fe4 lw s4, 0x30(sp) | s4 = *(var_30h_2);
0x00011fe8 lw s3, 0x2c(sp) | s3 = *(var_2ch_2);
0x00011fec lw s2, 0x28(sp) | s2 = *(var_28h_2);
0x00011ff0 lw s1, 0x24(sp) | s1 = *(var_24h_2);
0x00011ff4 lw s0, 0x20(sp) | s0 = *(var_20h_2);
0x00011ff8 addiu v0, zero, -0x16 | v0 = -0x16;
0x00011ffc addiu sp, sp, 0x48 |
0x00012000 jr ra | return v0;
| label_3:
0x00012004 move s3, zero | s3 = 0;
0x00012008 b 0x11f58 |
| } while (1);
| label_2:
0x0001200c addiu v0, zero, -0x16 | v0 = -0x16;
0x00012010 jr ra | return v0;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/udev/scsi_id @ 0xef14 */
| #include <stdint.h>
|
; (fcn) sym.get_ctty_devnr () | void get_ctty_devnr () {
0x0000ef14 lui gp, 2 |
0x0000ef18 addiu gp, gp, 0x30c |
0x0000ef1c addu gp, gp, t9 | gp += t9;
0x0000ef20 addiu sp, sp, -0x50 |
0x0000ef24 sw s1, 0x40(sp) | *(var_40h) = s1;
0x0000ef28 lw s1, -0x7c7c(gp) | s1 = *((gp - 7967));
0x0000ef2c sw fp, 0x48(sp) | *(var_48h) = fp;
0x0000ef30 sw ra, 0x4c(sp) | *(var_4ch) = ra;
0x0000ef34 sw s2, 0x44(sp) | *(var_44h) = s2;
0x0000ef38 sw s0, 0x3c(sp) | *(var_3ch) = s0;
0x0000ef3c sw gp, 0x18(sp) | *(var_18h) = gp;
0x0000ef40 move fp, sp | fp = sp;
0x0000ef44 lw v0, (s1) | v0 = *(s1);
0x0000ef48 sw zero, 0x2c(fp) | *(arg_2ch) = 0;
0x0000ef4c sw v0, 0x34(fp) | *(arg_34h) = v0;
0x0000ef50 lw v0, -0x7fdc(gp) | v0 = *(gp);
| if (a0 < 0) {
0x0000ef54 bltz a0, 0xf06c | goto label_1;
| }
0x0000ef58 move s2, a1 | s2 = a1;
| if (a0 != 0) {
0x0000ef5c bnez a0, 0xf03c | goto label_2;
| }
0x0000ef60 lw s0, -0x7fdc(gp) | s0 = *(gp);
| /* str._proc_self_stat */
0x0000ef64 addiu s0, s0, 0x4b20 | s0 += 0x4b20;
| do {
0x0000ef68 lw t9, -0x7ea4(gp) | t9 = sym.read_one_line_file;
0x0000ef6c move a0, s0 | a0 = s0;
0x0000ef70 addiu a1, fp, 0x2c | a1 = fp + 0x2c;
0x0000ef74 bal 0x7e88 | sym_read_one_line_file ();
0x0000ef78 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000ef7c lw s0, 0x2c(fp) | s0 = *(arg_2ch);
| if (v0 >= 0) {
0x0000ef80 bltz v0, 0xeff8 |
0x0000ef84 lw t9, -0x7d74(gp) | t9 = sym.imp.strrchr;
0x0000ef88 addiu a1, zero, 0x29 | a1 = 0x29;
0x0000ef8c move a0, s0 | a0 = s0;
0x0000ef90 jalr t9 | t9 ();
0x0000ef94 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 == 0) {
0x0000ef98 beqz v0, 0xf0a8 | goto label_3;
| }
0x0000ef9c lw a1, -0x7fdc(gp) | a1 = *(gp);
0x0000efa0 lw t9, -0x7d78(gp) | t9 = sym.imp.sscanf;
0x0000efa4 addiu a2, fp, 0x30 | a2 = fp + 0x30;
| /* str.__c__d__d__d__lu_ */
0x0000efa8 addiu a1, a1, 0x4ee0 | a1 += 0x4ee0;
0x0000efac addiu a0, v0, 1 | a0 = v0 + 1;
0x0000efb0 jalr t9 | t9 ();
0x0000efb4 addiu v1, zero, 1 | v1 = 1;
0x0000efb8 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 != v1) {
0x0000efbc bne v0, v1, 0xf094 | goto label_4;
| }
0x0000efc0 lw v1, 0x30(fp) | v1 = *(arg_30h);
0x0000efc4 addiu a1, zero, -0x100 | a1 = -0x100;
0x0000efc8 srl a0, v1, 0xc | a0 = v1 >> 0xc;
0x0000efcc and a0, a0, a1 | a0 &= a1;
0x0000efd0 ext v0, v1, 8, 0xc | __asm ("ext v0, v1, 8, 0xc");
0x0000efd4 or v0, v0, a0 | v0 |= a0;
0x0000efd8 andi a0, v1, 0xff | a0 = v1 & 0xff;
0x0000efdc or v0, v0, a0 | v0 |= a0;
0x0000efe0 lw s0, 0x2c(fp) | s0 = *(arg_2ch);
| if (v0 == 0) {
0x0000efe4 beqz v0, 0xf0a0 | goto label_5;
| }
0x0000efe8 move v0, zero | v0 = 0;
| if (s2 == 0) {
0x0000efec beqz s2, 0xeff8 | goto label_0;
| }
0x0000eff0 sw v1, (s2) | *(s2) = v1;
0x0000eff4 sw zero, 4(s2) | *((s2 + 1)) = 0;
| }
| label_0:
0x0000eff8 lw t9, -0x7c70(gp) | t9 = sym.imp.free;
0x0000effc sw v0, 0x24(fp) | *(arg_24h) = v0;
0x0000f000 move a0, s0 | a0 = s0;
0x0000f004 jalr t9 | t9 ();
0x0000f008 lw a0, 0x34(fp) | a0 = *(arg_34h);
0x0000f00c lw v1, (s1) | v1 = *(s1);
0x0000f010 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000f014 lw v0, 0x24(fp) | v0 = *(arg_24h);
| if (a0 != v1) {
0x0000f018 bne a0, v1, 0xf0b0 | goto label_6;
| }
0x0000f01c move sp, fp |
0x0000f020 lw ra, 0x4c(sp) | ra = *(var_4ch);
0x0000f024 lw fp, 0x48(sp) | fp = *(var_48h);
0x0000f028 lw s2, 0x44(sp) | s2 = *(var_44h);
0x0000f02c lw s1, 0x40(sp) | s1 = *(var_40h);
0x0000f030 lw s0, 0x3c(sp) | s0 = *(var_3ch);
0x0000f034 addiu sp, sp, 0x50 |
0x0000f038 jr ra | return v0;
| label_2:
0x0000f03c addiu sp, sp, -0x18 |
0x0000f040 lw a3, -0x7fdc(gp) | a3 = *(gp);
0x0000f044 lw t9, -0x7dcc(gp) | t9 = sym.imp.__sprintf_chk
0x0000f048 addiu s0, sp, 0x18 | s0 = sp + 0x18;
0x0000f04c sw a0, 0x10(sp) | *(var_10h_2) = a0;
| /* str._proc__i_stat */
0x0000f050 addiu a3, a3, 0x4b3c | a3 += 0x4b3c;
0x0000f054 addiu a2, zero, 0x18 | a2 = 0x18;
0x0000f058 addiu a1, zero, 1 | a1 = 1;
0x0000f05c move a0, s0 | a0 = s0;
0x0000f060 jalr t9 | t9 ();
0x0000f064 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000f068 b 0xef68 |
| } while (1);
| label_1:
0x0000f06c lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000f070 lw a1, -0x7fdc(gp) | a1 = *(gp);
| /* str.get_ctty_devnr */
0x0000f074 addiu v0, v0, 0x4f8c | v0 += 0x4f8c;
0x0000f078 lw t9, -0x7f8c(gp) | t9 = sym.log_assert_failed_realm;
0x0000f07c sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000f080 addiu a3, zero, 0x39a | a3 = 0x39a;
| /* esilref: 'src/basic/terminal-util.c' */
0x0000f084 addiu a2, a2, 0x4ec3 | a2 += 0x4ec3;
| /* str.pid___0 */
0x0000f088 addiu a1, a1, 0x4b30 | a1 += 0x4b30;
0x0000f08c move a0, zero | a0 = 0;
0x0000f090 bal 0x9fe4 | sym_log_assert_failed_realm ();
| label_4:
0x0000f094 lw s0, 0x2c(fp) | s0 = *(arg_2ch);
0x0000f098 addiu v0, zero, -5 | v0 = -5;
0x0000f09c b 0xeff8 | goto label_0;
| label_5:
0x0000f0a0 addiu v0, zero, -6 | v0 = -6;
0x0000f0a4 b 0xeff8 | goto label_0;
| label_3:
0x0000f0a8 addiu v0, zero, -5 | v0 = -5;
0x0000f0ac b 0xeff8 | goto label_0;
| label_6:
0x0000f0b0 lw t9, -0x7c94(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000f0b4 jalr t9 | t9 ();
0x0000f0b8 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/udev/scsi_id @ 0xd014 */
| #include <stdint.h>
|
; (fcn) sym.get_process_cmdline () | void get_process_cmdline () {
0x0000d014 lui gp, 2 |
0x0000d018 addiu gp, gp, 0x220c |
0x0000d01c addu gp, gp, t9 | gp += t9;
0x0000d020 addiu sp, sp, -0x58 |
0x0000d024 lw t9, -0x7c98(gp) | t9 = sym.imp.sysconf;
0x0000d028 sw s1, 0x38(sp) | *(var_38h_2) = s1;
0x0000d02c lw s1, -0x7c7c(gp) | s1 = *((gp - 7967));
0x0000d030 sw fp, 0x50(sp) | *(var_50h) = fp;
0x0000d034 sw s5, 0x48(sp) | *(var_48h) = s5;
0x0000d038 sw s4, 0x44(sp) | *(var_44h_2) = s4;
0x0000d03c sw s3, 0x40(sp) | *(var_40h_2) = s3;
0x0000d040 sw s2, 0x3c(sp) | *(var_3ch_2) = s2;
0x0000d044 sw gp, 0x18(sp) | *(var_18h_2) = gp;
0x0000d048 sw ra, 0x54(sp) | *(var_54h) = ra;
0x0000d04c sw s6, 0x4c(sp) | *(var_4ch) = s6;
0x0000d050 sw s0, 0x34(sp) | *(var_34h_2) = s0;
0x0000d054 move fp, sp | fp = sp;
0x0000d058 lw v0, (s1) | v0 = *(s1);
0x0000d05c move s5, a0 | s5 = a0;
0x0000d060 sw v0, 0x2c(fp) | *(arg_2ch) = v0;
0x0000d064 move a0, zero | a0 = 0;
0x0000d068 sw zero, 0x24(fp) | *(arg_24h) = 0;
0x0000d06c move s2, a1 | s2 = a1;
0x0000d070 move s3, a2 | s3 = a2;
0x0000d074 move s4, a3 | s4 = a3;
0x0000d078 jalr t9 | t9 ();
0x0000d07c lw gp, 0x18(fp) | gp = *(var_18h_2);
| if (v0 <= 0) {
0x0000d080 blez v0, 0xd324 | goto label_5;
| }
| if (s4 == 0) {
0x0000d084 beql s4, zero, 0xd350 | goto label_6;
| }
0x0000d088 lw v0, -0x7fdc(gp) | v0 = *(gp);
| if (s5 < 0) {
0x0000d08c bltzl s5, 0xd378 | goto label_7;
| }
0x0000d090 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000d094 move s0, v0 | s0 = v0;
| if (s5 != 0) {
0x0000d098 bnez s5, 0xd228 | goto label_8;
| }
0x0000d09c lw s6, -0x7fdc(gp) | s6 = *(gp);
| /* str._proc_self_cmdline */
0x0000d0a0 addiu s6, s6, 0x4b70 | s6 += 0x4b70;
| label_0:
0x0000d0a4 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x0000d0a8 lw t9, -0x7f38(gp) | t9 = sym.fopen_unlocked;
0x0000d0ac move a0, s6 | a0 = s6;
0x0000d0b0 addiu a2, fp, 0x24 | a2 = fp + 0x24;
| /* esilref: 're' */
0x0000d0b4 addiu a1, a1, 0x593c | a1 += 0x593c;
0x0000d0b8 bal 0x797c | sym_fopen_unlocked ();
0x0000d0bc move s6, v0 | s6 = v0;
0x0000d0c0 addiu v0, zero, -2 | v0 = -2;
0x0000d0c4 lw gp, 0x18(fp) | gp = *(var_18h_2);
| if (s6 == v0) {
0x0000d0c8 beq s6, v0, 0xd3dc | goto label_9;
| }
0x0000d0cc sll a2, s2, 2 | a2 = s2 << 2;
| if (s6 < 0) {
0x0000d0d0 bltz s6, 0xd270 | goto label_10;
| }
0x0000d0d4 addiu a2, a2, 1 | a2++;
0x0000d0d8 sltu v0, a2, s2 | v0 = (a2 < s2) ? 1 : 0;
0x0000d0dc move a0, s0 | a0 = s0;
| if (v0 != 0) {
0x0000d0e0 bnez v0, 0xd258 | goto label_11;
| }
0x0000d0e4 move s6, s0 | s6 = s0;
| label_1:
0x0000d0e8 lw t9, -0x7cd0(gp) | t9 = sym.imp.malloc;
0x0000d0ec jalr t9 | t9 ();
0x0000d0f0 nop |
0x0000d0f4 move s0, v0 | s0 = v0;
0x0000d0f8 lw gp, 0x18(fp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x0000d0fc beqz v0, 0xd3d4 | goto label_12;
| }
0x0000d100 lw t9, -0x7cb8(gp) | t9 = sym.imp.fread;
0x0000d104 lw a3, 0x24(fp) | a3 = *(arg_24h);
0x0000d108 move a2, s6 | a2 = s6;
0x0000d10c addiu a1, zero, 1 | a1 = 1;
0x0000d110 move a0, v0 | a0 = v0;
0x0000d114 jalr t9 | t9 ();
0x0000d118 lw gp, 0x18(fp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x0000d11c beqz v0, 0xd278 | goto label_13;
| }
0x0000d120 addiu v1, zero, 1 | v1 = 1;
0x0000d124 addiu a1, s0, -1 | a1 = s0 + -1;
| if (v0 == v1) {
0x0000d128 beq v0, v1, 0xd150 | goto label_14;
| }
0x0000d12c move v1, s0 | v1 = s0;
0x0000d130 addu a1, a1, v0 | a1 += v0;
0x0000d134 addiu a2, zero, 0x20 | a2 = 0x20;
0x0000d138 lb a0, (v1) | a0 = *(v1);
| do {
| if (a0 != 0) {
0x0000d13c beql a0, zero, 0xd144 |
0x0000d140 sb a2, (v1) | *(v1) = a2;
| }
0x0000d144 addiu v1, v1, 1 | v1++;
0x0000d148 lb a0, (v1) | a0 = *(v1);
0x0000d14c bnel a1, v1, 0xd13c |
| } while (a1 == v1);
| label_14:
0x0000d150 addu v0, s0, v0 | v0 = s0 + v0;
0x0000d154 sb zero, (v0) | *(v0) = 0;
| label_3:
0x0000d158 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x0000d15c lw t9, -0x7e94(gp) | t9 = sym.delete_trailing_chars;
| /* str.__t_n_r */
0x0000d160 addiu a1, a1, 0x3d40 | a1 += 0x3d40;
0x0000d164 move a0, s0 | a0 = s0;
0x0000d168 andi s3, s3, 2 | s3 &= 2;
0x0000d16c bal 0xe5ac | sym_delete_trailing_chars ();
0x0000d170 lw gp, 0x18(fp) | gp = *(var_18h_2);
| if (s3 != 0) {
0x0000d174 bnez s3, 0xd308 | goto label_15;
| }
0x0000d178 move a2, zero | a2 = 0;
| label_4:
0x0000d17c lw t9, -0x7e90(gp) | t9 = sym.escape_non_printable_full;
0x0000d180 move a1, s2 | a1 = s2;
0x0000d184 move a0, s0 | a0 = s0;
0x0000d188 bal 0x113c4 | sym_escape_non_printable_full ();
0x0000d18c move s2, v0 | s2 = v0;
0x0000d190 lw gp, 0x18(fp) | gp = *(var_18h_2);
| if (v0 == 0) {
0x0000d194 beqz v0, 0xd3d4 | goto label_12;
| }
0x0000d198 lw t9, -0x7cfc(gp) | t9 = sym.imp.strlen;
0x0000d19c move a0, v0 | a0 = v0;
0x0000d1a0 jalr t9 | t9 ();
0x0000d1a4 lw gp, 0x18(fp) | gp = *(var_18h_2);
0x0000d1a8 addiu a1, v0, 1 | a1 = v0 + 1;
0x0000d1ac move a0, s2 | a0 = s2;
0x0000d1b0 lw t9, -0x7ccc(gp) | t9 = sym.imp.realloc;
0x0000d1b4 move s6, zero | s6 = 0;
0x0000d1b8 jalr t9 | t9 ();
| if (v0 != 0) {
0x0000d1bc movz v0, s2, v0 | v0 = s2;
| }
0x0000d1c0 lw gp, 0x18(fp) | gp = *(var_18h_2);
0x0000d1c4 sw v0, (s4) | *(s4) = v0;
| do {
| label_2:
0x0000d1c8 lw t9, -0x7c70(gp) | t9 = sym.imp.free;
0x0000d1cc move a0, s0 | a0 = s0;
0x0000d1d0 jalr t9 | t9 ();
0x0000d1d4 lw gp, 0x18(fp) | gp = *(var_18h_2);
0x0000d1d8 lw t9, -0x7fb4(gp) | t9 = sym.safe_fclose;
0x0000d1dc lw a0, 0x24(fp) | a0 = *(arg_24h);
0x0000d1e0 bal 0x77bc | sym_safe_fclose ();
0x0000d1e4 lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x0000d1e8 lw v1, (s1) | v1 = *(s1);
0x0000d1ec lw gp, 0x18(fp) | gp = *(var_18h_2);
0x0000d1f0 move v0, s6 | v0 = s6;
| if (a0 != v1) {
0x0000d1f4 bne a0, v1, 0xd3e8 | goto label_16;
| }
0x0000d1f8 move sp, fp |
0x0000d1fc lw ra, 0x54(sp) | ra = *(var_54h);
0x0000d200 lw fp, 0x50(sp) | fp = *(var_50h);
0x0000d204 lw s6, 0x4c(sp) | s6 = *(var_4ch);
0x0000d208 lw s5, 0x48(sp) | s5 = *(var_48h);
0x0000d20c lw s4, 0x44(sp) | s4 = *(var_44h_2);
0x0000d210 lw s3, 0x40(sp) | s3 = *(var_40h_2);
0x0000d214 lw s2, 0x3c(sp) | s2 = *(var_3ch_2);
0x0000d218 lw s1, 0x38(sp) | s1 = *(var_38h_2);
0x0000d21c lw s0, 0x34(sp) | s0 = *(var_34h_2);
0x0000d220 addiu sp, sp, 0x58 |
0x0000d224 jr ra | return v0;
| label_8:
0x0000d228 addiu sp, sp, -0x20 |
0x0000d22c lw a3, -0x7fdc(gp) | a3 = *(gp);
0x0000d230 lw t9, -0x7dcc(gp) | t9 = sym.imp.__sprintf_chk
0x0000d234 addiu s6, sp, 0x18 | s6 = sp + 0x18;
0x0000d238 sw s5, 0x10(sp) | *(var_18h_3) = s5;
| /* str._proc__i_cmdline */
0x0000d23c addiu a3, a3, 0x4ba8 | a3 += 0x4ba8;
0x0000d240 addiu a2, zero, 0x1b | a2 = 0x1b;
0x0000d244 addiu a1, zero, 1 | a1 = 1;
0x0000d248 move a0, s6 | a0 = s6;
0x0000d24c jalr t9 | t9 ();
0x0000d250 lw gp, 0x18(fp) | gp = *(var_18h_2);
0x0000d254 b 0xd0a4 | goto label_0;
| label_11:
0x0000d258 sltu s6, s0, a2 | s6 = (s0 < a2) ? 1 : 0;
| if (s6 != 0) {
0x0000d25c movz a0, a2, s6 | a0 = a2;
| }
0x0000d260 move s6, a0 | s6 = a0;
0x0000d264 addiu a0, zero, 1 | a0 = 1;
| if (s6 == 0) {
0x0000d268 movn a0, s6, s6 | a0 = s6;
| }
0x0000d26c b 0xd0e8 | goto label_1;
| label_10:
0x0000d270 move s0, zero | s0 = 0;
0x0000d274 b 0xd1c8 |
| } while (1);
| label_13:
0x0000d278 lw t9, -0x7c80(gp) | t9 = sym.imp.ferror;
0x0000d27c lw a0, 0x24(fp) | a0 = *(arg_24h);
0x0000d280 jalr t9 | t9 ();
0x0000d284 lw gp, 0x18(fp) | gp = *(var_18h_2);
| if (v0 != 0) {
0x0000d288 bnez v0, 0xd3a0 | goto label_17;
| }
0x0000d28c andi v0, s3, 1 | v0 = s3 & 1;
0x0000d290 addiu s6, zero, -2 | s6 = -2;
| if (v0 == 0) {
0x0000d294 beqz v0, 0xd1c8 | goto label_2;
| }
0x0000d298 lw t9, -0x7e8c(gp) | t9 = sym.get_process_comm;
0x0000d29c addiu a1, fp, 0x28 | a1 = fp + 0x28;
0x0000d2a0 move a0, s5 | a0 = s5;
0x0000d2a4 sw zero, 0x28(fp) | *(arg_28h) = 0;
0x0000d2a8 bal 0xce4c | sym_get_process_comm ();
0x0000d2ac move s6, v0 | s6 = v0;
0x0000d2b0 lw gp, 0x18(fp) | gp = *(var_18h_2);
| if (v0 >= 0) {
0x0000d2b4 bltz v0, 0xd3c0 |
0x0000d2b8 lw t9, -0x7c70(gp) | t9 = sym.imp.free;
0x0000d2bc move a0, s0 | a0 = s0;
0x0000d2c0 jalr t9 | t9 ();
0x0000d2c4 lw gp, 0x18(fp) | gp = *(var_18h_2);
0x0000d2c8 lw a1, 0x28(fp) | a1 = *(arg_28h);
0x0000d2cc move a3, zero | a3 = 0;
0x0000d2d0 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000d2d4 lw a0, -0x7fdc(gp) | a0 = *(gp);
0x0000d2d8 lw t9, -0x7e88(gp) | t9 = sym.read_one_line_file;
0x0000d2dc addiu a2, a2, 0x4bbc | a2 += 0x4bbc;
0x0000d2e0 addiu a0, a0, 0x4bc0 | a0 += 0x4bc0;
0x0000d2e4 bal 0xe424 | sym_strjoin_real ();
0x0000d2e8 move s0, v0 | s0 = v0;
0x0000d2ec lw gp, 0x18(fp) | gp = *(var_18h_2);
| if (v0 != 0) {
0x0000d2f0 beqz v0, 0xd3bc |
0x0000d2f4 lw t9, -0x7c70(gp) | t9 = sym.imp.free;
0x0000d2f8 lw a0, 0x28(fp) | a0 = *(arg_28h);
0x0000d2fc jalr t9 | t9 ();
0x0000d300 lw gp, 0x18(fp) | gp = *(var_18h_2);
0x0000d304 b 0xd158 | goto label_3;
| label_15:
0x0000d308 lw t9, -0x7e84(gp) | t9 = sym.is_locale_utf8;
0x0000d30c bal 0x9128 | sym_is_locale_utf8 ();
0x0000d310 nop |
0x0000d314 xori v0, v0, 1 | v0 ^= 1;
0x0000d318 lw gp, 0x18(fp) | gp = *(var_18h_2);
0x0000d31c andi a2, v0, 0xff | a2 = v0 & 0xff;
0x0000d320 b 0xd17c | goto label_4;
| label_5:
0x0000d324 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000d328 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000d32c lw a1, -0x7fdc(gp) | a1 = *(gp);
| /* str.sc_arg_max */
0x0000d330 addiu v0, v0, 0x4c08 | v0 += 0x4c08;
0x0000d334 lw t9, -0x7f8c(gp) | t9 = sym.log_assert_failed_realm;
0x0000d338 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x0000d33c addiu a3, zero, 0xe | a3 = 0xe;
| /* esilref: 'src/basic/env-util.h' */
0x0000d340 addiu a2, a2, 0x4b8b | a2 += 0x4b8b;
| /* str.l___0 */
0x0000d344 addiu a1, a1, 0x4ba0 | a1 += 0x4ba0;
0x0000d348 move a0, zero | a0 = 0;
0x0000d34c bal 0x9fe4 | sym_log_assert_failed_realm ();
| label_6:
0x0000d350 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000d354 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x0000d358 addiu v0, v0, 0x4c14 | v0 += 0x4c14;
0x0000d35c lw t9, -0x7f8c(gp) | t9 = sym.log_assert_failed_realm;
0x0000d360 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x0000d364 addiu a3, zero, 0x77 | a3 = 0x77;
| /* esilref: 'src/basic/process-util.c' */
0x0000d368 addiu a2, a2, 0x4af3 | a2 += 0x4af3;
| /* esilref: 'line' */
0x0000d36c addiu a1, a1, 0x4bb4 | a1 += 0x4bb4;
0x0000d370 move a0, zero | a0 = 0;
0x0000d374 bal 0x9fe4 | sym_log_assert_failed_realm ();
| label_7:
0x0000d378 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000d37c lw a1, -0x7fdc(gp) | a1 = *(gp);
0x0000d380 addiu v0, v0, 0x4c14 | v0 += 0x4c14;
0x0000d384 lw t9, -0x7f8c(gp) | t9 = sym.log_assert_failed_realm;
0x0000d388 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x0000d38c addiu a3, zero, 0x78 | a3 = 0x78;
| /* esilref: 'src/basic/process-util.c' */
0x0000d390 addiu a2, a2, 0x4af3 | a2 += 0x4af3;
| /* str.pid___0 */
0x0000d394 addiu a1, a1, 0x4b30 | a1 += 0x4b30;
0x0000d398 move a0, zero | a0 = 0;
0x0000d39c bal 0x9fe4 | sym_log_assert_failed_realm ();
| label_17:
0x0000d3a0 lw t9, -0x7d2c(gp) | t9 = sym.imp.__errno_location;
0x0000d3a4 jalr t9 | t9 ();
0x0000d3a8 nop |
0x0000d3ac lw s6, (v0) | s6 = *(v0);
0x0000d3b0 lw gp, 0x18(fp) | gp = *(var_18h_2);
0x0000d3b4 negu s6, s6 | __asm ("negu s6, s6");
0x0000d3b8 b 0xd1c8 | goto label_2;
| }
0x0000d3bc addiu s6, zero, -0xc | s6 = -0xc;
| }
0x0000d3c0 lw t9, -0x7c70(gp) | t9 = sym.imp.free;
0x0000d3c4 lw a0, 0x28(fp) | a0 = *(arg_28h);
0x0000d3c8 jalr t9 | t9 ();
0x0000d3cc lw gp, 0x18(fp) | gp = *(var_18h_2);
0x0000d3d0 b 0xd1c8 | goto label_2;
| label_12:
0x0000d3d4 addiu s6, zero, -0xc | s6 = -0xc;
0x0000d3d8 b 0xd1c8 | goto label_2;
| label_9:
0x0000d3dc move s0, zero | s0 = 0;
0x0000d3e0 addiu s6, zero, -3 | s6 = -3;
0x0000d3e4 b 0xd1c8 | goto label_2;
| label_16:
0x0000d3e8 lw t9, -0x7c94(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000d3ec jalr t9 | t9 ();
0x0000d3f0 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/udev/scsi_id @ 0xce4c */
| #include <stdint.h>
|
; (fcn) sym.get_process_comm () | void get_process_comm () {
0x0000ce4c lui gp, 2 |
0x0000ce50 addiu gp, gp, 0x23d4 |
0x0000ce54 addu gp, gp, t9 | gp += t9;
0x0000ce58 addiu sp, sp, -0x48 |
0x0000ce5c sw s3, 0x38(sp) | *(var_38h) = s3;
0x0000ce60 lw s3, -0x7c7c(gp) | s3 = *((gp - 7967));
0x0000ce64 sw fp, 0x40(sp) | *(var_40h) = fp;
0x0000ce68 sw ra, 0x44(sp) | *(var_44h) = ra;
0x0000ce6c sw s4, 0x3c(sp) | *(var_3ch) = s4;
0x0000ce70 sw s2, 0x34(sp) | *(var_34h) = s2;
0x0000ce74 sw s1, 0x30(sp) | *(var_30h) = s1;
0x0000ce78 sw s0, 0x2c(sp) | *(var_2ch) = s0;
0x0000ce7c sw gp, 0x18(sp) | *(var_18h) = gp;
0x0000ce80 move fp, sp | fp = sp;
0x0000ce84 lw v0, (s3) | v0 = *(s3);
0x0000ce88 sw zero, 0x20(fp) | *(arg_20h) = 0;
0x0000ce8c sw v0, 0x24(fp) | *(arg_24h) = v0;
| if (a1 == 0) {
0x0000ce90 beql a1, zero, 0xcfa0 | goto label_1;
| }
0x0000ce94 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000ce98 move s1, a0 | s1 = a0;
| if (a0 < 0) {
0x0000ce9c bltz a0, 0xcfc8 | goto label_2;
| }
0x0000cea0 lw t9, -0x7cd0(gp) | t9 = sym.imp.malloc;
0x0000cea4 addiu a0, zero, 0x80 | a0 = 0x80;
0x0000cea8 move s4, a1 | s4 = a1;
0x0000ceac jalr t9 | t9 ();
0x0000ceb0 move s0, v0 | s0 = v0;
0x0000ceb4 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 == 0) {
0x0000ceb8 beqz v0, 0xcffc | goto label_3;
| }
0x0000cebc addiu sp, sp, -0x18 |
| if (s1 == 0) {
0x0000cec0 bnel s1, zero, 0xcf74 | goto label_4;
| }
0x0000cec4 lw s2, -0x7fdc(gp) | s2 = *(gp);
| /* str._proc_self_comm */
0x0000cec8 addiu s2, s2, 0x4b50 | s2 += 0x4b50;
| do {
0x0000cecc lw t9, -0x7ea4(gp) | t9 = sym.read_one_line_file;
0x0000ced0 move a0, s2 | a0 = s2;
0x0000ced4 addiu a1, fp, 0x20 | a1 = fp + 0x20;
0x0000ced8 bal 0x7e88 | sym_read_one_line_file ();
0x0000cedc move s1, v0 | s1 = v0;
0x0000cee0 addiu v0, zero, -2 | v0 = -2;
0x0000cee4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000cee8 lw a0, 0x20(fp) | a0 = *(arg_20h);
| if (s1 == v0) {
0x0000ceec beq s1, v0, 0xcff4 | goto label_5;
| }
0x0000cef0 lw t9, -0x7e98(gp) | t9 = sym.cellescape;
| if (s1 >= 0) {
0x0000cef4 bltz s1, 0xcf1c |
0x0000cef8 move a2, a0 | a2 = a0;
0x0000cefc addiu a1, zero, 0x80 | a1 = 0x80;
0x0000cf00 move a0, s0 | a0 = s0;
0x0000cf04 bal 0xe644 | sym_cellescape ();
0x0000cf08 lw a0, 0x20(fp) | a0 = *(arg_20h);
0x0000cf0c lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000cf10 move s1, zero | s1 = 0;
0x0000cf14 sw s0, (s4) | *(s4) = s0;
0x0000cf18 move s0, zero | s0 = 0;
| }
| label_0:
0x0000cf1c lw t9, -0x7c70(gp) | t9 = sym.imp.free;
0x0000cf20 jalr t9 | t9 ();
0x0000cf24 nop |
0x0000cf28 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000cf2c lw t9, -0x7c70(gp) | t9 = sym.imp.free;
0x0000cf30 move a0, s0 | a0 = s0;
0x0000cf34 jalr t9 | t9 ();
0x0000cf38 lw a0, 0x24(fp) | a0 = *(arg_24h);
0x0000cf3c lw v1, (s3) | v1 = *(s3);
0x0000cf40 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000cf44 move v0, s1 | v0 = s1;
| if (a0 != v1) {
0x0000cf48 bne a0, v1, 0xd008 | goto label_6;
| }
0x0000cf4c move sp, fp |
0x0000cf50 lw ra, 0x44(sp) | ra = *(var_44h);
0x0000cf54 lw fp, 0x40(sp) | fp = *(var_40h);
0x0000cf58 lw s4, 0x3c(sp) | s4 = *(var_3ch);
0x0000cf5c lw s3, 0x38(sp) | s3 = *(var_38h);
0x0000cf60 lw s2, 0x34(sp) | s2 = *(var_34h);
0x0000cf64 lw s1, 0x30(sp) | s1 = *(var_30h);
0x0000cf68 lw s0, 0x2c(sp) | s0 = *(var_2ch);
0x0000cf6c addiu sp, sp, 0x48 |
0x0000cf70 jr ra | return v0;
| label_4:
0x0000cf74 lw a3, -0x7fdc(gp) | a3 = *(gp);
0x0000cf78 lw t9, -0x7dcc(gp) | t9 = sym.imp.__sprintf_chk
0x0000cf7c addiu s2, sp, 0x18 | s2 = sp + 0x18;
0x0000cf80 sw s1, 0x10(sp) | *(var_50h) = s1;
| /* str._proc__i_comm */
0x0000cf84 addiu a3, a3, 0x4b60 | a3 += 0x4b60;
0x0000cf88 addiu a2, zero, 0x18 | a2 = 0x18;
0x0000cf8c addiu a1, zero, 1 | a1 = 1;
0x0000cf90 move a0, s2 | a0 = s2;
0x0000cf94 jalr t9 | t9 ();
0x0000cf98 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000cf9c b 0xcecc |
| } while (1);
| label_1:
0x0000cfa0 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000cfa4 lw a1, -0x7fdc(gp) | a1 = *(gp);
| /* str.get_process_comm */
0x0000cfa8 addiu v0, v0, 0x4c28 | v0 += 0x4c28;
0x0000cfac lw t9, -0x7f8c(gp) | t9 = sym.log_assert_failed_realm;
0x0000cfb0 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000cfb4 addiu a3, zero, 0x57 | a3 = 0x57;
| /* esilref: 'src/basic/process-util.c' */
0x0000cfb8 addiu a2, a2, 0x4af3 | a2 += 0x4af3;
| /* esilref: 'ret' */
0x0000cfbc addiu a1, a1, 0x3ee8 | a1 += 0x3ee8;
0x0000cfc0 move a0, zero | a0 = 0;
0x0000cfc4 bal 0x9fe4 | sym_log_assert_failed_realm ();
| label_2:
0x0000cfc8 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000cfcc lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000cfd0 lw a1, -0x7fdc(gp) | a1 = *(gp);
| /* str.get_process_comm */
0x0000cfd4 addiu v0, v0, 0x4c28 | v0 += 0x4c28;
0x0000cfd8 lw t9, -0x7f8c(gp) | t9 = sym.log_assert_failed_realm;
0x0000cfdc sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000cfe0 addiu a3, zero, 0x58 | a3 = 0x58;
| /* esilref: 'src/basic/process-util.c' */
0x0000cfe4 addiu a2, a2, 0x4af3 | a2 += 0x4af3;
| /* str.pid___0 */
0x0000cfe8 addiu a1, a1, 0x4b30 | a1 += 0x4b30;
0x0000cfec move a0, zero | a0 = 0;
0x0000cff0 bal 0x9fe4 | sym_log_assert_failed_realm ();
| label_5:
0x0000cff4 addiu s1, zero, -3 | s1 = -3;
0x0000cff8 b 0xcf1c | goto label_0;
| label_3:
0x0000cffc move a0, zero | a0 = 0;
0x0000d000 addiu s1, zero, -0xc | s1 = -0xc;
0x0000d004 b 0xcf1c | goto label_0;
| label_6:
0x0000d008 lw t9, -0x7c94(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000d00c jalr t9 | t9 ();
0x0000d010 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/udev/scsi_id @ 0xd4e4 */
| #include <stdint.h>
|
; (fcn) sym.getenv_for_pid () | void getenv_for_pid () {
0x0000d4e4 lui gp, 2 |
0x0000d4e8 addiu gp, gp, 0x1d3c |
0x0000d4ec addu gp, gp, t9 | gp += t9;
0x0000d4f0 addiu sp, sp, -0x60 |
0x0000d4f4 sw s4, 0x48(sp) | *(var_48h) = s4;
0x0000d4f8 lw s4, -0x7c7c(gp) | s4 = *((gp - 7967));
0x0000d4fc sw fp, 0x58(sp) | *(var_58h) = fp;
0x0000d500 sw ra, 0x5c(sp) | *(var_5ch) = ra;
0x0000d504 sw s7, 0x54(sp) | *(var_54h) = s7;
0x0000d508 sw s6, 0x50(sp) | *(var_50h) = s6;
0x0000d50c sw s5, 0x4c(sp) | *(var_4ch) = s5;
0x0000d510 sw s3, 0x44(sp) | *(var_44h) = s3;
0x0000d514 sw s2, 0x40(sp) | *(var_40h) = s2;
0x0000d518 sw s1, 0x3c(sp) | *(var_3ch) = s1;
0x0000d51c sw s0, 0x38(sp) | *(var_38h) = s0;
0x0000d520 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0000d524 move fp, sp | fp = sp;
0x0000d528 lw v0, (s4) | v0 = *(s4);
0x0000d52c sw zero, 0x2c(fp) | *(arg_2ch) = 0;
0x0000d530 sw v0, 0x34(fp) | *(arg_34h) = v0;
| if (a0 < 0) {
0x0000d534 bltzl a0, 0xd714 | goto label_2;
| }
0x0000d538 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000d53c move s2, a1 | s2 = a1;
| if (a1 == 0) {
0x0000d540 beqz a1, 0xd73c | goto label_3;
| }
0x0000d544 move s5, a2 | s5 = a2;
| if (a2 == 0) {
0x0000d548 beqz a2, 0xd768 | goto label_4;
| }
0x0000d54c move s0, a0 | s0 = a0;
0x0000d550 bnez a0, 0xd5d8 |
| while (v0 == s0) {
0x0000d554 lw t9, -0x7cc8(gp) | t9 = sym.imp.getenv;
0x0000d558 move a0, s2 | a0 = s2;
0x0000d55c jalr t9 | t9 ();
0x0000d560 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 == 0) {
0x0000d564 beqz v0, 0xd708 | goto label_5;
| }
0x0000d568 lw t9, -0x7c74(gp) | t9 = sym.imp.strdup;
0x0000d56c move a0, v0 | a0 = v0;
0x0000d570 jalr t9 | t9 ();
0x0000d574 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 == 0) {
0x0000d578 beqz v0, 0xd7e0 | goto label_6;
| }
0x0000d57c sw v0, (s5) | *(s5) = v0;
0x0000d580 addiu s0, zero, 1 | s0 = 1;
| label_0:
0x0000d584 lw t9, -0x7fb4(gp) | t9 = sym.safe_fclose;
0x0000d588 lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x0000d58c bal 0x77bc | sym_safe_fclose ();
0x0000d590 lw a0, 0x34(fp) | a0 = *(arg_34h);
0x0000d594 lw v1, (s4) | v1 = *(s4);
0x0000d598 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000d59c move v0, s0 | v0 = s0;
| if (a0 != v1) {
0x0000d5a0 bne a0, v1, 0xd7f0 | goto label_7;
| }
0x0000d5a4 move sp, fp |
0x0000d5a8 lw ra, 0x5c(sp) | ra = *(var_5ch);
0x0000d5ac lw fp, 0x58(sp) | fp = *(var_58h);
0x0000d5b0 lw s7, 0x54(sp) | s7 = *(var_54h);
0x0000d5b4 lw s6, 0x50(sp) | s6 = *(var_50h);
0x0000d5b8 lw s5, 0x4c(sp) | s5 = *(var_4ch);
0x0000d5bc lw s4, 0x48(sp) | s4 = *(var_48h);
0x0000d5c0 lw s3, 0x44(sp) | s3 = *(var_44h);
0x0000d5c4 lw s2, 0x40(sp) | s2 = *(var_40h);
0x0000d5c8 lw s1, 0x3c(sp) | s1 = *(var_3ch);
0x0000d5cc lw s0, 0x38(sp) | s0 = *(var_38h);
0x0000d5d0 addiu sp, sp, 0x60 |
0x0000d5d4 jr ra | return v0;
0x0000d5d8 lw t9, -0x7f10(gp) | t9 = sym.getpid_cached;
0x0000d5dc bal 0xd3f4 | sym_getpid_cached ();
0x0000d5e0 nop |
0x0000d5e4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000d5e8 beq v0, s0, 0xd554 |
| }
0x0000d5ec addiu sp, sp, -0x20 |
0x0000d5f0 lw a3, -0x7fdc(gp) | a3 = *(gp);
0x0000d5f4 lw t9, -0x7dcc(gp) | t9 = sym.imp.__sprintf_chk
0x0000d5f8 addiu s1, sp, 0x18 | s1 = sp + 0x18;
| /* str._proc__i_environ */
0x0000d5fc addiu a3, a3, 0x4bdc | a3 += 0x4bdc;
0x0000d600 addiu a2, zero, 0x1b | a2 = 0x1b;
0x0000d604 addiu a1, zero, 1 | a1 = 1;
0x0000d608 move a0, s1 | a0 = s1;
0x0000d60c sw s0, 0x10(sp) | *(var_10h_2) = s0;
0x0000d610 jalr t9 | t9 ();
0x0000d614 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000d618 addiu a2, fp, 0x2c | a2 = fp + 0x2c;
0x0000d61c move a0, s1 | a0 = s1;
0x0000d620 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x0000d624 lw t9, -0x7f38(gp) | t9 = sym.fopen_unlocked;
| /* esilref: 're' */
0x0000d628 addiu a1, a1, 0x593c | a1 += 0x593c;
0x0000d62c bal 0x797c | sym_fopen_unlocked ();
0x0000d630 move s0, v0 | s0 = v0;
0x0000d634 addiu v0, zero, -2 | v0 = -2;
0x0000d638 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (s0 == v0) {
0x0000d63c beq s0, v0, 0xd7e8 | goto label_8;
| }
0x0000d640 lw t9, -0x7cfc(gp) | t9 = sym.imp.strlen;
| if (s0 < 0) {
0x0000d644 bltz s0, 0xd584 | goto label_0;
| }
0x0000d648 move a0, s2 | a0 = s2;
0x0000d64c jalr t9 | t9 ();
0x0000d650 move s3, v0 | s3 = v0;
0x0000d654 lui v0, 0x50 | v0 = 0x500001;
0x0000d658 addiu v0, v0, 1 |
0x0000d65c lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000d660 sw zero, 0x30(fp) | *(arg_30h) = 0;
0x0000d664 move s1, zero | s1 = 0;
0x0000d668 addiu s6, fp, 0x30 | s6 = fp + 0x30;
0x0000d66c sw v0, 0x24(fp) | *(arg_24h) = v0;
0x0000d670 b 0xd6cc |
| while (v0 >= 0) {
0x0000d674 lw t9, -0x7d9c(gp) | t9 = sym.imp.strncmp;
| if (v0 == 0) {
0x0000d678 beqz v0, 0xd794 | goto label_9;
| }
0x0000d67c move a2, s3 | a2 = s3;
0x0000d680 move a1, s2 | a1 = s2;
0x0000d684 move a0, s7 | a0 = s7;
0x0000d688 jalr t9 | t9 ();
0x0000d68c addu s1, s1, s0 | s1 += s0;
0x0000d690 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 == 0) {
0x0000d694 bnez v0, 0xd6ac |
0x0000d698 addu v0, s7, s3 | v0 = s7 + s3;
0x0000d69c addiu v1, zero, 0x3d | v1 = 0x3d;
0x0000d6a0 lb v0, (v0) | v0 = *(v0);
0x0000d6a4 lw t9, -0x7c74(gp) | t9 = sym.imp.strdup;
| if (v0 == v1) {
0x0000d6a8 beq v0, v1, 0xd7b8 | goto label_10;
| }
| }
0x0000d6ac lw t9, -0x7c70(gp) | t9 = sym.imp.free;
0x0000d6b0 move a0, s7 | a0 = s7;
0x0000d6b4 jalr t9 | t9 ();
0x0000d6b8 lw v0, 0x24(fp) | v0 = *(arg_24h);
0x0000d6bc lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000d6c0 sltu v0, s1, v0 | v0 = (s1 < v0) ? 1 : 0;
0x0000d6c4 sw zero, 0x30(fp) | *(arg_30h) = 0;
| if (v0 == 0) {
0x0000d6c8 beqz v0, 0xd7ac | goto label_11;
| }
0x0000d6cc lw t9, -0x7f34(gp) | t9 = sym.read_line_full;
0x0000d6d0 lw a0, 0x2c(fp) | a0 = *(arg_2ch);
0x0000d6d4 move a3, s6 | a3 = s6;
0x0000d6d8 addiu a2, zero, 1 | a2 = 1;
0x0000d6dc lui a1, 0x10 | a1 = 0x100000;
0x0000d6e0 bal 0x7b34 | sym_read_line_full ();
0x0000d6e4 move s0, v0 | s0 = v0;
0x0000d6e8 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000d6ec lw s7, 0x30(fp) | s7 = *(arg_30h);
0x0000d6f0 bgez v0, 0xd674 |
| }
| do {
| label_1:
0x0000d6f4 lw t9, -0x7c70(gp) | t9 = sym.imp.free;
0x0000d6f8 move a0, s7 | a0 = s7;
0x0000d6fc jalr t9 | t9 ();
0x0000d700 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000d704 b 0xd584 | goto label_0;
| label_5:
0x0000d708 sw zero, (s5) | *(s5) = 0;
0x0000d70c move s0, zero | s0 = 0;
0x0000d710 b 0xd584 | goto label_0;
| label_2:
0x0000d714 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000d718 lw a1, -0x7fdc(gp) | a1 = *(gp);
| /* str.getenv_for_pid */
0x0000d71c addiu v0, v0, 0x4bf8 | v0 += 0x4bf8;
0x0000d720 lw t9, -0x7f8c(gp) | t9 = sym.log_assert_failed_realm;
0x0000d724 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000d728 addiu a3, zero, 0x31d | a3 = 0x31d;
| /* esilref: 'src/basic/process-util.c' */
0x0000d72c addiu a2, a2, 0x4af3 | a2 += 0x4af3;
| /* str.pid___0 */
0x0000d730 addiu a1, a1, 0x4b30 | a1 += 0x4b30;
0x0000d734 move a0, zero | a0 = 0;
0x0000d738 bal 0x9fe4 | sym_log_assert_failed_realm ();
| label_3:
0x0000d73c lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000d740 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000d744 lw a1, -0x7fdc(gp) | a1 = *(gp);
| /* str.getenv_for_pid */
0x0000d748 addiu v0, v0, 0x4bf8 | v0 += 0x4bf8;
0x0000d74c lw t9, -0x7f8c(gp) | t9 = sym.log_assert_failed_realm;
0x0000d750 sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000d754 addiu a3, zero, 0x31e | a3 = 0x31e;
| /* esilref: 'src/basic/process-util.c' */
0x0000d758 addiu a2, a2, 0x4af3 | a2 += 0x4af3;
| /* str.field */
0x0000d75c addiu a1, a1, 0x4bf0 | a1 += 0x4bf0;
0x0000d760 move a0, zero | a0 = 0;
0x0000d764 bal 0x9fe4 | sym_log_assert_failed_realm ();
| label_4:
0x0000d768 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000d76c lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000d770 lw a1, -0x7fdc(gp) | a1 = *(gp);
| /* str.getenv_for_pid */
0x0000d774 addiu v0, v0, 0x4bf8 | v0 += 0x4bf8;
0x0000d778 lw t9, -0x7f8c(gp) | t9 = sym.log_assert_failed_realm;
0x0000d77c sw v0, 0x10(sp) | *(var_10h) = v0;
0x0000d780 addiu a3, zero, 0x31f | a3 = 0x31f;
| /* esilref: 'src/basic/process-util.c' */
0x0000d784 addiu a2, a2, 0x4af3 | a2 += 0x4af3;
| /* esilref: 'ret' */
0x0000d788 addiu a1, a1, 0x3ee8 | a1 += 0x3ee8;
0x0000d78c move a0, zero | a0 = 0;
0x0000d790 bal 0x9fe4 | sym_log_assert_failed_realm ();
| label_9:
0x0000d794 lw t9, -0x7c70(gp) | t9 = sym.imp.free;
0x0000d798 move a0, s7 | a0 = s7;
0x0000d79c jalr t9 | t9 ();
0x0000d7a0 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0000d7a4 sw zero, (s5) | *(s5) = 0;
0x0000d7a8 b 0xd584 | goto label_0;
| label_11:
0x0000d7ac move s7, zero | s7 = 0;
0x0000d7b0 addiu s0, zero, -0x84 | s0 = -0x84;
0x0000d7b4 b 0xd6f4 |
| } while (1);
| label_10:
0x0000d7b8 addiu a0, s3, 1 | a0 = s3 + 1;
0x0000d7bc addu a0, s7, a0 | a0 = s7 + a0;
0x0000d7c0 jalr t9 | t9 ();
0x0000d7c4 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 != 0) {
0x0000d7c8 beqz v0, 0xd7d8 |
0x0000d7cc sw v0, (s5) | *(s5) = v0;
0x0000d7d0 addiu s0, zero, 1 | s0 = 1;
0x0000d7d4 b 0xd6f4 | goto label_1;
| }
0x0000d7d8 addiu s0, zero, -0xc | s0 = -0xc;
0x0000d7dc b 0xd6f4 | goto label_1;
| label_6:
0x0000d7e0 addiu s0, zero, -0xc | s0 = -0xc;
0x0000d7e4 b 0xd584 | goto label_0;
| label_8:
0x0000d7e8 addiu s0, zero, -3 | s0 = -3;
0x0000d7ec b 0xd584 | goto label_0;
| label_7:
0x0000d7f0 lw t9, -0x7c94(gp) | t9 = sym.imp.__stack_chk_fail;
0x0000d7f4 jalr t9 | t9 ();
0x0000d7f8 nop |
| }
[*] Function printf used 9 times scsi_id