[*] Binary protection state of ata_id

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


[*] Function sprintf tear down of ata_id

    ; assembly                                   | /* r2dec pseudo code output */
                                                 | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/udev/ata_id @ 0xeaec */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.encode_devnode_name ()           | void encode_devnode_name () {
    0x0000eaec lui gp, 2                         |     
    0x0000eaf0 addiu gp, gp, -0x3acc             |     
    0x0000eaf4 addu gp, gp, t9                   |     gp += t9;
                                                 |     if (a0 == 0) {
    0x0000eaf8 beqz a0, 0xecc4                   |         goto label_2;
                                                 |     }
    0x0000eafc nop                               |     
                                                 |     if (a1 == 0) {
    0x0000eb00 beqz a1, 0xecc4                   |         goto label_2;
                                                 |     }
    0x0000eb04 nop                               |     
    0x0000eb08 addiu sp, sp, -0x48               |     
    0x0000eb0c sw s6, 0x38(sp)                   |     *(var_38h_2) = s6;
    0x0000eb10 sw s5, 0x34(sp)                   |     *(var_34h_2) = s5;
    0x0000eb14 sw s4, 0x30(sp)                   |     *(var_30h_2) = s4;
    0x0000eb18 sw gp, 0x18(sp)                   |     *(var_18h_2) = gp;
    0x0000eb1c sw ra, 0x44(sp)                   |     *(var_44h_2) = ra;
    0x0000eb20 sw fp, 0x40(sp)                   |     *(var_40h_2) = fp;
    0x0000eb24 sw s7, 0x3c(sp)                   |     *(var_3ch_2) = s7;
    0x0000eb28 sw s3, 0x2c(sp)                   |     *(var_2ch_2) = s3;
    0x0000eb2c sw s2, 0x28(sp)                   |     *(var_28h_2) = s2;
    0x0000eb30 sw s1, 0x24(sp)                   |     *(var_24h_2) = s1;
    0x0000eb34 sw s0, 0x20(sp)                   |     *(var_20h_2) = s0;
    0x0000eb38 lb v0, (a0)                       |     v0 = *(a0);
    0x0000eb3c move s6, a2                       |     s6 = a2;
    0x0000eb40 move s5, a1                       |     s5 = a1;
    0x0000eb44 move s4, a0                       |     s4 = a0;
                                                 |     if (v0 == 0) {
    0x0000eb48 beqz v0, 0xecbc                   |         goto label_3;
                                                 |     }
    0x0000eb4c lw fp, -0x7fc8(gp)                |     fp = *(gp);
    0x0000eb50 move s1, a0                       |     s1 = a0;
    0x0000eb54 move s3, zero                     |     s3 = 0;
    0x0000eb58 move s0, zero                     |     s0 = 0;
    0x0000eb5c addiu s7, zero, 0x5c              |     s7 = 0x5c;
                                                 |     /* str.x_02x */
    0x0000eb60 addiu fp, fp, 0x2450              |     fp += 0x2450;
    0x0000eb64 b 0xebac                          |     
                                                 |     while (v0 == 0) {
    0x0000eb68 subu v0, s6, s3                   |         __asm ("subu v0, s6, s3");
    0x0000eb6c sltu v0, v0, s2                   |         v0 = (v0 < s2) ? 1 : 0;
    0x0000eb70 lw t9, -0x7cd8(gp)                |         t9 = sym.imp.memcpy;
                                                 |         if (v0 != 0) {
    0x0000eb74 bnez v0, 0xec88                   |             goto label_4;
                                                 |         }
    0x0000eb78 addu a0, s5, s3                   |         a0 = s5 + s3;
    0x0000eb7c move a2, s2                       |         a2 = s2;
    0x0000eb80 move a1, s1                       |         a1 = s1;
    0x0000eb84 jalr t9                           |         t9 ();
    0x0000eb88 addiu s0, s0, -1                  |         s0 += -1;
    0x0000eb8c lw gp, 0x18(sp)                   |         gp = *(var_18h_2);
    0x0000eb90 addu s3, s3, s2                   |         s3 += s2;
    0x0000eb94 addu s0, s2, s0                   |         s0 = s2 + s0;
                                                 | label_1:
    0x0000eb98 addiu s0, s0, 1                   |         s0++;
    0x0000eb9c addu s1, s4, s0                   |         s1 = s4 + s0;
    0x0000eba0 lb v0, (s1)                       |         v0 = *(s1);
                                                 |         if (v0 == 0) {
    0x0000eba4 beqz v0, 0xec10                   |             goto label_5;
                                                 |         }
    0x0000eba8 nop                               |         
                                                 | label_0:
    0x0000ebac lw t9, -0x7e70(gp)                |         t9 = sym.utf8_encoded_valid_unichar;
    0x0000ebb0 addiu a1, zero, -1                |         a1 = -1;
    0x0000ebb4 move a0, s1                       |         a0 = s1;
    0x0000ebb8 bal 0xc9e8                        |         sym_utf8_encoded_valid_unichar ();
    0x0000ebbc move s2, v0                       |         s2 = v0;
    0x0000ebc0 slti v0, v0, 2                    |         v0 = (v0 < 2) ? 1 : 0;
    0x0000ebc4 lw gp, 0x18(sp)                   |         gp = *(var_18h_2);
    0x0000ebc8 beqz v0, 0xeb68                   |         
                                                 |     }
    0x0000ebcc lb a0, (s1)                       |     a0 = *(s1);
    0x0000ebd0 subu v0, s6, s3                   |     __asm ("subu v0, s6, s3");
                                                 |     if (a0 == s7) {
    0x0000ebd4 beq a0, s7, 0xec54                |         goto label_6;
                                                 |     }
    0x0000ebd8 lw t9, -0x7e3c(gp)                |     t9 = sym.whitelisted_char_for_devnode;
    0x0000ebdc move a1, zero                     |     a1 = 0;
    0x0000ebe0 bal 0xea38                        |     sym_whitelisted_char_for_devnode ();
    0x0000ebe4 lw gp, 0x18(sp)                   |     gp = *(var_18h_2);
                                                 |     if (v0 == 0) {
    0x0000ebe8 beqz v0, 0xec50                   |         goto label_7;
                                                 |     }
    0x0000ebec addu v0, s5, s3                   |     v0 = s5 + s3;
                                                 |     if (s6 == s3) {
    0x0000ebf0 beq s6, s3, 0xec88                |         goto label_4;
                                                 |     }
    0x0000ebf4 lb v1, (s1)                       |     v1 = *(s1);
    0x0000ebf8 addiu s0, s0, 1                   |     s0++;
    0x0000ebfc addu s1, s4, s0                   |     s1 = s4 + s0;
    0x0000ec00 sb v1, (v0)                       |     *(v0) = v1;
    0x0000ec04 lb v0, (s1)                       |     v0 = *(s1);
    0x0000ec08 addiu s3, s3, 1                   |     s3++;
                                                 |     if (v0 != 0) {
    0x0000ec0c bnez v0, 0xebac                   |         goto label_0;
                                                 |     }
                                                 |     do {
                                                 | label_5:
    0x0000ec10 addu s3, s5, s3                   |         s3 = s5 + s3;
                                                 |         if (s6 != s3) {
    0x0000ec14 beq s6, s3, 0xec88                |             
    0x0000ec18 move v0, zero                     |             v0 = 0;
    0x0000ec1c sb zero, (s3)                     |             *(s3) = 0;
    0x0000ec20 lw ra, 0x44(sp)                   |             ra = *(var_44h_2);
    0x0000ec24 lw fp, 0x40(sp)                   |             fp = *(var_40h_2);
    0x0000ec28 lw s7, 0x3c(sp)                   |             s7 = *(var_3ch_2);
    0x0000ec2c lw s6, 0x38(sp)                   |             s6 = *(var_38h_2);
    0x0000ec30 lw s5, 0x34(sp)                   |             s5 = *(var_34h_2);
    0x0000ec34 lw s4, 0x30(sp)                   |             s4 = *(var_30h_2);
    0x0000ec38 lw s3, 0x2c(sp)                   |             s3 = *(var_2ch_2);
    0x0000ec3c lw s2, 0x28(sp)                   |             s2 = *(var_28h_2);
    0x0000ec40 lw s1, 0x24(sp)                   |             s1 = *(var_24h_2);
    0x0000ec44 lw s0, 0x20(sp)                   |             s0 = *(var_20h_2);
    0x0000ec48 addiu sp, sp, 0x48                |             
    0x0000ec4c jr ra                             |             return v0;
                                                 | label_7:
    0x0000ec50 subu v0, s6, s3                   |             __asm ("subu v0, s6, s3");
                                                 | label_6:
    0x0000ec54 sltiu v0, v0, 4                   |             v0 = (v0 < 4) ? 1 : 0;
    0x0000ec58 lw t9, -0x7dfc(gp)                |             t9 = sym.imp.__sprintf_chk
                                                 |             if (v0 != 0) {
    0x0000ec5c bnez v0, 0xec88                   |                 goto label_4;
                                                 |             }
    0x0000ec60 lbu v0, (s1)                      |             v0 = *(s1);
    0x0000ec64 addu a0, s5, s3                   |             a0 = s5 + s3;
    0x0000ec68 sw v0, 0x10(sp)                   |             *(var_10h_2) = v0;
    0x0000ec6c move a3, fp                       |             a3 = fp;
    0x0000ec70 addiu a2, zero, -1                |             a2 = -1;
    0x0000ec74 addiu a1, zero, 1                 |             a1 = 1;
    0x0000ec78 jalr t9                           |             t9 ();
    0x0000ec7c addiu s3, s3, 4                   |             s3 += 4;
    0x0000ec80 lw gp, 0x18(sp)                   |             gp = *(var_18h_2);
    0x0000ec84 b 0xeb98                          |             goto label_1;
                                                 |         }
                                                 | label_4:
    0x0000ec88 lw ra, 0x44(sp)                   |         ra = *(var_44h_2);
    0x0000ec8c lw fp, 0x40(sp)                   |         fp = *(var_40h_2);
    0x0000ec90 lw s7, 0x3c(sp)                   |         s7 = *(var_3ch_2);
    0x0000ec94 lw s6, 0x38(sp)                   |         s6 = *(var_38h_2);
    0x0000ec98 lw s5, 0x34(sp)                   |         s5 = *(var_34h_2);
    0x0000ec9c lw s4, 0x30(sp)                   |         s4 = *(var_30h_2);
    0x0000eca0 lw s3, 0x2c(sp)                   |         s3 = *(var_2ch_2);
    0x0000eca4 lw s2, 0x28(sp)                   |         s2 = *(var_28h_2);
    0x0000eca8 lw s1, 0x24(sp)                   |         s1 = *(var_24h_2);
    0x0000ecac lw s0, 0x20(sp)                   |         s0 = *(var_20h_2);
    0x0000ecb0 addiu v0, zero, -0x16             |         v0 = -0x16;
    0x0000ecb4 addiu sp, sp, 0x48                |         
    0x0000ecb8 jr ra                             |         return v0;
                                                 | label_3:
    0x0000ecbc move s3, zero                     |         s3 = 0;
    0x0000ecc0 b 0xec10                          |         
                                                 |     } while (1);
                                                 | label_2:
    0x0000ecc4 addiu v0, zero, -0x16             |     v0 = -0x16;
    0x0000ecc8 jr ra                             |     return v0;
                                                 | }
    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/udev/ata_id @ 0xbbcc */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.get_ctty_devnr ()            | void get_ctty_devnr () {
    0x0000bbcc lui gp, 2                     |     
    0x0000bbd0 addiu gp, gp, -0xbac          |     
    0x0000bbd4 addu gp, gp, t9               |     gp += t9;
    0x0000bbd8 addiu sp, sp, -0x50           |     
    0x0000bbdc sw s1, 0x40(sp)               |     *(var_40h) = s1;
    0x0000bbe0 lw s1, -0x7cdc(gp)            |     s1 = *((gp - 7991));
    0x0000bbe4 sw fp, 0x48(sp)               |     *(var_48h) = fp;
    0x0000bbe8 sw ra, 0x4c(sp)               |     *(var_4ch) = ra;
    0x0000bbec sw s2, 0x44(sp)               |     *(var_44h) = s2;
    0x0000bbf0 sw s0, 0x3c(sp)               |     *(var_3ch) = s0;
    0x0000bbf4 sw gp, 0x18(sp)               |     *(var_18h) = gp;
    0x0000bbf8 move fp, sp                   |     fp = sp;
    0x0000bbfc lw v0, (s1)                   |     v0 = *(s1);
    0x0000bc00 sw zero, 0x2c(fp)             |     *(arg_2ch) = 0;
    0x0000bc04 sw v0, 0x34(fp)               |     *(arg_34h) = v0;
    0x0000bc08 lw v0, -0x7fc8(gp)            |     v0 = *(gp);
                                             |     if (a0 < 0) {
    0x0000bc0c bltz a0, 0xbd24               |         goto label_1;
                                             |     }
    0x0000bc10 move s2, a1                   |     s2 = a1;
                                             |     if (a0 != 0) {
    0x0000bc14 bnez a0, 0xbcf4               |         goto label_2;
                                             |     }
    0x0000bc18 lw s0, -0x7fc8(gp)            |     s0 = *(gp);
                                             |     /* str._proc_self_stat */
    0x0000bc1c addiu s0, s0, 0x11b0          |     s0 += 0x11b0;
                                             |     do {
    0x0000bc20 lw t9, -0x7ebc(gp)            |         t9 = sym.read_one_line_file;
    0x0000bc24 move a0, s0                   |         a0 = s0;
    0x0000bc28 addiu a1, fp, 0x2c            |         a1 = fp + 0x2c;
    0x0000bc2c bal 0x5750                    |         sym_read_one_line_file ();
    0x0000bc30 lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000bc34 lw s0, 0x2c(fp)               |         s0 = *(arg_2ch);
                                             |         if (v0 >= 0) {
    0x0000bc38 bltz v0, 0xbcb0               |             
    0x0000bc3c lw t9, -0x7db4(gp)            |             t9 = sym.imp.strrchr;
    0x0000bc40 addiu a1, zero, 0x29          |             a1 = 0x29;
    0x0000bc44 move a0, s0                   |             a0 = s0;
    0x0000bc48 jalr t9                       |             t9 ();
    0x0000bc4c lw gp, 0x18(fp)               |             gp = *(arg_18h);
                                             |             if (v0 == 0) {
    0x0000bc50 beqz v0, 0xbd60               |                 goto label_3;
                                             |             }
    0x0000bc54 lw a1, -0x7fc8(gp)            |             a1 = *(gp);
    0x0000bc58 lw t9, -0x7db8(gp)            |             t9 = sym.imp.sscanf;
    0x0000bc5c addiu a2, fp, 0x30            |             a2 = fp + 0x30;
                                             |             /* str.__c__d__d__d__lu_ */
    0x0000bc60 addiu a1, a1, 0x147c          |             a1 += 0x147c;
                                             |             /* esilref: 'T_PUIS=1' */
    0x0000bc64 addiu a0, v0, 1               |             a0 = v0 + 1;
    0x0000bc68 jalr t9                       |             t9 ();
    0x0000bc6c addiu v1, zero, 1             |             v1 = 1;
    0x0000bc70 lw gp, 0x18(fp)               |             gp = *(arg_18h);
                                             |             if (v0 != v1) {
    0x0000bc74 bne v0, v1, 0xbd4c            |                 goto label_4;
                                             |             }
    0x0000bc78 lw v1, 0x30(fp)               |             v1 = *(arg_30h);
    0x0000bc7c addiu a1, zero, -0x100        |             a1 = -aav.0x00000100;
    0x0000bc80 srl a0, v1, 0xc               |             a0 = v1 >> 0xc;
    0x0000bc84 and a0, a0, a1                |             a0 &= a1;
    0x0000bc88 ext v0, v1, 8, 0xc            |             __asm ("ext v0, v1, 8, 0xc");
    0x0000bc8c or v0, v0, a0                 |             v0 |= a0;
    0x0000bc90 andi a0, v1, 0xff             |             a0 = v1 & 0xff;
    0x0000bc94 or v0, v0, a0                 |             v0 |= a0;
    0x0000bc98 lw s0, 0x2c(fp)               |             s0 = *(arg_2ch);
                                             |             if (v0 == 0) {
    0x0000bc9c beqz v0, 0xbd58               |                 goto label_5;
                                             |             }
    0x0000bca0 move v0, zero                 |             v0 = 0;
                                             |             if (s2 == 0) {
    0x0000bca4 beqz s2, 0xbcb0               |                 goto label_0;
                                             |             }
    0x0000bca8 sw v1, (s2)                   |             *(s2) = v1;
    0x0000bcac sw zero, 4(s2)                |             *((s2 + 1)) = 0;
                                             |         }
                                             | label_0:
    0x0000bcb0 lw t9, -0x7cd0(gp)            |         t9 = sym.imp.free;
    0x0000bcb4 sw v0, 0x24(fp)               |         *(arg_24h) = v0;
    0x0000bcb8 move a0, s0                   |         a0 = s0;
    0x0000bcbc jalr t9                       |         t9 ();
    0x0000bcc0 lw a0, 0x34(fp)               |         a0 = *(arg_34h);
    0x0000bcc4 lw v1, (s1)                   |         v1 = *(s1);
    0x0000bcc8 lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000bccc lw v0, 0x24(fp)               |         v0 = *(arg_24h);
                                             |         if (a0 != v1) {
    0x0000bcd0 bne a0, v1, 0xbd68            |             goto label_6;
                                             |         }
    0x0000bcd4 move sp, fp                   |         
    0x0000bcd8 lw ra, 0x4c(sp)               |         ra = *(var_4ch);
    0x0000bcdc lw fp, 0x48(sp)               |         fp = *(var_48h);
    0x0000bce0 lw s2, 0x44(sp)               |         s2 = *(var_44h);
    0x0000bce4 lw s1, 0x40(sp)               |         s1 = *(var_40h);
    0x0000bce8 lw s0, 0x3c(sp)               |         s0 = *(var_3ch);
    0x0000bcec addiu sp, sp, 0x50            |         
    0x0000bcf0 jr ra                         |         return v0;
                                             | label_2:
    0x0000bcf4 addiu sp, sp, -0x18           |         
    0x0000bcf8 lw a3, -0x7fc8(gp)            |         a3 = *(gp);
    0x0000bcfc lw t9, -0x7dfc(gp)            |         t9 = sym.imp.__sprintf_chk
    0x0000bd00 addiu s0, sp, 0x18            |         s0 = sp + 0x18;
    0x0000bd04 sw a0, 0x10(sp)               |         *(var_10h_2) = a0;
                                             |         /* str._proc__i_stat */
    0x0000bd08 addiu a3, a3, 0x11cc          |         a3 += 0x11cc;
    0x0000bd0c addiu a2, zero, 0x18          |         a2 = 0x18;
    0x0000bd10 addiu a1, zero, 1             |         a1 = 1;
    0x0000bd14 move a0, s0                   |         a0 = s0;
    0x0000bd18 jalr t9                       |         t9 ();
    0x0000bd1c lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000bd20 b 0xbc20                      |         
                                             |     } while (1);
                                             | label_1:
    0x0000bd24 lw a2, -0x7fc8(gp)            |     a2 = *(gp);
    0x0000bd28 lw a1, -0x7fc8(gp)            |     a1 = *(gp);
                                             |     /* str.get_ctty_devnr */
    0x0000bd2c addiu v0, v0, 0x1528          |     v0 += 0x1528;
    0x0000bd30 lw t9, -0x7f84(gp)            |     t9 = sym.log_assert_failed_realm;
    0x0000bd34 sw v0, 0x10(sp)               |     *(var_10h) = v0;
    0x0000bd38 addiu a3, zero, 0x39a         |     a3 = 0x39a;
                                             |     /* esilref: 'src/basic/terminal-util.c' */
    0x0000bd3c addiu a2, a2, 0x145f          |     a2 += 0x145f;
                                             |     /* str.pid___0 */
    0x0000bd40 addiu a1, a1, 0x11c0          |     a1 += 0x11c0;
    0x0000bd44 move a0, zero                 |     a0 = 0;
    0x0000bd48 bal 0x78ac                    |     sym_log_assert_failed_realm ();
                                             | label_4:
    0x0000bd4c lw s0, 0x2c(fp)               |     s0 = *(arg_2ch);
    0x0000bd50 addiu v0, zero, -5            |     v0 = -5;
    0x0000bd54 b 0xbcb0                      |     goto label_0;
                                             | label_5:
    0x0000bd58 addiu v0, zero, -6            |     v0 = -6;
    0x0000bd5c b 0xbcb0                      |     goto label_0;
                                             | label_3:
    0x0000bd60 addiu v0, zero, -5            |     v0 = -5;
    0x0000bd64 b 0xbcb0                      |     goto label_0;
                                             | label_6:
    0x0000bd68 lw t9, -0x7cf0(gp)            |     t9 = sym.imp.__stack_chk_fail;
    0x0000bd6c jalr t9                       |     t9 ();
    0x0000bd70 nop                           |     
                                             | }
    ; assembly                                   | /* r2dec pseudo code output */
                                                 | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/udev/ata_id @ 0xa88c */
                                                 | #include <stdint.h>
                                                 |  
    ; (fcn) sym.get_process_cmdline ()           | void get_process_cmdline () {
    0x0000a88c lui gp, 2                         |     
    0x0000a890 addiu gp, gp, 0x794               |     
    0x0000a894 addu gp, gp, t9                   |     gp += t9;
    0x0000a898 addiu sp, sp, -0x58               |     
    0x0000a89c lw t9, -0x7cf4(gp)                |     t9 = sym.imp.sysconf;
    0x0000a8a0 sw s1, 0x38(sp)                   |     *(var_38h_2) = s1;
    0x0000a8a4 lw s1, -0x7cdc(gp)                |     s1 = *((gp - 7991));
    0x0000a8a8 sw fp, 0x50(sp)                   |     *(var_50h) = fp;
    0x0000a8ac sw s5, 0x48(sp)                   |     *(var_48h) = s5;
    0x0000a8b0 sw s4, 0x44(sp)                   |     *(var_44h_2) = s4;
    0x0000a8b4 sw s3, 0x40(sp)                   |     *(var_40h_2) = s3;
    0x0000a8b8 sw s2, 0x3c(sp)                   |     *(var_3ch_2) = s2;
    0x0000a8bc sw gp, 0x18(sp)                   |     *(var_18h_2) = gp;
    0x0000a8c0 sw ra, 0x54(sp)                   |     *(var_54h) = ra;
    0x0000a8c4 sw s6, 0x4c(sp)                   |     *(var_4ch) = s6;
    0x0000a8c8 sw s0, 0x34(sp)                   |     *(var_34h_2) = s0;
    0x0000a8cc move fp, sp                       |     fp = sp;
    0x0000a8d0 lw v0, (s1)                       |     v0 = *(s1);
    0x0000a8d4 move s5, a0                       |     s5 = a0;
    0x0000a8d8 sw v0, 0x2c(fp)                   |     *(arg_2ch) = v0;
    0x0000a8dc move a0, zero                     |     a0 = 0;
    0x0000a8e0 sw zero, 0x24(fp)                 |     *(arg_24h) = 0;
    0x0000a8e4 move s2, a1                       |     s2 = a1;
    0x0000a8e8 move s3, a2                       |     s3 = a2;
    0x0000a8ec move s4, a3                       |     s4 = a3;
    0x0000a8f0 jalr t9                           |     t9 ();
    0x0000a8f4 lw gp, 0x18(fp)                   |     gp = *(var_18h_2);
                                                 |     if (v0 <= 0) {
    0x0000a8f8 blez v0, 0xab9c                   |         goto label_5;
                                                 |     }
                                                 |     if (s4 == 0) {
    0x0000a8fc beql s4, zero, 0xabc8             |         goto label_6;
                                                 |     }
    0x0000a900 lw v0, -0x7fc8(gp)                |     v0 = *(gp);
                                                 |     if (s5 < 0) {
    0x0000a904 bltzl s5, 0xabf0                  |         goto label_7;
                                                 |     }
    0x0000a908 lw v0, -0x7fc8(gp)                |     v0 = *(gp);
    0x0000a90c move s0, v0                       |     s0 = v0;
                                                 |     if (s5 != 0) {
    0x0000a910 bnez s5, 0xaaa0                   |         goto label_8;
                                                 |     }
    0x0000a914 lw s6, -0x7fc8(gp)                |     s6 = *(gp);
                                                 |     /* str._proc_self_cmdline */
    0x0000a918 addiu s6, s6, 0x1200              |     s6 += 0x1200;
                                                 | label_0:
    0x0000a91c lw a1, -0x7fc8(gp)                |     a1 = *(gp);
    0x0000a920 lw t9, -0x7f58(gp)                |     t9 = sym.fopen_unlocked;
    0x0000a924 move a0, s6                       |     a0 = s6;
    0x0000a928 addiu a2, fp, 0x24                |     a2 = fp + 0x24;
                                                 |     /* esilref: 're' */
    0x0000a92c addiu a1, a1, 0x1edc              |     a1 += 0x1edc;
    0x0000a930 bal 0x5244                        |     sym_fopen_unlocked ();
    0x0000a934 move s6, v0                       |     s6 = v0;
    0x0000a938 addiu v0, zero, -2                |     v0 = -2;
    0x0000a93c lw gp, 0x18(fp)                   |     gp = *(var_18h_2);
                                                 |     if (s6 == v0) {
    0x0000a940 beq s6, v0, 0xac54                |         goto label_9;
                                                 |     }
    0x0000a944 sll a2, s2, 2                     |     a2 = s2 << 2;
                                                 |     if (s6 < 0) {
    0x0000a948 bltz s6, 0xaae8                   |         goto label_10;
                                                 |     }
    0x0000a94c addiu a2, a2, 1                   |     a2++;
    0x0000a950 sltu v0, a2, s2                   |     v0 = (a2 < s2) ? 1 : 0;
    0x0000a954 move a0, s0                       |     a0 = s0;
                                                 |     if (v0 != 0) {
    0x0000a958 bnez v0, 0xaad0                   |         goto label_11;
                                                 |     }
    0x0000a95c move s6, s0                       |     s6 = s0;
                                                 | label_1:
    0x0000a960 lw t9, -0x7d28(gp)                |     t9 = sym.imp.malloc;
    0x0000a964 jalr t9                           |     t9 ();
    0x0000a968 nop                               |     
    0x0000a96c move s0, v0                       |     s0 = v0;
    0x0000a970 lw gp, 0x18(fp)                   |     gp = *(var_18h_2);
                                                 |     if (v0 == 0) {
    0x0000a974 beqz v0, 0xac4c                   |         goto label_12;
                                                 |     }
    0x0000a978 lw t9, -0x7d14(gp)                |     t9 = sym.imp.fread;
    0x0000a97c lw a3, 0x24(fp)                   |     a3 = *(arg_24h);
    0x0000a980 move a2, s6                       |     a2 = s6;
    0x0000a984 addiu a1, zero, 1                 |     a1 = 1;
    0x0000a988 move a0, v0                       |     a0 = v0;
    0x0000a98c jalr t9                           |     t9 ();
    0x0000a990 lw gp, 0x18(fp)                   |     gp = *(var_18h_2);
                                                 |     if (v0 == 0) {
    0x0000a994 beqz v0, 0xaaf0                   |         goto label_13;
                                                 |     }
    0x0000a998 addiu v1, zero, 1                 |     v1 = 1;
    0x0000a99c addiu a1, s0, -1                  |     a1 = s0 + -1;
                                                 |     if (v0 == v1) {
    0x0000a9a0 beq v0, v1, 0xa9c8                |         goto label_14;
                                                 |     }
    0x0000a9a4 move v1, s0                       |     v1 = s0;
    0x0000a9a8 addu a1, a1, v0                   |     a1 += v0;
    0x0000a9ac addiu a2, zero, 0x20              |     a2 = 0x20;
    0x0000a9b0 lb a0, (v1)                       |     a0 = *(v1);
                                                 |     do {
                                                 |         if (a0 != 0) {
    0x0000a9b4 beql a0, zero, 0xa9bc             |             
    0x0000a9b8 sb a2, (v1)                       |             *(v1) = a2;
                                                 |         }
    0x0000a9bc addiu v1, v1, 1                   |         v1++;
    0x0000a9c0 lb a0, (v1)                       |         a0 = *(v1);
    0x0000a9c4 bnel a1, v1, 0xa9b4               |         
                                                 |     } while (a1 == v1);
                                                 | label_14:
    0x0000a9c8 addu v0, s0, v0                   |     v0 = s0 + v0;
    0x0000a9cc sb zero, (v0)                     |     *(v0) = 0;
                                                 | label_3:
    0x0000a9d0 lw a1, -0x7fc8(gp)                |     a1 = *(gp);
    0x0000a9d4 lw t9, -0x7eac(gp)                |     t9 = sym.delete_trailing_chars;
                                                 |     /* str.__t_n_r */
    0x0000a9d8 addiu a1, a1, 0x3dc               |     a1 += 0x3dc;
    0x0000a9dc move a0, s0                       |     a0 = s0;
    0x0000a9e0 andi s3, s3, 2                    |     s3 &= 2;
    0x0000a9e4 bal 0xb508                        |     sym_delete_trailing_chars ();
    0x0000a9e8 lw gp, 0x18(fp)                   |     gp = *(var_18h_2);
                                                 |     if (s3 != 0) {
    0x0000a9ec bnez s3, 0xab80                   |         goto label_15;
                                                 |     }
    0x0000a9f0 move a2, zero                     |     a2 = 0;
                                                 | label_4:
    0x0000a9f4 lw t9, -0x7ea8(gp)                |     t9 = sym.escape_non_printable_full;
    0x0000a9f8 move a1, s2                       |     a1 = s2;
    0x0000a9fc move a0, s0                       |     a0 = s0;
    0x0000aa00 bal 0xe07c                        |     sym_escape_non_printable_full ();
    0x0000aa04 move s2, v0                       |     s2 = v0;
    0x0000aa08 lw gp, 0x18(fp)                   |     gp = *(var_18h_2);
                                                 |     if (v0 == 0) {
    0x0000aa0c beqz v0, 0xac4c                   |         goto label_12;
                                                 |     }
    0x0000aa10 lw t9, -0x7d48(gp)                |     t9 = sym.imp.strlen;
    0x0000aa14 move a0, v0                       |     a0 = v0;
    0x0000aa18 jalr t9                           |     t9 ();
    0x0000aa1c lw gp, 0x18(fp)                   |     gp = *(var_18h_2);
    0x0000aa20 addiu a1, v0, 1                   |     a1 = v0 + 1;
    0x0000aa24 move a0, s2                       |     a0 = s2;
    0x0000aa28 lw t9, -0x7d24(gp)                |     t9 = sym.imp.realloc;
    0x0000aa2c move s6, zero                     |     s6 = 0;
    0x0000aa30 jalr t9                           |     t9 ();
                                                 |     if (v0 != 0) {
    0x0000aa34 movz v0, s2, v0                   |         v0 = s2;
                                                 |     }
    0x0000aa38 lw gp, 0x18(fp)                   |     gp = *(var_18h_2);
    0x0000aa3c sw v0, (s4)                       |     *(s4) = v0;
                                                 |     do {
                                                 | label_2:
    0x0000aa40 lw t9, -0x7cd0(gp)                |         t9 = sym.imp.free;
    0x0000aa44 move a0, s0                       |         a0 = s0;
    0x0000aa48 jalr t9                           |         t9 ();
    0x0000aa4c lw gp, 0x18(fp)                   |         gp = *(var_18h_2);
    0x0000aa50 lw t9, -0x7f50(gp)                |         t9 = sym.safe_fclose;
    0x0000aa54 lw a0, 0x24(fp)                   |         a0 = *(arg_24h);
    0x0000aa58 bal 0x5084                        |         sym_safe_fclose ();
    0x0000aa5c lw a0, 0x2c(fp)                   |         a0 = *(arg_2ch);
    0x0000aa60 lw v1, (s1)                       |         v1 = *(s1);
    0x0000aa64 lw gp, 0x18(fp)                   |         gp = *(var_18h_2);
    0x0000aa68 move v0, s6                       |         v0 = s6;
                                                 |         if (a0 != v1) {
    0x0000aa6c bne a0, v1, 0xac60                |             goto label_16;
                                                 |         }
    0x0000aa70 move sp, fp                       |         
    0x0000aa74 lw ra, 0x54(sp)                   |         ra = *(var_54h);
    0x0000aa78 lw fp, 0x50(sp)                   |         fp = *(var_50h);
    0x0000aa7c lw s6, 0x4c(sp)                   |         s6 = *(var_4ch);
    0x0000aa80 lw s5, 0x48(sp)                   |         s5 = *(var_48h);
    0x0000aa84 lw s4, 0x44(sp)                   |         s4 = *(var_44h_2);
    0x0000aa88 lw s3, 0x40(sp)                   |         s3 = *(var_40h_2);
    0x0000aa8c lw s2, 0x3c(sp)                   |         s2 = *(var_3ch_2);
    0x0000aa90 lw s1, 0x38(sp)                   |         s1 = *(var_38h_2);
    0x0000aa94 lw s0, 0x34(sp)                   |         s0 = *(var_34h_2);
    0x0000aa98 addiu sp, sp, 0x58                |         
    0x0000aa9c jr ra                             |         return v0;
                                                 | label_8:
    0x0000aaa0 addiu sp, sp, -0x20               |         
    0x0000aaa4 lw a3, -0x7fc8(gp)                |         a3 = *(gp);
    0x0000aaa8 lw t9, -0x7dfc(gp)                |         t9 = sym.imp.__sprintf_chk
    0x0000aaac addiu s6, sp, 0x18                |         s6 = sp + 0x18;
    0x0000aab0 sw s5, 0x10(sp)                   |         *(var_18h_3) = s5;
                                                 |         /* str._proc__i_cmdline */
    0x0000aab4 addiu a3, a3, 0x1238              |         a3 += 0x1238;
    0x0000aab8 addiu a2, zero, 0x1b              |         a2 = 0x1b;
    0x0000aabc addiu a1, zero, 1                 |         a1 = 1;
    0x0000aac0 move a0, s6                       |         a0 = s6;
    0x0000aac4 jalr t9                           |         t9 ();
    0x0000aac8 lw gp, 0x18(fp)                   |         gp = *(var_18h_2);
    0x0000aacc b 0xa91c                          |         goto label_0;
                                                 | label_11:
    0x0000aad0 sltu s6, s0, a2                   |         s6 = (s0 < a2) ? 1 : 0;
                                                 |         if (s6 != 0) {
    0x0000aad4 movz a0, a2, s6                   |             a0 = a2;
                                                 |         }
    0x0000aad8 move s6, a0                       |         s6 = a0;
    0x0000aadc addiu a0, zero, 1                 |         a0 = 1;
                                                 |         if (s6 == 0) {
    0x0000aae0 movn a0, s6, s6                   |             a0 = s6;
                                                 |         }
    0x0000aae4 b 0xa960                          |         goto label_1;
                                                 | label_10:
    0x0000aae8 move s0, zero                     |         s0 = 0;
    0x0000aaec b 0xaa40                          |         
                                                 |     } while (1);
                                                 | label_13:
    0x0000aaf0 lw t9, -0x7ce0(gp)                |     t9 = sym.imp.ferror;
    0x0000aaf4 lw a0, 0x24(fp)                   |     a0 = *(arg_24h);
    0x0000aaf8 jalr t9                           |     t9 ();
    0x0000aafc lw gp, 0x18(fp)                   |     gp = *(var_18h_2);
                                                 |     if (v0 != 0) {
    0x0000ab00 bnez v0, 0xac18                   |         goto label_17;
                                                 |     }
    0x0000ab04 andi v0, s3, 1                    |     v0 = s3 & 1;
    0x0000ab08 addiu s6, zero, -2                |     s6 = -2;
                                                 |     if (v0 == 0) {
    0x0000ab0c beqz v0, 0xaa40                   |         goto label_2;
                                                 |     }
    0x0000ab10 lw t9, -0x7ea4(gp)                |     t9 = sym.get_process_comm;
    0x0000ab14 addiu a1, fp, 0x28                |     a1 = fp + 0x28;
    0x0000ab18 move a0, s5                       |     a0 = s5;
    0x0000ab1c sw zero, 0x28(fp)                 |     *(arg_28h) = 0;
    0x0000ab20 bal 0xa6c4                        |     sym_get_process_comm ();
    0x0000ab24 move s6, v0                       |     s6 = v0;
    0x0000ab28 lw gp, 0x18(fp)                   |     gp = *(var_18h_2);
                                                 |     if (v0 >= 0) {
    0x0000ab2c bltz v0, 0xac38                   |         
    0x0000ab30 lw t9, -0x7cd0(gp)                |         t9 = sym.imp.free;
    0x0000ab34 move a0, s0                       |         a0 = s0;
    0x0000ab38 jalr t9                           |         t9 ();
    0x0000ab3c lw gp, 0x18(fp)                   |         gp = *(var_18h_2);
    0x0000ab40 lw a1, 0x28(fp)                   |         a1 = *(arg_28h);
    0x0000ab44 move a3, zero                     |         a3 = 0;
    0x0000ab48 lw a2, -0x7fc8(gp)                |         a2 = *(gp);
    0x0000ab4c lw a0, -0x7fc8(gp)                |         a0 = *(gp);
    0x0000ab50 lw t9, -0x7ea0(gp)                |         t9 = sym.strjoin_real;
    0x0000ab54 addiu a2, a2, 0x124c              |         a2 += 0x124c;
    0x0000ab58 addiu a0, a0, 0x1250              |         a0 += 0x1250;
    0x0000ab5c bal 0xb380                        |         sym_strjoin_real ();
    0x0000ab60 move s0, v0                       |         s0 = v0;
    0x0000ab64 lw gp, 0x18(fp)                   |         gp = *(var_18h_2);
                                                 |         if (v0 != 0) {
    0x0000ab68 beqz v0, 0xac34                   |             
    0x0000ab6c lw t9, -0x7cd0(gp)                |             t9 = sym.imp.free;
    0x0000ab70 lw a0, 0x28(fp)                   |             a0 = *(arg_28h);
    0x0000ab74 jalr t9                           |             t9 ();
    0x0000ab78 lw gp, 0x18(fp)                   |             gp = *(var_18h_2);
    0x0000ab7c b 0xa9d0                          |             goto label_3;
                                                 | label_15:
    0x0000ab80 lw t9, -0x7e9c(gp)                |             t9 = sym.is_locale_utf8;
    0x0000ab84 bal 0x69f0                        |             sym_is_locale_utf8 ();
    0x0000ab88 nop                               |             
    0x0000ab8c xori v0, v0, 1                    |             v0 ^= 1;
    0x0000ab90 lw gp, 0x18(fp)                   |             gp = *(var_18h_2);
    0x0000ab94 andi a2, v0, 0xff                 |             a2 = v0 & 0xff;
    0x0000ab98 b 0xa9f4                          |             goto label_4;
                                                 | label_5:
    0x0000ab9c lw v0, -0x7fc8(gp)                |             v0 = *(gp);
    0x0000aba0 lw a2, -0x7fc8(gp)                |             a2 = *(gp);
    0x0000aba4 lw a1, -0x7fc8(gp)                |             a1 = *(gp);
                                                 |             /* str.sc_arg_max */
    0x0000aba8 addiu v0, v0, 0x1298              |             v0 += 0x1298;
    0x0000abac lw t9, -0x7f84(gp)                |             t9 = sym.log_assert_failed_realm;
    0x0000abb0 sw v0, 0x10(sp)                   |             *(var_10h_2) = v0;
    0x0000abb4 addiu a3, zero, 0xe               |             a3 = 0xe;
                                                 |             /* esilref: 'src/basic/env-util.h' */
    0x0000abb8 addiu a2, a2, 0x121b              |             a2 += 0x121b;
                                                 |             /* str.l___0 */
    0x0000abbc addiu a1, a1, 0x1230              |             a1 += 0x1230;
    0x0000abc0 move a0, zero                     |             a0 = 0;
    0x0000abc4 bal 0x78ac                        |             sym_log_assert_failed_realm ();
                                                 | label_6:
    0x0000abc8 lw a2, -0x7fc8(gp)                |             a2 = *(gp);
    0x0000abcc lw a1, -0x7fc8(gp)                |             a1 = *(gp);
    0x0000abd0 addiu v0, v0, 0x12a4              |             v0 += 0x12a4;
    0x0000abd4 lw t9, -0x7f84(gp)                |             t9 = sym.log_assert_failed_realm;
    0x0000abd8 sw v0, 0x10(sp)                   |             *(var_10h_2) = v0;
    0x0000abdc addiu a3, zero, 0x77              |             a3 = 0x77;
                                                 |             /* esilref: 'src/basic/process-util.c' */
    0x0000abe0 addiu a2, a2, 0x1183              |             a2 += 0x1183;
                                                 |             /* esilref: 'line' */
    0x0000abe4 addiu a1, a1, 0x1244              |             a1 += 0x1244;
    0x0000abe8 move a0, zero                     |             a0 = 0;
    0x0000abec bal 0x78ac                        |             sym_log_assert_failed_realm ();
                                                 | label_7:
    0x0000abf0 lw a2, -0x7fc8(gp)                |             a2 = *(gp);
    0x0000abf4 lw a1, -0x7fc8(gp)                |             a1 = *(gp);
    0x0000abf8 addiu v0, v0, 0x12a4              |             v0 += 0x12a4;
    0x0000abfc lw t9, -0x7f84(gp)                |             t9 = sym.log_assert_failed_realm;
    0x0000ac00 sw v0, 0x10(sp)                   |             *(var_10h_2) = v0;
    0x0000ac04 addiu a3, zero, 0x78              |             a3 = 0x78;
                                                 |             /* esilref: 'src/basic/process-util.c' */
    0x0000ac08 addiu a2, a2, 0x1183              |             a2 += 0x1183;
                                                 |             /* str.pid___0 */
    0x0000ac0c addiu a1, a1, 0x11c0              |             a1 += 0x11c0;
    0x0000ac10 move a0, zero                     |             a0 = 0;
    0x0000ac14 bal 0x78ac                        |             sym_log_assert_failed_realm ();
                                                 | label_17:
    0x0000ac18 lw t9, -0x7d78(gp)                |             t9 = sym.imp.__errno_location;
    0x0000ac1c jalr t9                           |             t9 ();
    0x0000ac20 nop                               |             
    0x0000ac24 lw s6, (v0)                       |             s6 = *(v0);
    0x0000ac28 lw gp, 0x18(fp)                   |             gp = *(var_18h_2);
    0x0000ac2c negu s6, s6                       |             __asm ("negu s6, s6");
    0x0000ac30 b 0xaa40                          |             goto label_2;
                                                 |         }
    0x0000ac34 addiu s6, zero, -0xc              |         s6 = -0xc;
                                                 |     }
    0x0000ac38 lw t9, -0x7cd0(gp)                |     t9 = sym.imp.free;
    0x0000ac3c lw a0, 0x28(fp)                   |     a0 = *(arg_28h);
    0x0000ac40 jalr t9                           |     t9 ();
    0x0000ac44 lw gp, 0x18(fp)                   |     gp = *(var_18h_2);
    0x0000ac48 b 0xaa40                          |     goto label_2;
                                                 | label_12:
    0x0000ac4c addiu s6, zero, -0xc              |     s6 = -0xc;
    0x0000ac50 b 0xaa40                          |     goto label_2;
                                                 | label_9:
    0x0000ac54 move s0, zero                     |     s0 = 0;
    0x0000ac58 addiu s6, zero, -3                |     s6 = -3;
    0x0000ac5c b 0xaa40                          |     goto label_2;
                                                 | label_16:
    0x0000ac60 lw t9, -0x7cf0(gp)                |     t9 = sym.imp.__stack_chk_fail;
    0x0000ac64 jalr t9                           |     t9 ();
    0x0000ac68 nop                               |     
                                                 | }
    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/udev/ata_id @ 0xa6c4 */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.get_process_comm ()          | void get_process_comm () {
    0x0000a6c4 lui gp, 2                     |     
    0x0000a6c8 addiu gp, gp, 0x95c           |     
    0x0000a6cc addu gp, gp, t9               |     gp += t9;
    0x0000a6d0 addiu sp, sp, -0x48           |     
    0x0000a6d4 sw s3, 0x38(sp)               |     *(var_38h) = s3;
    0x0000a6d8 lw s3, -0x7cdc(gp)            |     s3 = *((gp - 7991));
    0x0000a6dc sw fp, 0x40(sp)               |     *(var_40h) = fp;
    0x0000a6e0 sw ra, 0x44(sp)               |     *(var_44h) = ra;
    0x0000a6e4 sw s4, 0x3c(sp)               |     *(var_3ch) = s4;
    0x0000a6e8 sw s2, 0x34(sp)               |     *(var_34h) = s2;
    0x0000a6ec sw s1, 0x30(sp)               |     *(var_30h) = s1;
    0x0000a6f0 sw s0, 0x2c(sp)               |     *(var_2ch) = s0;
    0x0000a6f4 sw gp, 0x18(sp)               |     *(var_18h) = gp;
    0x0000a6f8 move fp, sp                   |     fp = sp;
    0x0000a6fc lw v0, (s3)                   |     v0 = *(s3);
    0x0000a700 sw zero, 0x20(fp)             |     *(arg_20h) = 0;
    0x0000a704 sw v0, 0x24(fp)               |     *(arg_24h) = v0;
                                             |     if (a1 == 0) {
    0x0000a708 beql a1, zero, 0xa818         |         goto label_1;
                                             |     }
    0x0000a70c lw v0, -0x7fc8(gp)            |     v0 = *(gp);
    0x0000a710 move s1, a0                   |     s1 = a0;
                                             |     if (a0 < 0) {
    0x0000a714 bltz a0, 0xa840               |         goto label_2;
                                             |     }
    0x0000a718 lw t9, -0x7d28(gp)            |     t9 = sym.imp.malloc;
    0x0000a71c addiu a0, zero, 0x80          |     a0 = 0x80;
    0x0000a720 move s4, a1                   |     s4 = a1;
    0x0000a724 jalr t9                       |     t9 ();
    0x0000a728 move s0, v0                   |     s0 = v0;
    0x0000a72c lw gp, 0x18(fp)               |     gp = *(arg_18h);
                                             |     if (v0 == 0) {
    0x0000a730 beqz v0, 0xa874               |         goto label_3;
                                             |     }
    0x0000a734 addiu sp, sp, -0x18           |     
                                             |     if (s1 == 0) {
    0x0000a738 bnel s1, zero, 0xa7ec         |         goto label_4;
                                             |     }
    0x0000a73c lw s2, -0x7fc8(gp)            |     s2 = *(gp);
                                             |     /* str._proc_self_comm */
    0x0000a740 addiu s2, s2, 0x11e0          |     s2 += 0x11e0;
                                             |     do {
    0x0000a744 lw t9, -0x7ebc(gp)            |         t9 = sym.read_one_line_file;
    0x0000a748 move a0, s2                   |         a0 = s2;
    0x0000a74c addiu a1, fp, 0x20            |         a1 = fp + 0x20;
    0x0000a750 bal 0x5750                    |         sym_read_one_line_file ();
    0x0000a754 move s1, v0                   |         s1 = v0;
    0x0000a758 addiu v0, zero, -2            |         v0 = -2;
    0x0000a75c lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000a760 lw a0, 0x20(fp)               |         a0 = *(arg_20h);
                                             |         if (s1 == v0) {
    0x0000a764 beq s1, v0, 0xa86c            |             goto label_5;
                                             |         }
    0x0000a768 lw t9, -0x7eb0(gp)            |         t9 = sym.cellescape;
                                             |         if (s1 >= 0) {
    0x0000a76c bltz s1, 0xa794               |             
    0x0000a770 move a2, a0                   |             a2 = a0;
    0x0000a774 addiu a1, zero, 0x80          |             a1 = 0x80;
    0x0000a778 move a0, s0                   |             a0 = s0;
    0x0000a77c bal 0xb5a0                    |             sym_cellescape ();
    0x0000a780 lw a0, 0x20(fp)               |             a0 = *(arg_20h);
    0x0000a784 lw gp, 0x18(fp)               |             gp = *(arg_18h);
    0x0000a788 move s1, zero                 |             s1 = 0;
    0x0000a78c sw s0, (s4)                   |             *(s4) = s0;
    0x0000a790 move s0, zero                 |             s0 = 0;
                                             |         }
                                             | label_0:
    0x0000a794 lw t9, -0x7cd0(gp)            |         t9 = sym.imp.free;
    0x0000a798 jalr t9                       |         t9 ();
    0x0000a79c nop                           |         
    0x0000a7a0 lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000a7a4 lw t9, -0x7cd0(gp)            |         t9 = sym.imp.free;
    0x0000a7a8 move a0, s0                   |         a0 = s0;
    0x0000a7ac jalr t9                       |         t9 ();
    0x0000a7b0 lw a0, 0x24(fp)               |         a0 = *(arg_24h);
    0x0000a7b4 lw v1, (s3)                   |         v1 = *(s3);
    0x0000a7b8 lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000a7bc move v0, s1                   |         v0 = s1;
                                             |         if (a0 != v1) {
    0x0000a7c0 bne a0, v1, 0xa880            |             goto label_6;
                                             |         }
    0x0000a7c4 move sp, fp                   |         
    0x0000a7c8 lw ra, 0x44(sp)               |         ra = *(var_44h);
    0x0000a7cc lw fp, 0x40(sp)               |         fp = *(var_40h);
    0x0000a7d0 lw s4, 0x3c(sp)               |         s4 = *(var_3ch);
    0x0000a7d4 lw s3, 0x38(sp)               |         s3 = *(var_38h);
    0x0000a7d8 lw s2, 0x34(sp)               |         s2 = *(var_34h);
    0x0000a7dc lw s1, 0x30(sp)               |         s1 = *(var_30h);
    0x0000a7e0 lw s0, 0x2c(sp)               |         s0 = *(var_2ch);
    0x0000a7e4 addiu sp, sp, 0x48            |         
    0x0000a7e8 jr ra                         |         return v0;
                                             | label_4:
    0x0000a7ec lw a3, -0x7fc8(gp)            |         a3 = *(gp);
    0x0000a7f0 lw t9, -0x7dfc(gp)            |         t9 = sym.imp.__sprintf_chk
    0x0000a7f4 addiu s2, sp, 0x18            |         s2 = sp + 0x18;
    0x0000a7f8 sw s1, 0x10(sp)               |         *(var_50h) = s1;
                                             |         /* str._proc__i_comm */
    0x0000a7fc addiu a3, a3, 0x11f0          |         a3 += 0x11f0;
    0x0000a800 addiu a2, zero, 0x18          |         a2 = 0x18;
    0x0000a804 addiu a1, zero, 1             |         a1 = 1;
    0x0000a808 move a0, s2                   |         a0 = s2;
    0x0000a80c jalr t9                       |         t9 ();
    0x0000a810 lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000a814 b 0xa744                      |         
                                             |     } while (1);
                                             | label_1:
    0x0000a818 lw a2, -0x7fc8(gp)            |     a2 = *(gp);
    0x0000a81c lw a1, -0x7fc8(gp)            |     a1 = *(gp);
                                             |     /* str.get_process_comm */
    0x0000a820 addiu v0, v0, 0x12b8          |     v0 += 0x12b8;
    0x0000a824 lw t9, -0x7f84(gp)            |     t9 = sym.log_assert_failed_realm;
    0x0000a828 sw v0, 0x10(sp)               |     *(var_10h) = v0;
    0x0000a82c addiu a3, zero, 0x57          |     a3 = 0x57;
                                             |     /* esilref: 'src/basic/process-util.c' */
    0x0000a830 addiu a2, a2, 0x1183          |     a2 += 0x1183;
                                             |     /* esilref: 'ret' */
    0x0000a834 addiu a1, a1, 0x584           |     a1 += 0x584;
    0x0000a838 move a0, zero                 |     a0 = 0;
    0x0000a83c bal 0x78ac                    |     sym_log_assert_failed_realm ();
                                             | label_2:
    0x0000a840 lw v0, -0x7fc8(gp)            |     v0 = *(gp);
    0x0000a844 lw a2, -0x7fc8(gp)            |     a2 = *(gp);
    0x0000a848 lw a1, -0x7fc8(gp)            |     a1 = *(gp);
                                             |     /* str.get_process_comm */
    0x0000a84c addiu v0, v0, 0x12b8          |     v0 += 0x12b8;
    0x0000a850 lw t9, -0x7f84(gp)            |     t9 = sym.log_assert_failed_realm;
    0x0000a854 sw v0, 0x10(sp)               |     *(var_10h) = v0;
    0x0000a858 addiu a3, zero, 0x58          |     a3 = 0x58;
                                             |     /* esilref: 'src/basic/process-util.c' */
    0x0000a85c addiu a2, a2, 0x1183          |     a2 += 0x1183;
                                             |     /* str.pid___0 */
    0x0000a860 addiu a1, a1, 0x11c0          |     a1 += 0x11c0;
    0x0000a864 move a0, zero                 |     a0 = 0;
    0x0000a868 bal 0x78ac                    |     sym_log_assert_failed_realm ();
                                             | label_5:
    0x0000a86c addiu s1, zero, -3            |     s1 = -3;
    0x0000a870 b 0xa794                      |     goto label_0;
                                             | label_3:
    0x0000a874 move a0, zero                 |     a0 = 0;
    0x0000a878 addiu s1, zero, -0xc          |     s1 = -0xc;
    0x0000a87c b 0xa794                      |     goto label_0;
                                             | label_6:
    0x0000a880 lw t9, -0x7cf0(gp)            |     t9 = sym.imp.__stack_chk_fail;
    0x0000a884 jalr t9                       |     t9 ();
    0x0000a888 nop                           |     
                                             | }
    ; assembly                               | /* r2dec pseudo code output */
                                             | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/lib/udev/ata_id @ 0xad5c */
                                             | #include <stdint.h>
                                             |  
    ; (fcn) sym.getenv_for_pid ()            | void getenv_for_pid () {
    0x0000ad5c lui gp, 2                     |     
    0x0000ad60 addiu gp, gp, 0x2c4           |     
    0x0000ad64 addu gp, gp, t9               |     gp += t9;
    0x0000ad68 addiu sp, sp, -0x60           |     
    0x0000ad6c sw s4, 0x48(sp)               |     *(var_48h) = s4;
    0x0000ad70 lw s4, -0x7cdc(gp)            |     s4 = *((gp - 7991));
    0x0000ad74 sw fp, 0x58(sp)               |     *(var_58h) = fp;
    0x0000ad78 sw ra, 0x5c(sp)               |     *(var_5ch) = ra;
    0x0000ad7c sw s7, 0x54(sp)               |     *(var_54h) = s7;
    0x0000ad80 sw s6, 0x50(sp)               |     *(var_50h) = s6;
    0x0000ad84 sw s5, 0x4c(sp)               |     *(var_4ch) = s5;
    0x0000ad88 sw s3, 0x44(sp)               |     *(var_44h) = s3;
    0x0000ad8c sw s2, 0x40(sp)               |     *(var_40h) = s2;
    0x0000ad90 sw s1, 0x3c(sp)               |     *(var_3ch) = s1;
    0x0000ad94 sw s0, 0x38(sp)               |     *(var_38h) = s0;
    0x0000ad98 sw gp, 0x18(sp)               |     *(var_18h) = gp;
    0x0000ad9c move fp, sp                   |     fp = sp;
    0x0000ada0 lw v0, (s4)                   |     v0 = *(s4);
    0x0000ada4 sw zero, 0x2c(fp)             |     *(arg_2ch) = 0;
    0x0000ada8 sw v0, 0x34(fp)               |     *(arg_34h) = v0;
                                             |     if (a0 < 0) {
    0x0000adac bltzl a0, 0xaf8c              |         goto label_2;
                                             |     }
    0x0000adb0 lw v0, -0x7fc8(gp)            |     v0 = *(gp);
    0x0000adb4 move s2, a1                   |     s2 = a1;
                                             |     if (a1 == 0) {
    0x0000adb8 beqz a1, 0xafb4               |         goto label_3;
                                             |     }
    0x0000adbc move s5, a2                   |     s5 = a2;
                                             |     if (a2 == 0) {
    0x0000adc0 beqz a2, 0xafe0               |         goto label_4;
                                             |     }
    0x0000adc4 move s0, a0                   |     s0 = a0;
    0x0000adc8 bnez a0, 0xae50               |     
                                             |     while (v0 == s0) {
    0x0000adcc lw t9, -0x7d20(gp)            |         t9 = sym.imp.getenv;
    0x0000add0 move a0, s2                   |         a0 = s2;
    0x0000add4 jalr t9                       |         t9 ();
    0x0000add8 lw gp, 0x18(fp)               |         gp = *(arg_18h);
                                             |         if (v0 == 0) {
    0x0000addc beqz v0, 0xaf80               |             goto label_5;
                                             |         }
    0x0000ade0 lw t9, -0x7cd4(gp)            |         t9 = sym.imp.strdup;
    0x0000ade4 move a0, v0                   |         a0 = v0;
    0x0000ade8 jalr t9                       |         t9 ();
    0x0000adec lw gp, 0x18(fp)               |         gp = *(arg_18h);
                                             |         if (v0 == 0) {
    0x0000adf0 beqz v0, 0xb058               |             goto label_6;
                                             |         }
    0x0000adf4 sw v0, (s5)                   |         *(s5) = v0;
    0x0000adf8 addiu s0, zero, 1             |         s0 = 1;
                                             | label_0:
    0x0000adfc lw t9, -0x7f50(gp)            |         t9 = sym.safe_fclose;
    0x0000ae00 lw a0, 0x2c(fp)               |         a0 = *(arg_2ch);
    0x0000ae04 bal 0x5084                    |         sym_safe_fclose ();
    0x0000ae08 lw a0, 0x34(fp)               |         a0 = *(arg_34h);
    0x0000ae0c lw v1, (s4)                   |         v1 = *(s4);
    0x0000ae10 lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000ae14 move v0, s0                   |         v0 = s0;
                                             |         if (a0 != v1) {
    0x0000ae18 bne a0, v1, 0xb068            |             goto label_7;
                                             |         }
    0x0000ae1c move sp, fp                   |         
    0x0000ae20 lw ra, 0x5c(sp)               |         ra = *(var_5ch);
    0x0000ae24 lw fp, 0x58(sp)               |         fp = *(var_58h);
    0x0000ae28 lw s7, 0x54(sp)               |         s7 = *(var_54h);
    0x0000ae2c lw s6, 0x50(sp)               |         s6 = *(var_50h);
    0x0000ae30 lw s5, 0x4c(sp)               |         s5 = *(var_4ch);
    0x0000ae34 lw s4, 0x48(sp)               |         s4 = *(var_48h);
    0x0000ae38 lw s3, 0x44(sp)               |         s3 = *(var_44h);
    0x0000ae3c lw s2, 0x40(sp)               |         s2 = *(var_40h);
    0x0000ae40 lw s1, 0x3c(sp)               |         s1 = *(var_3ch);
    0x0000ae44 lw s0, 0x38(sp)               |         s0 = *(var_38h);
    0x0000ae48 addiu sp, sp, 0x60            |         
    0x0000ae4c jr ra                         |         return v0;
    0x0000ae50 lw t9, -0x7f2c(gp)            |         t9 = sym.getpid_cached;
    0x0000ae54 bal 0xac6c                    |         sym_getpid_cached ();
    0x0000ae58 nop                           |         
    0x0000ae5c lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000ae60 beq v0, s0, 0xadcc            |         
                                             |     }
    0x0000ae64 addiu sp, sp, -0x20           |     
    0x0000ae68 lw a3, -0x7fc8(gp)            |     a3 = *(gp);
    0x0000ae6c lw t9, -0x7dfc(gp)            |     t9 = sym.imp.__sprintf_chk
    0x0000ae70 addiu s1, sp, 0x18            |     s1 = sp + 0x18;
                                             |     /* str._proc__i_environ */
    0x0000ae74 addiu a3, a3, 0x126c          |     a3 += 0x126c;
    0x0000ae78 addiu a2, zero, 0x1b          |     a2 = 0x1b;
    0x0000ae7c addiu a1, zero, 1             |     a1 = 1;
    0x0000ae80 move a0, s1                   |     a0 = s1;
    0x0000ae84 sw s0, 0x10(sp)               |     *(var_40h_2) = s0;
    0x0000ae88 jalr t9                       |     t9 ();
    0x0000ae8c lw gp, 0x18(fp)               |     gp = *(arg_18h);
    0x0000ae90 addiu a2, fp, 0x2c            |     a2 = fp + 0x2c;
    0x0000ae94 move a0, s1                   |     a0 = s1;
    0x0000ae98 lw a1, -0x7fc8(gp)            |     a1 = *(gp);
    0x0000ae9c lw t9, -0x7f58(gp)            |     t9 = sym.fopen_unlocked;
                                             |     /* esilref: 're' */
    0x0000aea0 addiu a1, a1, 0x1edc          |     a1 += 0x1edc;
    0x0000aea4 bal 0x5244                    |     sym_fopen_unlocked ();
    0x0000aea8 move s0, v0                   |     s0 = v0;
    0x0000aeac addiu v0, zero, -2            |     v0 = -2;
    0x0000aeb0 lw gp, 0x18(fp)               |     gp = *(arg_18h);
                                             |     if (s0 == v0) {
    0x0000aeb4 beq s0, v0, 0xb060            |         goto label_8;
                                             |     }
    0x0000aeb8 lw t9, -0x7d48(gp)            |     t9 = sym.imp.strlen;
                                             |     if (s0 < 0) {
    0x0000aebc bltz s0, 0xadfc               |         goto label_0;
                                             |     }
    0x0000aec0 move a0, s2                   |     a0 = s2;
    0x0000aec4 jalr t9                       |     t9 ();
    0x0000aec8 move s3, v0                   |     s3 = v0;
    0x0000aecc lui v0, 0x50                  |     v0 = 0x500001;
    0x0000aed0 addiu v0, v0, 1               |     
    0x0000aed4 lw gp, 0x18(fp)               |     gp = *(arg_18h);
    0x0000aed8 sw zero, 0x30(fp)             |     *(arg_30h) = 0;
    0x0000aedc move s1, zero                 |     s1 = 0;
    0x0000aee0 addiu s6, fp, 0x30            |     s6 = fp + 0x30;
    0x0000aee4 sw v0, 0x24(fp)               |     *(arg_24h) = v0;
    0x0000aee8 b 0xaf44                      |     
                                             |     while (v0 >= 0) {
    0x0000aeec lw t9, -0x7dd8(gp)            |         t9 = sym.imp.strncmp;
                                             |         if (v0 == 0) {
    0x0000aef0 beqz v0, 0xb00c               |             goto label_9;
                                             |         }
    0x0000aef4 move a2, s3                   |         a2 = s3;
    0x0000aef8 move a1, s2                   |         a1 = s2;
    0x0000aefc move a0, s7                   |         a0 = s7;
    0x0000af00 jalr t9                       |         t9 ();
    0x0000af04 addu s1, s1, s0               |         s1 += s0;
    0x0000af08 lw gp, 0x18(fp)               |         gp = *(arg_18h);
                                             |         if (v0 == 0) {
    0x0000af0c bnez v0, 0xaf24               |             
    0x0000af10 addu v0, s7, s3               |             v0 = s7 + s3;
    0x0000af14 addiu v1, zero, 0x3d          |             v1 = 0x3d;
    0x0000af18 lb v0, (v0)                   |             v0 = *(v0);
    0x0000af1c lw t9, -0x7cd4(gp)            |             t9 = sym.imp.strdup;
                                             |             if (v0 == v1) {
    0x0000af20 beq v0, v1, 0xb030            |                 goto label_10;
                                             |             }
                                             |         }
    0x0000af24 lw t9, -0x7cd0(gp)            |         t9 = sym.imp.free;
    0x0000af28 move a0, s7                   |         a0 = s7;
    0x0000af2c jalr t9                       |         t9 ();
    0x0000af30 lw v0, 0x24(fp)               |         v0 = *(arg_24h);
    0x0000af34 lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000af38 sltu v0, s1, v0               |         v0 = (s1 < v0) ? 1 : 0;
    0x0000af3c sw zero, 0x30(fp)             |         *(arg_30h) = 0;
                                             |         if (v0 == 0) {
    0x0000af40 beqz v0, 0xb024               |             goto label_11;
                                             |         }
    0x0000af44 lw t9, -0x7f54(gp)            |         t9 = sym.read_line_full;
    0x0000af48 lw a0, 0x2c(fp)               |         a0 = *(arg_2ch);
    0x0000af4c move a3, s6                   |         a3 = s6;
    0x0000af50 addiu a2, zero, 1             |         a2 = 1;
    0x0000af54 lui a1, 0x10                  |         a1 = 0x100000;
    0x0000af58 bal 0x53fc                    |         sym_read_line_full ();
    0x0000af5c move s0, v0                   |         s0 = v0;
    0x0000af60 lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000af64 lw s7, 0x30(fp)               |         s7 = *(arg_30h);
    0x0000af68 bgez v0, 0xaeec               |         
                                             |     }
                                             |     do {
                                             | label_1:
    0x0000af6c lw t9, -0x7cd0(gp)            |         t9 = sym.imp.free;
    0x0000af70 move a0, s7                   |         a0 = s7;
    0x0000af74 jalr t9                       |         t9 ();
    0x0000af78 lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000af7c b 0xadfc                      |         goto label_0;
                                             | label_5:
    0x0000af80 sw zero, (s5)                 |         *(s5) = 0;
    0x0000af84 move s0, zero                 |         s0 = 0;
    0x0000af88 b 0xadfc                      |         goto label_0;
                                             | label_2:
    0x0000af8c lw a2, -0x7fc8(gp)            |         a2 = *(gp);
    0x0000af90 lw a1, -0x7fc8(gp)            |         a1 = *(gp);
                                             |         /* str.getenv_for_pid */
    0x0000af94 addiu v0, v0, 0x1288          |         v0 += 0x1288;
    0x0000af98 lw t9, -0x7f84(gp)            |         t9 = sym.log_assert_failed_realm;
    0x0000af9c sw v0, 0x10(sp)               |         *(var_10h) = v0;
    0x0000afa0 addiu a3, zero, 0x31d         |         a3 = 0x31d;
                                             |         /* esilref: 'src/basic/process-util.c' */
    0x0000afa4 addiu a2, a2, 0x1183          |         a2 += 0x1183;
                                             |         /* str.pid___0 */
    0x0000afa8 addiu a1, a1, 0x11c0          |         a1 += 0x11c0;
    0x0000afac move a0, zero                 |         a0 = 0;
    0x0000afb0 bal 0x78ac                    |         sym_log_assert_failed_realm ();
                                             | label_3:
    0x0000afb4 lw v0, -0x7fc8(gp)            |         v0 = *(gp);
    0x0000afb8 lw a2, -0x7fc8(gp)            |         a2 = *(gp);
    0x0000afbc lw a1, -0x7fc8(gp)            |         a1 = *(gp);
                                             |         /* str.getenv_for_pid */
    0x0000afc0 addiu v0, v0, 0x1288          |         v0 += 0x1288;
    0x0000afc4 lw t9, -0x7f84(gp)            |         t9 = sym.log_assert_failed_realm;
    0x0000afc8 sw v0, 0x10(sp)               |         *(var_10h) = v0;
    0x0000afcc addiu a3, zero, 0x31e         |         a3 = 0x31e;
                                             |         /* esilref: 'src/basic/process-util.c' */
    0x0000afd0 addiu a2, a2, 0x1183          |         a2 += 0x1183;
                                             |         /* str.field */
    0x0000afd4 addiu a1, a1, 0x1280          |         a1 += 0x1280;
    0x0000afd8 move a0, zero                 |         a0 = 0;
    0x0000afdc bal 0x78ac                    |         sym_log_assert_failed_realm ();
                                             | label_4:
    0x0000afe0 lw v0, -0x7fc8(gp)            |         v0 = *(gp);
    0x0000afe4 lw a2, -0x7fc8(gp)            |         a2 = *(gp);
    0x0000afe8 lw a1, -0x7fc8(gp)            |         a1 = *(gp);
                                             |         /* str.getenv_for_pid */
    0x0000afec addiu v0, v0, 0x1288          |         v0 += 0x1288;
    0x0000aff0 lw t9, -0x7f84(gp)            |         t9 = sym.log_assert_failed_realm;
    0x0000aff4 sw v0, 0x10(sp)               |         *(var_10h) = v0;
    0x0000aff8 addiu a3, zero, 0x31f         |         a3 = 0x31f;
                                             |         /* esilref: 'src/basic/process-util.c' */
    0x0000affc addiu a2, a2, 0x1183          |         a2 += 0x1183;
                                             |         /* esilref: 'ret' */
    0x0000b000 addiu a1, a1, 0x584           |         a1 += 0x584;
    0x0000b004 move a0, zero                 |         a0 = 0;
    0x0000b008 bal 0x78ac                    |         sym_log_assert_failed_realm ();
                                             | label_9:
    0x0000b00c lw t9, -0x7cd0(gp)            |         t9 = sym.imp.free;
    0x0000b010 move a0, s7                   |         a0 = s7;
    0x0000b014 jalr t9                       |         t9 ();
    0x0000b018 lw gp, 0x18(fp)               |         gp = *(arg_18h);
    0x0000b01c sw zero, (s5)                 |         *(s5) = 0;
    0x0000b020 b 0xadfc                      |         goto label_0;
                                             | label_11:
    0x0000b024 move s7, zero                 |         s7 = 0;
    0x0000b028 addiu s0, zero, -0x84         |         s0 = -0x84;
    0x0000b02c b 0xaf6c                      |         
                                             |     } while (1);
                                             | label_10:
    0x0000b030 addiu a0, s3, 1               |     a0 = s3 + 1;
    0x0000b034 addu a0, s7, a0               |     a0 = s7 + a0;
    0x0000b038 jalr t9                       |     t9 ();
    0x0000b03c lw gp, 0x18(fp)               |     gp = *(arg_18h);
                                             |     if (v0 != 0) {
    0x0000b040 beqz v0, 0xb050               |         
    0x0000b044 sw v0, (s5)                   |         *(s5) = v0;
    0x0000b048 addiu s0, zero, 1             |         s0 = 1;
    0x0000b04c b 0xaf6c                      |         goto label_1;
                                             |     }
    0x0000b050 addiu s0, zero, -0xc          |     s0 = -0xc;
    0x0000b054 b 0xaf6c                      |     goto label_1;
                                             | label_6:
    0x0000b058 addiu s0, zero, -0xc          |     s0 = -0xc;
    0x0000b05c b 0xadfc                      |     goto label_0;
                                             | label_8:
    0x0000b060 addiu s0, zero, -3            |     s0 = -3;
    0x0000b064 b 0xadfc                      |     goto label_0;
                                             | label_7:
    0x0000b068 lw t9, -0x7cf0(gp)            |     t9 = sym.imp.__stack_chk_fail;
    0x0000b06c jalr t9                       |     t9 ();
    0x0000b070 nop                           |     
                                             | }

[*] Function sprintf used 6 times ata_id