[*] Binary protection state of lldpcli
Full RELRO Canary found NX disabled PIE enabled No RPATH No RUNPATH No Symbols
[*] Function fprintf tear down of lldpcli
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/lldpcli @ 0x3940 */
| #include <stdint.h>
|
; (fcn) fcn.00003940 () | void fcn_00003940 () {
0x00003940 lui gp, 3 |
0x00003944 addiu gp, gp, -0x8b0 |
0x00003948 addu gp, gp, t9 | gp += t9;
0x0000394c addiu sp, sp, -0x28 |
0x00003950 lw v0, -0x7d5c(gp) | v0 = *((gp - 8023));
0x00003954 sw s0, 0x1c(sp) | *(var_1ch) = s0;
0x00003958 lw s0, -0x7d78(gp) | s0 = *((gp - 8030));
0x0000395c lw a2, -0x7fdc(gp) | a2 = *(gp);
0x00003960 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
0x00003964 sw fp, 0x20(sp) | *(var_20h) = fp;
0x00003968 lw a0, (s0) | a0 = *(s0);
0x0000396c move fp, sp | fp = sp;
0x00003970 lw a3, (v0) | a3 = *(v0);
0x00003974 sw ra, 0x24(sp) | *(var_24h) = ra;
0x00003978 sw gp, 0x10(sp) | *(var_10h) = gp;
| /* str.Usage:____s__OPTIONS_...___COMMAND_...__n */
0x0000397c addiu a2, a2, 0x62b8 | a2 += 0x62b8;
0x00003980 addiu a1, zero, 1 | a1 = 1;
0x00003984 jalr t9 | t9 ();
0x00003988 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0000398c lw a0, (s0) | a0 = *(s0);
0x00003990 addiu a1, zero, 1 | a1 = 1;
0x00003994 lw a3, -0x7fdc(gp) | a3 = *(gp);
0x00003998 lw a2, -0x7fdc(gp) | a2 = *(gp);
0x0000399c lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
| /* str.lldpd_1.0.3 */
0x000039a0 addiu a3, a3, 0x62e4 | a3 += 0x62e4;
| /* str.Version:__s_n */
0x000039a4 addiu a2, a2, 0x62f0 | a2 += 0x62f0;
0x000039a8 jalr t9 | t9 ();
0x000039ac lw gp, 0x10(fp) | gp = *(arg_10h);
0x000039b0 lw a1, (s0) | a1 = *(s0);
0x000039b4 lw t9, -0x7e68(gp) | t9 = sym.imp.fputc;
0x000039b8 addiu a0, zero, 0xa | a0 = 0xa;
0x000039bc jalr t9 | t9 ();
0x000039c0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x000039c4 lw a3, (s0) | a3 = *(s0);
0x000039c8 addiu a2, zero, 0x2f | a2 = 0x2f;
0x000039cc lw a0, -0x7fdc(gp) | a0 = *(gp);
0x000039d0 lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x000039d4 addiu a1, zero, 1 | a1 = 1;
| /* str._d__________Enable_more_debugging_information._n */
0x000039d8 addiu a0, a0, 0x6300 | a0 += 0x6300;
0x000039dc jalr t9 | t9 ();
0x000039e0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x000039e4 lw a3, (s0) | a3 = *(s0);
0x000039e8 addiu a2, zero, 0x51 | a2 = 0x51;
0x000039ec lw a0, -0x7fdc(gp) | a0 = *(gp);
0x000039f0 lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x000039f4 addiu a1, zero, 1 | a1 = 1;
| /* str._u_socket___Specify_the_Unix_domain_socket_used_for_communication_with_lldpd_8_._n */
0x000039f8 addiu a0, a0, 0x6330 | a0 += 0x6330;
0x000039fc jalr t9 | t9 ();
0x00003a00 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00003a04 lw a3, (s0) | a3 = *(s0);
0x00003a08 addiu a2, zero, 0x41 | a2 = 0x41;
0x00003a0c lw a0, -0x7fdc(gp) | a0 = *(gp);
0x00003a10 lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00003a14 addiu a1, zero, 1 | a1 = 1;
| /* str._f_format___Choose_output_format__plain__keyvalue__json__json0_._n */
0x00003a18 addiu a0, a0, 0x6384 | a0 += 0x6384;
0x00003a1c jalr t9 | t9 ();
0x00003a20 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00003a24 lw v0, -0x7fd4(gp) | v0 = *((gp - 8181));
0x00003a28 lw v0, -0x4ff0(v0) | v0 = *((v0 - 5116));
0x00003a2c addiu v0, v0, 1 | v0++;
0x00003a30 sltiu v0, v0, 2 | v0 = (v0 < 2) ? 1 : 0;
0x00003a34 lw t9, -0x7e68(gp) | t9 = sym.imp.fputc;
| if (v0 != 0) {
0x00003a38 beqz v0, 0x3a60 |
0x00003a3c lw a0, -0x7fdc(gp) | a0 = *(gp);
0x00003a40 lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00003a44 lw a3, (s0) | a3 = *(s0);
0x00003a48 addiu a2, zero, 0x32 | a2 = 0x32;
0x00003a4c addiu a1, zero, 1 | a1 = 1;
| /* str._c_conf_____Read_the_provided_configuration_file._n */
0x00003a50 addiu a0, a0, 0x63c8 | a0 += 0x63c8;
0x00003a54 jalr t9 | t9 ();
0x00003a58 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00003a5c lw t9, -0x7e68(gp) | t9 = sym.imp.fputc;
| }
0x00003a60 lw a1, (s0) | a1 = *(s0);
0x00003a64 addiu a0, zero, 0xa | a0 = 0xa;
0x00003a68 jalr t9 | t9 ();
0x00003a6c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00003a70 lw a3, (s0) | a3 = *(s0);
0x00003a74 addiu a2, zero, 0x30 | a2 = 0x30;
0x00003a78 lw a0, -0x7fdc(gp) | a0 = *(gp);
0x00003a7c lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
| /* str.see_manual_page_lldpcli_8__for_more_information_n */
0x00003a80 addiu a0, a0, 0x63fc | a0 += 0x63fc;
0x00003a84 addiu a1, zero, 1 | a1 = 1;
0x00003a88 jalr t9 | t9 ();
0x00003a8c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00003a90 lw t9, -0x7df0(gp) | t9 = sym.imp.exit;
0x00003a94 addiu a0, zero, 1 | a0 = 1;
0x00003a98 jalr t9 | t9 ();
0x00003a9c nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/lldpcli @ 0xfd48 */
| #include <stdint.h>
|
; (fcn) fcn.0000fd48 () | void fcn_0000fd48 () {
0x0000fd48 lui gp, 2 |
0x0000fd4c addiu gp, gp, 0x3348 |
0x0000fd50 addu gp, gp, t9 | gp += t9;
0x0000fd54 addiu sp, sp, -0x110 |
0x0000fd58 lw v0, -0x7d88(gp) | v0 = *((gp - 8034));
0x0000fd5c sw fp, 0x108(sp) | *(var_108h) = fp;
0x0000fd60 move fp, sp | fp = sp;
0x0000fd64 sw s6, 0x100(sp) | *(var_100h) = s6;
0x0000fd68 sw s5, 0xfc(sp) | *(var_fch) = s5;
0x0000fd6c sw s3, 0xf4(sp) | *(var_f4h) = s3;
0x0000fd70 sw s0, 0xe8(sp) | *(var_e8h) = s0;
0x0000fd74 sw gp, 0x20(sp) | *(var_20h) = gp;
0x0000fd78 sw ra, 0x10c(sp) | *(var_10ch) = ra;
0x0000fd7c sw s7, 0x104(sp) | *(var_104h) = s7;
0x0000fd80 sw s4, 0xf8(sp) | *(var_f8h) = s4;
0x0000fd84 sw s2, 0xf0(sp) | *(var_f0h) = s2;
0x0000fd88 sw s1, 0xec(sp) | *(var_ech) = s1;
0x0000fd8c lw v1, -0x7fdc(gp) | v1 = *(gp);
0x0000fd90 sw v0, 0x38(fp) | *(arg_38h) = v0;
0x0000fd94 lw v0, (v0) | v0 = *(v0);
0x0000fd98 lw s6, 0x120(fp) | s6 = *(arg_120h);
0x0000fd9c addiu s3, fp, 0x64 | s3 = fp + 0x64;
0x0000fda0 addiu t9, v1, -0x8b0 | t9 = v1 + -aav.0x000008b0;
0x0000fda4 sw v0, 0xe4(fp) | *(arg_e4h) = v0;
0x0000fda8 lw s5, 0x124(fp) | s5 = *(arg_124h);
0x0000fdac addiu v0, fp, 0x6c | v0 = fp + 0x6c;
0x0000fdb0 sw a0, 0x44(fp) | *(arg_44h) = a0;
0x0000fdb4 sw a1, 0x40(fp) | *(arg_40h) = a1;
0x0000fdb8 move a0, s3 | a0 = s3;
0x0000fdbc move a1, a2 | a1 = a2;
0x0000fdc0 sw t9, 0x48(fp) | *(arg_48h) = t9;
0x0000fdc4 sw zero, 0x64(fp) | *(arg_64h) = 0;
0x0000fdc8 sw s3, 0x68(fp) | *(arg_68h) = s3;
0x0000fdcc sw zero, 0x6c(fp) | *(arg_6ch) = 0;
0x0000fdd0 sw v0, 0x70(fp) | *(arg_70h) = v0;
0x0000fdd4 sw a3, 0x74(fp) | *(arg_74h) = a3;
0x0000fdd8 sw zero, 0x78(fp) | *(arg_78h) = 0;
0x0000fddc sw s6, 0x7c(fp) | *(arg_7ch) = s6;
0x0000fde0 move s0, a3 | s0 = a3;
0x0000fde4 bal 0xf750 | fcn_0000f750 ();
0x0000fde8 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (s5 == 0) {
0x0000fdec beqz s5, 0x105d4 | goto label_50;
| }
0x0000fdf0 lw v1, 0x6c(fp) | v1 = *(arg_6ch);
0x0000fdf4 sw zero, (s5) | *(s5) = 0;
0x0000fdf8 move s4, v1 | s4 = v1;
| if (v1 == 0) {
0x0000fdfc beqz v1, 0x107ec | goto label_51;
| }
0x0000fe00 lw s6, 8(v1) | s6 = *((v1 + 2));
0x0000fe04 lw s2, 0x78(fp) | s2 = *(arg_78h);
| if (s6 == 0) {
0x0000fe08 beqz s6, 0x1084c | goto label_52;
| }
0x0000fe0c lw v0, -0x7fdc(gp) | v0 = *(gp);
| label_27:
0x0000fe10 sw v0, 0x30(fp) | *(arg_30h) = v0;
0x0000fe14 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000fe18 move s0, s2 | s0 = s2;
0x0000fe1c sw v0, 0x28(fp) | *(arg_28h) = v0;
0x0000fe20 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x0000fe24 sw zero, 0x50(fp) | *(arg_50h) = 0;
| /* str.help */
0x0000fe28 addiu v0, v0, 0x6528 | v0 += 0x6528;
0x0000fe2c sw v0, 0x34(fp) | *(arg_34h) = v0;
0x0000fe30 lw v0, -0x7f80(gp) | v0 = *((gp - 8160));
0x0000fe34 sw zero, 0x4c(fp) | *(arg_4ch) = 0;
| /* str.process_argument__02d:___s_ */
0x0000fe38 addiu v0, v0, -0x6cb0 | v0 += -0x6cb0;
0x0000fe3c sw v0, 0x2c(fp) | *(arg_2ch) = v0;
0x0000fe40 lw v0, -0x7fdc(gp) | v0 = *(gp);
| /* str._CR_ */
0x0000fe44 addiu v0, v0, 0x64c4 | v0 += 0x64c4;
0x0000fe48 sw v0, 0x3c(fp) | *(arg_3ch) = v0;
| label_4:
0x0000fe4c lw s1, -0x7f68(gp) | s1 = sym.cmdenv_get;
| if (s5 == 0) {
0x0000fe50 beqz s5, 0x1052c | goto label_53;
| }
| label_21:
0x0000fe54 lw v0, 0x74(fp) | v0 = *(arg_74h);
0x0000fe58 slt v1, s0, v0 | v1 = (s0 < v0) ? 1 : 0;
0x0000fe5c lw v1, 0x7c(fp) | v1 = *(arg_7ch);
| if (v1 == 0) {
0x0000fe60 beqz v1, 0x104a0 | goto label_54;
| }
0x0000fe64 sll s1, s0, 2 | s1 = s0 << 2;
0x0000fe68 lwx s1, s1(v1) | __asm ("lwx s1, s1(v1)");
| if (s1 == 0) {
0x0000fe6c beqz s1, 0xffb8 | goto label_16;
| }
0x0000fe70 nop |
0x0000fe74 addiu v0, v0, -1 | v0 += -1;
| if (s5 == 0) {
0x0000fe78 beqz s5, 0x104c4 | goto label_55;
| }
0x0000fe7c move v0, s0 | v0 = s0;
| if (v0 == s0) {
0x0000fe80 beq v0, s0, 0x107fc | goto label_56;
| }
| label_17:
0x0000fe84 lw s7, 0x24(s6) | s7 = *((s6 + 9));
| if (s7 == 0) {
0x0000fe88 beql s7, zero, 0x104f0 | goto label_23;
| }
0x0000fe8c lw s2, 0x78(fp) | s2 = *(arg_78h);
| label_18:
0x0000fe90 lw v0, 0x50(fp) | v0 = *(arg_50h);
0x0000fe94 lw v1, 0x12c(fp) | v1 = *(arg_12ch);
0x0000fe98 move s2, zero | s2 = 0;
0x0000fe9c or v0, v0, v1 | v0 |= v1;
0x0000fea0 addiu s4, zero, 1 | s4 = 1;
0x0000fea4 sw v0, 0x54(fp) | *(arg_54h) = v0;
0x0000fea8 b 0xfec8 | goto label_57;
| label_2:
0x0000feac move a0, s3 | a0 = s3;
0x0000feb0 jalr t9 | t9 ();
0x0000feb4 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (v0 == s4) {
0x0000feb8 beq v0, s4, 0x10450 | goto label_58;
| }
| do {
| label_0:
0x0000febc lw s7, (s7) | s7 = *(s7);
| if (s7 == 0) {
| label_1:
0x0000fec0 beqz s7, 0xff50 | goto label_59;
| }
0x0000fec4 nop |
| label_57:
0x0000fec8 lw s0, 8(s7) | s0 = *((s7 + 2));
| label_3:
0x0000fecc lw t9, -0x7e04(gp) | t9 = sym.imp.strlen;
0x0000fed0 beqz s0, 0xfebc |
| } while (s0 == 0);
0x0000fed4 move a0, s1 | a0 = s1;
0x0000fed8 jalr t9 | t9 ();
0x0000fedc lw gp, 0x20(fp) | gp = *(arg_20h);
0x0000fee0 move a2, v0 | a2 = v0;
0x0000fee4 move a1, s1 | a1 = s1;
0x0000fee8 lw t9, -0x7e94(gp) | t9 = sym.imp.strncmp;
0x0000feec move a0, s0 | a0 = s0;
0x0000fef0 jalr t9 | t9 ();
0x0000fef4 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (v0 != 0) {
0x0000fef8 bnez v0, 0xfebc | goto label_0;
| }
0x0000fefc lw v0, 0x10(s7) | v0 = *((s7 + 4));
| if (v0 == 0) {
0x0000ff00 beql v0, zero, 0xff18 | goto label_60;
| }
0x0000ff04 lw t9, 0x18(s7) | t9 = *((s7 + 6));
0x0000ff08 lw v0, 0x54(fp) | v0 = *(arg_54h);
| if (v0 == 0) {
0x0000ff0c beql v0, zero, 0xfec0 | goto label_1;
| }
0x0000ff10 lw s7, (s7) | s7 = *(s7);
0x0000ff14 lw t9, 0x18(s7) | t9 = *((s7 + 6));
| label_60:
0x0000ff18 lw a1, 0x20(s7) | a1 = *((s7 + 8));
| if (t9 == 0) {
0x0000ff1c bnel t9, zero, 0xfeac | goto label_2;
| }
0x0000ff20 lw t9, -0x7d60(gp) | t9 = sym.imp.strcmp;
| label_12:
0x0000ff24 move a1, s1 | a1 = s1;
0x0000ff28 move a0, s0 | a0 = s0;
0x0000ff2c jalr t9 | t9 ();
0x0000ff30 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (v0 == 0) {
0x0000ff34 beqz v0, 0x10694 | goto label_61;
| }
| if (s2 != 0) {
0x0000ff38 bnez s2, 0x10464 | goto label_62;
| }
0x0000ff3c nop |
0x0000ff40 move s2, s7 | s2 = s7;
| label_13:
0x0000ff44 lw s7, (s7) | s7 = *(s7);
0x0000ff48 lw s0, 8(s7) | s0 = *((s7 + 2));
| if (s7 == 0) {
0x0000ff4c bnel s7, zero, 0xfecc | goto label_3;
| }
| if (s2 == 0) {
| label_59:
0x0000ff50 beql s2, zero, 0x10568 | goto label_63;
| }
0x0000ff54 lw s2, 0x24(s6) | s2 = *((s6 + 9));
| label_33:
0x0000ff58 lw t9, 0x48(fp) | t9 = *(arg_48h);
| label_25:
0x0000ff5c move a1, s2 | a1 = s2;
0x0000ff60 move a0, s3 | a0 = s3;
0x0000ff64 jalr t9 | t9 ();
0x0000ff68 lw t9, 0x1c(s2) | t9 = *((s2 + 7));
0x0000ff6c lw gp, 0x20(fp) | gp = *(arg_20h);
| if (t9 != 0) {
0x0000ff70 beqz t9, 0xff94 |
0x0000ff74 lw a3, 0x20(s2) | a3 = *((s2 + 8));
0x0000ff78 lw a1, 0x40(fp) | a1 = *(arg_40h);
0x0000ff7c lw a0, 0x44(fp) | a0 = *(arg_44h);
0x0000ff80 move a2, s3 | a2 = s3;
0x0000ff84 jalr t9 | t9 ();
0x0000ff88 addiu v1, zero, 1 | v1 = 1;
0x0000ff8c lw gp, 0x20(fp) | gp = *(arg_20h);
| if (v0 != v1) {
0x0000ff90 bne v0, v1, 0x10804 | goto label_64;
| }
| }
0x0000ff94 lw s2, 0x78(fp) | s2 = *(arg_78h);
0x0000ff98 lw s4, 0x6c(fp) | s4 = *(arg_6ch);
0x0000ff9c addiu s0, s2, 1 | s0 = s2 + 1;
0x0000ffa0 move s2, s0 | s2 = s0;
0x0000ffa4 sw s0, 0x78(fp) | *(arg_78h) = s0;
| if (s4 == 0) {
0x0000ffa8 beqz s4, 0xffb8 | goto label_16;
| }
0x0000ffac lw s6, 8(s4) | s6 = *((s4 + 2));
| if (s6 != 0) {
0x0000ffb0 bnez s6, 0xfe4c | goto label_4;
| }
0x0000ffb4 nop |
| label_16:
0x0000ffb8 lw v0, 0x4c(fp) | v0 = *(arg_4ch);
| if (s5 == 0) {
0x0000ffbc beqz s5, 0x10784 | goto label_65;
| }
| label_43:
0x0000ffc0 lw v0, 0x74(fp) | v0 = *(arg_74h);
0x0000ffc4 lw v1, 0x6c(fp) | v1 = *(arg_6ch);
0x0000ffc8 move s0, s2 | s0 = s2;
0x0000ffcc addiu v0, v0, -1 | v0 += -1;
| label_38:
0x0000ffd0 lw v0, 0x50(fp) | v0 = *(arg_50h);
| if (s0 != v0) {
0x0000ffd4 beq s0, v0, 0xffe8 |
0x0000ffd8 lw a0, 0x4c(fp) | a0 = *(arg_4ch);
0x0000ffdc or s0, v0, a0 | s0 = v0 | a0;
| if (s0 == 0) {
0x0000ffe0 beqz s0, 0x10474 | goto label_28;
| }
0x0000ffe4 nop |
| }
| label_46:
0x0000ffe8 addiu v0, fp, 0x5c | v0 = fp + 0x5c;
0x0000ffec sw zero, 0x5c(fp) | *(arg_5ch) = 0;
0x0000fff0 sw v0, 0x60(fp) | *(arg_60h) = v0;
| if (v1 == 0) {
0x0000fff4 beqz v1, 0x108bc | goto label_66;
| }
0x0000fff8 lw v0, 8(v1) | v0 = *((v1 + 2));
0x0000fffc sw v0, 0x40(fp) | *(arg_40h) = v0;
0x00010000 lw s7, 0x24(v0) | s7 = *((v0 + 9));
0x00010004 lw v0, 0x50(fp) | v0 = *(arg_50h);
| if (s7 == 0) {
0x00010008 beqz s7, 0x103a0 | goto label_67;
| }
0x0001000c lw v1, 0x12c(fp) | v1 = *(arg_12ch);
0x00010010 lui s6, 0x3fff | s6 = 0x3fff0000;
0x00010014 or s2, v1, v0 | s2 = v1 | v0;
0x00010018 lw v1, 0x4c(fp) | v1 = *(arg_4ch);
0x0001001c addiu s4, zero, 0xa | s4 = 0xa;
0x00010020 or s1, v1, v0 | s1 = v1 | v0;
0x00010024 ori v0, s6, 0xffff | v0 = s6 | 0xffff;
0x00010028 addiu s0, zero, 1 | s0 = 1;
0x0001002c sw v0, 0x48(fp) | *(arg_48h) = v0;
0x00010030 b 0x10040 |
| while (v0 != 0) {
| label_6:
0x00010034 lw s7, (s7) | s7 = *(s7);
| label_5:
0x00010038 lw v0, 0x5c(fp) | v0 = *(arg_5ch);
| if (s7 == 0) {
0x0001003c beqz s7, 0x10138 | goto label_68;
| }
| label_7:
0x00010040 lw a1, 8(s7) | a1 = *((s7 + 2));
0x00010044 sw a1, 0x54(fp) | *(arg_54h) = a1;
| if (a1 == 0) {
0x00010048 beqz a1, 0x10098 | goto label_69;
| }
0x0001004c lw v0, 0x10(s7) | v0 = *((s7 + 4));
| if (s1 == 0) {
0x00010050 bnel s1, zero, 0x1009c | goto label_70;
| }
0x00010054 lw v1, 0x48(fp) | v1 = *(arg_48h);
0x00010058 lw v0, 0x74(fp) | v0 = *(arg_74h);
0x0001005c lw t9, -0x7e04(gp) | t9 = sym.imp.strlen;
0x00010060 addu v0, v0, v1 | v0 += v1;
0x00010064 lw v1, 0x7c(fp) | v1 = *(arg_7ch);
0x00010068 sll v0, v0, 2 | v0 <<= 2;
0x0001006c lwx s6, v0(v1) | __asm ("lwx s6, v0(v1)");
0x00010070 move a0, s6 | a0 = s6;
0x00010074 jalr t9 | t9 ();
0x00010078 lw gp, 0x20(fp) | gp = *(arg_20h);
0x0001007c lw a1, 0x54(fp) | a1 = *(arg_54h);
0x00010080 move a2, v0 | a2 = v0;
0x00010084 lw t9, -0x7e94(gp) | t9 = sym.imp.strncmp;
0x00010088 move a0, s6 | a0 = s6;
0x0001008c jalr t9 | t9 ();
0x00010090 lw gp, 0x20(fp) | gp = *(arg_20h);
0x00010094 bnez v0, 0x10034 |
| }
| label_69:
0x00010098 lw v0, 0x10(s7) | v0 = *((s7 + 4));
| if (v0 == 0) {
| label_70:
0x0001009c beql v0, zero, 0x100b0 | goto label_71;
| }
0x000100a0 lw t9, 0x18(s7) | t9 = *((s7 + 6));
| if (s2 == 0) {
0x000100a4 beql s2, zero, 0x10038 | goto label_5;
| }
0x000100a8 lw s7, (s7) | s7 = *(s7);
0x000100ac lw t9, 0x18(s7) | t9 = *((s7 + 6));
| if (t9 == 0) {
| label_71:
0x000100b0 beql t9, zero, 0x100d0 | goto label_72;
| }
0x000100b4 lw t9, -0x7de0(gp) | t9 = sym.imp.malloc;
0x000100b8 lw a1, 0x20(s7) | a1 = *((s7 + 8));
0x000100bc move a0, s3 | a0 = s3;
0x000100c0 jalr t9 | t9 ();
0x000100c4 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (v0 != s0) {
0x000100c8 bne v0, s0, 0x10034 | goto label_6;
| }
0x000100cc lw t9, -0x7de0(gp) | t9 = sym.imp.malloc;
| label_72:
0x000100d0 addiu a0, zero, 0x14 | a0 = 0x14;
0x000100d4 jalr t9 | t9 ();
0x000100d8 move s6, v0 | s6 = v0;
0x000100dc lw gp, 0x20(fp) | gp = *(arg_20h);
| if (v0 == 0) {
0x000100e0 beqz v0, 0x10134 | goto label_73;
| }
0x000100e4 lw a0, 8(s7) | a0 = *((s7 + 2));
0x000100e8 lw a1, 0xc(s7) | a1 = *((s7 + 3));
0x000100ec lw v0, 0x14(s7) | v0 = *((s7 + 5));
0x000100f0 sw a0, 8(s6) | *((s6 + 2)) = a0;
0x000100f4 sw a1, 0xc(s6) | *((s6 + 3)) = a1;
0x000100f8 sw v0, 0x10(s6) | *((s6 + 4)) = v0;
| if (a0 != 0) {
0x000100fc beqz a0, 0x10118 |
0x00010100 lw t9, -0x7e04(gp) | t9 = sym.imp.strlen;
0x00010104 jalr t9 | t9 ();
0x00010108 nop |
0x0001010c sltu a0, s4, v0 | a0 = (s4 < v0) ? 1 : 0;
0x00010110 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (a0 != 0) {
0x00010114 movn s4, v0, a0 | s4 = v0;
| goto label_74;
| }
| }
| label_74:
0x00010118 lw v0, 0x60(fp) | v0 = *(arg_60h);
0x0001011c lw s7, (s7) | s7 = *(s7);
0x00010120 sw zero, (s6) | *(s6) = 0;
0x00010124 sw v0, 4(s6) | *((s6 + 1)) = v0;
0x00010128 sw s6, (v0) | *(v0) = s6;
0x0001012c sw s6, 0x60(fp) | *(arg_60h) = s6;
| if (s7 != 0) {
0x00010130 bnez s7, 0x10040 | goto label_7;
| }
| label_73:
0x00010134 lw v0, 0x5c(fp) | v0 = *(arg_5ch);
| label_68:
0x00010138 sw v0, 0x54(fp) | *(arg_54h) = v0;
| if (v0 == 0) {
0x0001013c beqz v0, 0x107bc | goto label_75;
| }
0x00010140 addiu v0, s4, 9 | v0 = s4 + 9;
0x00010144 srl v0, v0, 3 | v0 >>= 3;
0x00010148 sll v0, v0, 3 | v0 <<= 3;
0x0001014c sw sp, 0x44(fp) |
0x00010150 subu sp, sp, v0 |
0x00010154 addiu v0, sp, 0x20 | v0 = sp + 0x20;
0x00010158 lw t9, -0x7e20(gp) | t9 = sym.imp.memset;
0x0001015c sw v0, 0x48(fp) | *(arg_48h) = v0;
0x00010160 addiu a2, s4, 2 | a2 = s4 + 2;
0x00010164 move a1, zero | a1 = 0;
0x00010168 move a0, v0 | a0 = v0;
0x0001016c move s1, v0 | s1 = v0;
0x00010170 jalr t9 | t9 ();
0x00010174 lw gp, 0x20(fp) | gp = *(arg_20h);
0x00010178 move s0, zero | s0 = 0;
0x0001017c lw s2, -0x7fdc(gp) | s2 = *(gp);
| /* str._CR_ */
0x00010180 addiu s2, s2, 0x64c4 | s2 += 0x64c4;
| label_8:
0x00010184 lw s7, 0x54(fp) | s7 = *(arg_54h);
0x00010188 lw v0, 0x10(s7) | v0 = *((s7 + 4));
| do {
| label_29:
0x0001018c lw s7, (s7) | s7 = *(s7);
| if (v0 == 0) {
0x00010190 bnel v0, zero, 0x1064c | goto label_76;
| }
0x00010194 lw s6, 8(s7) | s6 = *((s7 + 2));
0x00010198 lw t9, -0x7d60(gp) | t9 = sym.imp.strcmp;
| if (s6 == 0) {
0x0001019c beqz s6, 0x10654 | goto label_77;
| }
0x000101a0 move a1, s2 | a1 = s2;
0x000101a4 move a0, s6 | a0 = s6;
0x000101a8 jalr t9 | t9 ();
0x000101ac lw gp, 0x20(fp) | gp = *(arg_20h);
| if (v0 == 0) {
0x000101b0 beqz v0, 0x10654 | goto label_77;
| }
0x000101b4 lw t9, -0x7e04(gp) | t9 = sym.imp.strlen;
0x000101b8 move a0, s6 | a0 = s6;
0x000101bc jalr t9 | t9 ();
0x000101c0 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (v0 == s0) {
0x000101c4 beq v0, s0, 0x10654 | goto label_77;
| }
0x000101c8 addu a2, s6, s0 | a2 = s6 + s0;
0x000101cc lb v0, (s1) | v0 = *(s1);
0x000101d0 lb a0, (a2) | a0 = *(a2);
| if (v0 != 0) {
0x000101d4 bnez v0, 0x1067c | goto label_78;
| }
0x000101d8 sb a0, (s1) | *(s1) = a0;
0x000101dc lw s7, (s7) | s7 = *(s7);
| label_31:
0x000101e0 lw v0, 0x10(s7) | v0 = *((s7 + 4));
0x000101e4 bnel s7, zero, 0x1018c |
| } while (s7 == 0);
0x000101e8 addiu s0, s0, 1 | s0++;
0x000101ec addiu s1, s1, 1 | s1++;
| if (s4 != s0) {
0x000101f0 bne s4, s0, 0x10184 | goto label_8;
| }
0x000101f4 lw v0, 0x128(fp) | v0 = *(arg_128h);
0x000101f8 lw v1, 0x4c(fp) | v1 = *(arg_4ch);
0x000101fc or v0, v0, v1 | v0 |= v1;
0x00010200 lw v0, 0x50(fp) | v0 = *(arg_50h);
| if (v0 == 0) {
0x00010204 beqz v0, 0x1069c | goto label_79;
| }
| label_30:
0x00010208 lw s7, 0x5c(fp) | s7 = *(arg_5ch);
| if (v0 == 0) {
0x0001020c bnez v0, 0x10240 |
| label_35:
0x00010210 lw v0, 0x40(fp) | v0 = *(arg_40h);
| label_36:
0x00010214 lw a3, 0xc(v0) | a3 = *((v0 + 3));
0x00010218 lw v0, -0x7d78(gp) | v0 = *((gp - 8030));
0x0001021c lw a0, (v0) | a0 = *(v0);
| if (a3 == 0) {
0x00010220 beqz a3, 0x10828 | goto label_80;
| }
| label_45:
0x00010224 lw a2, -0x7f80(gp) | a2 = *((gp - 8160));
0x00010228 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
| /* str._n___e_1_34m_se_0m_n */
0x0001022c addiu a2, a2, -0x6c38 | a2 += -0x6c38;
0x00010230 addiu a1, zero, 1 | a1 = 1;
0x00010234 jalr t9 | t9 ();
0x00010238 lw gp, 0x20(fp) | gp = *(arg_20h);
0x0001023c lw s7, 0x5c(fp) | s7 = *(arg_5ch);
| }
| label_34:
0x00010240 lw s0, -0x7f80(gp) | s0 = *((gp - 8160));
| if (s7 == 0) {
0x00010244 beqz s7, 0x10398 | goto label_81;
| }
0x00010248 lw s1, -0x7f80(gp) | s1 = *((gp - 8160));
0x0001024c lw s6, -0x7f80(gp) | s6 = *((gp - 8160));
| /* str.e_0m */
0x00010250 addiu v0, s1, -0x6c24 | v0 = s1 + -0x6c24;
0x00010254 lw s2, -0x7fdc(gp) | s2 = *(gp);
0x00010258 lw s5, -0x7f80(gp) | s5 = *((gp - 8160));
| /* esilref: '...' */
0x0001025c addiu s0, s0, -0x6cb4 | s0 += -0x6cb4;
0x00010260 sw v0, 0x54(fp) | *(arg_54h) = v0;
| /* str.e_1_30m */
0x00010264 addiu s6, s6, -0x6c1c | s6 += -0x6c1c;
0x00010268 b 0x102c0 | goto label_10;
| label_9:
0x0001026c lw t9, -0x7d60(gp) | t9 = sym.imp.strcmp;
| if (s1 == 0) {
0x00010270 beqz s1, 0x102b4 | goto label_82;
| }
| /* str._CR_ */
0x00010274 addiu a1, s2, 0x64c4 | a1 = s2 + 0x64c4;
0x00010278 move a0, s1 | a0 = s1;
0x0001027c jalr t9 | t9 ();
0x00010280 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (v0 == 0) {
0x00010284 beqz v0, 0x102b4 | goto label_82;
| }
0x00010288 lw v1, -0x7e4c(gp) | v1 = *((gp - 8083));
0x0001028c lw v0, 0xc(s7) | v0 = *((s7 + 3));
0x00010290 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
0x00010294 lw a0, (v1) | a0 = *(v1);
| if (v0 != 0) {
0x00010298 movz v0, s0, v0 | v0 = s0;
| }
0x0001029c sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x000102a0 move a3, s1 | a3 = s1;
| /* str._s__s_n */
0x000102a4 addiu a2, s5, -0x6c04 | a2 = s5 + -0x6c04;
0x000102a8 addiu a1, zero, 1 | a1 = 1;
0x000102ac jalr t9 | t9 ();
0x000102b0 lw gp, 0x20(fp) | gp = *(arg_20h);
| do {
| label_82:
0x000102b4 lw s7, (s7) | s7 = *(s7);
0x000102b8 lw a0, 0x5c(fp) | a0 = *(arg_5ch);
| if (s7 == 0) {
0x000102bc beqz s7, 0x1034c | goto label_83;
| }
| label_10:
0x000102c0 lw v0, 0x10(s7) | v0 = *((s7 + 4));
0x000102c4 lw v0, 0x50(fp) | v0 = *(arg_50h);
0x000102c8 bnez v0, 0x102b4 |
| } while (v0 != 0);
0x000102cc lw s1, 8(s7) | s1 = *((s7 + 2));
| if (v0 == 0) {
0x000102d0 bnel v0, zero, 0x1026c | goto label_9;
| }
0x000102d4 lw v0, 0x54(fp) | v0 = *(arg_54h);
0x000102d8 lw t9, -0x7d58(gp) | t9 = sym.imp.__snprintf_chk;
0x000102dc sw v0, 0x1c(sp) | *(var_1ch_2) = v0;
0x000102e0 lw v0, -0x7f80(gp) | v0 = *((gp - 8160));
0x000102e4 addiu s1, fp, 0x80 | s1 = fp + 0x80;
| /* str._s___ds_s____s_n */
0x000102e8 addiu v0, v0, -0x6c14 | v0 += -0x6c14;
0x000102ec addiu a3, zero, 0x64 | a3 = 0x64;
0x000102f0 move a0, s1 | a0 = s1;
0x000102f4 sw s4, 0x18(sp) | *(var_18h) = s4;
0x000102f8 sw s6, 0x14(sp) | *(var_14h) = s6;
0x000102fc sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00010300 addiu a2, zero, 1 | a2 = 1;
0x00010304 addiu a1, zero, 0x64 | a1 = 0x64;
0x00010308 jalr t9 | t9 ();
0x0001030c lw gp, 0x20(fp) | gp = *(arg_20h);
0x00010310 lw a3, 8(s7) | a3 = *((s7 + 2));
0x00010314 lw v0, -0x7d78(gp) | v0 = *((gp - 8030));
0x00010318 lw a0, (v0) | a0 = *(v0);
| if (a3 == 0) {
0x0001031c beqz a3, 0x107b0 | goto label_84;
| }
| label_39:
0x00010320 lw v0, 0xc(s7) | v0 = *((s7 + 3));
0x00010324 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
| if (v0 != 0) {
0x00010328 movz v0, s0, v0 | v0 = s0;
| }
0x0001032c sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00010330 move a2, s1 | a2 = s1;
0x00010334 addiu a1, zero, 1 | a1 = 1;
0x00010338 jalr t9 | t9 ();
0x0001033c lw s7, (s7) | s7 = *(s7);
0x00010340 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (s7 != 0) {
0x00010344 bnez s7, 0x102c0 | goto label_10;
| }
| label_37:
0x00010348 lw a0, 0x5c(fp) | a0 = *(arg_5ch);
| label_83:
0x0001034c lw v1, 0x6c(fp) | v1 = *(arg_6ch);
| if (a0 == 0) {
0x00010350 beqz a0, 0x1039c | goto label_85;
| }
0x00010354 lw s0, (a0) | s0 = *(a0);
0x00010358 lw v0, 4(a0) | v0 = *((a0 + 1));
| if (s0 == 0) {
0x0001035c beqz s0, 0x10388 | goto label_86;
| }
| do {
0x00010360 sw v0, 4(s0) | *((s0 + 1)) = v0;
0x00010364 lw v0, 4(a0) | v0 = *((a0 + 1));
0x00010368 lw t9, -0x7d7c(gp) | t9 = sym.imp.free;
0x0001036c sw s0, (v0) | *(v0) = s0;
0x00010370 jalr t9 | t9 ();
0x00010374 move a0, s0 | a0 = s0;
0x00010378 lw gp, 0x20(fp) | gp = *(arg_20h);
0x0001037c lw s0, (a0) | s0 = *(a0);
0x00010380 lw v0, 4(a0) | v0 = *((a0 + 1));
0x00010384 bnez s0, 0x10360 |
| } while (s0 != 0);
| label_86:
0x00010388 lw t9, -0x7d7c(gp) | t9 = sym.imp.free;
0x0001038c sw zero, (v0) | *(v0) = 0;
0x00010390 jalr t9 | t9 ();
0x00010394 lw gp, 0x20(fp) | gp = *(arg_20h);
| label_81:
0x00010398 lw v1, 0x6c(fp) | v1 = *(arg_6ch);
| label_85:
0x0001039c lw sp, 0x44(fp) |
| label_67:
0x000103a0 move s0, zero | s0 = 0;
| label_40:
0x000103a4 lw s1, -0x7f0c(gp) | s1 = sym.cmdenv_pop;
| if (v1 != 0) {
0x000103a8 bnez v1, 0x1047c | goto label_87;
| }
| label_14:
0x000103ac lw a0, 0x64(fp) | a0 = *(arg_64h);
| label_15:
0x000103b0 lw v1, (a0) | v1 = *(a0);
| if (a0 == 0) {
0x000103b4 bnel a0, zero, 0x103e4 | goto label_88;
| }
0x000103b8 lw v0, 0x38(fp) | v0 = *(arg_38h);
0x000103bc b 0x1040c | goto label_89;
| do {
0x000103c0 sw v0, 4(v1) | *((v1 + 1)) = v0;
0x000103c4 lw v0, 4(a0) | v0 = *((a0 + 1));
0x000103c8 lw t9, -0x7d7c(gp) | t9 = sym.imp.free;
0x000103cc sw v1, (v0) | *(v0) = v1;
0x000103d0 jalr t9 | t9 ();
0x000103d4 lw a0, 0x64(fp) | a0 = *(arg_64h);
0x000103d8 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (a0 == 0) {
0x000103dc beqz a0, 0x10408 | goto label_90;
| }
| label_11:
0x000103e0 lw v1, (a0) | v1 = *(a0);
| label_88:
0x000103e4 lw v0, 4(a0) | v0 = *((a0 + 1));
0x000103e8 bnez v1, 0x103c0 |
| } while (v1 != 0);
0x000103ec lw t9, -0x7d7c(gp) | t9 = sym.imp.free;
0x000103f0 sw v0, 0x68(fp) | *(arg_68h) = v0;
0x000103f4 sw v1, (v0) | *(v0) = v1;
0x000103f8 jalr t9 | t9 ();
0x000103fc lw a0, 0x64(fp) | a0 = *(arg_64h);
0x00010400 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (a0 != 0) {
0x00010404 bnez a0, 0x103e0 | goto label_11;
| }
| label_90:
0x00010408 lw v0, 0x38(fp) | v0 = *(arg_38h);
| label_89:
0x0001040c lw a0, 0xe4(fp) | a0 = *(arg_e4h);
0x00010410 lw v1, (v0) | v1 = *(v0);
0x00010414 move v0, s0 | v0 = s0;
| if (a0 != v1) {
0x00010418 bne a0, v1, 0x108b0 | goto label_91;
| }
0x0001041c move sp, fp |
0x00010420 lw ra, 0x10c(sp) | ra = *(var_10ch);
0x00010424 lw fp, 0x108(sp) | fp = *(var_108h);
0x00010428 lw s7, 0x104(sp) | s7 = *(var_104h);
0x0001042c lw s6, 0x100(sp) | s6 = *(var_100h);
0x00010430 lw s5, 0xfc(sp) | s5 = *(var_fch);
0x00010434 lw s4, 0xf8(sp) | s4 = *(var_f8h);
0x00010438 lw s3, 0xf4(sp) | s3 = *(var_f4h);
0x0001043c lw s2, 0xf0(sp) | s2 = *(var_f0h);
0x00010440 lw s1, 0xec(sp) | s1 = *(var_ech);
0x00010444 lw s0, 0xe8(sp) | s0 = *(var_e8h);
0x00010448 addiu sp, sp, 0x110 |
0x0001044c jr ra | return v0;
| label_58:
0x00010450 lw s0, 8(s7) | s0 = *((s7 + 2));
0x00010454 lw t9, -0x7d60(gp) | t9 = sym.imp.strcmp;
| if (s0 != 0) {
0x00010458 bnez s0, 0xff24 | goto label_12;
| }
| if (s2 == 0) {
0x0001045c beql s2, zero, 0xff44 | goto label_13;
| }
0x00010460 move s2, s7 | s2 = s7;
| label_62:
0x00010464 lw a1, -0x7f80(gp) | a1 = *((gp - 8160));
| if (s5 == 0) {
0x00010468 beqz s5, 0x10758 | goto label_92;
| }
| label_20:
0x0001046c lw v1, 0x6c(fp) | v1 = *(arg_6ch);
| label_19:
0x00010470 addiu s0, zero, -1 | s0 = -1;
| label_28:
0x00010474 lw s1, -0x7f0c(gp) | s1 = sym.cmdenv_pop;
| if (v1 == 0) {
0x00010478 beqz v1, 0x103ac | goto label_14;
| }
| do {
| label_87:
0x0001047c addiu a1, zero, 1 | a1 = 1;
0x00010480 move t9, s1 | t9 = s1;
0x00010484 move a0, s3 | a0 = s3;
0x00010488 bal 0xfc40 | sym_cmdenv_pop ();
0x0001048c lw v0, 0x6c(fp) | v0 = *(arg_6ch);
0x00010490 lw gp, 0x20(fp) | gp = *(arg_20h);
0x00010494 bnez v0, 0x1047c |
| } while (v0 != 0);
0x00010498 lw a0, 0x64(fp) | a0 = *(arg_64h);
0x0001049c b 0x103b0 | goto label_15;
| label_54:
0x000104a0 lw v1, 0x4c(fp) | v1 = *(arg_4ch);
| if (v0 != s0) {
0x000104a4 bne v0, s0, 0xffb8 | goto label_16;
| }
0x000104a8 addiu v0, s0, -1 | v0 = s0 + -1;
| if (v1 == 0) {
0x000104ac bnel v1, zero, 0x10820 | goto label_93;
| }
0x000104b0 lw v1, 0x50(fp) | v1 = *(arg_50h);
| if (v1 != 0) {
0x000104b4 bnez v1, 0x1083c | goto label_94;
| }
0x000104b8 nop |
0x000104bc lw s1, 0x3c(fp) | s1 = *(arg_3ch);
| if (s5 != 0) {
0x000104c0 bnez s5, 0xfe84 | goto label_17;
| }
| label_55:
0x000104c4 lw v0, 0x28(fp) | v0 = *(arg_28h);
0x000104c8 lw t9, -0x7fd0(gp) | t9 = sym.log_debug;
0x000104cc lw a1, 0x2c(fp) | a1 = *(arg_2ch);
0x000104d0 move a3, s1 | a3 = s1;
0x000104d4 move a2, s0 | a2 = s0;
0x000104d8 addiu a0, v0, 0x603c | a0 = v0 + 0x603c;
0x000104dc bal 0x150f4 | sym_log_debug ();
0x000104e0 lw s7, 0x24(s6) | s7 = *((s6 + 9));
0x000104e4 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (s7 != 0) {
0x000104e8 bnez s7, 0xfe90 | goto label_18;
| }
| label_22:
0x000104ec lw s2, 0x78(fp) | s2 = *(arg_78h);
| label_23:
0x000104f0 lw v0, 0x74(fp) | v0 = *(arg_74h);
| if (s2 == v0) {
0x000104f4 beq s2, v0, 0xffb8 | goto label_16;
| }
0x000104f8 nop |
0x000104fc lw v1, 0x6c(fp) | v1 = *(arg_6ch);
| if (s5 != 0) {
0x00010500 bnez s5, 0x10470 | goto label_19;
| }
0x00010504 lw a1, -0x7f80(gp) | a1 = *((gp - 8160));
0x00010508 lw a0, -0x7fdc(gp) | a0 = *(gp);
0x0001050c lw t9, -0x7fcc(gp) | t9 = sym.log_warnx;
0x00010510 move a3, s1 | a3 = s1;
0x00010514 addiu a2, s2, 1 | a2 = s2 + 1;
| /* str.unknown_command_from_argument__d:___s_ */
0x00010518 addiu a1, a1, -0x6c74 | a1 += -aav.0x00006c74;
| /* str.lldpctl */
0x0001051c addiu a0, a0, 0x603c | a0 += 0x603c;
0x00010520 bal 0x14fa4 | sym_log_warnx ();
0x00010524 lw gp, 0x20(fp) | gp = *(arg_20h);
0x00010528 b 0x1046c | goto label_20;
| label_53:
0x0001052c lw a1, 0x34(fp) | a1 = *(arg_34h);
0x00010530 move t9, s1 | t9 = s1;
0x00010534 move a0, s3 | a0 = s3;
0x00010538 bal 0xfa98 | sym_cmdenv_get ();
0x0001053c lw v1, 0x30(fp) | v1 = *(arg_30h);
0x00010540 sltu v0, zero, v0 | v0 = (0 < v0) ? 1 : 0;
0x00010544 addiu a1, v1, 0x64fc | a1 = v1 + 0x64fc;
0x00010548 move a0, s3 | a0 = s3;
0x0001054c move t9, s1 | t9 = s1;
0x00010550 sw v0, 0x4c(fp) | *(arg_4ch) = v0;
0x00010554 bal 0xfa98 | sym_cmdenv_get ();
0x00010558 sltu v0, zero, v0 | v0 = (0 < v0) ? 1 : 0;
0x0001055c lw gp, 0x20(fp) | gp = *(arg_20h);
0x00010560 sw v0, 0x50(fp) | *(arg_50h) = v0;
0x00010564 b 0xfe54 | goto label_21;
| label_63:
0x00010568 lw v0, 0x50(fp) | v0 = *(arg_50h);
| if (s2 == 0) {
0x0001056c beqz s2, 0x104ec | goto label_22;
| }
0x00010570 lw v1, 0x12c(fp) | v1 = *(arg_12ch);
0x00010574 addiu s0, zero, 1 | s0 = 1;
0x00010578 or s4, v0, v1 | s4 = v0 | v1;
0x0001057c b 0x1058c | goto label_95;
| label_26:
0x00010580 lw s2, (s2) | s2 = *(s2);
| if (s2 == 0) {
| label_24:
0x00010584 beql s2, zero, 0x104f0 | goto label_23;
| }
0x00010588 lw s2, 0x78(fp) | s2 = *(arg_78h);
| label_95:
0x0001058c lw v0, 8(s2) | v0 = *((s2 + 2));
0x00010590 lw s2, (s2) | s2 = *(s2);
| if (v0 == 0) {
0x00010594 bnel v0, zero, 0x10584 | goto label_24;
| }
0x00010598 lw v0, 0x10(s2) | v0 = *((s2 + 4));
| if (v0 == 0) {
0x0001059c beql v0, zero, 0x105b0 | goto label_96;
| }
0x000105a0 lw t9, 0x18(s2) | t9 = *((s2 + 6));
| if (s4 == 0) {
0x000105a4 beql s4, zero, 0x10584 | goto label_24;
| }
0x000105a8 lw s2, (s2) | s2 = *(s2);
0x000105ac lw t9, 0x18(s2) | t9 = *((s2 + 6));
| if (t9 == 0) {
| label_96:
0x000105b0 beql t9, zero, 0xff5c | goto label_25;
| }
0x000105b4 lw t9, 0x48(fp) | t9 = *(arg_48h);
0x000105b8 lw a1, 0x20(s2) | a1 = *((s2 + 8));
0x000105bc move a0, s3 | a0 = s3;
0x000105c0 jalr t9 | t9 ();
0x000105c4 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (v0 != s0) {
0x000105c8 bne v0, s0, 0x10580 | goto label_26;
| }
0x000105cc lw t9, 0x48(fp) | t9 = *(arg_48h);
0x000105d0 b 0xff5c | goto label_25;
| label_50:
0x000105d4 move s4, zero | s4 = 0;
| if (s0 <= 0) {
0x000105d8 blez s0, 0x10614 | goto label_97;
| }
0x000105dc lw s2, -0x7f80(gp) | s2 = *((gp - 8160));
0x000105e0 lw s1, -0x7fdc(gp) | s1 = *(gp);
| /* esilref: 'argument &d: `&s`' */
0x000105e4 addiu s2, s2, -0x6ca8 | s2 += -0x6ca8;
| /* str.lldpctl */
0x000105e8 addiu s1, s1, 0x603c | s1 += 0x603c;
| do {
0x000105ec lw t9, -0x7fd0(gp) | t9 = sym.log_debug;
0x000105f0 lw a3, (s6) | a3 = *(s6);
0x000105f4 move a2, s4 | a2 = s4;
0x000105f8 move a1, s2 | a1 = s2;
0x000105fc move a0, s1 | a0 = s1;
0x00010600 addiu s4, s4, 1 | s4++;
0x00010604 bal 0x150f4 | sym_log_debug ();
0x00010608 addiu s6, s6, 4 | s6 += 4;
0x0001060c lw gp, 0x20(fp) | gp = *(arg_20h);
0x00010610 bne s0, s4, 0x105ec |
| } while (s0 != s4);
| label_97:
0x00010614 lw s4, 0x6c(fp) | s4 = *(arg_6ch);
0x00010618 lw s2, 0x78(fp) | s2 = *(arg_78h);
| if (s4 == 0) {
0x0001061c beqz s4, 0x10630 | goto label_98;
| }
0x00010620 lw s6, 8(s4) | s6 = *((s4 + 2));
0x00010624 lw v0, -0x7fdc(gp) | v0 = *(gp);
| if (s6 != 0) {
0x00010628 bnez s6, 0xfe10 | goto label_27;
| }
0x0001062c lw s2, 0x78(fp) | s2 = *(arg_78h);
| label_98:
0x00010630 lw v0, 0x74(fp) | v0 = *(arg_74h);
| label_41:
0x00010634 addiu v0, v0, 1 | v0++;
0x00010638 lw a1, -0x7f80(gp) | a1 = *((gp - 8160));
| if (s2 != v0) {
0x0001063c bne s2, v0, 0x1088c | goto label_99;
| }
0x00010640 lw v1, 0x6c(fp) | v1 = *(arg_6ch);
0x00010644 move s0, zero | s0 = 0;
0x00010648 b 0x10474 | goto label_28;
| label_76:
0x0001064c lw v0, 0x10(s7) | v0 = *((s7 + 4));
| if (s7 == 0) {
0x00010650 bnel s7, zero, 0x1018c | goto label_29;
| }
| label_77:
0x00010654 lw v0, 0x48(fp) | v0 = *(arg_48h);
0x00010658 addu s0, v0, s0 | s0 = v0 + s0;
0x0001065c sb zero, (s0) | *(s0) = 0;
| label_32:
0x00010660 lw v0, 0x128(fp) | v0 = *(arg_128h);
0x00010664 lw v1, 0x4c(fp) | v1 = *(arg_4ch);
0x00010668 or v0, v0, v1 | v0 |= v1;
0x0001066c lw v0, 0x50(fp) | v0 = *(arg_50h);
| if (v0 != 0) {
0x00010670 bnez v0, 0x10208 | goto label_30;
| }
0x00010674 b 0x1069c | goto label_79;
0x00010678 nop |
| if (v0 == a0) {
| label_78:
0x0001067c beql v0, a0, 0x101e0 | goto label_31;
| }
0x00010680 lw s7, (s7) | s7 = *(s7);
0x00010684 lw v0, 0x48(fp) | v0 = *(arg_48h);
0x00010688 addu s0, v0, s0 | s0 = v0 + s0;
0x0001068c sb zero, (s0) | *(s0) = 0;
0x00010690 b 0x10660 | goto label_32;
| label_61:
0x00010694 move s2, s7 | s2 = s7;
0x00010698 b 0xff58 | goto label_33;
| label_79:
0x0001069c lw s7, 0x5c(fp) | s7 = *(arg_5ch);
| if (v0 != 0) {
0x000106a0 bnez v0, 0x10240 | goto label_34;
| }
0x000106a4 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x000106a8 lw s0, 0x48(fp) | s0 = *(arg_48h);
0x000106ac lw t9, -0x7d60(gp) | t9 = sym.imp.strcmp;
| /* str._CR_ */
0x000106b0 addiu a1, a1, 0x64c4 | a1 += 0x64c4;
0x000106b4 move a0, s0 | a0 = s0;
0x000106b8 jalr t9 | t9 ();
0x000106bc lw gp, 0x20(fp) | gp = *(arg_20h);
| if (v0 == 0) {
0x000106c0 beqz v0, 0x10210 | goto label_35;
| }
0x000106c4 lb v0, (s0) | v0 = *(s0);
0x000106c8 lw v0, 0x40(fp) | v0 = *(arg_40h);
| if (v0 == 0) {
0x000106cc beqz v0, 0x10214 | goto label_36;
| }
0x000106d0 lw v0, 0x74(fp) | v0 = *(arg_74h);
0x000106d4 lw a0, 0x7c(fp) | a0 = *(arg_7ch);
0x000106d8 sll v0, v0, 2 | v0 <<= 2;
0x000106dc addiu v0, v0, -4 | v0 += -4;
0x000106e0 lw t9, -0x7e04(gp) | t9 = sym.imp.strlen;
0x000106e4 lwx a0, v0(a0) | __asm ("lwx a0, v0(a0)");
0x000106e8 jalr t9 | t9 ();
0x000106ec lw gp, 0x20(fp) | gp = *(arg_20h);
0x000106f0 move a0, s0 | a0 = s0;
0x000106f4 lw t9, -0x7e04(gp) | t9 = sym.imp.strlen;
0x000106f8 move s1, v0 | s1 = v0;
0x000106fc jalr t9 | t9 ();
0x00010700 sltu s1, s1, v0 | s1 = (s1 < v0) ? 1 : 0;
0x00010704 lw gp, 0x20(fp) | gp = *(arg_20h);
0x00010708 move s0, v0 | s0 = v0;
| if (s1 == 0) {
0x0001070c beqz s1, 0x10210 | goto label_35;
| }
| do {
0x00010710 lw v0, 0x54(fp) | v0 = *(arg_54h);
0x00010714 lw a1, 8(v0) | a1 = *((v0 + 2));
0x00010718 lw t9, -0x7d60(gp) | t9 = sym.imp.strcmp;
| if (a1 != 0) {
0x0001071c beqz a1, 0x10734 |
0x00010720 lw a0, 0x48(fp) | a0 = *(arg_48h);
0x00010724 jalr t9 | t9 ();
0x00010728 lw gp, 0x20(fp) | gp = *(arg_20h);
| if (v0 == 0) {
0x0001072c beqz v0, 0x10878 | goto label_100;
| }
0x00010730 lw v0, 0x54(fp) | v0 = *(arg_54h);
| }
0x00010734 lw v0, (v0) | v0 = *(v0);
0x00010738 sw v0, 0x54(fp) | *(arg_54h) = v0;
0x0001073c bnez v0, 0x10710 |
| } while (v0 != 0);
| label_49:
0x00010740 lw t9, -0x7d80(gp) | t9 = sym.imp.strdup;
0x00010744 lw a0, 0x48(fp) | a0 = *(arg_48h);
0x00010748 jalr t9 | t9 ();
0x0001074c lw gp, 0x20(fp) | gp = *(arg_20h);
0x00010750 sw v0, (s5) | *(s5) = v0;
0x00010754 b 0x10348 | goto label_37;
| label_92:
0x00010758 lw a0, -0x7fdc(gp) | a0 = *(gp);
0x0001075c lw v0, 8(s2) | v0 = *((s2 + 2));
0x00010760 lw t9, -0x7fcc(gp) | t9 = sym.log_warnx;
0x00010764 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00010768 move a3, s0 | a3 = s0;
0x0001076c move a2, s1 | a2 = s1;
| /* str.ambiguous_token:__s___s_or__s_ */
0x00010770 addiu a1, a1, -0x6c94 | a1 += -0x6c94;
| /* str.lldpctl */
0x00010774 addiu a0, a0, 0x603c | a0 += 0x603c;
0x00010778 bal 0x14fa4 | sym_log_warnx ();
0x0001077c lw gp, 0x20(fp) | gp = *(arg_20h);
0x00010780 b 0x1046c | goto label_20;
| label_65:
0x00010784 move v0, zero | v0 = 0;
| if (v0 != 0) {
0x00010788 beqz v0, 0x107c8 |
0x0001078c addiu a0, zero, 1 | a0 = 1;
0x00010790 lw v1, 0x6c(fp) | v1 = *(arg_6ch);
| label_44:
0x00010794 sw a0, 0x4c(fp) | *(arg_4ch) = a0;
| label_42:
0x00010798 lw v0, 0x74(fp) | v0 = *(arg_74h);
| if (v0 != 0) {
0x0001079c bnez v0, 0x10834 | goto label_101;
| }
0x000107a0 lw s2, 0x78(fp) | s2 = *(arg_78h);
0x000107a4 move s0, s2 | s0 = s2;
| label_47:
0x000107a8 addiu v0, v0, -1 | v0 += -1;
0x000107ac b 0xffd0 | goto label_38;
| label_84:
0x000107b0 lw a3, -0x7f80(gp) | a3 = *((gp - 8160));
| /* str.WORD */
0x000107b4 addiu a3, a3, -0x6cbc | a3 += -0x6cbc;
0x000107b8 b 0x10320 | goto label_39;
| label_75:
0x000107bc lw v1, 0x6c(fp) | v1 = *(arg_6ch);
0x000107c0 move s0, zero | s0 = 0;
0x000107c4 b 0x103a4 | goto label_40;
| }
0x000107c8 lw v0, 0x50(fp) | v0 = *(arg_50h);
| if (v0 == 0) {
0x000107cc beql v0, zero, 0x10634 | goto label_41;
| }
0x000107d0 lw v0, 0x74(fp) | v0 = *(arg_74h);
| label_48:
0x000107d4 addiu a0, zero, 1 | a0 = 1;
0x000107d8 lw v0, 0x4c(fp) | v0 = *(arg_4ch);
0x000107dc lw v1, 0x6c(fp) | v1 = *(arg_6ch);
0x000107e0 sw a0, 0x50(fp) | *(arg_50h) = a0;
0x000107e4 sw zero, 0x4c(fp) | *(arg_4ch) = 0;
0x000107e8 b 0x10798 | goto label_42;
| label_51:
0x000107ec lw s2, 0x78(fp) | s2 = *(arg_78h);
0x000107f0 sw zero, 0x4c(fp) | *(arg_4ch) = 0;
0x000107f4 sw zero, 0x50(fp) | *(arg_50h) = 0;
0x000107f8 b 0xffc0 | goto label_43;
| label_56:
0x000107fc move v1, s4 | v1 = s4;
0x00010800 b 0xffd0 | goto label_38;
| label_64:
0x00010804 lw v1, 0x6c(fp) | v1 = *(arg_6ch);
| if (s5 != 0) {
0x00010808 bnez s5, 0x10470 | goto label_19;
| }
0x0001080c lw v0, 0x4c(fp) | v0 = *(arg_4ch);
0x00010810 addiu v0, zero, -1 | v0 = -1;
| if (v0 == 0) {
0x00010814 beqz v0, 0x10864 | goto label_102;
| }
0x00010818 addiu a0, zero, 1 | a0 = 1;
0x0001081c b 0x10794 | goto label_44;
| label_93:
0x00010820 move v1, s4 | v1 = s4;
0x00010824 b 0xffd0 | goto label_38;
| label_80:
0x00010828 lw a3, -0x7f80(gp) | a3 = *((gp - 8160));
| /* str.Help */
0x0001082c addiu a3, a3, -0x6cc4 | a3 += -0x6cc4;
0x00010830 b 0x10224 | goto label_45;
| label_101:
0x00010834 addiu s0, zero, -1 | s0 = -1;
0x00010838 b 0x10474 | goto label_28;
| label_94:
0x0001083c move v1, s4 | v1 = s4;
| if (s5 != 0) {
0x00010840 bnez s5, 0xffe8 | goto label_46;
| }
0x00010844 move s0, s2 | s0 = s2;
0x00010848 b 0x107a8 | goto label_47;
| label_52:
0x0001084c lw v0, 0x74(fp) | v0 = *(arg_74h);
0x00010850 sw zero, 0x50(fp) | *(arg_50h) = 0;
0x00010854 sw zero, 0x4c(fp) | *(arg_4ch) = 0;
0x00010858 move s0, s2 | s0 = s2;
0x0001085c addiu v0, v0, -1 | v0 += -1;
0x00010860 b 0xffd0 | goto label_38;
| label_102:
0x00010864 lw v0, 0x50(fp) | v0 = *(arg_50h);
0x00010868 addiu v0, zero, -1 | v0 = -1;
| if (v0 == 0) {
0x0001086c beqz v0, 0x1046c | goto label_20;
| }
0x00010870 sw v0, 0x4c(fp) | *(arg_4ch) = v0;
0x00010874 b 0x107d4 | goto label_48;
| label_100:
0x00010878 lw v0, 0x48(fp) | v0 = *(arg_48h);
0x0001087c addu s0, v0, s0 | s0 = v0 + s0;
0x00010880 addiu v0, zero, 0x20 | v0 = 0x20;
0x00010884 sb v0, (s0) | *(s0) = v0;
0x00010888 b 0x10740 | goto label_49;
| label_99:
0x0001088c lw a0, -0x7fdc(gp) | a0 = *(gp);
0x00010890 lw t9, -0x7fcc(gp) | t9 = sym.log_warnx;
| /* str.incomplete_command */
0x00010894 addiu a1, a1, -0x6c4c | a1 += -0x6c4c;
| /* str.lldpctl */
0x00010898 addiu a0, a0, 0x603c | a0 += 0x603c;
0x0001089c bal 0x14fa4 | sym_log_warnx ();
0x000108a0 addiu s0, zero, -1 | s0 = -1;
0x000108a4 lw gp, 0x20(fp) | gp = *(arg_20h);
0x000108a8 lw v1, 0x6c(fp) | v1 = *(arg_6ch);
0x000108ac b 0x10474 | goto label_28;
| label_91:
0x000108b0 lw t9, -0x7db0(gp) | t9 = sym.imp.__stack_chk_fail;
0x000108b4 jalr t9 | t9 ();
0x000108b8 nop |
| label_66:
0x000108bc lw v0, 0x24(zero) | v0 = *((zero + 9));
0x000108c0 teq zero, zero | __asm ("teq zero, zero");
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/lldpcli @ 0x13bac */
| #include <stdint.h>
|
; (fcn) fcn.00013bac () | void fcn_00013bac () {
0x00013bac lui gp, 2 |
0x00013bb0 addiu gp, gp, -0xb1c |
0x00013bb4 addu gp, gp, t9 | gp += t9;
0x00013bb8 addiu sp, sp, -0x58 |
0x00013bbc lw v0, (a1) | v0 = *(a1);
0x00013bc0 addiu v1, zero, 1 | v1 = 1;
0x00013bc4 sw fp, 0x50(sp) | *(var_50h) = fp;
0x00013bc8 move fp, sp | fp = sp;
0x00013bcc sw s0, 0x30(sp) | *(var_30h) = s0;
0x00013bd0 sw ra, 0x54(sp) | *(var_54h) = ra;
0x00013bd4 sw s7, 0x4c(sp) | *(var_4ch) = s7;
0x00013bd8 sw s6, 0x48(sp) | *(var_48h) = s6;
0x00013bdc sw s5, 0x44(sp) | *(var_44h) = s5;
0x00013be0 sw s4, 0x40(sp) | *(var_40h) = s4;
0x00013be4 sw s3, 0x3c(sp) | *(var_3ch) = s3;
0x00013be8 sw s2, 0x38(sp) | *(var_38h) = s2;
0x00013bec sw s1, 0x34(sp) | *(var_34h) = s1;
0x00013bf0 sw gp, 0x18(sp) | *(var_18h) = gp;
0x00013bf4 move s0, a0 | s0 = a0;
| if (v0 == v1) {
0x00013bf8 beq v0, v1, 0x13f7c | goto label_3;
| }
0x00013bfc move s2, a3 | s2 = a3;
0x00013c00 move s5, a2 | s5 = a2;
0x00013c04 move s1, a1 | s1 = a1;
| if (v0 == 0) {
0x00013c08 beqz v0, 0x13d54 | goto label_4;
| }
0x00013c0c sltiu v1, v0, 4 | v1 = (v0 < 4) ? 1 : 0;
0x00013c10 lw s6, -0x7f80(gp) | s6 = *((gp - 8160));
| if (v1 == 0) {
0x00013c14 beqz v1, 0x13d20 | goto label_5;
| }
0x00013c18 xori v0, v0, 2 | v0 ^= 2;
0x00013c1c sltiu v0, v0, 1 | v0 = (v0 < 1) ? 1 : 0;
| /* str.__ */
0x00013c20 addiu v1, s6, -0x66a0 | v1 = s6 + -0x66a0;
0x00013c24 sll v0, v0, 1 | v0 <<= 1;
0x00013c28 lw s4, -0x7f80(gp) | s4 = *((gp - 8160));
0x00013c2c addu v0, v1, v0 | v0 = v1 + v0;
0x00013c30 lw a2, -0x7f80(gp) | a2 = *((gp - 8160));
0x00013c34 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
0x00013c38 addiu s3, a3, 2 | s3 = a3 + 2;
0x00013c3c addiu s4, s4, -0x6494 | s4 += -0x6494;
0x00013c40 lb a3, (v0) | a3 = *(v0);
0x00013c44 sw v1, 0x28(fp) | *(arg_28h) = v1;
0x00013c48 sw s4, 0x14(sp) | *(var_14h) = s4;
0x00013c4c sw s3, 0x10(sp) | *(var_10h) = s3;
| /* str._c_n_s */
0x00013c50 addiu a2, a2, -0x66c8 | a2 += -0x66c8;
0x00013c54 addiu a1, zero, 1 | a1 = 1;
0x00013c58 jalr t9 | t9 ();
0x00013c5c lw s6, (s5) | s6 = *(s5);
0x00013c60 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (s6 == 0) {
0x00013c64 beqz s6, 0x13ce4 | goto label_6;
| }
0x00013c68 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00013c6c lw s5, -0x7f80(gp) | s5 = *((gp - 8160));
| /* fcn.00013bac */
0x00013c70 addiu v0, v0, 0x3bac | v0 += 0x3bac;
0x00013c74 sw v0, 0x2c(fp) | *(arg_2ch) = v0;
0x00013c78 lw v0, -0x7f80(gp) | v0 = *((gp - 8160));
0x00013c7c addiu s7, zero, 3 | s7 = 3;
| /* str.__s_:_ */
0x00013c80 addiu v0, v0, -0x66b8 | v0 += -0x66b8;
0x00013c84 sw v0, 0x24(fp) | *(arg_24h) = v0;
| /* str.__n_s */
0x00013c88 addiu s5, s5, -0x66b0 | s5 += -0x66b0;
| do {
0x00013c8c lw v0, (s1) | v0 = *(s1);
| if (v0 == s7) {
0x00013c90 beql v0, s7, 0x14000 | goto label_7;
| }
0x00013c94 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
0x00013c98 lw t9, 0x2c(fp) | t9 = *(arg_2ch);
| label_2:
0x00013c9c addiu a2, s6, 0x14 | a2 = s6 + 0x14;
0x00013ca0 addiu a1, s6, 0x10 | a1 = s6 + 0x10;
0x00013ca4 move a3, s3 | a3 = s3;
0x00013ca8 move a0, s0 | a0 = s0;
0x00013cac jalr t9 | t9 ();
0x00013cb0 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00013cb4 lw v0, 4(s6) | v0 = *((s6 + 1));
0x00013cb8 move a3, s3 | a3 = s3;
0x00013cbc move a2, s5 | a2 = s5;
0x00013cc0 addiu a1, zero, 1 | a1 = 1;
0x00013cc4 move a0, s0 | a0 = s0;
0x00013cc8 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
| if (v0 == 0) {
0x00013ccc beqz v0, 0x13ce4 | goto label_6;
| }
0x00013cd0 sw s4, 0x10(sp) | *(var_10h) = s4;
0x00013cd4 jalr t9 | t9 ();
0x00013cd8 lw s6, 4(s6) | s6 = *((s6 + 1));
0x00013cdc lw gp, 0x18(fp) | gp = *(arg_18h);
0x00013ce0 bnez s6, 0x13c8c |
| } while (s6 != 0);
| label_6:
0x00013ce4 lw v0, (s1) | v0 = *(s1);
0x00013ce8 lw v1, 0x28(fp) | v1 = *(arg_28h);
0x00013cec xori v0, v0, 2 | v0 ^= 2;
0x00013cf0 sltiu v0, v0, 1 | v0 = (v0 < 1) ? 1 : 0;
0x00013cf4 sll v0, v0, 1 | v0 <<= 1;
0x00013cf8 addu s6, v1, v0 | s6 = v1 + v0;
0x00013cfc lw a2, -0x7f80(gp) | a2 = *((gp - 8160));
0x00013d00 lb v0, 1(s6) | v0 = *((s6 + 1));
0x00013d04 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
0x00013d08 addiu a3, s2, 1 | a3 = s2 + 1;
0x00013d0c sw v0, 0x10(sp) | *(var_10h) = v0;
| /* str._n_c */
0x00013d10 addiu a2, a2, -0x66c0 | a2 += -0x66c0;
0x00013d14 addiu a1, zero, 1 | a1 = 1;
0x00013d18 move a0, s0 | a0 = s0;
0x00013d1c jalr t9 | t9 ();
| label_5:
0x00013d20 move sp, fp |
0x00013d24 lw ra, 0x54(fp) | ra = *(arg_54h);
0x00013d28 lw fp, 0x50(sp) | fp = *(var_50h);
0x00013d2c lw s7, 0x4c(sp) | s7 = *(var_4ch);
0x00013d30 lw s6, 0x48(sp) | s6 = *(var_48h);
0x00013d34 lw s5, 0x44(sp) | s5 = *(var_44h);
0x00013d38 lw s4, 0x40(sp) | s4 = *(var_40h);
0x00013d3c lw s3, 0x3c(sp) | s3 = *(var_3ch);
0x00013d40 lw s2, 0x38(sp) | s2 = *(var_38h);
0x00013d44 lw s1, 0x34(sp) | s1 = *(var_34h);
0x00013d48 lw s0, 0x30(sp) | s0 = *(var_30h);
0x00013d4c addiu sp, sp, 0x58 |
0x00013d50 jr ra | return v0;
| label_4:
0x00013d54 lw t9, -0x7e68(gp) | t9 = sym.imp.fputc;
0x00013d58 move a1, a0 | a1 = a0;
0x00013d5c addiu a0, zero, 0x22 | a0 = 0x22;
0x00013d60 lw s7, (a2) | s7 = *(a2);
0x00013d64 jalr t9 | t9 ();
0x00013d68 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00013d6c lb s1, (s7) | s1 = *(s7);
0x00013d70 lw s5, -0x7f80(gp) | s5 = *((gp - 8160));
0x00013d74 lw s4, -0x7f80(gp) | s4 = *((gp - 8160));
| /* str.u_04X */
0x00013d78 addiu v0, s5, -0x66d0 | v0 = s5 + -0x66d0;
0x00013d7c sw v0, 0x2c(fp) | *(arg_2ch) = v0;
0x00013d80 lw s3, -0x7f80(gp) | s3 = *((gp - 8160));
0x00013d84 lw v0, -0x7f80(gp) | v0 = *((gp - 8160));
| /* esilref: '\f' */
0x00013d88 addiu s4, s4, -0x66e8 | s4 += -0x66e8;
0x00013d8c sw v0, 0x28(fp) | *(arg_28h) = v0;
| /* esilref: '\"' */
0x00013d90 addiu s3, s3, -0x66f4 | s3 += -0x66f4;
0x00013d94 lw s6, -0x7f80(gp) | s6 = *((gp - 8160));
| if (s1 == 0) {
0x00013d98 beqz s1, 0x13e1c | goto label_8;
| }
0x00013d9c addiu s2, s7, 1 | s2 = s7 + 1;
| do {
0x00013da0 addiu v0, zero, 0xc | v0 = 0xc;
0x00013da4 move s5, s2 | s5 = s2;
| if (s1 == v0) {
0x00013da8 beq s1, v0, 0x13ee4 | goto label_9;
| }
0x00013dac slti v0, s1, 0xd | v0 = (s1 < 0xd) ? 1 : 0;
0x00013db0 addiu v0, zero, 0x22 | v0 = 0x22;
| if (v0 == 0) {
0x00013db4 beqz v0, 0x13e5c | goto label_10;
| }
0x00013db8 addiu v0, zero, 9 | v0 = 9;
0x00013dbc addiu v0, zero, 0xa | v0 = 0xa;
| if (s1 == v0) {
0x00013dc0 beq s1, v0, 0x13f54 | goto label_11;
| }
0x00013dc4 addiu v0, zero, 8 | v0 = 8;
| if (s1 == v0) {
0x00013dc8 beq s1, v0, 0x13f2c | goto label_12;
| }
0x00013dcc lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
| if (s1 == v0) {
0x00013dd0 beq s1, v0, 0x13f08 | goto label_13;
| }
0x00013dd4 lw t9, -0x7ec8(gp) | t9 = sym.utf8_validate_cz;
| label_0:
0x00013dd8 move a0, s7 | a0 = s7;
0x00013ddc bal 0x12c70 | sym_utf8_validate_cz ();
0x00013de0 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 == 0) {
0x00013de4 beqz v0, 0x13fd8 | goto label_14;
| }
0x00013de8 sltiu a0, s1, 0x1f | a0 = (s1 < 0x1f) ? 1 : 0;
0x00013dec lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
| if (a0 == 0) {
0x00013df0 beqz a0, 0x1401c | goto label_15;
| }
0x00013df4 lw a2, 0x2c(fp) | a2 = *(arg_2ch);
0x00013df8 move a3, s1 | a3 = s1;
0x00013dfc addiu a1, zero, 1 | a1 = 1;
0x00013e00 move a0, s0 | a0 = s0;
0x00013e04 jalr t9 | t9 ();
0x00013e08 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00013e0c move s7, s2 | s7 = s2;
| label_1:
0x00013e10 lb s1, (s7) | s1 = *(s7);
0x00013e14 addiu s2, s7, 1 | s2 = s7 + 1;
0x00013e18 bnez s1, 0x13da0 |
| } while (s1 != 0);
| label_8:
0x00013e1c move sp, fp |
0x00013e20 move a1, s0 | a1 = s0;
0x00013e24 lw ra, 0x54(sp) | ra = *(var_54h);
0x00013e28 lw fp, 0x50(sp) | fp = *(var_50h);
0x00013e2c lw s7, 0x4c(sp) | s7 = *(var_4ch);
0x00013e30 lw s6, 0x48(sp) | s6 = *(var_48h);
0x00013e34 lw s5, 0x44(sp) | s5 = *(var_44h);
0x00013e38 lw s4, 0x40(sp) | s4 = *(var_40h);
0x00013e3c lw s3, 0x3c(sp) | s3 = *(var_3ch);
0x00013e40 lw s2, 0x38(sp) | s2 = *(var_38h);
0x00013e44 lw s1, 0x34(sp) | s1 = *(var_34h);
0x00013e48 lw s0, 0x30(sp) | s0 = *(var_30h);
0x00013e4c lw t9, -0x7e68(gp) | t9 = sym.imp.fputc;
0x00013e50 addiu a0, zero, 0x22 | a0 = 0x22;
0x00013e54 addiu sp, sp, 0x58 |
0x00013e58 jr t9 | t9 ();
| label_10:
0x00013e5c addiu v0, zero, 0x5c | v0 = 0x5c;
| if (s1 == v0) {
0x00013e60 beq s1, v0, 0x13ec0 | goto label_16;
| }
0x00013e64 addiu v0, zero, 0xd | v0 = 0xd;
| if (s1 == v0) {
0x00013e68 beq s1, v0, 0x13e9c | goto label_17;
| }
0x00013e6c lw t9, -0x7ec8(gp) | t9 = sym.utf8_validate_cz;
| if (s1 != v0) {
0x00013e70 bne s1, v0, 0x13dd8 | goto label_0;
| }
0x00013e74 lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
0x00013e78 lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00013e7c move a3, s0 | a3 = s0;
0x00013e80 addiu a2, zero, 2 | a2 = 2;
0x00013e84 addiu a1, zero, 1 | a1 = 1;
| /* esilref: '\r' */
0x00013e88 addiu a0, a0, -0x66e0 | a0 += -0x66e0;
0x00013e8c jalr t9 | t9 ();
0x00013e90 move s7, s2 | s7 = s2;
0x00013e94 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00013e98 b 0x13e10 | goto label_1;
| label_17:
0x00013e9c lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00013ea0 move a3, s0 | a3 = s0;
0x00013ea4 addiu a2, zero, 2 | a2 = 2;
0x00013ea8 addiu a1, zero, 1 | a1 = 1;
| /* esilref: '\\' */
0x00013eac addiu a0, s6, -0x66f0 | a0 = s6 + -0x66f0;
0x00013eb0 jalr t9 | t9 ();
0x00013eb4 move s7, s2 | s7 = s2;
0x00013eb8 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00013ebc b 0x13e10 | goto label_1;
| label_16:
0x00013ec0 lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00013ec4 move a3, s0 | a3 = s0;
0x00013ec8 addiu a2, zero, 2 | a2 = 2;
0x00013ecc addiu a1, zero, 1 | a1 = 1;
0x00013ed0 move a0, s3 | a0 = s3;
0x00013ed4 jalr t9 | t9 ();
0x00013ed8 move s7, s2 | s7 = s2;
0x00013edc lw gp, 0x18(fp) | gp = *(arg_18h);
0x00013ee0 b 0x13e10 | goto label_1;
| label_9:
0x00013ee4 lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00013ee8 move a3, s0 | a3 = s0;
0x00013eec addiu a2, zero, 2 | a2 = 2;
0x00013ef0 addiu a1, zero, 1 | a1 = 1;
0x00013ef4 move a0, s4 | a0 = s4;
0x00013ef8 jalr t9 | t9 ();
0x00013efc move s7, s2 | s7 = s2;
0x00013f00 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00013f04 b 0x13e10 | goto label_1;
| label_13:
0x00013f08 lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00013f0c move a3, s0 | a3 = s0;
0x00013f10 addiu a2, zero, 2 | a2 = 2;
0x00013f14 addiu a1, zero, 1 | a1 = 1;
| /* esilref: '\b' */
0x00013f18 addiu a0, a0, -0x66ec | a0 += -0x66ec;
0x00013f1c jalr t9 | t9 ();
0x00013f20 move s7, s2 | s7 = s2;
0x00013f24 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00013f28 b 0x13e10 | goto label_1;
| label_12:
0x00013f2c lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
0x00013f30 lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00013f34 move a3, s0 | a3 = s0;
0x00013f38 addiu a2, zero, 2 | a2 = 2;
0x00013f3c addiu a1, zero, 1 | a1 = 1;
| /* esilref: '\n' */
0x00013f40 addiu a0, a0, -0x66e4 | a0 += -0x66e4;
0x00013f44 jalr t9 | t9 ();
0x00013f48 move s7, s2 | s7 = s2;
0x00013f4c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00013f50 b 0x13e10 | goto label_1;
| label_11:
0x00013f54 lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
0x00013f58 lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00013f5c move a3, s0 | a3 = s0;
0x00013f60 addiu a2, zero, 2 | a2 = 2;
0x00013f64 addiu a1, zero, 1 | a1 = 1;
| /* esilref: '\t' */
0x00013f68 addiu a0, a0, -0x66dc | a0 += -0x66dc;
0x00013f6c jalr t9 | t9 ();
0x00013f70 move s7, s2 | s7 = s2;
0x00013f74 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00013f78 b 0x13e10 | goto label_1;
| label_3:
0x00013f7c lw v0, (a2) | v0 = *(a2);
0x00013f80 lw a2, -0x7f80(gp) | a2 = *((gp - 8160));
| if (v0 == 0) {
0x00013f84 bnel v0, zero, 0x13fd0 | goto label_18;
| }
0x00013f88 lw a2, -0x7f80(gp) | a2 = *((gp - 8160));
| /* str.false */
0x00013f8c addiu a2, a2, -0x66fc | a2 += -0x66fc;
| do {
0x00013f90 move sp, fp |
0x00013f94 move a0, s0 | a0 = s0;
0x00013f98 lw ra, 0x54(sp) | ra = *(var_54h);
0x00013f9c lw fp, 0x50(sp) | fp = *(var_50h);
0x00013fa0 lw s7, 0x4c(sp) | s7 = *(var_4ch);
0x00013fa4 lw s6, 0x48(sp) | s6 = *(var_48h);
0x00013fa8 lw s5, 0x44(sp) | s5 = *(var_44h);
0x00013fac lw s4, 0x40(sp) | s4 = *(var_40h);
0x00013fb0 lw s3, 0x3c(sp) | s3 = *(var_3ch);
0x00013fb4 lw s2, 0x38(sp) | s2 = *(var_38h);
0x00013fb8 lw s1, 0x34(sp) | s1 = *(var_34h);
0x00013fbc lw s0, 0x30(sp) | s0 = *(var_30h);
0x00013fc0 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
0x00013fc4 addiu a1, zero, 1 | a1 = 1;
0x00013fc8 addiu sp, sp, 0x58 |
0x00013fcc jr t9 | t9 ();
| /* str.true */
| label_18:
0x00013fd0 addiu a2, a2, -0x6704 | a2 += -0x6704;
0x00013fd4 b 0x13f90 |
| } while (1);
| label_14:
0x00013fd8 lw v0, 0x28(fp) | v0 = *(arg_28h);
0x00013fdc lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00013fe0 move a3, s0 | a3 = s0;
0x00013fe4 addiu a2, zero, 6 | a2 = 6;
0x00013fe8 addiu a1, zero, 1 | a1 = 1;
0x00013fec addiu a0, v0, -0x66d8 | a0 = v0 + -0x66d8;
0x00013ff0 jalr t9 | t9 ();
0x00013ff4 move s7, s2 | s7 = s2;
0x00013ff8 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00013ffc b 0x13e10 | goto label_1;
| label_7:
0x00014000 lw a3, 0xc(s6) | a3 = *((s6 + 3));
0x00014004 lw a2, 0x24(fp) | a2 = *(arg_24h);
0x00014008 addiu a1, zero, 1 | a1 = 1;
0x0001400c move a0, s0 | a0 = s0;
0x00014010 jalr t9 | t9 ();
0x00014014 lw t9, 0x2c(fp) | t9 = *(arg_2ch);
0x00014018 b 0x13c9c | goto label_2;
| label_15:
0x0001401c addu s2, s7, v0 | s2 = s7 + v0;
0x00014020 b 0x14028 |
| while (s5 != s2) {
0x00014024 addiu s5, s5, 1 | s5++;
0x00014028 lw t9, -0x7e68(gp) | t9 = sym.imp.fputc;
0x0001402c lb a0, -1(s5) | a0 = *((s5 - 1));
0x00014030 move a1, s0 | a1 = s0;
0x00014034 jalr t9 | t9 ();
0x00014038 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0001403c bne s5, s2, 0x14024 |
| }
0x00014040 move s7, s2 | s7 = s2;
0x00014044 b 0x13e10 | goto label_1;
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/lldpcli @ 0x15390 */
| #include <stdint.h>
|
; (fcn) fcn.00015390 () | void fcn_00015390 () {
0x00015390 lui gp, 2 |
0x00015394 addiu gp, gp, -0x2300 |
0x00015398 addu gp, gp, t9 | gp += t9;
0x0001539c addiu sp, sp, -0x40 |
0x000153a0 lw t9, -0x7ea0(gp) | t9 = sym.imp.fputs;
0x000153a4 sw s2, 0x28(sp) | *(var_28h) = s2;
0x000153a8 sw s0, 0x20(sp) | *(var_20h) = s0;
0x000153ac move s2, a0 | s2 = a0;
0x000153b0 move s0, a2 | s0 = a2;
0x000153b4 sw fp, 0x38(sp) | *(var_38h) = fp;
0x000153b8 sw gp, 0x18(sp) | *(var_18h) = gp;
0x000153bc move fp, sp | fp = sp;
0x000153c0 move a0, a1 | a0 = a1;
0x000153c4 sw ra, 0x3c(sp) | *(var_3ch) = ra;
0x000153c8 sw s5, 0x34(sp) | *(var_34h) = s5;
0x000153cc sw s4, 0x30(sp) | *(var_30h) = s4;
0x000153d0 sw s3, 0x2c(sp) | *(var_2ch) = s3;
0x000153d4 sw s1, 0x24(sp) | *(var_24h) = s1;
0x000153d8 move a1, s2 | a1 = s2;
0x000153dc jalr t9 | t9 ();
0x000153e0 lw v0, (s0) | v0 = *(s0);
0x000153e4 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 == 0) {
0x000153e8 beqz v0, 0x15480 | goto label_0;
| }
0x000153ec lw s4, -0x7f80(gp) | s4 = *((gp - 8160));
0x000153f0 lw s3, -0x7f80(gp) | s3 = *((gp - 8160));
0x000153f4 lw s5, -0x7f80(gp) | s5 = *((gp - 8160));
0x000153f8 addiu s4, s4, -0x6494 | s4 += -0x6494;
0x000153fc move s1, zero | s1 = 0;
0x00015400 move a3, s4 | a3 = s4;
| /* str._s_s */
0x00015404 addiu s3, s3, -0x676c | s3 += -0x676c;
| /* esilref: ', ' */
0x00015408 addiu s5, s5, -0x6770 | s5 += -0x6770;
0x0001540c b 0x15418 |
| while (v0 != 0) {
0x00015410 move a3, s4 | a3 = s4;
| if (s1 == 0) {
0x00015414 movn a3, s5, s1 | a3 = s5;
| }
0x00015418 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
0x0001541c addiu s0, s0, 4 | s0 += 4;
0x00015420 sw v0, 0x10(sp) | *(var_10h) = v0;
0x00015424 move a2, s3 | a2 = s3;
0x00015428 addiu a1, zero, 1 | a1 = 1;
0x0001542c move a0, s2 | a0 = s2;
0x00015430 jalr t9 | t9 ();
0x00015434 lw v0, (s0) | v0 = *(s0);
0x00015438 lw gp, 0x18(fp) | gp = *(arg_18h);
0x0001543c addiu s1, s1, 1 | s1++;
0x00015440 bnez v0, 0x15410 |
| }
0x00015444 move a1, s2 | a1 = s2;
| if (s1 != 0) {
0x00015448 beqz s1, 0x15480 |
0x0001544c move sp, fp |
0x00015450 lw ra, 0x3c(sp) | ra = *(var_3ch);
0x00015454 lw fp, 0x38(sp) | fp = *(var_38h);
0x00015458 lw s5, 0x34(sp) | s5 = *(var_34h);
0x0001545c lw s4, 0x30(sp) | s4 = *(var_30h);
0x00015460 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x00015464 lw s2, 0x28(sp) | s2 = *(var_28h);
0x00015468 lw s1, 0x24(sp) | s1 = *(var_24h);
0x0001546c lw s0, 0x20(sp) | s0 = *(var_20h);
0x00015470 lw t9, -0x7e68(gp) | t9 = sym.imp.fputc;
0x00015474 addiu a0, zero, 0xa | a0 = 0xa;
0x00015478 addiu sp, sp, 0x40 |
0x0001547c jr t9 | t9 ();
| }
| label_0:
0x00015480 move sp, fp |
0x00015484 lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
0x00015488 lw ra, 0x3c(sp) | ra = *(var_3ch);
0x0001548c lw fp, 0x38(sp) | fp = *(var_38h);
0x00015490 lw s5, 0x34(sp) | s5 = *(var_34h);
0x00015494 lw s4, 0x30(sp) | s4 = *(var_30h);
0x00015498 lw s3, 0x2c(sp) | s3 = *(var_2ch);
0x0001549c lw s1, 0x24(sp) | s1 = *(var_24h);
0x000154a0 lw s0, 0x20(sp) | s0 = *(var_20h);
0x000154a4 move a3, s2 | a3 = s2;
0x000154a8 lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x000154ac lw s2, 0x28(sp) | s2 = *(var_28h);
0x000154b0 addiu a2, zero, 7 | a2 = 7;
0x000154b4 addiu a1, zero, 1 | a1 = 1;
| /* str._none__n */
0x000154b8 addiu a0, a0, -0x6590 | a0 += -0x6590;
0x000154bc addiu sp, sp, 0x40 |
0x000154c0 jr t9 | return t9 ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/lldpcli @ 0x13628 */
| #include <stdint.h>
|
; (fcn) sym.kv_data () | void kv_data () {
0x00013628 lui gp, 2 |
0x0001362c addiu gp, gp, -0x598 |
0x00013630 addu gp, gp, t9 | gp += t9;
0x00013634 addiu sp, sp, -0x38 |
0x00013638 lw t9, -0x7d80(gp) | t9 = sym.imp.strdup;
0x0001363c sw s2, 0x28(sp) | *(var_28h_2) = s2;
0x00013640 lw s2, (a0) | s2 = *(a0);
0x00013644 sw fp, 0x30(sp) | *(var_30h_2) = fp;
0x00013648 sw s1, 0x24(sp) | *(var_24h_2) = s1;
0x0001364c lw a0, 4(s2) | a0 = *((s2 + 1));
0x00013650 move fp, sp | fp = sp;
0x00013654 sw s0, 0x20(sp) | *(var_20h_3) = s0;
0x00013658 sw gp, 0x18(sp) | *(var_18h) = gp;
0x0001365c sw ra, 0x34(sp) | *(var_34h) = ra;
0x00013660 sw s3, 0x2c(sp) | *(var_2ch_3) = s3;
0x00013664 move s1, a1 | s1 = a1;
0x00013668 jalr t9 | t9 ();
0x0001366c move s0, v0 | s0 = v0;
0x00013670 lw gp, 0x18(fp) | gp = *(var_18h);
| if (s1 == 0) {
0x00013674 beqz s1, 0x1374c | goto label_1;
| }
0x00013678 lw t9, -0x7d80(gp) | t9 = sym.imp.strdup;
0x0001367c move a0, s1 | a0 = s1;
0x00013680 jalr t9 | t9 ();
0x00013684 lw gp, 0x18(fp) | gp = *(var_18h);
0x00013688 move s1, v0 | s1 = v0;
| label_0:
0x0001368c addiu s3, zero, 0x2e | s3 = 0x2e;
| if (s0 != 0) {
0x00013690 bnez s0, 0x136a0 | goto label_2;
| }
0x00013694 lw t9, -0x7ee0(gp) | t9 = sym.fatal;
0x00013698 b 0x13760 | goto label_3;
| do {
0x0001369c sb s3, (v0) | *(v0) = s3;
| label_2:
0x000136a0 lw t9, -0x7e00(gp) | t9 = sym.imp.strchr;
0x000136a4 addiu a1, zero, 1 | a1 = 1;
0x000136a8 move a0, s0 | a0 = s0;
0x000136ac jalr t9 | t9 ();
0x000136b0 lw gp, 0x18(fp) | gp = *(var_18h);
0x000136b4 bnez v0, 0x1369c |
| } while (v0 != 0);
0x000136b8 lw v0, -0x7f80(gp) | v0 = *((gp - 8160));
| if (s1 == 0) {
0x000136bc beqz s1, 0x13754 | goto label_4;
| }
0x000136c0 move a0, s1 | a0 = s1;
0x000136c4 addiu s3, zero, 0x20 | s3 = 0x20;
0x000136c8 b 0x136d4 |
| while (v0 != 0) {
0x000136cc sb s3, (v0) | *(v0) = s3;
0x000136d0 addiu a0, v0, 1 | a0 = v0 + 1;
0x000136d4 lw t9, -0x7e00(gp) | t9 = sym.imp.strchr;
0x000136d8 addiu a1, zero, 0xa | a1 = 0xa;
0x000136dc jalr t9 | t9 ();
0x000136e0 lw gp, 0x18(fp) | gp = *(var_18h);
0x000136e4 bnez v0, 0x136cc |
| }
0x000136e8 lw a0, (s2) | a0 = *(s2);
0x000136ec move v0, s1 | v0 = s1;
| do {
0x000136f0 lw a2, -0x7f80(gp) | a2 = *((gp - 8160));
0x000136f4 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
0x000136f8 move a3, s0 | a3 = s0;
| /* str._s_s_n */
0x000136fc addiu a2, a2, -0x671c | a2 += -0x671c;
0x00013700 addiu a1, zero, 1 | a1 = 1;
0x00013704 sw v0, 0x10(sp) | *(var_10h_2) = v0;
0x00013708 jalr t9 | t9 ();
0x0001370c lw gp, 0x18(fp) | gp = *(var_18h);
0x00013710 lw t9, -0x7d7c(gp) | t9 = sym.imp.free;
0x00013714 move a0, s0 | a0 = s0;
0x00013718 jalr t9 | t9 ();
0x0001371c lw gp, 0x18(fp) | gp = *(var_18h);
0x00013720 move sp, fp |
0x00013724 move a0, s1 | a0 = s1;
0x00013728 lw ra, 0x34(sp) | ra = *(var_34h);
0x0001372c lw fp, 0x30(sp) | fp = *(var_30h_2);
0x00013730 lw s3, 0x2c(sp) | s3 = *(var_2ch_3);
0x00013734 lw s2, 0x28(sp) | s2 = *(var_28h_2);
0x00013738 lw s1, 0x24(sp) | s1 = *(var_24h_2);
0x0001373c lw s0, 0x20(sp) | s0 = *(var_20h_3);
0x00013740 lw t9, -0x7d7c(gp) | t9 = sym.imp.free;
0x00013744 addiu sp, sp, 0x38 |
0x00013748 jr t9 | t9 ();
| label_1:
0x0001374c move s1, zero | s1 = 0;
0x00013750 b 0x1368c | goto label_0;
| label_4:
0x00013754 lw a0, (s2) | a0 = *(s2);
0x00013758 addiu v0, v0, -0x6494 | v0 += -0x6494;
0x0001375c b 0x136f0 |
| } while (1);
| label_3:
0x00013760 move a1, zero | a1 = 0;
0x00013764 move a0, zero | a0 = 0;
0x00013768 bal 0x15214 | return sym_fatal ();
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/sbin/lldpcli @ 0x154c4 */
| #include <stdint.h>
|
; (fcn) sym.version_display () | void version_display () {
0x000154c4 lui gp, 2 |
0x000154c8 addiu gp, gp, -0x2434 |
0x000154cc addu gp, gp, t9 | gp += t9;
0x000154d0 addiu sp, sp, -0x68 |
0x000154d4 sw s1, 0x54(sp) | *(var_54h) = s1;
0x000154d8 lw s1, -0x7d88(gp) | s1 = *((gp - 8034));
0x000154dc sw fp, 0x60(sp) | *(var_60h) = fp;
0x000154e0 move fp, sp | fp = sp;
0x000154e4 lw v0, (s1) | v0 = *(s1);
0x000154e8 sw ra, 0x64(sp) | *(var_64h) = ra;
0x000154ec sw s3, 0x5c(sp) | *(var_5ch) = s3;
0x000154f0 sw s2, 0x58(sp) | *(var_58h) = s2;
0x000154f4 sw s0, 0x50(sp) | *(var_50h) = s0;
0x000154f8 sw gp, 0x18(sp) | *(var_18h) = gp;
0x000154fc sw v0, 0x4c(fp) | *(arg_4ch) = v0;
0x00015500 lw v0, -0x7f80(gp) | v0 = *((gp - 8160));
| if (a2 == 0) {
0x00015504 beqz a2, 0x157f4 | goto label_3;
| }
0x00015508 lw a2, -0x7f80(gp) | a2 = *((gp - 8160));
| /* str.1.0.3 */
0x0001550c addiu v0, v0, -0x6588 | v0 += -0x6588;
0x00015510 sw v0, 0x10(sp) | *(var_10h_3) = v0;
0x00015514 lw v0, -0x7fdc(gp) | v0 = *(gp);
0x00015518 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
| /* str.LLDP_MED */
0x0001551c addiu v0, v0, 0x684c | v0 += 0x684c;
0x00015520 sw v0, 0x2c(fp) | *(arg_2ch) = v0;
0x00015524 lw v0, -0x7f80(gp) | v0 = *((gp - 8160));
0x00015528 move a3, a1 | a3 = a1;
| /* str.Dot3 */
0x0001552c addiu v0, v0, -0x6580 | v0 += -0x6580;
0x00015530 sw v0, 0x30(fp) | *(arg_30h) = v0;
0x00015534 lw v0, -0x7f80(gp) | v0 = *((gp - 8160));
0x00015538 move s2, a1 | s2 = a1;
| /* str.Custom_TLV */
0x0001553c addiu v0, v0, -0x6578 | v0 += -0x6578;
0x00015540 sw v0, 0x34(fp) | *(arg_34h) = v0;
0x00015544 lw v0, -0x7f80(gp) | v0 = *((gp - 8160));
| /* str._s__s_n */
0x00015548 addiu a2, a2, -0x6c04 | a2 += -0x6c04;
| /* esilref: 'CDP' */
0x0001554c addiu v0, v0, -0x656c | v0 += -aav.0x0000656c;
0x00015550 sw v0, 0x24(fp) | *(arg_24h) = v0;
0x00015554 lw v0, -0x7f80(gp) | v0 = *((gp - 8160));
0x00015558 addiu a1, zero, 1 | a1 = 1;
| /* str.TEXT */
0x0001555c addiu v0, v0, -0x6568 | v0 += -0x6568;
0x00015560 sw v0, 0x3c(fp) | *(arg_3ch) = v0;
0x00015564 lw v0, -0x7f80(gp) | v0 = *((gp - 8160));
0x00015568 sw zero, 0x38(fp) | *(arg_38h) = 0;
| /* esilref: 'KV' */
0x0001556c addiu v0, v0, -0x6560 | v0 += -0x6560;
0x00015570 sw v0, 0x40(fp) | *(arg_40h) = v0;
0x00015574 lw v0, -0x7f80(gp) | v0 = *((gp - 8160));
0x00015578 sw zero, 0x28(fp) | *(arg_28h) = 0;
| /* str.JSON */
0x0001557c addiu v0, v0, -0x655c | v0 += -0x655c;
0x00015580 sw v0, 0x44(fp) | *(arg_44h) = v0;
0x00015584 sw zero, 0x48(fp) | *(arg_48h) = 0;
0x00015588 move s0, a0 | s0 = a0;
0x0001558c jalr t9 | t9 ();
0x00015590 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00015594 move a3, s0 | a3 = s0;
0x00015598 addiu a2, zero, 0x20 | a2 = 0x20;
0x0001559c lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
0x000155a0 lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x000155a4 addiu a1, zero, 1 | a1 = 1;
| /* str.__Built_on_2023_05_31T13:12:12Z_n */
0x000155a8 addiu a0, a0, -0x6554 | a0 += -0x6554;
0x000155ac jalr t9 | t9 ();
0x000155b0 lw gp, 0x18(fp) | gp = *(arg_18h);
0x000155b4 move a1, s0 | a1 = s0;
0x000155b8 lw t9, -0x7e68(gp) | t9 = sym.imp.fputc;
0x000155bc addiu a0, zero, 0xa | a0 = 0xa;
0x000155c0 jalr t9 | t9 ();
0x000155c4 lw gp, 0x18(fp) | gp = *(arg_18h);
0x000155c8 move a0, s2 | a0 = s2;
0x000155cc lw a1, -0x7f80(gp) | a1 = *((gp - 8160));
0x000155d0 lw t9, -0x7d60(gp) | t9 = sym.imp.strcmp;
| /* str.lldpd */
0x000155d4 addiu a1, a1, -0x6530 | a1 += -0x6530;
0x000155d8 jalr t9 | t9 ();
0x000155dc lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 == 0) {
0x000155e0 beqz v0, 0x156b0 | goto label_4;
| }
0x000155e4 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x000155e8 lw t9, -0x7d60(gp) | t9 = sym.imp.strcmp;
| /* str.lldpcli */
0x000155ec addiu a1, a1, 0x648c | a1 += 0x648c;
0x000155f0 move a0, s2 | a0 = s2;
0x000155f4 jalr t9 | t9 ();
0x000155f8 lw gp, 0x18(fp) | gp = *(arg_18h);
0x000155fc beqz v0, 0x1568c |
| while (1) {
| label_0:
0x00015600 lw t9, -0x7e68(gp) | t9 = sym.imp.fputc;
0x00015604 move a1, s0 | a1 = s0;
0x00015608 addiu a0, zero, 0xa | a0 = 0xa;
0x0001560c jalr t9 | t9 ();
0x00015610 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00015614 addiu a1, zero, 1 | a1 = 1;
0x00015618 move a0, s0 | a0 = s0;
0x0001561c lw a3, -0x7f80(gp) | a3 = *((gp - 8160));
0x00015620 lw a2, -0x7f80(gp) | a2 = *((gp - 8160));
0x00015624 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
| /* str.mipsisa32r2el_axis_linux_gnu_gcc___mel__mabi32__msoft_float___march34kc__msynci__fstack_protector_strong__pie__fPIE__D_FORTIFY_SOURCE2__Wformat__Wformat_security__Werrorformat_security___sysroot_home_svcj_build_build_build_tmp_work_mips32r2el_nf_poky_linux_lldpd_1.0.3_r0_recipe_sysroot___fdiagnostics_show_option__fdiagnostics_colorauto__pipe__Wall__W__Wextra__Wformat__Wformat_security__Wfatal_errors__Wcast_align__Winline__Wpointer_arith__fno_omit_frame_pointer__Wno_unused_parameter__Wno_missing_field_initializers__Wno_sign_compare__fstack_protector__fstack_protector_all__fstack_protector_strong___D_FORTIFY_SOURCE2__D_GNU_SOURCE___O2__pipe__g__feliminate_unused_debug_types__fmacro_prefix_map_home_svcj_build_build_build_tmp_work_mips32r2el_nf_poky_linux_lldpd_1.0.3_r0_usr_src_debug_lldpd_1.0.3_r0_______________________fdebug_prefix_map_home_svcj_build_build_build_tmp_work_mips32r2el_nf_poky_linux_lldpd_1.0.3_r0_usr_src_debug_lldpd_1.0.3_r0_______________________fdebug_prefix_map_home_svcj_build_build_build_tmp_work_mips32r2el_nf_poky_linux_lldpd_1.0.3_r0_recipe_sysroot_______________________fdebug_prefix_map_home_svcj_build_build_build_tmp_work_mips32r2el_nf_poky_linux_lldpd_1.0.3_r0_recipe_sysroot_native__ */
0x00015628 addiu a3, a3, -0x63ac | a3 += -0x63ac;
| /* str.C_compiler_command:__s_n */
0x0001562c addiu a2, a2, -0x5ed4 | a2 += -0x5ed4;
0x00015630 jalr t9 | t9 ();
0x00015634 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00015638 addiu a1, zero, 1 | a1 = 1;
0x0001563c move a0, s0 | a0 = s0;
0x00015640 lw a3, -0x7f80(gp) | a3 = *((gp - 8160));
0x00015644 lw a2, -0x7f80(gp) | a2 = *((gp - 8160));
0x00015648 lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
| /* str.mipsisa32r2el_axis_linux_gnu_ld___sysroot_home_svcj_build_build_build_tmp_work_mips32r2el_nf_poky_linux_lldpd_1.0.3_r0_recipe_sysroot____Wl__z_relro__Wl__z_now___Wl__O1___Wl___as_needed__fstack_protector_strong__Wl__z_relro__z_now_ */
0x0001564c addiu a3, a3, -0x5ebc | a3 += -0x5ebc;
| /* str.Linker_command:______s_n */
0x00015650 addiu a2, a2, -0x5dd0 | a2 += -0x5dd0;
0x00015654 jalr t9 | t9 ();
0x00015658 lw gp, 0x18(fp) | gp = *(arg_18h);
| label_2:
0x0001565c lw v1, 0x4c(fp) | v1 = *(arg_4ch);
0x00015660 lw v0, (s1) | v0 = *(s1);
0x00015664 lw ra, 0x64(fp) | ra = *(arg_64h);
| if (v1 != v0) {
0x00015668 bne v1, v0, 0x15818 | goto label_5;
| }
0x0001566c move sp, fp |
0x00015670 lw fp, 0x60(sp) | fp = *(var_60h);
0x00015674 lw s3, 0x5c(sp) | s3 = *(var_5ch);
0x00015678 lw s2, 0x58(sp) | s2 = *(var_58h);
0x0001567c lw s1, 0x54(sp) | s1 = *(var_54h);
0x00015680 lw s0, 0x50(sp) | s0 = *(var_50h);
0x00015684 addiu sp, sp, 0x68 |
0x00015688 jr ra | return v0;
0x0001568c lw a1, -0x7f80(gp) | a1 = *((gp - 8160));
| label_1:
0x00015690 lw t9, -0x7fdc(gp) | t9 = *(gp);
0x00015694 addiu a2, fp, 0x3c | a2 = fp + 0x3c;
| /* str.Additional_output_formats:___ */
0x00015698 addiu a1, a1, -0x63cc | a1 += -0x63cc;
| /* fcn.00015390 */
0x0001569c addiu t9, t9, 0x5390 | t9 += 0x5390;
0x000156a0 move a0, s0 | a0 = s0;
0x000156a4 bal 0x15390 | fcn_00015390 ();
0x000156a8 lw gp, 0x18(fp) | gp = *(arg_18h);
0x000156ac b 0x15600 |
| }
| label_4:
0x000156b0 lw s3, -0x7fdc(gp) | s3 = *(gp);
0x000156b4 lw a1, -0x7f80(gp) | a1 = *((gp - 8160));
| /* fcn.00015390 */
0x000156b8 addiu s3, s3, 0x5390 | s3 += 0x5390;
0x000156bc addiu a2, fp, 0x2c | a2 = fp + 0x2c;
| /* str.Additional_LLDP_features:____ */
0x000156c0 addiu a1, a1, -0x6528 | a1 += -0x6528;
0x000156c4 move t9, s3 | t9 = s3;
0x000156c8 move a0, s0 | a0 = s0;
0x000156cc bal 0x15390 | fcn_00015390 ();
0x000156d0 lw gp, 0x18(fp) | gp = *(arg_18h);
0x000156d4 addiu a2, fp, 0x24 | a2 = fp + 0x24;
0x000156d8 move a0, s0 | a0 = s0;
0x000156dc lw a1, -0x7f80(gp) | a1 = *((gp - 8160));
0x000156e0 move t9, s3 | t9 = s3;
| /* str.Additional_protocols:________ */
0x000156e4 addiu a1, a1, -0x6508 | a1 += -0x6508;
0x000156e8 bal 0x15390 | fcn_00015390 ();
0x000156ec lw gp, 0x18(fp) | gp = *(arg_18h);
0x000156f0 move a3, s0 | a3 = s0;
0x000156f4 addiu a2, zero, 0x20 | a2 = 0x20;
0x000156f8 lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
0x000156fc lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00015700 addiu a1, zero, 1 | a1 = 1;
| /* str.SNMP_support:________________no_n */
0x00015704 addiu a0, a0, -0x64e8 | a0 += -0x64e8;
0x00015708 jalr t9 | t9 ();
0x0001570c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00015710 move a3, s0 | a3 = s0;
0x00015714 addiu a2, zero, 0x30 | a2 = 0x30;
0x00015718 lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
0x0001571c lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00015720 addiu a1, zero, 1 | a1 = 1;
| /* str.Old_kernel_support:__________no__Linux_2.6.39__n */
0x00015724 addiu a0, a0, -0x64c4 | a0 += -0x64c4;
0x00015728 jalr t9 | t9 ();
0x0001572c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00015730 move a3, s0 | a3 = s0;
0x00015734 addiu a2, zero, 0x25 | a2 = 0x25;
0x00015738 lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
0x0001573c lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00015740 addiu a1, zero, 1 | a1 = 1;
| /* str.Privilege_separation:________enabled_n */
0x00015744 addiu a0, a0, -0x6490 | a0 += -0x6490;
0x00015748 jalr t9 | t9 ();
0x0001574c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00015750 move a3, s0 | a3 = s0;
0x00015754 addiu a2, zero, 0x23 | a2 = 0x23;
0x00015758 lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
0x0001575c lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00015760 addiu a1, zero, 1 | a1 = 1;
| /* str.Privilege_separation_user:___lldpd_n */
0x00015764 addiu a0, a0, -0x6468 | a0 += -aav.0x00006468;
0x00015768 jalr t9 | t9 ();
0x0001576c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00015770 move a3, s0 | a3 = s0;
0x00015774 addiu a2, zero, 0x23 | a2 = 0x23;
0x00015778 lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
0x0001577c lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x00015780 addiu a1, zero, 1 | a1 = 1;
| /* str.Privilege_separation_group:__lldpd_n */
0x00015784 addiu a0, a0, -0x6444 | a0 += -0x6444;
0x00015788 jalr t9 | t9 ();
0x0001578c lw gp, 0x18(fp) | gp = *(arg_18h);
0x00015790 move a3, s0 | a3 = s0;
0x00015794 addiu a2, zero, 0x2c | a2 = 0x2c;
0x00015798 lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
0x0001579c lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x000157a0 addiu a1, zero, 1 | a1 = 1;
| /* str.Privilege_separation_chroot:__var_run_lldpd_n */
0x000157a4 addiu a0, a0, -0x6420 | a0 += -0x6420;
0x000157a8 jalr t9 | t9 ();
0x000157ac lw gp, 0x18(fp) | gp = *(arg_18h);
0x000157b0 move a3, s0 | a3 = s0;
0x000157b4 addiu a2, zero, 0x22 | a2 = 0x22;
0x000157b8 lw a0, -0x7f80(gp) | a0 = *((gp - 8160));
0x000157bc lw t9, -0x7dc0(gp) | t9 = sym.imp.fwrite;
0x000157c0 addiu a1, zero, 1 | a1 = 1;
| /* str.Configuration_directory:______etc_n */
0x000157c4 addiu a0, a0, -0x63f0 | a0 += -0x63f0;
0x000157c8 jalr t9 | t9 ();
0x000157cc lw gp, 0x18(fp) | gp = *(arg_18h);
0x000157d0 move a0, s2 | a0 = s2;
0x000157d4 lw a1, -0x7fdc(gp) | a1 = *(gp);
0x000157d8 lw t9, -0x7d60(gp) | t9 = sym.imp.strcmp;
| /* str.lldpcli */
0x000157dc addiu a1, a1, 0x648c | a1 += 0x648c;
0x000157e0 jalr t9 | t9 ();
0x000157e4 lw gp, 0x18(fp) | gp = *(arg_18h);
| if (v0 != 0) {
0x000157e8 bnez v0, 0x15600 | goto label_0;
| }
0x000157ec lw a1, -0x7f80(gp) | a1 = *((gp - 8160));
0x000157f0 b 0x15690 | goto label_1;
| label_3:
0x000157f4 lw a3, -0x7f80(gp) | a3 = *((gp - 8160));
0x000157f8 lw a2, -0x7f80(gp) | a2 = *((gp - 8160));
0x000157fc lw t9, -0x7e84(gp) | t9 = sym.imp.__fprintf_chk
| /* str.1.0.3 */
0x00015800 addiu a3, a3, -0x6588 | a3 += -0x6588;
| /* esilref: '&s
' */
0x00015804 addiu a2, a2, -0x5dbc | a2 += -0x5dbc;
0x00015808 addiu a1, zero, 1 | a1 = 1;
0x0001580c jalr t9 | t9 ();
0x00015810 lw gp, 0x18(fp) | gp = *(arg_18h);
0x00015814 b 0x1565c | goto label_2;
| label_5:
0x00015818 lw t9, -0x7db0(gp) | t9 = sym.imp.__stack_chk_fail;
0x0001581c jalr t9 | t9 ();
0x00015820 nop |
0x00015824 nop |
0x00015828 nop |
0x0001582c nop |
| }
[*] Function fprintf used 18 times lldpcli