
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void try_send(Actual_Socket_conflict s)

{
  bufchain *ch;
  ulong data_00;
  ulong *puVar1;
  size_t __n;
  int iVar2;
  int in_GS_OFFSET;
  void *data;
  int len;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x678d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __n = s->sending_oob;
  ch = &s->output_data;
LAB_00067900:
  if (__n == 0) goto LAB_0006794a;
LAB_00067904:
  data = s->oobdata;
  iVar2 = 1;
  len = __n;
  do {
    data_00 = send(s->s,data,len,iVar2);
    noise_ultralight(data_00);
    if ((int)data_00 < 1) {
      if (data_00 != 0) {
        puVar1 = (ulong *)__errno_location();
        data_00 = *puVar1;
        if (data_00 == 0xb) {
          s->writable = 0;
          goto LAB_000679fb;
        }
      }
      s->pending_error = data_00;
      uxsel_tell(s);
      queue_toplevel_callback(socket_error_callback,s);
LAB_000679fb:
      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
        __stack_chk_fail_local();
      }
      return;
    }
    if (s->sending_oob == 0) {
      bufchain_consume(ch,data_00);
      __n = s->sending_oob;
      goto LAB_00067900;
    }
    if ((int)data_00 < len) {
      __n = len - data_00;
      memmove(s->oobdata,s->oobdata + data_00,__n);
      s->sending_oob = __n;
      goto LAB_00067900;
    }
    s->sending_oob = 0;
LAB_0006794a:
    iVar2 = bufchain_size(ch);
    if (iVar2 < 1) {
      if (s->outgoingeof == ADDRTYPE_IPV4) {
        shutdown(s->s,1);
        s->outgoingeof = ADDRTYPE_IPV6;
      }
      uxsel_tell(s);
      goto LAB_000679fb;
    }
    __n = s->sending_oob;
    if (__n != 0) goto LAB_00067904;
    bufchain_prefix(ch,&data,&len);
    iVar2 = 0;
  } while( true );
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_000678d0(int param_1)

{
  int iVar1;
  int *piVar2;
  size_t __n;
  int iVar3;
  int in_GS_OFFSET;
  void *local_28;
  size_t local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x678d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __n = *(size_t *)(param_1 + 0x30);
  iVar1 = param_1 + 0x10;
LAB_00067900:
  if (__n == 0) goto LAB_0006794a;
LAB_00067904:
  local_28 = (void *)(param_1 + 0x2c);
  iVar3 = 1;
  local_24 = __n;
  do {
    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);
    FUN_00068a80(iVar3);
    if (iVar3 < 1) {
      if (iVar3 != 0) {
        piVar2 = __errno_location();
        iVar3 = *piVar2;
        if (iVar3 == 0xb) {
          *(undefined4 *)(param_1 + 0x20) = 0;
          goto LAB_000679fb;
        }
      }
      *(int *)(param_1 + 0x44) = iVar3;
      FUN_00066370();
      FUN_00014ec0(FUN_00066420,param_1);
LAB_000679fb:
      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
        FUN_0006f2a0();
      }
      return;
    }
    if (*(int *)(param_1 + 0x30) == 0) {
      FUN_0001a830(iVar1,iVar3);
      __n = *(size_t *)(param_1 + 0x30);
      goto LAB_00067900;
    }
    if (iVar3 < (int)local_24) {
      __n = local_24 - iVar3;
      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);
      *(size_t *)(param_1 + 0x30) = __n;
      goto LAB_00067900;
    }
    *(undefined4 *)(param_1 + 0x30) = 0;
