[*] Binary protection state of tcptest

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


[*] Function printf tear down of tcptest

    ; assembly                           | /* r2dec pseudo code output */
                                         | /* /logs/firmware/unblob_extracted/firmware_extract/4325012-58052244.squashfs_v4_le_extract/usr/bin/tcptest @ 0x9c0 */
                                         | #include <stdint.h>
                                         |  
    ; (fcn) main ()                      | int32_t main () {
                                         |     /* [13] -r-x section size 2400 named .text */
    0x000009c0 lui gp, 2                 |     
    0x000009c4 addiu gp, gp, -0x69b0     |     
    0x000009c8 addu gp, gp, t9           |     gp += t9;
    0x000009cc lw v1, -0x7f58(gp)        |     v1 = *((gp - 8150));
    0x000009d0 addiu sp, sp, -0x130      |     
    0x000009d4 addiu v0, zero, 4         |     v0 = 4;
    0x000009d8 lw v1, (v1)               |     v1 = *(v1);
    0x000009dc sw gp, 0x18(sp)           |     *(var_18h) = gp;
    0x000009e0 sw s7, 0x124(sp)          |     *(var_124h) = s7;
    0x000009e4 sw ra, 0x12c(sp)          |     *(var_12ch) = ra;
    0x000009e8 sw fp, 0x128(sp)          |     *(var_128h) = fp;
    0x000009ec sw s6, 0x120(sp)          |     *(var_120h) = s6;
    0x000009f0 sw s5, 0x11c(sp)          |     *(var_11ch) = s5;
    0x000009f4 sw s4, 0x118(sp)          |     *(var_118h) = s4;
    0x000009f8 sw s3, 0x114(sp)          |     *(var_114h) = s3;
    0x000009fc sw s2, 0x110(sp)          |     *(var_110h) = s2;
    0x00000a00 sw s1, 0x10c(sp)          |     *(var_10ch) = s1;
    0x00000a04 sw s0, 0x108(sp)          |     *(var_108h) = s0;
    0x00000a08 move s7, a1               |     s7 = a1;
    0x00000a0c sw zero, 0x3c(sp)         |     *(var_3ch) = 0;
    0x00000a10 sw v1, 0x104(sp)          |     *(var_104h) = v1;
    0x00000a14 sw zero, 0x40(sp)         |     *(var_40h) = 0;
                                         |     if (a0 != v0) {
    0x00000a18 beq a0, v0, 0xa68         |         
    0x00000a1c lw v0, -0x7f54(gp)        |         v0 = *((gp - 8149));
    0x00000a20 lw a2, -0x7fd8(gp)        |         a2 = *((gp - 8182));
    0x00000a24 lw t9, -0x7f9c(gp)        |         t9 = sym.imp.__fprintf_chk
    0x00000a28 lw a3, (a1)               |         a3 = *(a1);
    0x00000a2c lw a0, (v0)               |         a0 = *(v0);
    0x00000a30 addiu a2, a2, 0x14a8      |         a2 += str.usage:__s__timeout___hostname___port__n;
    0x00000a34 addiu a1, zero, 1         |         a1 = 1;
    0x00000a38 jalr t9                   |         t9 ();
    0x00000a3c lw gp, 0x18(sp)           |         gp = *(var_18h);
    0x00000a40 addiu fp, zero, 1         |         fp = 1;
                                         | label_5:
    0x00000a44 lw a0, 0x40(sp)           |         a0 = *(var_40h);
                                         | label_6:
    0x00000a48 lw t9, -0x7f90(gp)        |         t9 = sym.imp.freeaddrinfo;
                                         |         if (a0 != 0) {
    0x00000a4c beqz a0, 0xa5c            |             
    0x00000a50 jalr t9                   |             t9 ();
    0x00000a54 nop                       |             
    0x00000a58 lw gp, 0x18(sp)           |             gp = *(var_18h);
                                         |         }
    0x00000a5c lw t9, -0x7f78(gp)        |         t9 = sym.imp.exit;
    0x00000a60 move a0, fp               |         a0 = fp;
    0x00000a64 jalr t9                   |         t9 ();
                                         |     }
    0x00000a68 lw t9, -0x7f88(gp)        |     t9 = sym.imp.__errno_location;
    0x00000a6c jalr t9                   |     t9 ();
    0x00000a70 nop                       |     
    0x00000a74 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000a78 lw a0, 4(s7)              |     a0 = *((s7 + 1));
    0x00000a7c move s5, v0               |     s5 = v0;
    0x00000a80 lw t9, -0x7fa8(gp)        |     t9 = sym.imp.strtol;
    0x00000a84 sw zero, (v0)             |     *(v0) = 0;
    0x00000a88 addiu a2, zero, 0xa       |     a2 = 0xa;
    0x00000a8c addiu a1, sp, 0x3c        |     a1 = sp + 0x3c;
    0x00000a90 jalr t9                   |     t9 ();
    0x00000a94 lw v1, (s5)               |     v1 = *(s5);
    0x00000a98 addiu a0, zero, 0x22      |     a0 = 0x22;
    0x00000a9c lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000aa0 sw v0, 0x28(sp)           |     *(var_28h) = v0;
                                         |     if (v1 == a0) {
    0x00000aa4 beq v1, a0, 0xdf8         |         goto label_12;
                                         |     }
    0x00000aa8 addiu s6, sp, 0x74        |     s6 = sp + 0x74;
                                         |     if (v1 != 0) {
    0x00000aac beqz v1, 0xabc            |         
    0x00000ab0 lw v0, 0x28(sp)           |         v0 = *(var_28h);
                                         | label_4:
    0x00000ab4 addiu s6, sp, 0x74        |         s6 = sp + 0x74;
                                         |         if (v0 == 0) {
    0x00000ab8 beqz v0, 0xe14            |             goto label_13;
                                         |         }
                                         |     }
    0x00000abc lw t9, -0x7f84(gp)        |     t9 = sym.imp.memset;
    0x00000ac0 addiu a2, zero, 0x90      |     a2 = 0x90;
    0x00000ac4 move a1, zero             |     a1 = 0;
    0x00000ac8 move a0, s6               |     a0 = s6;
    0x00000acc jalr t9                   |     t9 ();
    0x00000ad0 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000ad4 addiu s0, sp, 0x7c        |     s0 = sp + 0x7c;
    0x00000ad8 lw t9, -0x7f8c(gp)        |     t9 = sym.imp.sigemptyset;
    0x00000adc move a0, s0               |     a0 = s0;
    0x00000ae0 jalr t9                   |     t9 ();
    0x00000ae4 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000ae8 move a2, zero             |     a2 = 0;
    0x00000aec move a1, s6               |     a1 = s6;
    0x00000af0 lw v0, -0x7fd8(gp)        |     v0 = *((gp - 8182));
    0x00000af4 lw t9, -0x7fa0(gp)        |     t9 = sym.imp.sigaction;
    0x00000af8 addiu v0, v0, 0x1220      |     v0 += 0x1220;
    0x00000afc addiu a0, zero, 0xf       |     a0 = 0xf;
    0x00000b00 sw v0, 0x78(sp)           |     *(var_78h) = v0;
    0x00000b04 jalr t9                   |     t9 ();
    0x00000b08 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000b0c move a2, zero             |     a2 = 0;
    0x00000b10 move a1, s6               |     a1 = s6;
    0x00000b14 lw t9, -0x7fa0(gp)        |     t9 = sym.imp.sigaction;
    0x00000b18 addiu a0, zero, 2         |     a0 = 2;
    0x00000b1c jalr t9                   |     t9 ();
    0x00000b20 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000b24 move a2, zero             |     a2 = 0;
    0x00000b28 move a1, s6               |     a1 = s6;
    0x00000b2c lw t9, -0x7fa0(gp)        |     t9 = sym.imp.sigaction;
    0x00000b30 addiu a0, zero, 0xe       |     a0 = 0xe;
    0x00000b34 jalr t9                   |     t9 ();
    0x00000b38 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000b3c addiu a2, zero, 0x90      |     a2 = 0x90;
    0x00000b40 move a1, zero             |     a1 = 0;
    0x00000b44 lw t9, -0x7f84(gp)        |     t9 = sym.imp.memset;
    0x00000b48 move a0, s6               |     a0 = s6;
    0x00000b4c jalr t9                   |     t9 ();
    0x00000b50 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000b54 lw t9, -0x7f8c(gp)        |     t9 = sym.imp.sigemptyset;
    0x00000b58 move a0, s0               |     a0 = s0;
    0x00000b5c jalr t9                   |     t9 ();
    0x00000b60 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000b64 addiu v0, zero, 1         |     v0 = 1;
    0x00000b68 move a2, zero             |     a2 = 0;
    0x00000b6c lw t9, -0x7fa0(gp)        |     t9 = sym.imp.sigaction;
    0x00000b70 move a1, s6               |     a1 = s6;
    0x00000b74 addiu a0, zero, 0xd       |     a0 = 0xd;
    0x00000b78 sw v0, 0x78(sp)           |     *(var_78h) = v0;
    0x00000b7c jalr t9                   |     t9 ();
    0x00000b80 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000b84 addiu v1, sp, 0x54        |     v1 = sp + 0x54;
    0x00000b88 move a0, v1               |     a0 = v1;
    0x00000b8c lw t9, -0x7f84(gp)        |     t9 = sym.imp.memset;
    0x00000b90 addiu a2, zero, 0x20      |     a2 = 0x20;
    0x00000b94 move a1, zero             |     a1 = 0;
    0x00000b98 jalr t9                   |     t9 ();
    0x00000b9c lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000ba0 move a2, v0               |     a2 = v0;
    0x00000ba4 lw a1, 0xc(s7)            |     a1 = *((s7 + 3));
    0x00000ba8 lw t9, -0x7f98(gp)        |     t9 = sym.imp.getaddrinfo;
    0x00000bac addiu v0, zero, 2         |     v0 = 2;
    0x00000bb0 lw a0, 8(s7)              |     a0 = *((s7 + 2));
    0x00000bb4 addiu a3, sp, 0x40        |     a3 = sp + 0x40;
    0x00000bb8 sw v0, 0x5c(sp)           |     *(var_5ch) = v0;
    0x00000bbc jalr t9                   |     t9 ();
    0x00000bc0 move fp, v0               |     fp = v0;
    0x00000bc4 lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 != 0) {
    0x00000bc8 bnez v0, 0xf80            |         goto label_14;
                                         |     }
    0x00000bcc lw s0, 0x40(sp)           |     s0 = *(var_40h);
    0x00000bd0 lw v0, -0x7fdc(gp)        |     v0 = *((gp - 8183));
                                         |     if (s0 == 0) {
    0x00000bd4 beqz s0, 0xe68            |         goto label_15;
                                         |     }
    0x00000bd8 lw s3, -0x7fdc(gp)        |     s3 = *((gp - 8183));
    0x00000bdc sw v0, 0x24(sp)           |     *(var_24h) = v0;
    0x00000be0 lw v0, -0x7fd8(gp)        |     v0 = *((gp - 8182));
    0x00000be4 addiu v0, v0, 0x15a0      |     v0 += str.Failed_to_set_back_nonblocking_flag_on_socket:__s_n;
    0x00000be8 sw v0, 0x34(sp)           |     *(var_34h) = v0;
    0x00000bec lw v0, -0x7fd8(gp)        |     v0 = *((gp - 8182));
    0x00000bf0 addiu v0, v0, 0x14ec      |     v0 += str.Failed_to_get_socket_flags:__s_n;
    0x00000bf4 sw v0, 0x2c(sp)           |     *(var_2ch) = v0;
    0x00000bf8 lw v0, -0x7fd8(gp)        |     v0 = *((gp - 8182));
    0x00000bfc addiu v0, v0, 0x1584      |     v0 += str.Error_in_getsockopt__:__s_n;
    0x00000c00 sw v0, 0x30(sp)           |     *(var_30h) = v0;
    0x00000c04 b 0xc84                   |     goto label_16;
                                         | label_0:
    0x00000c08 move s4, zero             |     s4 = 0;
    0x00000c0c move s2, zero             |     s2 = 0;
                                         | label_1:
    0x00000c10 lw t9, -0x7f80(gp)        |     t9 = sym.imp.fcntl;
    0x00000c14 move a2, zero             |     a2 = 0;
    0x00000c18 addiu a1, zero, 3         |     a1 = 3;
    0x00000c1c move a0, s1               |     a0 = s1;
    0x00000c20 jalr t9                   |     t9 ();
    0x00000c24 lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 < 0) {
    0x00000c28 bltz v0, 0xfac            |         goto label_17;
                                         |     }
    0x00000c2c lw t9, -0x7f80(gp)        |     t9 = sym.imp.fcntl;
    0x00000c30 addiu a2, zero, -0x81     |     a2 = -0x81;
    0x00000c34 and a2, v0, a2            |     a2 = v0 & a2;
    0x00000c38 addiu a1, zero, 4         |     a1 = 4;
    0x00000c3c move a0, s1               |     a0 = s1;
    0x00000c40 jalr t9                   |     t9 ();
    0x00000c44 lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 < 0) {
    0x00000c48 bltz v0, 0x1070           |         goto label_18;
                                         |     }
    0x00000c4c sw s2, (s5)               |     *(s5) = s2;
                                         |     if (s2 != 0) {
    0x00000c50 bnel s2, zero, 0xc54      |         
                                         |     }
    0x00000c54 addiu s2, zero, -1        |     s2 = -1;
    0x00000c58 lw a1, -0x7fd8(gp)        |     a1 = *((gp - 8182));
                                         |     if (s4 != s2) {
    0x00000c5c bne s4, s2, 0xf1c         |         goto label_19;
                                         |     }
                                         | label_10:
    0x00000c60 lw v0, 0x24(sp)           |     v0 = *(var_24h);
    0x00000c64 lw v0, 0x20e4(v0)         |     v0 = *((v0 + 2105));
    0x00000c68 lw v0, 0x20e0(s3)         |     v0 = *((s3 + 2104));
                                         |     if (v0 != 0) {
    0x00000c6c bnez v0, 0xf54            |         goto label_20;
                                         |     }
    0x00000c70 lw t9, -0x7fb0(gp)        |     t9 = sym.imp.close;
                                         |     if (v0 != 0) {
    0x00000c74 bnez v0, 0xde4            |         goto label_21;
                                         |     }
                                         |     do {
                                         | label_3:
    0x00000c78 lw s0, 0x1c(s0)           |         s0 = *((s0 + 7));
    0x00000c7c lw v0, -0x7f54(gp)        |         v0 = *((gp - 8149));
                                         |         if (s0 == 0) {
    0x00000c80 beqz s0, 0xe70            |             goto label_22;
                                         |         }
                                         | label_16:
    0x00000c84 lw t9, -0x7f94(gp)        |         t9 = sym.imp.socket;
    0x00000c88 lw a2, 0xc(s0)            |         a2 = *((s0 + 3));
    0x00000c8c lw a1, 8(s0)              |         a1 = *((s0 + 2));
    0x00000c90 lw a0, 4(s0)              |         a0 = *((s0 + 1));
    0x00000c94 jalr t9                   |         t9 ();
    0x00000c98 move s1, v0               |         s1 = v0;
    0x00000c9c addiu v0, zero, -1        |         v0 = -1;
    0x00000ca0 lw gp, 0x18(sp)           |         gp = *(var_18h);
    0x00000ca4 beq s1, v0, 0xc78         |         
                                         |     } while (s1 == v0);
    0x00000ca8 lw t9, -0x7f80(gp)        |     t9 = sym.imp.fcntl;
    0x00000cac addiu v0, zero, 4         |     v0 = 4;
    0x00000cb0 move a2, zero             |     a2 = 0;
    0x00000cb4 addiu a1, zero, 3         |     a1 = 3;
    0x00000cb8 move a0, s1               |     a0 = s1;
    0x00000cbc sw zero, 0x20e0(s3)       |     *((s3 + 2104)) = 0;
    0x00000cc0 sw zero, 0x44(sp)         |     *(var_44h) = 0;
    0x00000cc4 sw v0, 0x48(sp)           |     *(var_48h) = v0;
    0x00000cc8 lw s2, 0x14(s0)           |     s2 = *((s0 + 5));
    0x00000ccc jalr t9                   |     t9 ();
    0x00000cd0 lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 < 0) {
    0x00000cd4 bltz v0, 0xfac            |         goto label_17;
                                         |     }
    0x00000cd8 lw t9, -0x7f80(gp)        |     t9 = sym.imp.fcntl;
    0x00000cdc ori a2, v0, 0x80          |     a2 = v0 | 0x80;
    0x00000ce0 addiu a1, zero, 4         |     a1 = 4;
    0x00000ce4 move a0, s1               |     a0 = s1;
    0x00000ce8 jalr t9                   |     t9 ();
    0x00000cec lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 < 0) {
    0x00000cf0 bltz v0, 0x1034           |         goto label_23;
                                         |     }
    0x00000cf4 lhu v0, (s2)              |     v0 = *(s2);
    0x00000cf8 addiu v1, zero, 2         |     v1 = 2;
    0x00000cfc addiu v1, zero, 0xa       |     v1 = 0xa;
                                         |     if (v0 == v1) {
    0x00000d00 beq v0, v1, 0xddc         |         goto label_24;
                                         |     }
    0x00000d04 addiu a2, zero, 0x1c      |     a2 = 0x1c;
                                         |     if (v0 != v1) {
    0x00000d08 bne v0, v1, 0x100c        |         goto label_25;
                                         |     }
                                         | label_2:
    0x00000d0c lw t9, -0x7fac(gp)        |     t9 = sym.imp.connect;
    0x00000d10 move a1, s2               |     a1 = s2;
    0x00000d14 move a0, s1               |     a0 = s1;
    0x00000d18 jalr t9                   |     t9 ();
    0x00000d1c lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 >= 0) {
    0x00000d20 bgez v0, 0xc08            |         goto label_0;
                                         |     }
    0x00000d24 lw v1, (s5)               |     v1 = *(s5);
    0x00000d28 addiu v0, zero, 0x96      |     v0 = 0x96;
    0x00000d2c move s2, zero             |     s2 = 0;
                                         |     if (v1 != v0) {
    0x00000d30 bne v1, v0, 0xdd4         |         goto label_7;
                                         |     }
    0x00000d34 lw v0, 0x28(sp)           |     v0 = *(var_28h);
    0x00000d38 sw zero, 0x50(sp)         |     *(var_50h) = 0;
    0x00000d3c sw v0, 0x4c(sp)           |     *(var_4ch) = v0;
    0x00000d40 addiu v1, sp, 0xf4        |     v1 = sp + 0xf4;
    0x00000d44 move v0, s6               |     v0 = s6;
    0x00000d48 sw zero, (v0)             |     *(v0) = 0;
                                         |     do {
    0x00000d4c addiu v0, v0, 4           |         v0 += 4;
    0x00000d50 sw zero, (v0)             |         *(v0) = 0;
    0x00000d54 bnel v0, v1, 0xd4c        |         
                                         |     } while (v0 == v1);
    0x00000d58 lw t9, -0x7f60(gp)        |     t9 = sym.imp.__fdelt_chk;
    0x00000d5c move a0, s1               |     a0 = s1;
    0x00000d60 jalr t9                   |     t9 ();
    0x00000d64 addiu v1, zero, 0x20      |     v1 = 0x20;
    0x00000d68 div zero, s1, v1          |     __asm ("div zero, s1, v1");
    0x00000d6c teq v1, zero, 7           |     __asm ("teq v1, zero, 7");
    0x00000d70 addiu a0, sp, 0x108       |     a0 = sp + 0x108;
    0x00000d74 sll v0, v0, 2             |     v0 <<= 2;
    0x00000d78 addu v0, a0, v0           |     v0 = a0 + v0;
    0x00000d7c lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000d80 lw t0, -0x94(v0)          |     t0 = *((v0 - 37));
    0x00000d84 addiu s2, zero, 1         |     s2 = 1;
    0x00000d88 addiu a0, sp, 0x4c        |     a0 = sp + 0x4c;
    0x00000d8c lw t9, -0x7f5c(gp)        |     t9 = sym.imp.select;
    0x00000d90 sw a0, 0x10(sp)           |     *(var_10h) = a0;
    0x00000d94 move a3, zero             |     a3 = 0;
    0x00000d98 move a2, s6               |     a2 = s6;
    0x00000d9c move a1, zero             |     a1 = 0;
    0x00000da0 addiu a0, s1, 1           |     a0 = s1 + 1;
    0x00000da4 mfhi v1                   |     __asm ("mfhi v1");
    0x00000da8 sllv v1, s2, v1           |     v1 = s2 << v1;
    0x00000dac or v1, v1, t0             |     v1 |= t0;
    0x00000db0 sw v1, -0x94(v0)          |     *((v0 - 37)) = v1;
    0x00000db4 jalr t9                   |     t9 ();
    0x00000db8 lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 < 0) {
    0x00000dbc bltz v0, 0xecc            |         goto label_26;
                                         |     }
    0x00000dc0 addiu s4, zero, -1        |     s4 = -1;
                                         |     if (v0 != 0) {
    0x00000dc4 bnez v0, 0xe30            |         goto label_27;
                                         |     }
    0x00000dc8 sw s2, 0x20e0(s3)         |     *((s3 + 2104)) = s2;
    0x00000dcc addiu s2, zero, 0x91      |     s2 = 0x91;
    0x00000dd0 b 0xc10                   |     goto label_1;
                                         | label_7:
    0x00000dd4 addiu s4, zero, -1        |     s4 = -1;
    0x00000dd8 b 0xc10                   |     goto label_1;
                                         | label_24:
    0x00000ddc addiu a2, zero, 0x10      |     a2 = 0x10;
    0x00000de0 b 0xd0c                   |     goto label_2;
                                         | label_21:
    0x00000de4 move a0, s1               |     a0 = s1;
    0x00000de8 jalr t9                   |     t9 ();
    0x00000dec addiu s1, zero, -1        |     s1 = -1;
    0x00000df0 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000df4 b 0xc78                   |     goto label_3;
                                         | label_12:
    0x00000df8 lui v0, 0x7fff            |     v0 = 0x7fff0000;
    0x00000dfc lw v1, 0x28(sp)           |     v1 = *(var_28h);
    0x00000e00 ori v0, v0, 0xffff        |     v0 |= 0xffff;
    0x00000e04 addu v0, v1, v0           |     v0 = v1 + v0;
    0x00000e08 sltiu v0, v0, -2          |     v0 = (v0 < -2) ? 1 : 0;
    0x00000e0c lw v0, 0x28(sp)           |     v0 = *(var_28h);
                                         |     if (v0 != 0) {
    0x00000e10 bnez v0, 0xab4            |         goto label_4;
                                         |     }
                                         | label_13:
    0x00000e14 lw a0, -0x7fd8(gp)        |     a0 = *((gp - 8182));
    0x00000e18 lw t9, -0x7f68(gp)        |     t9 = sym.imp.perror;
    0x00000e1c addiu a0, a0, 0x14d0      |     a0 += str.strtol;
    0x00000e20 jalr t9                   |     t9 ();
    0x00000e24 addiu fp, zero, 1         |     fp = 1;
    0x00000e28 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000e2c b 0xa44                   |     goto label_5;
                                         | label_27:
    0x00000e30 lw t9, -0x7f64(gp)        |     t9 = sym.imp.getsockopt;
    0x00000e34 addiu v0, sp, 0x48        |     v0 = sp + 0x48;
    0x00000e38 sw v0, 0x10(sp)           |     *(var_10h) = v0;
    0x00000e3c addiu a3, sp, 0x44        |     a3 = sp + 0x44;
    0x00000e40 addiu a2, zero, 0x1007    |     a2 = 0x1007;
    0x00000e44 ori a1, zero, 0xffff      |     a1 = 0xffff;
    0x00000e48 move a0, s1               |     a0 = s1;
    0x00000e4c jalr t9                   |     t9 ();
    0x00000e50 lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 < 0) {
    0x00000e54 bltz v0, 0xfe4            |         goto label_28;
                                         |     }
    0x00000e58 lw s2, 0x44(sp)           |     s2 = *(var_44h);
    0x00000e5c sltu s4, zero, s2         |     s4 = (0 < s2) ? 1 : 0;
    0x00000e60 negu s4, s4               |     __asm ("negu s4, s4");
    0x00000e64 b 0xc10                   |     goto label_1;
                                         | label_15:
    0x00000e68 addiu s1, zero, -1        |     s1 = -1;
                                         | label_9:
    0x00000e6c lw v0, -0x7f54(gp)        |     v0 = *((gp - 8149));
                                         | label_22:
    0x00000e70 lw t9, -0x7f70(gp)        |     t9 = sym.imp.strerror;
    0x00000e74 lw a0, (s5)               |     a0 = *(s5);
    0x00000e78 lw s0, (v0)               |     s0 = *(v0);
    0x00000e7c lw s2, 8(s7)              |     s2 = *((s7 + 2));
    0x00000e80 jalr t9                   |     t9 ();
    0x00000e84 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000e88 sw v0, 0x10(sp)           |     *(var_10h) = v0;
    0x00000e8c move a3, s2               |     a3 = s2;
    0x00000e90 lw a2, -0x7fd8(gp)        |     a2 = *((gp - 8182));
    0x00000e94 lw t9, -0x7f9c(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00000e98 addiu a2, a2, 0x1610      |     a2 += str.cant_connect_to_remote_host___s_:__s_n;
    0x00000e9c addiu a1, zero, 1         |     a1 = 1;
    0x00000ea0 move a0, s0               |     a0 = s0;
    0x00000ea4 jalr t9                   |     t9 ();
    0x00000ea8 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000eac addiu fp, zero, 1         |     fp = 1;
                                         | label_8:
    0x00000eb0 lw a0, 0x40(sp)           |     a0 = *(var_40h);
                                         |     if (s1 < 0) {
    0x00000eb4 bltz s1, 0xa48            |         goto label_6;
                                         |     }
    0x00000eb8 lw t9, -0x7fb0(gp)        |     t9 = sym.imp.close;
    0x00000ebc move a0, s1               |     a0 = s1;
    0x00000ec0 jalr t9                   |     t9 ();
    0x00000ec4 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000ec8 b 0xa44                   |     goto label_5;
                                         | label_26:
    0x00000ecc lw a0, (s5)               |     a0 = *(s5);
    0x00000ed0 addiu v0, zero, 4         |     v0 = 4;
                                         |     if (a0 == v0) {
    0x00000ed4 beql a0, v0, 0xdd4        |         goto label_7;
                                         |     }
    0x00000ed8 move s2, zero             |     s2 = 0;
    0x00000edc lw v0, -0x7f54(gp)        |     v0 = *((gp - 8149));
    0x00000ee0 lw t9, -0x7f70(gp)        |     t9 = sym.imp.strerror;
    0x00000ee4 lw s2, (v0)               |     s2 = *(v0);
    0x00000ee8 jalr t9                   |     t9 ();
    0x00000eec lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000ef0 move a3, v0               |     a3 = v0;
    0x00000ef4 lw a2, -0x7fd8(gp)        |     a2 = *((gp - 8182));
    0x00000ef8 lw t9, -0x7f9c(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00000efc addiu a2, a2, 0x156c      |     a2 += str.Error_in_select:__s_n;
                                         | label_11:
    0x00000f00 move a0, s2               |     a0 = s2;
    0x00000f04 addiu a1, zero, 1         |     a1 = 1;
    0x00000f08 jalr t9                   |     t9 ();
    0x00000f0c move s2, zero             |     s2 = 0;
    0x00000f10 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000f14 addiu s4, zero, -1        |     s4 = -1;
    0x00000f18 b 0xc10                   |     goto label_1;
                                         | label_19:
    0x00000f1c lw t9, -0x7fb4(gp)        |     t9 = sym.imp.send;
    0x00000f20 move a3, zero             |     a3 = 0;
    0x00000f24 addiu a2, zero, 5         |     a2 = 5;
    0x00000f28 addiu a1, a1, 0x1600      |     a1 += str.TEST_n;
    0x00000f2c move a0, s1               |     a0 = s1;
    0x00000f30 jalr t9                   |     t9 ();
    0x00000f34 lw gp, 0x18(sp)           |     gp = *(var_18h);
                                         |     if (v0 != s2) {
    0x00000f38 bne v0, s2, 0xeb0         |         goto label_8;
                                         |     }
    0x00000f3c lw a0, -0x7fd8(gp)        |     a0 = *((gp - 8182));
    0x00000f40 lw t9, -0x7f68(gp)        |     t9 = sym.imp.perror;
    0x00000f44 addiu a0, a0, 0x1608      |     a0 += str.send;
    0x00000f48 jalr t9                   |     t9 ();
    0x00000f4c lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000f50 b 0xe6c                   |     goto label_9;
                                         | label_20:
    0x00000f54 lw v0, -0x7f54(gp)        |     v0 = *((gp - 8149));
    0x00000f58 lw a0, -0x7fd8(gp)        |     a0 = *((gp - 8182));
    0x00000f5c lw t9, -0x7f6c(gp)        |     t9 = sym.imp.fwrite;
    0x00000f60 lw a3, (v0)               |     a3 = *(v0);
    0x00000f64 addiu a2, zero, 0x28      |     a2 = 0x28;
    0x00000f68 addiu a1, zero, 1         |     a1 = 1;
    0x00000f6c addiu a0, a0, 0x15d4      |     a0 += str.termination_requested__shutting_down..._n;
    0x00000f70 jalr t9                   |     t9 ();
    0x00000f74 addiu fp, zero, 1         |     fp = 1;
    0x00000f78 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000f7c b 0xeb0                   |     goto label_8;
                                         | label_14:
    0x00000f80 lw v0, -0x7f54(gp)        |     v0 = *((gp - 8149));
    0x00000f84 lw a2, -0x7fd8(gp)        |     a2 = *((gp - 8182));
    0x00000f88 lw t9, -0x7f9c(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00000f8c lw a3, 8(s7)              |     a3 = *((s7 + 2));
    0x00000f90 lw a0, (v0)               |     a0 = *(v0);
    0x00000f94 addiu a2, a2, 0x14d8      |     a2 += str.bad_address__s_n;
    0x00000f98 addiu a1, zero, 1         |     a1 = 1;
    0x00000f9c jalr t9                   |     t9 ();
    0x00000fa0 addiu fp, zero, 1         |     fp = 1;
    0x00000fa4 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000fa8 b 0xa44                   |     goto label_5;
                                         | label_17:
    0x00000fac lw v0, -0x7f54(gp)        |     v0 = *((gp - 8149));
    0x00000fb0 lw t9, -0x7f70(gp)        |     t9 = sym.imp.strerror;
    0x00000fb4 lw a0, (s5)               |     a0 = *(s5);
    0x00000fb8 lw s2, (v0)               |     s2 = *(v0);
    0x00000fbc jalr t9                   |     t9 ();
    0x00000fc0 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000fc4 lw a2, 0x2c(sp)           |     a2 = *(var_2ch);
    0x00000fc8 move a3, v0               |     a3 = v0;
    0x00000fcc lw t9, -0x7f9c(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00000fd0 addiu a1, zero, 1         |     a1 = 1;
    0x00000fd4 move a0, s2               |     a0 = s2;
    0x00000fd8 jalr t9                   |     t9 ();
    0x00000fdc lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000fe0 b 0xc60                   |     goto label_10;
                                         | label_28:
    0x00000fe4 lw v0, -0x7f54(gp)        |     v0 = *((gp - 8149));
    0x00000fe8 lw t9, -0x7f70(gp)        |     t9 = sym.imp.strerror;
    0x00000fec lw a0, (s5)               |     a0 = *(s5);
    0x00000ff0 lw s2, (v0)               |     s2 = *(v0);
    0x00000ff4 jalr t9                   |     t9 ();
    0x00000ff8 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00000ffc move a3, v0               |     a3 = v0;
    0x00001000 lw a2, 0x30(sp)           |     a2 = *(var_30h);
    0x00001004 lw t9, -0x7f9c(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00001008 b 0xf00                   |     goto label_11;
                                         | label_25:
    0x0000100c lw v0, -0x7f54(gp)        |     v0 = *((gp - 8149));
    0x00001010 lw a0, -0x7fd8(gp)        |     a0 = *((gp - 8182));
    0x00001014 lw t9, -0x7f6c(gp)        |     t9 = sym.imp.fwrite;
    0x00001018 lw a3, (v0)               |     a3 = *(v0);
    0x0000101c addiu a2, zero, 0x2d      |     a2 = 0x2d;
    0x00001020 addiu a1, zero, 1         |     a1 = 1;
    0x00001024 addiu a0, a0, 0x153c      |     a0 += str.Unknown_address_type___neither_IPv4_nor_IPv6_n;
    0x00001028 jalr t9                   |     t9 ();
    0x0000102c lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00001030 b 0xc60                   |     goto label_10;
                                         | label_23:
    0x00001034 lw v0, -0x7f54(gp)        |     v0 = *((gp - 8149));
    0x00001038 lw t9, -0x7f70(gp)        |     t9 = sym.imp.strerror;
    0x0000103c lw a0, (s5)               |     a0 = *(s5);
    0x00001040 lw s2, (v0)               |     s2 = *(v0);
    0x00001044 jalr t9                   |     t9 ();
    0x00001048 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x0000104c move a3, v0               |     a3 = v0;
    0x00001050 addiu a1, zero, 1         |     a1 = 1;
    0x00001054 lw a2, -0x7fd8(gp)        |     a2 = *((gp - 8182));
    0x00001058 lw t9, -0x7f9c(gp)        |     t9 = sym.imp.__fprintf_chk
    0x0000105c addiu a2, a2, 0x150c      |     a2 += str.Failed_to_set_O_NONBLOCK_flag_on_socket:__s_n;
    0x00001060 move a0, s2               |     a0 = s2;
    0x00001064 jalr t9                   |     t9 ();
    0x00001068 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x0000106c b 0xc60                   |     goto label_10;
                                         | label_18:
    0x00001070 lw v0, -0x7f54(gp)        |     v0 = *((gp - 8149));
    0x00001074 lw t9, -0x7f70(gp)        |     t9 = sym.imp.strerror;
    0x00001078 lw a0, (s5)               |     a0 = *(s5);
    0x0000107c lw s2, (v0)               |     s2 = *(v0);
    0x00001080 jalr t9                   |     t9 ();
    0x00001084 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x00001088 lw a2, 0x34(sp)           |     a2 = *(var_34h);
    0x0000108c move a3, v0               |     a3 = v0;
    0x00001090 lw t9, -0x7f9c(gp)        |     t9 = sym.imp.__fprintf_chk
    0x00001094 addiu a1, zero, 1         |     a1 = 1;
    0x00001098 move a0, s2               |     a0 = s2;
    0x0000109c jalr t9                   |     t9 ();
    0x000010a0 lw gp, 0x18(sp)           |     gp = *(var_18h);
    0x000010a4 b 0xc60                   |     goto label_10;
                                         | }

[*] Function printf used 9 times tcptest