LAB_0006794a:
    iVar3 = FUN_0001a820(iVar1);
    if (iVar3 < 1) {
      if (*(int *)(param_1 + 0x3c) == 1) {
        shutdown(*(int *)(param_1 + 8),1);
        *(undefined4 *)(param_1 + 0x3c) = 2;
      }
      FUN_00066370();
      goto LAB_000679fb;
    }
    __n = *(size_t *)(param_1 + 0x30);
    if (__n != 0) goto LAB_00067904;
    FUN_0001a8f0(iVar1,&local_28,&local_24);
    iVar3 = 0;
  } while( true );
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00014980
ADD EBX,0x41497
SUB ESP,0x2c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x40]
LEA EAX,[ESP + 0x18]
MOV dword ptr [ESP + 0xc],EAX
MOV EDX,dword ptr [ESI + 0x30]
LEA EDI,[ESI + 0x10]
TEST EDX,EDX
JZ 0x0006794a
LEA ECX,[ESI + 0x2c]
MOV dword ptr [ESP + 0x18],EDX
MOV EBP,0x1
MOV dword ptr [ESP + 0x14],ECX
PUSH EBP
PUSH EDX
PUSH ECX
PUSH dword ptr [ESI + 0x8]
CALL 0x000148a0
MOV EBP,EAX
MOV dword ptr [ESP],EAX
CALL 0x00068a80
ADD ESP,0x10
TEST EBP,EBP
JLE 0x000679d0
MOV EAX,dword ptr [ESI + 0x30]
TEST EAX,EAX
JZ 0x00067990
MOV EDX,dword ptr [ESP + 0x18]
CMP EDX,EBP
JG 0x000679a8
MOV dword ptr [ESI + 0x30],0x0
SUB ESP,0xc
PUSH EDI
CALL 0x0001a820
ADD ESP,0x10
TEST EAX,EAX
JLE 0x00067a10
MOV EBP,dword ptr [ESI + 0x30]
TEST EBP,EBP
JNZ 0x00067a47
SUB ESP,0x4
PUSH dword ptr [ESP + 0x10]
LEA EDX,[ESP + 0x1c]
PUSH EDX
PUSH EDI
CALL 0x0001a8f0
MOV EDX,dword ptr [ESP + 0x28]
MOV ECX,dword ptr [ESP + 0x24]
ADD ESP,0x10
JMP 0x00067914
SUB ESP,0x8
PUSH EBP
PUSH EDI
CALL 0x0001a830
MOV EDX,dword ptr [ESI + 0x30]
ADD ESP,0x10
JMP 0x00067900
SUB ESP,0x4
SUB EDX,EBP
LEA ECX,[ESI + 0x2c]
PUSH EDX
LEA EAX,[ECX + EBP*0x1]
MOV dword ptr [ESP + 0x10],EDX
PUSH EAX
PUSH ECX
CALL 0x00014110
MOV EDX,dword ptr [ESP + 0x18]
ADD ESP,0x10
MOV dword ptr [ESI + 0x30],EDX
JMP 0x00067900
JZ 0x000679de
CALL 0x00014550
MOV EBP,dword ptr [EAX]
CMP EBP,0xb
JZ 0x00067a20
MOV dword ptr [ESI + 0x44],EBP
MOV EAX,ESI
CALL 0x00066370
SUB ESP,0x8
LEA EAX,[EBX + 0xfffbd6b0]
PUSH ESI
PUSH EAX
CALL 0x00014ec0
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x1c]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x00067a42
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP dword ptr [ESI + 0x3c],0x1
JZ 0x00067a29
MOV EAX,ESI
CALL 0x00066370
JMP 0x000679fb
MOV dword ptr [ESI + 0x20],0x0
JMP 0x000679fb
SUB ESP,0x8
PUSH 0x1
PUSH dword ptr [ESI + 0x8]
CALL 0x000147d0
MOV dword ptr [ESI + 0x3c],0x2
ADD ESP,0x10
JMP 0x00067a16
CALL 0x0006f2a0
MOV EDX,EBP
JMP 0x00067904
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_000678d0(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  size_t __n;\n  int iVar3;\n  int in_GS_OFFSET;\n  void *local_28;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x678d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __n = *(size_t *)(param_1 + 0x30);\n  iVar1 = param_1 + 0x10;\nLAB_00067900:\n  if (__n == 0) goto LAB_0006794a;\nLAB_00067904:\n  local_28 = (void *)(param_1 + 0x2c);\n  iVar3 = 1;\n  local_24 = __n;\n  do {\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  } while( true );\n}\n\n" comment (function_definition "void FUN_000678d0(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  size_t __n;\n  int iVar3;\n  int in_GS_OFFSET;\n  void *local_28;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x678d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __n = *(size_t *)(param_1 + 0x30);\n  iVar1 = param_1 + 0x10;\nLAB_00067900:\n  if (__n == 0) goto LAB_0006794a;\nLAB_00067904:\n  local_28 = (void *)(param_1 + 0x2c);\n  iVar3 = 1;\n  local_24 = __n;\n  do {\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  } while( true );\n}" primitive_type (function_declarator "FUN_000678d0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  size_t __n;\n  int iVar3;\n  int in_GS_OFFSET;\n  void *local_28;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x678d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __n = *(size_t *)(param_1 + 0x30);\n  iVar1 = param_1 + 0x10;\nLAB_00067900:\n  if (__n == 0) goto LAB_0006794a;\nLAB_00067904:\n  local_28 = (void *)(param_1 + 0x2c);\n  iVar3 = 1;\n  local_24 = __n;\n  do {\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "void *local_28;" primitive_type (pointer_declarator "*local_28" * identifier) ;) (declaration "size_t local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x678d9;" (assignment_expression "uStack_14 = 0x678d9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__n = *(size_t *)(param_1 + 0x30);" (assignment_expression "__n = *(size_t *)(param_1 + 0x30)" identifier = (pointer_expression "*(size_t *)(param_1 + 0x30)" * (cast_expression "(size_t *)(param_1 + 0x30)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = param_1 + 0x10;" (assignment_expression "iVar1 = param_1 + 0x10" identifier = (binary_expression "param_1 + 0x10" identifier + number_literal)) ;) (labeled_statement "LAB_00067900:\n  if (__n == 0) goto LAB_0006794a;" statement_identifier : (if_statement "if (__n == 0) goto LAB_0006794a;" if (parenthesized_expression "(__n == 0)" ( (binary_expression "__n == 0" identifier == number_literal) )) (goto_statement "goto LAB_0006794a;" goto statement_identifier ;))) (labeled_statement "LAB_00067904:\n  local_28 = (void *)(param_1 + 0x2c);" statement_identifier : (expression_statement "local_28 = (void *)(param_1 + 0x2c);" (assignment_expression "local_28 = (void *)(param_1 + 0x2c)" identifier = (cast_expression "(void *)(param_1 + 0x2c)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) ;)) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) (expression_statement "local_24 = __n;" (assignment_expression "local_24 = __n" identifier = identifier) ;) (do_statement "do {\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  } while( true );" do (compound_statement "{\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  }" { (expression_statement "iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);" (assignment_expression "iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3)" identifier = (call_expression "send(*(int *)(param_1 + 8),local_28,local_24,iVar3)" identifier (argument_list "(*(int *)(param_1 + 8),local_28,local_24,iVar3)" ( (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , identifier , identifier , identifier )))) ;) (expression_statement "FUN_00068a80(iVar3);" (call_expression "FUN_00068a80(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (if_statement "if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        FUN_0006f2a0();\n      }\n      return;\n    }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        FUN_0006f2a0();\n      }\n      return;\n    }" { (if_statement "if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = *piVar2;" (assignment_expression "iVar3 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (if_statement "if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }" if (parenthesized_expression "(iVar3 == 0xb)" ( (binary_expression "iVar3 == 0xb" identifier == number_literal) )) (compound_statement "{\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }" { (expression_statement "*(undefined4 *)(param_1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = number_literal) ;) (goto_statement "goto LAB_000679fb;" goto statement_identifier ;) })) })) (expression_statement "*(int *)(param_1 + 0x44) = iVar3;" (assignment_expression "*(int *)(param_1 + 0x44) = iVar3" (pointer_expression "*(int *)(param_1 + 0x44)" * (cast_expression "(int *)(param_1 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) = identifier) ;) (expression_statement "FUN_00066370();" (call_expression "FUN_00066370()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00014ec0(FUN_00066420,param_1);" (call_expression "FUN_00014ec0(FUN_00066420,param_1)" identifier (argument_list "(FUN_00066420,param_1)" ( identifier , identifier ))) ;) (labeled_statement "LAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        FUN_0006f2a0();\n      }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        FUN_0006f2a0();\n      }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        FUN_0006f2a0();\n      }" { comment (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return;" return ;) })) (if_statement "if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x30) == 0)" ( (binary_expression "*(int *)(param_1 + 0x30) == 0" (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }" { (expression_statement "FUN_0001a830(iVar1,iVar3);" (call_expression "FUN_0001a830(iVar1,iVar3)" identifier (argument_list "(iVar1,iVar3)" ( identifier , identifier ))) ;) (expression_statement "__n = *(size_t *)(param_1 + 0x30);" (assignment_expression "__n = *(size_t *)(param_1 + 0x30)" identifier = (pointer_expression "*(size_t *)(param_1 + 0x30)" * (cast_expression "(size_t *)(param_1 + 0x30)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_00067900;" goto statement_identifier ;) })) (if_statement "if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }" if (parenthesized_expression "(iVar3 < (int)local_24)" ( (binary_expression "iVar3 < (int)local_24" identifier < (cast_expression "(int)local_24" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }" { (expression_statement "__n = local_24 - iVar3;" (assignment_expression "__n = local_24 - iVar3" identifier = (binary_expression "local_24 - iVar3" identifier - identifier)) ;) (expression_statement "memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);" (call_expression "memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n)" identifier (argument_list "((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n)" ( (cast_expression "(void *)(param_1 + 0x2c)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) ))) , (cast_expression "(void *)(param_1 + 0x2c + iVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c + iVar3)" ( (binary_expression "param_1 + 0x2c + iVar3" (binary_expression "param_1 + 0x2c" identifier + number_literal) + identifier) ))) , identifier ))) ;) (expression_statement "*(size_t *)(param_1 + 0x30) = __n;" (assignment_expression "*(size_t *)(param_1 + 0x30) = __n" (pointer_expression "*(size_t *)(param_1 + 0x30)" * (cast_expression "(size_t *)(param_1 + 0x30)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto LAB_00067900;" goto statement_identifier ;) })) (expression_statement "*(undefined4 *)(param_1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x30)" * (cast_expression "(undefined4 *)(param_1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = number_literal) ;) (labeled_statement "LAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);" statement_identifier : (expression_statement "iVar3 = FUN_0001a820(iVar1);" (assignment_expression "iVar3 = FUN_0001a820(iVar1)" identifier = (call_expression "FUN_0001a820(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;)) (if_statement "if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }" { (if_statement "if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }" if (parenthesized_expression "(*(int *)(param_1 + 0x3c) == 1)" ( (binary_expression "*(int *)(param_1 + 0x3c) == 1" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }" { (expression_statement "shutdown(*(int *)(param_1 + 8),1);" (call_expression "shutdown(*(int *)(param_1 + 8),1)" identifier (argument_list "(*(int *)(param_1 + 8),1)" ( (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , number_literal ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x3c) = 2;" (assignment_expression "*(undefined4 *)(param_1 + 0x3c) = 2" (pointer_expression "*(undefined4 *)(param_1 + 0x3c)" * (cast_expression "(undefined4 *)(param_1 + 0x3c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) = number_literal) ;) })) (expression_statement "FUN_00066370();" (call_expression "FUN_00066370()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_000679fb;" goto statement_identifier ;) })) (expression_statement "__n = *(size_t *)(param_1 + 0x30);" (assignment_expression "__n = *(size_t *)(param_1 + 0x30)" identifier = (pointer_expression "*(size_t *)(param_1 + 0x30)" * (cast_expression "(size_t *)(param_1 + 0x30)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (if_statement "if (__n != 0) goto LAB_00067904;" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (goto_statement "goto LAB_00067904;" goto statement_identifier ;)) (expression_statement "FUN_0001a8f0(iVar1,&local_28,&local_24);" (call_expression "FUN_0001a8f0(iVar1,&local_28,&local_24)" identifier (argument_list "(iVar1,&local_28,&local_24)" ( identifier , (pointer_expression "&local_28" & identifier) , (pointer_expression "&local_24" & identifier) ))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid try_send(Actual_Socket_conflict s)\n\n{\n  bufchain *ch;\n  ulong data_00;\n  ulong *puVar1;\n  size_t __n;\n  int iVar2;\n  int in_GS_OFFSET;\n  void *data;\n  int len;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x678d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __n = s->sending_oob;\n  ch = &s->output_data;\nLAB_00067900:\n  if (__n == 0) goto LAB_0006794a;\nLAB_00067904:\n  data = s->oobdata;\n  iVar2 = 1;\n  len = __n;\n  do {\n    data_00 = send(s->s,data,len,iVar2);\n    noise_ultralight(data_00);\n    if ((int)data_00 < 1) {\n      if (data_00 != 0) {\n        puVar1 = (ulong *)__errno_location();\n        data_00 = *puVar1;\n        if (data_00 == 0xb) {\n          s->writable = 0;\n          goto LAB_000679fb;\n        }\n      }\n      s->pending_error = data_00;\n      uxsel_tell(s);\n      queue_toplevel_callback(socket_error_callback,s);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        __stack_chk_fail_local();\n      }\n      return;\n    }\n    if (s->sending_oob == 0) {\n      bufchain_consume(ch,data_00);\n      __n = s->sending_oob;\n      goto LAB_00067900;\n    }\n    if ((int)data_00 < len) {\n      __n = len - data_00;\n      memmove(s->oobdata,s->oobdata + data_00,__n);\n      s->sending_oob = __n;\n      goto LAB_00067900;\n    }\n    s->sending_oob = 0;\nLAB_0006794a:\n    iVar2 = bufchain_size(ch);\n    if (iVar2 < 1) {\n      if (s->outgoingeof == ADDRTYPE_IPV4) {\n        shutdown(s->s,1);\n        s->outgoingeof = ADDRTYPE_IPV6;\n      }\n      uxsel_tell(s);\n      goto LAB_000679fb;\n    }\n    __n = s->sending_oob;\n    if (__n != 0) goto LAB_00067904;\n    bufchain_prefix(ch,&data,&len);\n    iVar2 = 0;\n  } while( true );\n}\n\n" comment comment comment (function_definition "void try_send(Actual_Socket_conflict s)\n\n{\n  bufchain *ch;\n  ulong data_00;\n  ulong *puVar1;\n  size_t __n;\n  int iVar2;\n  int in_GS_OFFSET;\n  void *data;\n  int len;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x678d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __n = s->sending_oob;\n  ch = &s->output_data;\nLAB_00067900:\n  if (__n == 0) goto LAB_0006794a;\nLAB_00067904:\n  data = s->oobdata;\n  iVar2 = 1;\n  len = __n;\n  do {\n    data_00 = send(s->s,data,len,iVar2);\n    noise_ultralight(data_00);\n    if ((int)data_00 < 1) {\n      if (data_00 != 0) {\n        puVar1 = (ulong *)__errno_location();\n        data_00 = *puVar1;\n        if (data_00 == 0xb) {\n          s->writable = 0;\n          goto LAB_000679fb;\n        }\n      }\n      s->pending_error = data_00;\n      uxsel_tell(s);\n      queue_toplevel_callback(socket_error_callback,s);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        __stack_chk_fail_local();\n      }\n      return;\n    }\n    if (s->sending_oob == 0) {\n      bufchain_consume(ch,data_00);\n      __n = s->sending_oob;\n      goto LAB_00067900;\n    }\n    if ((int)data_00 < len) {\n      __n = len - data_00;\n      memmove(s->oobdata,s->oobdata + data_00,__n);\n      s->sending_oob = __n;\n      goto LAB_00067900;\n    }\n    s->sending_oob = 0;\nLAB_0006794a:\n    iVar2 = bufchain_size(ch);\n    if (iVar2 < 1) {\n      if (s->outgoingeof == ADDRTYPE_IPV4) {\n        shutdown(s->s,1);\n        s->outgoingeof = ADDRTYPE_IPV6;\n      }\n      uxsel_tell(s);\n      goto LAB_000679fb;\n    }\n    __n = s->sending_oob;\n    if (__n != 0) goto LAB_00067904;\n    bufchain_prefix(ch,&data,&len);\n    iVar2 = 0;\n  } while( true );\n}" primitive_type (function_declarator "try_send(Actual_Socket_conflict s)" identifier (parameter_list "(Actual_Socket_conflict s)" ( (parameter_declaration "Actual_Socket_conflict s" type_identifier identifier) ))) (compound_statement "{\n  bufchain *ch;\n  ulong data_00;\n  ulong *puVar1;\n  size_t __n;\n  int iVar2;\n  int in_GS_OFFSET;\n  void *data;\n  int len;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x678d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __n = s->sending_oob;\n  ch = &s->output_data;\nLAB_00067900:\n  if (__n == 0) goto LAB_0006794a;\nLAB_00067904:\n  data = s->oobdata;\n  iVar2 = 1;\n  len = __n;\n  do {\n    data_00 = send(s->s,data,len,iVar2);\n    noise_ultralight(data_00);\n    if ((int)data_00 < 1) {\n      if (data_00 != 0) {\n        puVar1 = (ulong *)__errno_location();\n        data_00 = *puVar1;\n        if (data_00 == 0xb) {\n          s->writable = 0;\n          goto LAB_000679fb;\n        }\n      }\n      s->pending_error = data_00;\n      uxsel_tell(s);\n      queue_toplevel_callback(socket_error_callback,s);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        __stack_chk_fail_local();\n      }\n      return;\n    }\n    if (s->sending_oob == 0) {\n      bufchain_consume(ch,data_00);\n      __n = s->sending_oob;\n      goto LAB_00067900;\n    }\n    if ((int)data_00 < len) {\n      __n = len - data_00;\n      memmove(s->oobdata,s->oobdata + data_00,__n);\n      s->sending_oob = __n;\n      goto LAB_00067900;\n    }\n    s->sending_oob = 0;\nLAB_0006794a:\n    iVar2 = bufchain_size(ch);\n    if (iVar2 < 1) {\n      if (s->outgoingeof == ADDRTYPE_IPV4) {\n        shutdown(s->s,1);\n        s->outgoingeof = ADDRTYPE_IPV6;\n      }\n      uxsel_tell(s);\n      goto LAB_000679fb;\n    }\n    __n = s->sending_oob;\n    if (__n != 0) goto LAB_00067904;\n    bufchain_prefix(ch,&data,&len);\n    iVar2 = 0;\n  } while( true );\n}" { (declaration "bufchain *ch;" type_identifier (pointer_declarator "*ch" * identifier) ;) (declaration "ulong data_00;" type_identifier identifier ;) (declaration "ulong *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "void *data;" primitive_type (pointer_declarator "*data" * identifier) ;) (declaration "int len;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x678d9;" (assignment_expression "uStack_14 = 0x678d9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__n = s->sending_oob;" (assignment_expression "__n = s->sending_oob" identifier = (field_expression "s->sending_oob" identifier -> field_identifier)) ;) (expression_statement "ch = &s->output_data;" (assignment_expression "ch = &s->output_data" identifier = (pointer_expression "&s->output_data" & (field_expression "s->output_data" identifier -> field_identifier))) ;) (labeled_statement "LAB_00067900:\n  if (__n == 0) goto LAB_0006794a;" statement_identifier : (if_statement "if (__n == 0) goto LAB_0006794a;" if (parenthesized_expression "(__n == 0)" ( (binary_expression "__n == 0" identifier == number_literal) )) (goto_statement "goto LAB_0006794a;" goto statement_identifier ;))) (labeled_statement "LAB_00067904:\n  data = s->oobdata;" statement_identifier : (expression_statement "data = s->oobdata;" (assignment_expression "data = s->oobdata" identifier = (field_expression "s->oobdata" identifier -> field_identifier)) ;)) (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (expression_statement "len = __n;" (assignment_expression "len = __n" identifier = identifier) ;) (do_statement "do {\n    data_00 = send(s->s,data,len,iVar2);\n    noise_ultralight(data_00);\n    if ((int)data_00 < 1) {\n      if (data_00 != 0) {\n        puVar1 = (ulong *)__errno_location();\n        data_00 = *puVar1;\n        if (data_00 == 0xb) {\n          s->writable = 0;\n          goto LAB_000679fb;\n        }\n      }\n      s->pending_error = data_00;\n      uxsel_tell(s);\n      queue_toplevel_callback(socket_error_callback,s);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        __stack_chk_fail_local();\n      }\n      return;\n    }\n    if (s->sending_oob == 0) {\n      bufchain_consume(ch,data_00);\n      __n = s->sending_oob;\n      goto LAB_00067900;\n    }\n    if ((int)data_00 < len) {\n      __n = len - data_00;\n      memmove(s->oobdata,s->oobdata + data_00,__n);\n      s->sending_oob = __n;\n      goto LAB_00067900;\n    }\n    s->sending_oob = 0;\nLAB_0006794a:\n    iVar2 = bufchain_size(ch);\n    if (iVar2 < 1) {\n      if (s->outgoingeof == ADDRTYPE_IPV4) {\n        shutdown(s->s,1);\n        s->outgoingeof = ADDRTYPE_IPV6;\n      }\n      uxsel_tell(s);\n      goto LAB_000679fb;\n    }\n    __n = s->sending_oob;\n    if (__n != 0) goto LAB_00067904;\n    bufchain_prefix(ch,&data,&len);\n    iVar2 = 0;\n  } while( true );" do (compound_statement "{\n    data_00 = send(s->s,data,len,iVar2);\n    noise_ultralight(data_00);\n    if ((int)data_00 < 1) {\n      if (data_00 != 0) {\n        puVar1 = (ulong *)__errno_location();\n        data_00 = *puVar1;\n        if (data_00 == 0xb) {\n          s->writable = 0;\n          goto LAB_000679fb;\n        }\n      }\n      s->pending_error = data_00;\n      uxsel_tell(s);\n      queue_toplevel_callback(socket_error_callback,s);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        __stack_chk_fail_local();\n      }\n      return;\n    }\n    if (s->sending_oob == 0) {\n      bufchain_consume(ch,data_00);\n      __n = s->sending_oob;\n      goto LAB_00067900;\n    }\n    if ((int)data_00 < len) {\n      __n = len - data_00;\n      memmove(s->oobdata,s->oobdata + data_00,__n);\n      s->sending_oob = __n;\n      goto LAB_00067900;\n    }\n    s->sending_oob = 0;\nLAB_0006794a:\n    iVar2 = bufchain_size(ch);\n    if (iVar2 < 1) {\n      if (s->outgoingeof == ADDRTYPE_IPV4) {\n        shutdown(s->s,1);\n        s->outgoingeof = ADDRTYPE_IPV6;\n      }\n      uxsel_tell(s);\n      goto LAB_000679fb;\n    }\n    __n = s->sending_oob;\n    if (__n != 0) goto LAB_00067904;\n    bufchain_prefix(ch,&data,&len);\n    iVar2 = 0;\n  }" { (expression_statement "data_00 = send(s->s,data,len,iVar2);" (assignment_expression "data_00 = send(s->s,data,len,iVar2)" identifier = (call_expression "send(s->s,data,len,iVar2)" identifier (argument_list "(s->s,data,len,iVar2)" ( (field_expression "s->s" identifier -> field_identifier) , identifier , identifier , identifier )))) ;) (expression_statement "noise_ultralight(data_00);" (call_expression "noise_ultralight(data_00)" identifier (argument_list "(data_00)" ( identifier ))) ;) (if_statement "if ((int)data_00 < 1) {\n      if (data_00 != 0) {\n        puVar1 = (ulong *)__errno_location();\n        data_00 = *puVar1;\n        if (data_00 == 0xb) {\n          s->writable = 0;\n          goto LAB_000679fb;\n        }\n      }\n      s->pending_error = data_00;\n      uxsel_tell(s);\n      queue_toplevel_callback(socket_error_callback,s);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        __stack_chk_fail_local();\n      }\n      return;\n    }" if (parenthesized_expression "((int)data_00 < 1)" ( (binary_expression "(int)data_00 < 1" (cast_expression "(int)data_00" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n      if (data_00 != 0) {\n        puVar1 = (ulong *)__errno_location();\n        data_00 = *puVar1;\n        if (data_00 == 0xb) {\n          s->writable = 0;\n          goto LAB_000679fb;\n        }\n      }\n      s->pending_error = data_00;\n      uxsel_tell(s);\n      queue_toplevel_callback(socket_error_callback,s);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        __stack_chk_fail_local();\n      }\n      return;\n    }" { (if_statement "if (data_00 != 0) {\n        puVar1 = (ulong *)__errno_location();\n        data_00 = *puVar1;\n        if (data_00 == 0xb) {\n          s->writable = 0;\n          goto LAB_000679fb;\n        }\n      }" if (parenthesized_expression "(data_00 != 0)" ( (binary_expression "data_00 != 0" identifier != number_literal) )) (compound_statement "{\n        puVar1 = (ulong *)__errno_location();\n        data_00 = *puVar1;\n        if (data_00 == 0xb) {\n          s->writable = 0;\n          goto LAB_000679fb;\n        }\n      }" { (expression_statement "puVar1 = (ulong *)__errno_location();" (assignment_expression "puVar1 = (ulong *)__errno_location()" identifier = (cast_expression "(ulong *)__errno_location()" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "__errno_location()" identifier (argument_list "()" ( ))))) ;) (expression_statement "data_00 = *puVar1;" (assignment_expression "data_00 = *puVar1" identifier = (pointer_expression "*puVar1" * identifier)) ;) (if_statement "if (data_00 == 0xb) {\n          s->writable = 0;\n          goto LAB_000679fb;\n        }" if (parenthesized_expression "(data_00 == 0xb)" ( (binary_expression "data_00 == 0xb" identifier == number_literal) )) (compound_statement "{\n          s->writable = 0;\n          goto LAB_000679fb;\n        }" { (expression_statement "s->writable = 0;" (assignment_expression "s->writable = 0" (field_expression "s->writable" identifier -> field_identifier) = number_literal) ;) (goto_statement "goto LAB_000679fb;" goto statement_identifier ;) })) })) (expression_statement "s->pending_error = data_00;" (assignment_expression "s->pending_error = data_00" (field_expression "s->pending_error" identifier -> field_identifier) = identifier) ;) (expression_statement "uxsel_tell(s);" (call_expression "uxsel_tell(s)" identifier (argument_list "(s)" ( identifier ))) ;) (expression_statement "queue_toplevel_callback(socket_error_callback,s);" (call_expression "queue_toplevel_callback(socket_error_callback,s)" identifier (argument_list "(socket_error_callback,s)" ( identifier , identifier ))) ;) (labeled_statement "LAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        __stack_chk_fail_local();\n      }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n        __stack_chk_fail_local();\n      }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        __stack_chk_fail_local();\n      }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return;" return ;) })) (if_statement "if (s->sending_oob == 0) {\n      bufchain_consume(ch,data_00);\n      __n = s->sending_oob;\n      goto LAB_00067900;\n    }" if (parenthesized_expression "(s->sending_oob == 0)" ( (binary_expression "s->sending_oob == 0" (field_expression "s->sending_oob" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n      bufchain_consume(ch,data_00);\n      __n = s->sending_oob;\n      goto LAB_00067900;\n    }" { (expression_statement "bufchain_consume(ch,data_00);" (call_expression "bufchain_consume(ch,data_00)" identifier (argument_list "(ch,data_00)" ( identifier , identifier ))) ;) (expression_statement "__n = s->sending_oob;" (assignment_expression "__n = s->sending_oob" identifier = (field_expression "s->sending_oob" identifier -> field_identifier)) ;) (goto_statement "goto LAB_00067900;" goto statement_identifier ;) })) (if_statement "if ((int)data_00 < len) {\n      __n = len - data_00;\n      memmove(s->oobdata,s->oobdata + data_00,__n);\n      s->sending_oob = __n;\n      goto LAB_00067900;\n    }" if (parenthesized_expression "((int)data_00 < len)" ( (binary_expression "(int)data_00 < len" (cast_expression "(int)data_00" ( (type_descriptor "int" primitive_type) ) identifier) < identifier) )) (compound_statement "{\n      __n = len - data_00;\n      memmove(s->oobdata,s->oobdata + data_00,__n);\n      s->sending_oob = __n;\n      goto LAB_00067900;\n    }" { (expression_statement "__n = len - data_00;" (assignment_expression "__n = len - data_00" identifier = (binary_expression "len - data_00" identifier - identifier)) ;) (expression_statement "memmove(s->oobdata,s->oobdata + data_00,__n);" (call_expression "memmove(s->oobdata,s->oobdata + data_00,__n)" identifier (argument_list "(s->oobdata,s->oobdata + data_00,__n)" ( (field_expression "s->oobdata" identifier -> field_identifier) , (binary_expression "s->oobdata + data_00" (field_expression "s->oobdata" identifier -> field_identifier) + identifier) , identifier ))) ;) (expression_statement "s->sending_oob = __n;" (assignment_expression "s->sending_oob = __n" (field_expression "s->sending_oob" identifier -> field_identifier) = identifier) ;) (goto_statement "goto LAB_00067900;" goto statement_identifier ;) })) (expression_statement "s->sending_oob = 0;" (assignment_expression "s->sending_oob = 0" (field_expression "s->sending_oob" identifier -> field_identifier) = number_literal) ;) (labeled_statement "LAB_0006794a:\n    iVar2 = bufchain_size(ch);" statement_identifier : (expression_statement "iVar2 = bufchain_size(ch);" (assignment_expression "iVar2 = bufchain_size(ch)" identifier = (call_expression "bufchain_size(ch)" identifier (argument_list "(ch)" ( identifier )))) ;)) (if_statement "if (iVar2 < 1) {\n      if (s->outgoingeof == ADDRTYPE_IPV4) {\n        shutdown(s->s,1);\n        s->outgoingeof = ADDRTYPE_IPV6;\n      }\n      uxsel_tell(s);\n      goto LAB_000679fb;\n    }" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (compound_statement "{\n      if (s->outgoingeof == ADDRTYPE_IPV4) {\n        shutdown(s->s,1);\n        s->outgoingeof = ADDRTYPE_IPV6;\n      }\n      uxsel_tell(s);\n      goto LAB_000679fb;\n    }" { (if_statement "if (s->outgoingeof == ADDRTYPE_IPV4) {\n        shutdown(s->s,1);\n        s->outgoingeof = ADDRTYPE_IPV6;\n      }" if (parenthesized_expression "(s->outgoingeof == ADDRTYPE_IPV4)" ( (binary_expression "s->outgoingeof == ADDRTYPE_IPV4" (field_expression "s->outgoingeof" identifier -> field_identifier) == identifier) )) (compound_statement "{\n        shutdown(s->s,1);\n        s->outgoingeof = ADDRTYPE_IPV6;\n      }" { (expression_statement "shutdown(s->s,1);" (call_expression "shutdown(s->s,1)" identifier (argument_list "(s->s,1)" ( (field_expression "s->s" identifier -> field_identifier) , number_literal ))) ;) (expression_statement "s->outgoingeof = ADDRTYPE_IPV6;" (assignment_expression "s->outgoingeof = ADDRTYPE_IPV6" (field_expression "s->outgoingeof" identifier -> field_identifier) = identifier) ;) })) (expression_statement "uxsel_tell(s);" (call_expression "uxsel_tell(s)" identifier (argument_list "(s)" ( identifier ))) ;) (goto_statement "goto LAB_000679fb;" goto statement_identifier ;) })) (expression_statement "__n = s->sending_oob;" (assignment_expression "__n = s->sending_oob" identifier = (field_expression "s->sending_oob" identifier -> field_identifier)) ;) (if_statement "if (__n != 0) goto LAB_00067904;" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (goto_statement "goto LAB_00067904;" goto statement_identifier ;)) (expression_statement "bufchain_prefix(ch,&data,&len);" (call_expression "bufchain_prefix(ch,&data,&len)" identifier (argument_list "(ch,&data,&len)" ( identifier , (pointer_expression "&data" & identifier) , (pointer_expression "&len" & identifier) ))) ;) (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit "void FUN_000678d0(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  size_t __n;\n  int iVar3;\n  int in_GS_OFFSET;\n  void *local_28;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x678d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __n = *(size_t *)(param_1 + 0x30);\n  iVar1 = param_1 + 0x10;\nLAB_00067900:\n  if (__n == 0) goto LAB_0006794a;\nLAB_00067904:\n  local_28 = (void *)(param_1 + 0x2c);\n  iVar3 = 1;\n  local_24 = __n;\n  do {\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  } while( true );\n}\n\n" (function_definition "void FUN_000678d0(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  size_t __n;\n  int iVar3;\n  int in_GS_OFFSET;\n  void *local_28;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x678d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __n = *(size_t *)(param_1 + 0x30);\n  iVar1 = param_1 + 0x10;\nLAB_00067900:\n  if (__n == 0) goto LAB_0006794a;\nLAB_00067904:\n  local_28 = (void *)(param_1 + 0x2c);\n  iVar3 = 1;\n  local_24 = __n;\n  do {\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  } while( true );\n}" primitive_type (function_declarator "FUN_000678d0(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  size_t __n;\n  int iVar3;\n  int in_GS_OFFSET;\n  void *local_28;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x678d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __n = *(size_t *)(param_1 + 0x30);\n  iVar1 = param_1 + 0x10;\nLAB_00067900:\n  if (__n == 0) goto LAB_0006794a;\nLAB_00067904:\n  local_28 = (void *)(param_1 + 0x2c);\n  iVar3 = 1;\n  local_24 = __n;\n  do {\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  } while( true );\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "void *local_28;" primitive_type (pointer_declarator "*local_28" * identifier) ;) (declaration "size_t local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x678d9;" (assignment_expression "uStack_14 = 0x678d9" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "__n = *(size_t *)(param_1 + 0x30);" (assignment_expression "__n = *(size_t *)(param_1 + 0x30)" identifier = (pointer_expression "*(size_t *)(param_1 + 0x30)" * (cast_expression "(size_t *)(param_1 + 0x30)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = param_1 + 0x10;" (assignment_expression "iVar1 = param_1 + 0x10" identifier = (binary_expression "param_1 + 0x10" identifier + number_literal)) ;) (labeled_statement "LAB_00067900:\n  if (__n == 0) goto LAB_0006794a;" statement_identifier : (if_statement "if (__n == 0) goto LAB_0006794a;" if (parenthesized_expression "(__n == 0)" ( (binary_expression "__n == 0" identifier == number_literal) )) (goto_statement "goto LAB_0006794a;" goto statement_identifier ;))) (labeled_statement "LAB_00067904:\n  local_28 = (void *)(param_1 + 0x2c);" statement_identifier : (expression_statement "local_28 = (void *)(param_1 + 0x2c);" (assignment_expression "local_28 = (void *)(param_1 + 0x2c)" identifier = (cast_expression "(void *)(param_1 + 0x2c)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) ;)) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" identifier = number_literal) ;) (expression_statement "local_24 = __n;" (assignment_expression "local_24 = __n" identifier = identifier) ;) (do_statement "do {\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  } while( true );" do (compound_statement "{\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  }" { (expression_statement "iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);" (assignment_expression "iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3)" identifier = (call_expression "send(*(int *)(param_1 + 8),local_28,local_24,iVar3)" identifier (argument_list "(*(int *)(param_1 + 8),local_28,local_24,iVar3)" ( (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , identifier , identifier , identifier )))) ;) (expression_statement "FUN_00068a80(iVar3);" (call_expression "FUN_00068a80(iVar3)" identifier (argument_list "(iVar3)" ( identifier ))) ;) (if_statement "if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }" { (if_statement "if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar3 = *piVar2;" (assignment_expression "iVar3 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (if_statement "if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }" if (parenthesized_expression "(iVar3 == 0xb)" ( (binary_expression "iVar3 == 0xb" identifier == number_literal) )) (compound_statement "{\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }" { (expression_statement "*(undefined4 *)(param_1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = number_literal) ;) (goto_statement "goto LAB_000679fb;" goto statement_identifier ;) })) })) (expression_statement "*(int *)(param_1 + 0x44) = iVar3;" (assignment_expression "*(int *)(param_1 + 0x44) = iVar3" (pointer_expression "*(int *)(param_1 + 0x44)" * (cast_expression "(int *)(param_1 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) = identifier) ;) (expression_statement "FUN_00066370();" (call_expression "FUN_00066370()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_00014ec0(FUN_00066420,param_1);" (call_expression "FUN_00014ec0(FUN_00066420,param_1)" identifier (argument_list "(FUN_00066420,param_1)" ( identifier , identifier ))) ;) (labeled_statement "LAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n        FUN_0006f2a0();\n      }" { (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return;" return ;) })) (if_statement "if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x30) == 0)" ( (binary_expression "*(int *)(param_1 + 0x30) == 0" (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }" { (expression_statement "FUN_0001a830(iVar1,iVar3);" (call_expression "FUN_0001a830(iVar1,iVar3)" identifier (argument_list "(iVar1,iVar3)" ( identifier , identifier ))) ;) (expression_statement "__n = *(size_t *)(param_1 + 0x30);" (assignment_expression "__n = *(size_t *)(param_1 + 0x30)" identifier = (pointer_expression "*(size_t *)(param_1 + 0x30)" * (cast_expression "(size_t *)(param_1 + 0x30)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_00067900;" goto statement_identifier ;) })) (if_statement "if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }" if (parenthesized_expression "(iVar3 < (int)local_24)" ( (binary_expression "iVar3 < (int)local_24" identifier < (cast_expression "(int)local_24" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }" { (expression_statement "__n = local_24 - iVar3;" (assignment_expression "__n = local_24 - iVar3" identifier = (binary_expression "local_24 - iVar3" identifier - identifier)) ;) (expression_statement "memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);" (call_expression "memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n)" identifier (argument_list "((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n)" ( (cast_expression "(void *)(param_1 + 0x2c)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) ))) , (cast_expression "(void *)(param_1 + 0x2c + iVar3)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c + iVar3)" ( (binary_expression "param_1 + 0x2c + iVar3" (binary_expression "param_1 + 0x2c" identifier + number_literal) + identifier) ))) , identifier ))) ;) (expression_statement "*(size_t *)(param_1 + 0x30) = __n;" (assignment_expression "*(size_t *)(param_1 + 0x30) = __n" (pointer_expression "*(size_t *)(param_1 + 0x30)" * (cast_expression "(size_t *)(param_1 + 0x30)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto LAB_00067900;" goto statement_identifier ;) })) (expression_statement "*(undefined4 *)(param_1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x30)" * (cast_expression "(undefined4 *)(param_1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = number_literal) ;) (labeled_statement "LAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);" statement_identifier : (expression_statement "iVar3 = FUN_0001a820(iVar1);" (assignment_expression "iVar3 = FUN_0001a820(iVar1)" identifier = (call_expression "FUN_0001a820(iVar1)" identifier (argument_list "(iVar1)" ( identifier )))) ;)) (if_statement "if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }" if (parenthesized_expression "(iVar3 < 1)" ( (binary_expression "iVar3 < 1" identifier < number_literal) )) (compound_statement "{\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }" { (if_statement "if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }" if (parenthesized_expression "(*(int *)(param_1 + 0x3c) == 1)" ( (binary_expression "*(int *)(param_1 + 0x3c) == 1" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }" { (expression_statement "shutdown(*(int *)(param_1 + 8),1);" (call_expression "shutdown(*(int *)(param_1 + 8),1)" identifier (argument_list "(*(int *)(param_1 + 8),1)" ( (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , number_literal ))) ;) (expression_statement "*(undefined4 *)(param_1 + 0x3c) = 2;" (assignment_expression "*(undefined4 *)(param_1 + 0x3c) = 2" (pointer_expression "*(undefined4 *)(param_1 + 0x3c)" * (cast_expression "(undefined4 *)(param_1 + 0x3c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) = number_literal) ;) })) (expression_statement "FUN_00066370();" (call_expression "FUN_00066370()" identifier (argument_list "()" ( ))) ;) (goto_statement "goto LAB_000679fb;" goto statement_identifier ;) })) (expression_statement "__n = *(size_t *)(param_1 + 0x30);" (assignment_expression "__n = *(size_t *)(param_1 + 0x30)" identifier = (pointer_expression "*(size_t *)(param_1 + 0x30)" * (cast_expression "(size_t *)(param_1 + 0x30)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) ))))) ;) (if_statement "if (__n != 0) goto LAB_00067904;" if (parenthesized_expression "(__n != 0)" ( (binary_expression "__n != 0" identifier != number_literal) )) (goto_statement "goto LAB_00067904;" goto statement_identifier ;)) (expression_statement "FUN_0001a8f0(iVar1,&local_28,&local_24);" (call_expression "FUN_0001a8f0(iVar1,&local_28,&local_24)" identifier (argument_list "(iVar1,&local_28,&local_24)" ( identifier , (pointer_expression "&local_28" & identifier) , (pointer_expression "&local_24" & identifier) ))) ;) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" identifier = number_literal) ;) }) while (parenthesized_expression "( true )" ( true )) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;))) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;)) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) ))) , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , (pointer_expression & IDENT) ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) while (parenthesized_expression ( BOOL )) ;) })))
(function_definition "void FUN_000678d0(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  size_t __n;\n  int iVar3;\n  int in_GS_OFFSET;\n  void *local_28;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x678d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __n = *(size_t *)(param_1 + 0x30);\n  iVar1 = param_1 + 0x10;\nLAB_00067900:\n  if (__n == 0) goto LAB_0006794a;\nLAB_00067904:\n  local_28 = (void *)(param_1 + 0x2c);\n  iVar3 = 1;\n  local_24 = __n;\n  do {\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  } while( true );\n}" (primitive_type "void") (function_declarator "FUN_000678d0(int param_1)" (identifier "FUN_000678d0") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  size_t __n;\n  int iVar3;\n  int in_GS_OFFSET;\n  void *local_28;\n  size_t local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x678d9;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  __n = *(size_t *)(param_1 + 0x30);\n  iVar1 = param_1 + 0x10;\nLAB_00067900:\n  if (__n == 0) goto LAB_0006794a;\nLAB_00067904:\n  local_28 = (void *)(param_1 + 0x2c);\n  iVar3 = 1;\n  local_24 = __n;\n  do {\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  } while( true );\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "void *local_28;" (primitive_type "void") (pointer_declarator "*local_28" (* "*") (identifier "local_28")) (; ";")) (declaration "size_t local_24;" (primitive_type "size_t") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x678d9;" (assignment_expression "uStack_14 = 0x678d9" (identifier "uStack_14") (= "=") (number_literal "0x678d9")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "__n = *(size_t *)(param_1 + 0x30);" (assignment_expression "__n = *(size_t *)(param_1 + 0x30)" (identifier "__n") (= "=") (pointer_expression "*(size_t *)(param_1 + 0x30)" (* "*") (cast_expression "(size_t *)(param_1 + 0x30)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (expression_statement "iVar1 = param_1 + 0x10;" (assignment_expression "iVar1 = param_1 + 0x10" (identifier "iVar1") (= "=") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10"))) (; ";")) (labeled_statement "LAB_00067900:\n  if (__n == 0) goto LAB_0006794a;" (statement_identifier "LAB_00067900") (: ":") (if_statement "if (__n == 0) goto LAB_0006794a;" (if "if") (parenthesized_expression "(__n == 0)" (( "(") (binary_expression "__n == 0" (identifier "__n") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0006794a;" (goto "goto") (statement_identifier "LAB_0006794a") (; ";")))) (labeled_statement "LAB_00067904:\n  local_28 = (void *)(param_1 + 0x2c);" (statement_identifier "LAB_00067904") (: ":") (expression_statement "local_28 = (void *)(param_1 + 0x2c);" (assignment_expression "local_28 = (void *)(param_1 + 0x2c)" (identifier "local_28") (= "=") (cast_expression "(void *)(param_1 + 0x2c)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")")))) (; ";"))) (expression_statement "iVar3 = 1;" (assignment_expression "iVar3 = 1" (identifier "iVar3") (= "=") (number_literal "1")) (; ";")) (expression_statement "local_24 = __n;" (assignment_expression "local_24 = __n" (identifier "local_24") (= "=") (identifier "__n")) (; ";")) (do_statement "do {\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  } while( true );" (do "do") (compound_statement "{\n    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);\n    FUN_00068a80(iVar3);\n    if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }\n    if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }\n    if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }\n    *(undefined4 *)(param_1 + 0x30) = 0;\nLAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);\n    if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }\n    __n = *(size_t *)(param_1 + 0x30);\n    if (__n != 0) goto LAB_00067904;\n    FUN_0001a8f0(iVar1,&local_28,&local_24);\n    iVar3 = 0;\n  }" ({ "{") (expression_statement "iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);" (assignment_expression "iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3)" (identifier "iVar3") (= "=") (call_expression "send(*(int *)(param_1 + 8),local_28,local_24,iVar3)" (identifier "send") (argument_list "(*(int *)(param_1 + 8),local_28,local_24,iVar3)" (( "(") (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (, ",") (identifier "local_28") (, ",") (identifier "local_24") (, ",") (identifier "iVar3") () ")")))) (; ";")) (expression_statement "FUN_00068a80(iVar3);" (call_expression "FUN_00068a80(iVar3)" (identifier "FUN_00068a80") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")"))) (; ";")) (if_statement "if (iVar3 < 1) {\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }" (if "if") (parenthesized_expression "(iVar3 < 1)" (( "(") (binary_expression "iVar3 < 1" (identifier "iVar3") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n      if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }\n      *(int *)(param_1 + 0x44) = iVar3;\n      FUN_00066370();\n      FUN_00014ec0(FUN_00066420,param_1);\nLAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }\n      return;\n    }" ({ "{") (if_statement "if (iVar3 != 0) {\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }" (if "if") (parenthesized_expression "(iVar3 != 0)" (( "(") (binary_expression "iVar3 != 0" (identifier "iVar3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        piVar2 = __errno_location();\n        iVar3 = *piVar2;\n        if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }\n      }" ({ "{") (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" (identifier "piVar2") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar3 = *piVar2;" (assignment_expression "iVar3 = *piVar2" (identifier "iVar3") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (if_statement "if (iVar3 == 0xb) {\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }" (if "if") (parenthesized_expression "(iVar3 == 0xb)" (( "(") (binary_expression "iVar3 == 0xb" (identifier "iVar3") (== "==") (number_literal "0xb")) () ")")) (compound_statement "{\n          *(undefined4 *)(param_1 + 0x20) = 0;\n          goto LAB_000679fb;\n        }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0x20) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x20) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_000679fb;" (goto "goto") (statement_identifier "LAB_000679fb") (; ";")) (} "}"))) (} "}"))) (expression_statement "*(int *)(param_1 + 0x44) = iVar3;" (assignment_expression "*(int *)(param_1 + 0x44) = iVar3" (pointer_expression "*(int *)(param_1 + 0x44)" (* "*") (cast_expression "(int *)(param_1 + 0x44)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "FUN_00066370();" (call_expression "FUN_00066370()" (identifier "FUN_00066370") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_00014ec0(FUN_00066420,param_1);" (call_expression "FUN_00014ec0(FUN_00066420,param_1)" (identifier "FUN_00014ec0") (argument_list "(FUN_00066420,param_1)" (( "(") (identifier "FUN_00066420") (, ",") (identifier "param_1") () ")"))) (; ";")) (labeled_statement "LAB_000679fb:\n      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }" (statement_identifier "LAB_000679fb") (: ":") (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n        FUN_0006f2a0();\n      }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n        FUN_0006f2a0();\n      }" ({ "{") (expression_statement "FUN_0006f2a0();" (call_expression "FUN_0006f2a0()" (identifier "FUN_0006f2a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (*(int *)(param_1 + 0x30) == 0) {\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x30) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x30) == 0" (pointer_expression "*(int *)(param_1 + 0x30)" (* "*") (cast_expression "(int *)(param_1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_0001a830(iVar1,iVar3);\n      __n = *(size_t *)(param_1 + 0x30);\n      goto LAB_00067900;\n    }" ({ "{") (expression_statement "FUN_0001a830(iVar1,iVar3);" (call_expression "FUN_0001a830(iVar1,iVar3)" (identifier "FUN_0001a830") (argument_list "(iVar1,iVar3)" (( "(") (identifier "iVar1") (, ",") (identifier "iVar3") () ")"))) (; ";")) (expression_statement "__n = *(size_t *)(param_1 + 0x30);" (assignment_expression "__n = *(size_t *)(param_1 + 0x30)" (identifier "__n") (= "=") (pointer_expression "*(size_t *)(param_1 + 0x30)" (* "*") (cast_expression "(size_t *)(param_1 + 0x30)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (goto_statement "goto LAB_00067900;" (goto "goto") (statement_identifier "LAB_00067900") (; ";")) (} "}"))) (if_statement "if (iVar3 < (int)local_24) {\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }" (if "if") (parenthesized_expression "(iVar3 < (int)local_24)" (( "(") (binary_expression "iVar3 < (int)local_24" (identifier "iVar3") (< "<") (cast_expression "(int)local_24" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_24"))) () ")")) (compound_statement "{\n      __n = local_24 - iVar3;\n      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);\n      *(size_t *)(param_1 + 0x30) = __n;\n      goto LAB_00067900;\n    }" ({ "{") (expression_statement "__n = local_24 - iVar3;" (assignment_expression "__n = local_24 - iVar3" (identifier "__n") (= "=") (binary_expression "local_24 - iVar3" (identifier "local_24") (- "-") (identifier "iVar3"))) (; ";")) (expression_statement "memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);" (call_expression "memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n)" (identifier "memmove") (argument_list "((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n)" (( "(") (cast_expression "(void *)(param_1 + 0x2c)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")"))) (, ",") (cast_expression "(void *)(param_1 + 0x2c + iVar3)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c + iVar3)" (( "(") (binary_expression "param_1 + 0x2c + iVar3" (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) (+ "+") (identifier "iVar3")) () ")"))) (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "*(size_t *)(param_1 + 0x30) = __n;" (assignment_expression "*(size_t *)(param_1 + 0x30) = __n" (pointer_expression "*(size_t *)(param_1 + 0x30)" (* "*") (cast_expression "(size_t *)(param_1 + 0x30)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (identifier "__n")) (; ";")) (goto_statement "goto LAB_00067900;" (goto "goto") (statement_identifier "LAB_00067900") (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(param_1 + 0x30) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x30) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x30)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x30)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (number_literal "0")) (; ";")) (labeled_statement "LAB_0006794a:\n    iVar3 = FUN_0001a820(iVar1);" (statement_identifier "LAB_0006794a") (: ":") (expression_statement "iVar3 = FUN_0001a820(iVar1);" (assignment_expression "iVar3 = FUN_0001a820(iVar1)" (identifier "iVar3") (= "=") (call_expression "FUN_0001a820(iVar1)" (identifier "FUN_0001a820") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")")))) (; ";"))) (if_statement "if (iVar3 < 1) {\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }" (if "if") (parenthesized_expression "(iVar3 < 1)" (( "(") (binary_expression "iVar3 < 1" (identifier "iVar3") (< "<") (number_literal "1")) () ")")) (compound_statement "{\n      if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }\n      FUN_00066370();\n      goto LAB_000679fb;\n    }" ({ "{") (if_statement "if (*(int *)(param_1 + 0x3c) == 1) {\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x3c) == 1)" (( "(") (binary_expression "*(int *)(param_1 + 0x3c) == 1" (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (== "==") (number_literal "1")) () ")")) (compound_statement "{\n        shutdown(*(int *)(param_1 + 8),1);\n        *(undefined4 *)(param_1 + 0x3c) = 2;\n      }" ({ "{") (expression_statement "shutdown(*(int *)(param_1 + 8),1);" (call_expression "shutdown(*(int *)(param_1 + 8),1)" (identifier "shutdown") (argument_list "(*(int *)(param_1 + 8),1)" (( "(") (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x3c) = 2;" (assignment_expression "*(undefined4 *)(param_1 + 0x3c) = 2" (pointer_expression "*(undefined4 *)(param_1 + 0x3c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x3c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (= "=") (number_literal "2")) (; ";")) (} "}"))) (expression_statement "FUN_00066370();" (call_expression "FUN_00066370()" (identifier "FUN_00066370") (argument_list "()" (( "(") () ")"))) (; ";")) (goto_statement "goto LAB_000679fb;" (goto "goto") (statement_identifier "LAB_000679fb") (; ";")) (} "}"))) (expression_statement "__n = *(size_t *)(param_1 + 0x30);" (assignment_expression "__n = *(size_t *)(param_1 + 0x30)" (identifier "__n") (= "=") (pointer_expression "*(size_t *)(param_1 + 0x30)" (* "*") (cast_expression "(size_t *)(param_1 + 0x30)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (if_statement "if (__n != 0) goto LAB_00067904;" (if "if") (parenthesized_expression "(__n != 0)" (( "(") (binary_expression "__n != 0" (identifier "__n") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00067904;" (goto "goto") (statement_identifier "LAB_00067904") (; ";"))) (expression_statement "FUN_0001a8f0(iVar1,&local_28,&local_24);" (call_expression "FUN_0001a8f0(iVar1,&local_28,&local_24)" (identifier "FUN_0001a8f0") (argument_list "(iVar1,&local_28,&local_24)" (( "(") (identifier "iVar1") (, ",") (pointer_expression "&local_28" (& "&") (identifier "local_28")) (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) () ")"))) (; ";")) (expression_statement "iVar3 = 0;" (assignment_expression "iVar3 = 0" (identifier "iVar3") (= "=") (number_literal "0")) (; ";")) (} "}")) (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void function_1(type_1 s)

{
  type_2 *ch;
  type_3 var_5;
  type_3 *puVar1;
  size_t var_2;
  int var_15;
  int var_1;
  void *data;
  int var_12;
  int var_9;
  type_4 uStack_14;
  
  uStack_14 = 0x678d9;
  var_9 = *(int *)(var_1 + 0x14);
  var_2 = s->sending_oob;
  ch = &s->output_data;
LAB_00067900:
  if (var_2 == 0) goto LAB_0006794a;
LAB_00067904:
  data = s->oobdata;
  var_15 = 1;
  var_12 = var_2;
  do {
    var_5 = var_3(s->s,data,var_12,var_15);
    var_4(var_5);
    if ((int)var_5 < 1) {
      if (var_5 != 0) {
        puVar1 = (type_3 *)var_6();
        var_5 = *puVar1;
        if (var_5 == 0xb) {
          s->writable = 0;
          goto LAB_000679fb;
        }
      }
      s->pending_error = var_5;
      var_7(s);
      var_8(socket_error_callback,s);
LAB_000679fb:
      if (var_9 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
        var_10();
      }
      return;
    }
    if (s->sending_oob == 0) {
      var_11(ch,var_5);
      var_2 = s->sending_oob;
      goto LAB_00067900;
    }
    if ((int)var_5 < var_12) {
      var_2 = var_12 - var_5;
      var_13(s->oobdata,s->oobdata + var_5,var_2);
      s->sending_oob = var_2;
      goto LAB_00067900;
    }
    s->sending_oob = 0;
LAB_0006794a:
    var_15 = var_14(ch);
    if (var_15 < 1) {
      if (s->outgoingeof == var_16) {
        var_17(s->s,1);
        s->outgoingeof = ADDRTYPE_IPV6;
      }
      var_7(s);
      goto LAB_000679fb;
    }
    var_2 = s->sending_oob;
    if (var_2 != 0) goto LAB_00067904;
    var_18(ch,&data,&var_12);
    var_15 = 0;
  } while( true );
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier)))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (identifier) (identifier) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list)))))) (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (goto_statement label: (statement_identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier)))) (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (pointer_expression argument: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) condition: (parenthesized_expression (true))))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(int param_1)

{
  int iVar1;
  int *piVar2;
  size_t __n;
  int iVar3;
  int in_GS_OFFSET;
  void *local_28;
  size_t local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x678d9;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  __n = *(size_t *)(param_1 + 0x30);
  iVar1 = param_1 + 0x10;
LAB_00067900:
  if (__n == 0) goto LAB_0006794a;
LAB_00067904:
  local_28 = (void *)(param_1 + 0x2c);
  iVar3 = 1;
  local_24 = __n;
  do {
    iVar3 = send(*(int *)(param_1 + 8),local_28,local_24,iVar3);
    FUN_00068a80(iVar3);
    if (iVar3 < 1) {
      if (iVar3 != 0) {
        piVar2 = __errno_location();
        iVar3 = *piVar2;
        if (iVar3 == 0xb) {
          *(undefined4 *)(param_1 + 0x20) = 0;
          goto LAB_000679fb;
        }
      }
      *(int *)(param_1 + 0x44) = iVar3;
      FUN_00066370();
      FUN_00014ec0(FUN_00066420,param_1);
LAB_000679fb:
      if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
        FUN_0006f2a0();
      }
      return;
    }
    if (*(int *)(param_1 + 0x30) == 0) {
      FUN_0001a830(iVar1,iVar3);
      __n = *(size_t *)(param_1 + 0x30);
      goto LAB_00067900;
    }
    if (iVar3 < (int)local_24) {
      __n = local_24 - iVar3;
      memmove((void *)(param_1 + 0x2c),(void *)(param_1 + 0x2c + iVar3),__n);
      *(size_t *)(param_1 + 0x30) = __n;
      goto LAB_00067900;
    }
    *(undefined4 *)(param_1 + 0x30) = 0;
LAB_0006794a:
    iVar3 = FUN_0001a820(iVar1);
    if (iVar3 < 1) {
      if (*(int *)(param_1 + 0x3c) == 1) {
        shutdown(*(int *)(param_1 + 8),1);
        *(undefined4 *)(param_1 + 0x3c) = 2;
      }
      FUN_00066370();
      goto LAB_000679fb;
    }
    __n = *(size_t *)(param_1 + 0x30);
    if (__n != 0) goto LAB_00067904;
    FUN_0001a8f0(iVar1,&local_28,&local_24);
    iVar3 = 0;
  } while( true );
}

