
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

CURLcode trynextip(connectdata *conn,int sockindex,int tempindex)

{
  int sock;
  Curl_addrinfo *pCVar1;
  connectdata *conn_00;
  CURLcode CVar2;
  uint extraout_ECX;
  Curl_addrinfo *ai;
  int iVar3;
  undefined8 uVar4;
  
  uVar4 = __x86_get_pc_thunk_di();
  conn_00 = (connectdata *)uVar4;
  sock = conn_00->tempsock[extraout_ECX];
  conn_00->tempsock[extraout_ECX] = -1;
  if ((int)((ulonglong)uVar4 >> 0x20) == 0) {
    pCVar1 = conn_00->tempaddr[extraout_ECX];
    if (pCVar1 == (Curl_addrinfo *)0x0) {
      pCVar1 = conn_00->tempaddr[0];
      if (pCVar1 == (Curl_addrinfo *)0x0) goto LAB_00040e64;
      ai = pCVar1->ai_next;
      iVar3 = (uint)(pCVar1->ai_family == 2) * 8 + 2;
    }
    else {
      iVar3 = pCVar1->ai_family;
      ai = pCVar1->ai_next;
    }
    if (ai != (Curl_addrinfo *)0x0) {
      do {
        if (conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0) {
          while (ai->ai_family != iVar3) {
            ai = ai->ai_next;
            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;
          }
        }
        CVar2 = singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX);
        if (CVar2 != CURLE_COULDNT_CONNECT) {
          conn_00->tempaddr[extraout_ECX] = ai;
          goto joined_r0x00040e6f;
        }
        ai = ai->ai_next;
      } while (ai != (Curl_addrinfo *)0x0);
    }
  }
LAB_00040e64:
  CVar2 = CURLE_COULDNT_CONNECT;
joined_r0x00040e6f:
  if (sock == -1) {
    return CVar2;
  }
  Curl_closesocket(conn_00,sock);
  return CVar2;
}



int FUN_00040dc0(void)

{
  int iVar1;
  int iVar2;
  int iVar3;
  uint extraout_ECX;
  int iVar4;
  int iVar5;
  int unaff_EDI;
  int iVar6;
  undefined8 uVar7;
  int iVar8;
  int iVar9;
  int iVar10;
  
  uVar7 = FUN_00020d67();
  iVar2 = (int)uVar7;
  iVar6 = unaff_EDI + 0x6fa19;
  iVar1 = iVar2 + extraout_ECX * 4;
  iVar8 = *(int *)(iVar1 + 0x198);
  *(undefined4 *)(iVar1 + 0x198) = 0xffffffff;
  if ((int)((ulonglong)uVar7 >> 0x20) == 0) {
    iVar9 = *(int *)(iVar1 + 0x4c);
    if (iVar9 == 0) {
      iVar9 = *(int *)(iVar2 + 0x4c);
      if (iVar9 == 0) goto LAB_00040e64;
      iVar4 = *(int *)(iVar9 + 0x1c);
      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;
    }
    else {
      iVar5 = *(int *)(iVar9 + 4);
      iVar4 = *(int *)(iVar9 + 0x1c);
    }
    if (iVar4 != 0) {
      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;
      iVar9 = (extraout_ECX ^ 1) + 0x10;
      do {
        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {
          while (*(int *)(iVar4 + 4) != iVar5) {
            iVar4 = *(int *)(iVar4 + 0x1c);
            if (iVar4 == 0) goto LAB_00040e64;
          }
        }
        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);
        if (iVar3 != 7) {
          *(int *)(iVar1 + 0x4c) = iVar4;
          goto joined_r0x00040e6f;
        }
        iVar4 = *(int *)(iVar4 + 0x1c);
      } while (iVar4 != 0);
    }
  }
LAB_00040e64:
  iVar3 = 7;
joined_r0x00040e6f:
  if (iVar8 == -1) {
    return iVar3;
  }
  FUN_000400c0(iVar2,iVar8);
  return iVar3;
}


PUSH EBP
PUSH EDI
CALL 0x00020d67
ADD EDI,0x6fa19
PUSH ESI
MOV ESI,EAX
PUSH EBX
SUB ESP,0x1c
MOV dword ptr [ESP + 0x4],EDI
LEA EDI,[EAX + ECX*0x4]
MOV EAX,dword ptr [EDI + 0x198]
MOV dword ptr [EDI + 0x198],0xffffffff
MOV dword ptr [ESP],EAX
TEST EDX,EDX
JNZ 0x00040e64
MOV EAX,dword ptr [EDI + 0x4c]
TEST EAX,EAX
JZ 0x00040e98
MOV EBP,dword ptr [EAX + 0x4]
MOV EBX,dword ptr [EAX + 0x1c]
TEST EBX,EBX
JZ 0x00040e64
LEA EAX,[ESI + ECX*0x4 + 0x198]
XOR ECX,0x1
MOV dword ptr [ESP + 0xc],EAX
LEA EAX,[ECX + 0x10]
MOV dword ptr [ESP + 0x8],EAX
MOV EAX,dword ptr [ESP + 0x8]
MOV EAX,dword ptr [ESI + EAX*0x4 + 0xc]
TEST EAX,EAX
JNZ 0x00040e58
MOV ECX,dword ptr [ESP + 0xc]
MOV EDX,EBX
MOV EAX,ESI
CALL 0x00040350
CMP EAX,0x7
JZ 0x00040ec0
MOV EDX,EAX
MOV EAX,dword ptr [ESP]
MOV dword ptr [EDI + 0x4c],EBX
CMP EAX,-0x1
JNZ 0x00040e71
ADD ESP,0x1c
MOV EAX,EDX
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP dword ptr [EBX + 0x4],EBP
JZ 0x00040e28
MOV EBX,dword ptr [EBX + 0x1c]
TEST EBX,EBX
JNZ 0x00040e58
MOV EAX,dword ptr [ESP]
MOV EDX,0x7
CMP EAX,-0x1
JZ 0x00040e4b
MOV dword ptr [ESP],EDX
SUB ESP,0x8
PUSH EAX
PUSH ESI
MOV EBX,dword ptr [ESP + 0x14]
CALL 0x000400c0
ADD ESP,0x10
MOV EDX,dword ptr [ESP]
ADD ESP,0x1c
POP EBX
MOV EAX,EDX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,dword ptr [ESI + 0x4c]
TEST EAX,EAX
JZ 0x00040e64
XOR EDX,EDX
CMP dword ptr [EAX + 0x4],0x2
MOV EBX,dword ptr [EAX + 0x1c]
SETZ DL
MOV EBP,EDX
LEA EBP,[EBP*0x8 + 0x2]
JMP 0x00040e03
MOV EBX,dword ptr [EBX + 0x1c]
TEST EBX,EBX
JNZ 0x00040e1c
JMP 0x00040e64
(translation_unit "int FUN_00040dc0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  uint extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EDI;\n  int iVar6;\n  undefined8 uVar7;\n  int iVar8;\n  int iVar9;\n  int iVar10;\n  \n  uVar7 = FUN_00020d67();\n  iVar2 = (int)uVar7;\n  iVar6 = unaff_EDI + 0x6fa19;\n  iVar1 = iVar2 + extraout_ECX * 4;\n  iVar8 = *(int *)(iVar1 + 0x198);\n  *(undefined4 *)(iVar1 + 0x198) = 0xffffffff;\n  if ((int)((ulonglong)uVar7 >> 0x20) == 0) {\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }\nLAB_00040e64:\n  iVar3 = 7;\njoined_r0x00040e6f:\n  if (iVar8 == -1) {\n    return iVar3;\n  }\n  FUN_000400c0(iVar2,iVar8);\n  return iVar3;\n}\n\n" (function_definition "int FUN_00040dc0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  uint extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EDI;\n  int iVar6;\n  undefined8 uVar7;\n  int iVar8;\n  int iVar9;\n  int iVar10;\n  \n  uVar7 = FUN_00020d67();\n  iVar2 = (int)uVar7;\n  iVar6 = unaff_EDI + 0x6fa19;\n  iVar1 = iVar2 + extraout_ECX * 4;\n  iVar8 = *(int *)(iVar1 + 0x198);\n  *(undefined4 *)(iVar1 + 0x198) = 0xffffffff;\n  if ((int)((ulonglong)uVar7 >> 0x20) == 0) {\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }\nLAB_00040e64:\n  iVar3 = 7;\njoined_r0x00040e6f:\n  if (iVar8 == -1) {\n    return iVar3;\n  }\n  FUN_000400c0(iVar2,iVar8);\n  return iVar3;\n}" primitive_type (function_declarator "FUN_00040dc0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  uint extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EDI;\n  int iVar6;\n  undefined8 uVar7;\n  int iVar8;\n  int iVar9;\n  int iVar10;\n  \n  uVar7 = FUN_00020d67();\n  iVar2 = (int)uVar7;\n  iVar6 = unaff_EDI + 0x6fa19;\n  iVar1 = iVar2 + extraout_ECX * 4;\n  iVar8 = *(int *)(iVar1 + 0x198);\n  *(undefined4 *)(iVar1 + 0x198) = 0xffffffff;\n  if ((int)((ulonglong)uVar7 >> 0x20) == 0) {\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }\nLAB_00040e64:\n  iVar3 = 7;\njoined_r0x00040e6f:\n  if (iVar8 == -1) {\n    return iVar3;\n  }\n  FUN_000400c0(iVar2,iVar8);\n  return iVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint extraout_ECX;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined8 uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "int iVar10;" primitive_type identifier ;) (expression_statement "uVar7 = FUN_00020d67();" (assignment_expression "uVar7 = FUN_00020d67()" identifier = (call_expression "FUN_00020d67()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = (int)uVar7;" (assignment_expression "iVar2 = (int)uVar7" identifier = (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "iVar6 = unaff_EDI + 0x6fa19;" (assignment_expression "iVar6 = unaff_EDI + 0x6fa19" identifier = (binary_expression "unaff_EDI + 0x6fa19" identifier + number_literal)) ;) (expression_statement "iVar1 = iVar2 + extraout_ECX * 4;" (assignment_expression "iVar1 = iVar2 + extraout_ECX * 4" identifier = (binary_expression "iVar2 + extraout_ECX * 4" identifier + (binary_expression "extraout_ECX * 4" identifier * number_literal))) ;) (expression_statement "iVar8 = *(int *)(iVar1 + 0x198);" (assignment_expression "iVar8 = *(int *)(iVar1 + 0x198)" identifier = (pointer_expression "*(int *)(iVar1 + 0x198)" * (cast_expression "(int *)(iVar1 + 0x198)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x198)" ( (binary_expression "iVar1 + 0x198" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x198) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar1 + 0x198) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar1 + 0x198)" * (cast_expression "(undefined4 *)(iVar1 + 0x198)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x198)" ( (binary_expression "iVar1 + 0x198" identifier + number_literal) )))) = number_literal) ;) (if_statement "if ((int)((ulonglong)uVar7 >> 0x20) == 0) {\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }" if (parenthesized_expression "((int)((ulonglong)uVar7 >> 0x20) == 0)" ( (binary_expression "(int)((ulonglong)uVar7 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar7 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar7 >> 0x20)" ( (binary_expression "(ulonglong)uVar7 >> 0x20" (cast_expression "(ulonglong)uVar7" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) == number_literal) )) (compound_statement "{\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }" { (expression_statement "iVar9 = *(int *)(iVar1 + 0x4c);" (assignment_expression "iVar9 = *(int *)(iVar1 + 0x4c)" identifier = (pointer_expression "*(int *)(iVar1 + 0x4c)" * (cast_expression "(int *)(iVar1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) ))))) ;) (if_statement "if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }" if (parenthesized_expression "(iVar9 == 0)" ( (binary_expression "iVar9 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }" { (expression_statement "iVar9 = *(int *)(iVar2 + 0x4c);" (assignment_expression "iVar9 = *(int *)(iVar2 + 0x4c)" identifier = (pointer_expression "*(int *)(iVar2 + 0x4c)" * (cast_expression "(int *)(iVar2 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x4c)" ( (binary_expression "iVar2 + 0x4c" identifier + number_literal) ))))) ;) (if_statement "if (iVar9 == 0) goto LAB_00040e64;" if (parenthesized_expression "(iVar9 == 0)" ( (binary_expression "iVar9 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00040e64;" goto statement_identifier ;)) (expression_statement "iVar4 = *(int *)(iVar9 + 0x1c);" (assignment_expression "iVar4 = *(int *)(iVar9 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar9 + 0x1c)" * (cast_expression "(int *)(iVar9 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 0x1c)" ( (binary_expression "iVar9 + 0x1c" identifier + number_literal) ))))) ;) (expression_statement "iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;" (assignment_expression "iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2" identifier = (binary_expression "(uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2" (binary_expression "(uint)(*(int *)(iVar9 + 4) == 2) * 8" (call_expression "(uint)(*(int *)(iVar9 + 4) == 2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(int *)(iVar9 + 4) == 2)" ( (binary_expression "*(int *)(iVar9 + 4) == 2" (pointer_expression "*(int *)(iVar9 + 4)" * (cast_expression "(int *)(iVar9 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 4)" ( (binary_expression "iVar9 + 4" identifier + number_literal) )))) == number_literal) ))) * number_literal) + number_literal)) ;) }) (else_clause "else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }" else (compound_statement "{\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }" { (expression_statement "iVar5 = *(int *)(iVar9 + 4);" (assignment_expression "iVar5 = *(int *)(iVar9 + 4)" identifier = (pointer_expression "*(int *)(iVar9 + 4)" * (cast_expression "(int *)(iVar9 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 4)" ( (binary_expression "iVar9 + 4" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = *(int *)(iVar9 + 0x1c);" (assignment_expression "iVar4 = *(int *)(iVar9 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar9 + 0x1c)" * (cast_expression "(int *)(iVar9 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 0x1c)" ( (binary_expression "iVar9 + 0x1c" identifier + number_literal) ))))) ;) }))) (if_statement "if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }" { (expression_statement "iVar10 = iVar2 + 0x198 + extraout_ECX * 4;" (assignment_expression "iVar10 = iVar2 + 0x198 + extraout_ECX * 4" identifier = (binary_expression "iVar2 + 0x198 + extraout_ECX * 4" (binary_expression "iVar2 + 0x198" identifier + number_literal) + (binary_expression "extraout_ECX * 4" identifier * number_literal))) ;) (expression_statement "iVar9 = (extraout_ECX ^ 1) + 0x10;" (assignment_expression "iVar9 = (extraout_ECX ^ 1) + 0x10" identifier = (binary_expression "(extraout_ECX ^ 1) + 0x10" (parenthesized_expression "(extraout_ECX ^ 1)" ( (binary_expression "extraout_ECX ^ 1" identifier ^ number_literal) )) + number_literal)) ;) (do_statement "do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);" do (compound_statement "{\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      }" { (if_statement "if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }" if (parenthesized_expression "(*(int *)(iVar2 + 0xc + iVar9 * 4) != 0)" ( (binary_expression "*(int *)(iVar2 + 0xc + iVar9 * 4) != 0" (pointer_expression "*(int *)(iVar2 + 0xc + iVar9 * 4)" * (cast_expression "(int *)(iVar2 + 0xc + iVar9 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xc + iVar9 * 4)" ( (binary_expression "iVar2 + 0xc + iVar9 * 4" (binary_expression "iVar2 + 0xc" identifier + number_literal) + (binary_expression "iVar9 * 4" identifier * number_literal)) )))) != number_literal) )) (compound_statement "{\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }" { (while_statement "while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }" while (parenthesized_expression "(*(int *)(iVar4 + 4) != iVar5)" ( (binary_expression "*(int *)(iVar4 + 4) != iVar5" (pointer_expression "*(int *)(iVar4 + 4)" * (cast_expression "(int *)(iVar4 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 4)" ( (binary_expression "iVar4 + 4" identifier + number_literal) )))) != identifier) )) (compound_statement "{\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }" { (expression_statement "iVar4 = *(int *)(iVar4 + 0x1c);" (assignment_expression "iVar4 = *(int *)(iVar4 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar4 + 0x1c)" * (cast_expression "(int *)(iVar4 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x1c)" ( (binary_expression "iVar4 + 0x1c" identifier + number_literal) ))))) ;) (if_statement "if (iVar4 == 0) goto LAB_00040e64;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00040e64;" goto statement_identifier ;)) })) })) (expression_statement "iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);" (assignment_expression "iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10)" identifier = (call_expression "FUN_00040350(iVar8,iVar6,iVar9,iVar10)" identifier (argument_list "(iVar8,iVar6,iVar9,iVar10)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }" if (parenthesized_expression "(iVar3 != 7)" ( (binary_expression "iVar3 != 7" identifier != number_literal) )) (compound_statement "{\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }" { (expression_statement "*(int *)(iVar1 + 0x4c) = iVar4;" (assignment_expression "*(int *)(iVar1 + 0x4c) = iVar4" (pointer_expression "*(int *)(iVar1 + 0x4c)" * (cast_expression "(int *)(iVar1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto joined_r0x00040e6f;" goto statement_identifier ;) })) (expression_statement "iVar4 = *(int *)(iVar4 + 0x1c);" (assignment_expression "iVar4 = *(int *)(iVar4 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar4 + 0x1c)" * (cast_expression "(int *)(iVar4 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x1c)" ( (binary_expression "iVar4 + 0x1c" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) })) })) (labeled_statement "LAB_00040e64:\n  iVar3 = 7;" statement_identifier : (expression_statement "iVar3 = 7;" (assignment_expression "iVar3 = 7" identifier = number_literal) ;)) (labeled_statement "joined_r0x00040e6f:\n  if (iVar8 == -1) {\n    return iVar3;\n  }" statement_identifier : (if_statement "if (iVar8 == -1) {\n    return iVar3;\n  }" if (parenthesized_expression "(iVar8 == -1)" ( (binary_expression "iVar8 == -1" identifier == number_literal) )) (compound_statement "{\n    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) }))) (expression_statement "FUN_000400c0(iVar2,iVar8);" (call_expression "FUN_000400c0(iVar2,iVar8)" identifier (argument_list "(iVar2,iVar8)" ( identifier , identifier ))) ;) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nCURLcode trynextip(connectdata *conn,int sockindex,int tempindex)\n\n{\n  int sock;\n  Curl_addrinfo *pCVar1;\n  connectdata *conn_00;\n  CURLcode CVar2;\n  uint extraout_ECX;\n  Curl_addrinfo *ai;\n  int iVar3;\n  undefined8 uVar4;\n  \n  uVar4 = __x86_get_pc_thunk_di();\n  conn_00 = (connectdata *)uVar4;\n  sock = conn_00->tempsock[extraout_ECX];\n  conn_00->tempsock[extraout_ECX] = -1;\n  if ((int)((ulonglong)uVar4 >> 0x20) == 0) {\n    pCVar1 = conn_00->tempaddr[extraout_ECX];\n    if (pCVar1 == (Curl_addrinfo *)0x0) {\n      pCVar1 = conn_00->tempaddr[0];\n      if (pCVar1 == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n      ai = pCVar1->ai_next;\n      iVar3 = (uint)(pCVar1->ai_family == 2) * 8 + 2;\n    }\n    else {\n      iVar3 = pCVar1->ai_family;\n      ai = pCVar1->ai_next;\n    }\n    if (ai != (Curl_addrinfo *)0x0) {\n      do {\n        if (conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0) {\n          while (ai->ai_family != iVar3) {\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }\n        }\n        CVar2 = singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX);\n        if (CVar2 != CURLE_COULDNT_CONNECT) {\n          conn_00->tempaddr[extraout_ECX] = ai;\n          goto joined_r0x00040e6f;\n        }\n        ai = ai->ai_next;\n      } while (ai != (Curl_addrinfo *)0x0);\n    }\n  }\nLAB_00040e64:\n  CVar2 = CURLE_COULDNT_CONNECT;\njoined_r0x00040e6f:\n  if (sock == -1) {\n    return CVar2;\n  }\n  Curl_closesocket(conn_00,sock);\n  return CVar2;\n}\n\n" comment (function_definition "CURLcode trynextip(connectdata *conn,int sockindex,int tempindex)\n\n{\n  int sock;\n  Curl_addrinfo *pCVar1;\n  connectdata *conn_00;\n  CURLcode CVar2;\n  uint extraout_ECX;\n  Curl_addrinfo *ai;\n  int iVar3;\n  undefined8 uVar4;\n  \n  uVar4 = __x86_get_pc_thunk_di();\n  conn_00 = (connectdata *)uVar4;\n  sock = conn_00->tempsock[extraout_ECX];\n  conn_00->tempsock[extraout_ECX] = -1;\n  if ((int)((ulonglong)uVar4 >> 0x20) == 0) {\n    pCVar1 = conn_00->tempaddr[extraout_ECX];\n    if (pCVar1 == (Curl_addrinfo *)0x0) {\n      pCVar1 = conn_00->tempaddr[0];\n      if (pCVar1 == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n      ai = pCVar1->ai_next;\n      iVar3 = (uint)(pCVar1->ai_family == 2) * 8 + 2;\n    }\n    else {\n      iVar3 = pCVar1->ai_family;\n      ai = pCVar1->ai_next;\n    }\n    if (ai != (Curl_addrinfo *)0x0) {\n      do {\n        if (conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0) {\n          while (ai->ai_family != iVar3) {\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }\n        }\n        CVar2 = singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX);\n        if (CVar2 != CURLE_COULDNT_CONNECT) {\n          conn_00->tempaddr[extraout_ECX] = ai;\n          goto joined_r0x00040e6f;\n        }\n        ai = ai->ai_next;\n      } while (ai != (Curl_addrinfo *)0x0);\n    }\n  }\nLAB_00040e64:\n  CVar2 = CURLE_COULDNT_CONNECT;\njoined_r0x00040e6f:\n  if (sock == -1) {\n    return CVar2;\n  }\n  Curl_closesocket(conn_00,sock);\n  return CVar2;\n}" type_identifier (function_declarator "trynextip(connectdata *conn,int sockindex,int tempindex)" identifier (parameter_list "(connectdata *conn,int sockindex,int tempindex)" ( (parameter_declaration "connectdata *conn" type_identifier (pointer_declarator "*conn" * identifier)) , (parameter_declaration "int sockindex" primitive_type identifier) , (parameter_declaration "int tempindex" primitive_type identifier) ))) (compound_statement "{\n  int sock;\n  Curl_addrinfo *pCVar1;\n  connectdata *conn_00;\n  CURLcode CVar2;\n  uint extraout_ECX;\n  Curl_addrinfo *ai;\n  int iVar3;\n  undefined8 uVar4;\n  \n  uVar4 = __x86_get_pc_thunk_di();\n  conn_00 = (connectdata *)uVar4;\n  sock = conn_00->tempsock[extraout_ECX];\n  conn_00->tempsock[extraout_ECX] = -1;\n  if ((int)((ulonglong)uVar4 >> 0x20) == 0) {\n    pCVar1 = conn_00->tempaddr[extraout_ECX];\n    if (pCVar1 == (Curl_addrinfo *)0x0) {\n      pCVar1 = conn_00->tempaddr[0];\n      if (pCVar1 == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n      ai = pCVar1->ai_next;\n      iVar3 = (uint)(pCVar1->ai_family == 2) * 8 + 2;\n    }\n    else {\n      iVar3 = pCVar1->ai_family;\n      ai = pCVar1->ai_next;\n    }\n    if (ai != (Curl_addrinfo *)0x0) {\n      do {\n        if (conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0) {\n          while (ai->ai_family != iVar3) {\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }\n        }\n        CVar2 = singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX);\n        if (CVar2 != CURLE_COULDNT_CONNECT) {\n          conn_00->tempaddr[extraout_ECX] = ai;\n          goto joined_r0x00040e6f;\n        }\n        ai = ai->ai_next;\n      } while (ai != (Curl_addrinfo *)0x0);\n    }\n  }\nLAB_00040e64:\n  CVar2 = CURLE_COULDNT_CONNECT;\njoined_r0x00040e6f:\n  if (sock == -1) {\n    return CVar2;\n  }\n  Curl_closesocket(conn_00,sock);\n  return CVar2;\n}" { (declaration "int sock;" primitive_type identifier ;) (declaration "Curl_addrinfo *pCVar1;" type_identifier (pointer_declarator "*pCVar1" * identifier) ;) (declaration "connectdata *conn_00;" type_identifier (pointer_declarator "*conn_00" * identifier) ;) (declaration "CURLcode CVar2;" type_identifier identifier ;) (declaration "uint extraout_ECX;" type_identifier identifier ;) (declaration "Curl_addrinfo *ai;" type_identifier (pointer_declarator "*ai" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (expression_statement "uVar4 = __x86_get_pc_thunk_di();" (assignment_expression "uVar4 = __x86_get_pc_thunk_di()" identifier = (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( )))) ;) (expression_statement "conn_00 = (connectdata *)uVar4;" (assignment_expression "conn_00 = (connectdata *)uVar4" identifier = (cast_expression "(connectdata *)uVar4" ( (type_descriptor "connectdata *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "sock = conn_00->tempsock[extraout_ECX];" (assignment_expression "sock = conn_00->tempsock[extraout_ECX]" identifier = (subscript_expression "conn_00->tempsock[extraout_ECX]" (field_expression "conn_00->tempsock" identifier -> field_identifier) [ identifier ])) ;) (expression_statement "conn_00->tempsock[extraout_ECX] = -1;" (assignment_expression "conn_00->tempsock[extraout_ECX] = -1" (subscript_expression "conn_00->tempsock[extraout_ECX]" (field_expression "conn_00->tempsock" identifier -> field_identifier) [ identifier ]) = number_literal) ;) (if_statement "if ((int)((ulonglong)uVar4 >> 0x20) == 0) {\n    pCVar1 = conn_00->tempaddr[extraout_ECX];\n    if (pCVar1 == (Curl_addrinfo *)0x0) {\n      pCVar1 = conn_00->tempaddr[0];\n      if (pCVar1 == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n      ai = pCVar1->ai_next;\n      iVar3 = (uint)(pCVar1->ai_family == 2) * 8 + 2;\n    }\n    else {\n      iVar3 = pCVar1->ai_family;\n      ai = pCVar1->ai_next;\n    }\n    if (ai != (Curl_addrinfo *)0x0) {\n      do {\n        if (conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0) {\n          while (ai->ai_family != iVar3) {\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }\n        }\n        CVar2 = singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX);\n        if (CVar2 != CURLE_COULDNT_CONNECT) {\n          conn_00->tempaddr[extraout_ECX] = ai;\n          goto joined_r0x00040e6f;\n        }\n        ai = ai->ai_next;\n      } while (ai != (Curl_addrinfo *)0x0);\n    }\n  }" if (parenthesized_expression "((int)((ulonglong)uVar4 >> 0x20) == 0)" ( (binary_expression "(int)((ulonglong)uVar4 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar4 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar4 >> 0x20)" ( (binary_expression "(ulonglong)uVar4 >> 0x20" (cast_expression "(ulonglong)uVar4" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) == number_literal) )) (compound_statement "{\n    pCVar1 = conn_00->tempaddr[extraout_ECX];\n    if (pCVar1 == (Curl_addrinfo *)0x0) {\n      pCVar1 = conn_00->tempaddr[0];\n      if (pCVar1 == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n      ai = pCVar1->ai_next;\n      iVar3 = (uint)(pCVar1->ai_family == 2) * 8 + 2;\n    }\n    else {\n      iVar3 = pCVar1->ai_family;\n      ai = pCVar1->ai_next;\n    }\n    if (ai != (Curl_addrinfo *)0x0) {\n      do {\n        if (conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0) {\n          while (ai->ai_family != iVar3) {\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }\n        }\n        CVar2 = singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX);\n        if (CVar2 != CURLE_COULDNT_CONNECT) {\n          conn_00->tempaddr[extraout_ECX] = ai;\n          goto joined_r0x00040e6f;\n        }\n        ai = ai->ai_next;\n      } while (ai != (Curl_addrinfo *)0x0);\n    }\n  }" { (expression_statement "pCVar1 = conn_00->tempaddr[extraout_ECX];" (assignment_expression "pCVar1 = conn_00->tempaddr[extraout_ECX]" identifier = (subscript_expression "conn_00->tempaddr[extraout_ECX]" (field_expression "conn_00->tempaddr" identifier -> field_identifier) [ identifier ])) ;) (if_statement "if (pCVar1 == (Curl_addrinfo *)0x0) {\n      pCVar1 = conn_00->tempaddr[0];\n      if (pCVar1 == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n      ai = pCVar1->ai_next;\n      iVar3 = (uint)(pCVar1->ai_family == 2) * 8 + 2;\n    }\n    else {\n      iVar3 = pCVar1->ai_family;\n      ai = pCVar1->ai_next;\n    }" if (parenthesized_expression "(pCVar1 == (Curl_addrinfo *)0x0)" ( (binary_expression "pCVar1 == (Curl_addrinfo *)0x0" identifier == (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pCVar1 = conn_00->tempaddr[0];\n      if (pCVar1 == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n      ai = pCVar1->ai_next;\n      iVar3 = (uint)(pCVar1->ai_family == 2) * 8 + 2;\n    }" { (expression_statement "pCVar1 = conn_00->tempaddr[0];" (assignment_expression "pCVar1 = conn_00->tempaddr[0]" identifier = (subscript_expression "conn_00->tempaddr[0]" (field_expression "conn_00->tempaddr" identifier -> field_identifier) [ number_literal ])) ;) (if_statement "if (pCVar1 == (Curl_addrinfo *)0x0) goto LAB_00040e64;" if (parenthesized_expression "(pCVar1 == (Curl_addrinfo *)0x0)" ( (binary_expression "pCVar1 == (Curl_addrinfo *)0x0" identifier == (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00040e64;" goto statement_identifier ;)) (expression_statement "ai = pCVar1->ai_next;" (assignment_expression "ai = pCVar1->ai_next" identifier = (field_expression "pCVar1->ai_next" identifier -> field_identifier)) ;) (expression_statement "iVar3 = (uint)(pCVar1->ai_family == 2) * 8 + 2;" (assignment_expression "iVar3 = (uint)(pCVar1->ai_family == 2) * 8 + 2" identifier = (binary_expression "(uint)(pCVar1->ai_family == 2) * 8 + 2" (binary_expression "(uint)(pCVar1->ai_family == 2) * 8" (call_expression "(uint)(pCVar1->ai_family == 2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pCVar1->ai_family == 2)" ( (binary_expression "pCVar1->ai_family == 2" (field_expression "pCVar1->ai_family" identifier -> field_identifier) == number_literal) ))) * number_literal) + number_literal)) ;) }) (else_clause "else {\n      iVar3 = pCVar1->ai_family;\n      ai = pCVar1->ai_next;\n    }" else (compound_statement "{\n      iVar3 = pCVar1->ai_family;\n      ai = pCVar1->ai_next;\n    }" { (expression_statement "iVar3 = pCVar1->ai_family;" (assignment_expression "iVar3 = pCVar1->ai_family" identifier = (field_expression "pCVar1->ai_family" identifier -> field_identifier)) ;) (expression_statement "ai = pCVar1->ai_next;" (assignment_expression "ai = pCVar1->ai_next" identifier = (field_expression "pCVar1->ai_next" identifier -> field_identifier)) ;) }))) (if_statement "if (ai != (Curl_addrinfo *)0x0) {\n      do {\n        if (conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0) {\n          while (ai->ai_family != iVar3) {\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }\n        }\n        CVar2 = singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX);\n        if (CVar2 != CURLE_COULDNT_CONNECT) {\n          conn_00->tempaddr[extraout_ECX] = ai;\n          goto joined_r0x00040e6f;\n        }\n        ai = ai->ai_next;\n      } while (ai != (Curl_addrinfo *)0x0);\n    }" if (parenthesized_expression "(ai != (Curl_addrinfo *)0x0)" ( (binary_expression "ai != (Curl_addrinfo *)0x0" identifier != (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      do {\n        if (conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0) {\n          while (ai->ai_family != iVar3) {\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }\n        }\n        CVar2 = singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX);\n        if (CVar2 != CURLE_COULDNT_CONNECT) {\n          conn_00->tempaddr[extraout_ECX] = ai;\n          goto joined_r0x00040e6f;\n        }\n        ai = ai->ai_next;\n      } while (ai != (Curl_addrinfo *)0x0);\n    }" { (do_statement "do {\n        if (conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0) {\n          while (ai->ai_family != iVar3) {\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }\n        }\n        CVar2 = singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX);\n        if (CVar2 != CURLE_COULDNT_CONNECT) {\n          conn_00->tempaddr[extraout_ECX] = ai;\n          goto joined_r0x00040e6f;\n        }\n        ai = ai->ai_next;\n      } while (ai != (Curl_addrinfo *)0x0);" do (compound_statement "{\n        if (conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0) {\n          while (ai->ai_family != iVar3) {\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }\n        }\n        CVar2 = singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX);\n        if (CVar2 != CURLE_COULDNT_CONNECT) {\n          conn_00->tempaddr[extraout_ECX] = ai;\n          goto joined_r0x00040e6f;\n        }\n        ai = ai->ai_next;\n      }" { (if_statement "if (conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0) {\n          while (ai->ai_family != iVar3) {\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }\n        }" if (parenthesized_expression "(conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0)" ( (binary_expression "conn_00->tempaddr[extraout_ECX ^ 1] != (Curl_addrinfo *)0x0" (subscript_expression "conn_00->tempaddr[extraout_ECX ^ 1]" (field_expression "conn_00->tempaddr" identifier -> field_identifier) [ (binary_expression "extraout_ECX ^ 1" identifier ^ number_literal) ]) != (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n          while (ai->ai_family != iVar3) {\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }\n        }" { (while_statement "while (ai->ai_family != iVar3) {\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }" while (parenthesized_expression "(ai->ai_family != iVar3)" ( (binary_expression "ai->ai_family != iVar3" (field_expression "ai->ai_family" identifier -> field_identifier) != identifier) )) (compound_statement "{\n            ai = ai->ai_next;\n            if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;\n          }" { (expression_statement "ai = ai->ai_next;" (assignment_expression "ai = ai->ai_next" identifier = (field_expression "ai->ai_next" identifier -> field_identifier)) ;) (if_statement "if (ai == (Curl_addrinfo *)0x0) goto LAB_00040e64;" if (parenthesized_expression "(ai == (Curl_addrinfo *)0x0)" ( (binary_expression "ai == (Curl_addrinfo *)0x0" identifier == (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_00040e64;" goto statement_identifier ;)) })) })) (expression_statement "CVar2 = singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX);" (assignment_expression "CVar2 = singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX)" identifier = (call_expression "singleipconnect(conn_00,ai,conn_00->tempsock + extraout_ECX)" identifier (argument_list "(conn_00,ai,conn_00->tempsock + extraout_ECX)" ( identifier , identifier , (binary_expression "conn_00->tempsock + extraout_ECX" (field_expression "conn_00->tempsock" identifier -> field_identifier) + identifier) )))) ;) (if_statement "if (CVar2 != CURLE_COULDNT_CONNECT) {\n          conn_00->tempaddr[extraout_ECX] = ai;\n          goto joined_r0x00040e6f;\n        }" if (parenthesized_expression "(CVar2 != CURLE_COULDNT_CONNECT)" ( (binary_expression "CVar2 != CURLE_COULDNT_CONNECT" identifier != identifier) )) (compound_statement "{\n          conn_00->tempaddr[extraout_ECX] = ai;\n          goto joined_r0x00040e6f;\n        }" { (expression_statement "conn_00->tempaddr[extraout_ECX] = ai;" (assignment_expression "conn_00->tempaddr[extraout_ECX] = ai" (subscript_expression "conn_00->tempaddr[extraout_ECX]" (field_expression "conn_00->tempaddr" identifier -> field_identifier) [ identifier ]) = identifier) ;) (goto_statement "goto joined_r0x00040e6f;" goto statement_identifier ;) })) (expression_statement "ai = ai->ai_next;" (assignment_expression "ai = ai->ai_next" identifier = (field_expression "ai->ai_next" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(ai != (Curl_addrinfo *)0x0)" ( (binary_expression "ai != (Curl_addrinfo *)0x0" identifier != (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) })) })) (labeled_statement "LAB_00040e64:\n  CVar2 = CURLE_COULDNT_CONNECT;" statement_identifier : (expression_statement "CVar2 = CURLE_COULDNT_CONNECT;" (assignment_expression "CVar2 = CURLE_COULDNT_CONNECT" identifier = identifier) ;)) (labeled_statement "joined_r0x00040e6f:\n  if (sock == -1) {\n    return CVar2;\n  }" statement_identifier : (if_statement "if (sock == -1) {\n    return CVar2;\n  }" if (parenthesized_expression "(sock == -1)" ( (binary_expression "sock == -1" identifier == number_literal) )) (compound_statement "{\n    return CVar2;\n  }" { (return_statement "return CVar2;" return identifier ;) }))) (expression_statement "Curl_closesocket(conn_00,sock);" (call_expression "Curl_closesocket(conn_00,sock)" identifier (argument_list "(conn_00,sock)" ( identifier , identifier ))) ;) (return_statement "return CVar2;" return identifier ;) })))
(translation_unit "int FUN_00040dc0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  uint extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EDI;\n  int iVar6;\n  undefined8 uVar7;\n  int iVar8;\n  int iVar9;\n  int iVar10;\n  \n  uVar7 = FUN_00020d67();\n  iVar2 = (int)uVar7;\n  iVar6 = unaff_EDI + 0x6fa19;\n  iVar1 = iVar2 + extraout_ECX * 4;\n  iVar8 = *(int *)(iVar1 + 0x198);\n  *(undefined4 *)(iVar1 + 0x198) = 0xffffffff;\n  if ((int)((ulonglong)uVar7 >> 0x20) == 0) {\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }\nLAB_00040e64:\n  iVar3 = 7;\njoined_r0x00040e6f:\n  if (iVar8 == -1) {\n    return iVar3;\n  }\n  FUN_000400c0(iVar2,iVar8);\n  return iVar3;\n}\n\n" (function_definition "int FUN_00040dc0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  uint extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EDI;\n  int iVar6;\n  undefined8 uVar7;\n  int iVar8;\n  int iVar9;\n  int iVar10;\n  \n  uVar7 = FUN_00020d67();\n  iVar2 = (int)uVar7;\n  iVar6 = unaff_EDI + 0x6fa19;\n  iVar1 = iVar2 + extraout_ECX * 4;\n  iVar8 = *(int *)(iVar1 + 0x198);\n  *(undefined4 *)(iVar1 + 0x198) = 0xffffffff;\n  if ((int)((ulonglong)uVar7 >> 0x20) == 0) {\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }\nLAB_00040e64:\n  iVar3 = 7;\njoined_r0x00040e6f:\n  if (iVar8 == -1) {\n    return iVar3;\n  }\n  FUN_000400c0(iVar2,iVar8);\n  return iVar3;\n}" primitive_type (function_declarator "FUN_00040dc0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  uint extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EDI;\n  int iVar6;\n  undefined8 uVar7;\n  int iVar8;\n  int iVar9;\n  int iVar10;\n  \n  uVar7 = FUN_00020d67();\n  iVar2 = (int)uVar7;\n  iVar6 = unaff_EDI + 0x6fa19;\n  iVar1 = iVar2 + extraout_ECX * 4;\n  iVar8 = *(int *)(iVar1 + 0x198);\n  *(undefined4 *)(iVar1 + 0x198) = 0xffffffff;\n  if ((int)((ulonglong)uVar7 >> 0x20) == 0) {\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }\nLAB_00040e64:\n  iVar3 = 7;\njoined_r0x00040e6f:\n  if (iVar8 == -1) {\n    return iVar3;\n  }\n  FUN_000400c0(iVar2,iVar8);\n  return iVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint extraout_ECX;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined8 uVar7;" type_identifier identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "int iVar9;" primitive_type identifier ;) (declaration "int iVar10;" primitive_type identifier ;) (expression_statement "uVar7 = FUN_00020d67();" (assignment_expression "uVar7 = FUN_00020d67()" identifier = (call_expression "FUN_00020d67()" identifier (argument_list "()" ( )))) ;) (expression_statement "iVar2 = (int)uVar7;" (assignment_expression "iVar2 = (int)uVar7" identifier = (cast_expression "(int)uVar7" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "iVar6 = unaff_EDI + 0x6fa19;" (assignment_expression "iVar6 = unaff_EDI + 0x6fa19" identifier = (binary_expression "unaff_EDI + 0x6fa19" identifier + number_literal)) ;) (expression_statement "iVar1 = iVar2 + extraout_ECX * 4;" (assignment_expression "iVar1 = iVar2 + extraout_ECX * 4" identifier = (binary_expression "iVar2 + extraout_ECX * 4" identifier + (binary_expression "extraout_ECX * 4" identifier * number_literal))) ;) (expression_statement "iVar8 = *(int *)(iVar1 + 0x198);" (assignment_expression "iVar8 = *(int *)(iVar1 + 0x198)" identifier = (pointer_expression "*(int *)(iVar1 + 0x198)" * (cast_expression "(int *)(iVar1 + 0x198)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x198)" ( (binary_expression "iVar1 + 0x198" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x198) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar1 + 0x198) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar1 + 0x198)" * (cast_expression "(undefined4 *)(iVar1 + 0x198)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x198)" ( (binary_expression "iVar1 + 0x198" identifier + number_literal) )))) = number_literal) ;) (if_statement "if ((int)((ulonglong)uVar7 >> 0x20) == 0) {\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }" if (parenthesized_expression "((int)((ulonglong)uVar7 >> 0x20) == 0)" ( (binary_expression "(int)((ulonglong)uVar7 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar7 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)uVar7 >> 0x20)" ( (binary_expression "(ulonglong)uVar7 >> 0x20" (cast_expression "(ulonglong)uVar7" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) ))) == number_literal) )) (compound_statement "{\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }" { (expression_statement "iVar9 = *(int *)(iVar1 + 0x4c);" (assignment_expression "iVar9 = *(int *)(iVar1 + 0x4c)" identifier = (pointer_expression "*(int *)(iVar1 + 0x4c)" * (cast_expression "(int *)(iVar1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) ))))) ;) (if_statement "if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }" if (parenthesized_expression "(iVar9 == 0)" ( (binary_expression "iVar9 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }" { (expression_statement "iVar9 = *(int *)(iVar2 + 0x4c);" (assignment_expression "iVar9 = *(int *)(iVar2 + 0x4c)" identifier = (pointer_expression "*(int *)(iVar2 + 0x4c)" * (cast_expression "(int *)(iVar2 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x4c)" ( (binary_expression "iVar2 + 0x4c" identifier + number_literal) ))))) ;) (if_statement "if (iVar9 == 0) goto LAB_00040e64;" if (parenthesized_expression "(iVar9 == 0)" ( (binary_expression "iVar9 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00040e64;" goto statement_identifier ;)) (expression_statement "iVar4 = *(int *)(iVar9 + 0x1c);" (assignment_expression "iVar4 = *(int *)(iVar9 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar9 + 0x1c)" * (cast_expression "(int *)(iVar9 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 0x1c)" ( (binary_expression "iVar9 + 0x1c" identifier + number_literal) ))))) ;) (expression_statement "iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;" (assignment_expression "iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2" identifier = (binary_expression "(uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2" (binary_expression "(uint)(*(int *)(iVar9 + 4) == 2) * 8" (call_expression "(uint)(*(int *)(iVar9 + 4) == 2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(int *)(iVar9 + 4) == 2)" ( (binary_expression "*(int *)(iVar9 + 4) == 2" (pointer_expression "*(int *)(iVar9 + 4)" * (cast_expression "(int *)(iVar9 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 4)" ( (binary_expression "iVar9 + 4" identifier + number_literal) )))) == number_literal) ))) * number_literal) + number_literal)) ;) }) (else_clause "else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }" else (compound_statement "{\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }" { (expression_statement "iVar5 = *(int *)(iVar9 + 4);" (assignment_expression "iVar5 = *(int *)(iVar9 + 4)" identifier = (pointer_expression "*(int *)(iVar9 + 4)" * (cast_expression "(int *)(iVar9 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 4)" ( (binary_expression "iVar9 + 4" identifier + number_literal) ))))) ;) (expression_statement "iVar4 = *(int *)(iVar9 + 0x1c);" (assignment_expression "iVar4 = *(int *)(iVar9 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar9 + 0x1c)" * (cast_expression "(int *)(iVar9 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar9 + 0x1c)" ( (binary_expression "iVar9 + 0x1c" identifier + number_literal) ))))) ;) }))) (if_statement "if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }" if (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) (compound_statement "{\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }" { (expression_statement "iVar10 = iVar2 + 0x198 + extraout_ECX * 4;" (assignment_expression "iVar10 = iVar2 + 0x198 + extraout_ECX * 4" identifier = (binary_expression "iVar2 + 0x198 + extraout_ECX * 4" (binary_expression "iVar2 + 0x198" identifier + number_literal) + (binary_expression "extraout_ECX * 4" identifier * number_literal))) ;) (expression_statement "iVar9 = (extraout_ECX ^ 1) + 0x10;" (assignment_expression "iVar9 = (extraout_ECX ^ 1) + 0x10" identifier = (binary_expression "(extraout_ECX ^ 1) + 0x10" (parenthesized_expression "(extraout_ECX ^ 1)" ( (binary_expression "extraout_ECX ^ 1" identifier ^ number_literal) )) + number_literal)) ;) (do_statement "do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);" do (compound_statement "{\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      }" { (if_statement "if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }" if (parenthesized_expression "(*(int *)(iVar2 + 0xc + iVar9 * 4) != 0)" ( (binary_expression "*(int *)(iVar2 + 0xc + iVar9 * 4) != 0" (pointer_expression "*(int *)(iVar2 + 0xc + iVar9 * 4)" * (cast_expression "(int *)(iVar2 + 0xc + iVar9 * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0xc + iVar9 * 4)" ( (binary_expression "iVar2 + 0xc + iVar9 * 4" (binary_expression "iVar2 + 0xc" identifier + number_literal) + (binary_expression "iVar9 * 4" identifier * number_literal)) )))) != number_literal) )) (compound_statement "{\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }" { (while_statement "while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }" while (parenthesized_expression "(*(int *)(iVar4 + 4) != iVar5)" ( (binary_expression "*(int *)(iVar4 + 4) != iVar5" (pointer_expression "*(int *)(iVar4 + 4)" * (cast_expression "(int *)(iVar4 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 4)" ( (binary_expression "iVar4 + 4" identifier + number_literal) )))) != identifier) )) (compound_statement "{\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }" { (expression_statement "iVar4 = *(int *)(iVar4 + 0x1c);" (assignment_expression "iVar4 = *(int *)(iVar4 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar4 + 0x1c)" * (cast_expression "(int *)(iVar4 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x1c)" ( (binary_expression "iVar4 + 0x1c" identifier + number_literal) ))))) ;) (if_statement "if (iVar4 == 0) goto LAB_00040e64;" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_00040e64;" goto statement_identifier ;)) })) })) (expression_statement "iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);" (assignment_expression "iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10)" identifier = (call_expression "FUN_00040350(iVar8,iVar6,iVar9,iVar10)" identifier (argument_list "(iVar8,iVar6,iVar9,iVar10)" ( identifier , identifier , identifier , identifier )))) ;) (if_statement "if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }" if (parenthesized_expression "(iVar3 != 7)" ( (binary_expression "iVar3 != 7" identifier != number_literal) )) (compound_statement "{\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }" { (expression_statement "*(int *)(iVar1 + 0x4c) = iVar4;" (assignment_expression "*(int *)(iVar1 + 0x4c) = iVar4" (pointer_expression "*(int *)(iVar1 + 0x4c)" * (cast_expression "(int *)(iVar1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) )))) = identifier) ;) (goto_statement "goto joined_r0x00040e6f;" goto statement_identifier ;) })) (expression_statement "iVar4 = *(int *)(iVar4 + 0x1c);" (assignment_expression "iVar4 = *(int *)(iVar4 + 0x1c)" identifier = (pointer_expression "*(int *)(iVar4 + 0x1c)" * (cast_expression "(int *)(iVar4 + 0x1c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar4 + 0x1c)" ( (binary_expression "iVar4 + 0x1c" identifier + number_literal) ))))) ;) }) while (parenthesized_expression "(iVar4 != 0)" ( (binary_expression "iVar4 != 0" identifier != number_literal) )) ;) })) })) (labeled_statement "LAB_00040e64:\n  iVar3 = 7;" statement_identifier : (expression_statement "iVar3 = 7;" (assignment_expression "iVar3 = 7" identifier = number_literal) ;)) (labeled_statement "joined_r0x00040e6f:\n  if (iVar8 == -1) {\n    return iVar3;\n  }" statement_identifier : (if_statement "if (iVar8 == -1) {\n    return iVar3;\n  }" if (parenthesized_expression "(iVar8 == -1)" ( (binary_expression "iVar8 == -1" identifier == number_literal) )) (compound_statement "{\n    return iVar3;\n  }" { (return_statement "return iVar3;" return identifier ;) }))) (expression_statement "FUN_000400c0(iVar2,iVar8);" (call_expression "FUN_000400c0(iVar2,iVar8)" identifier (argument_list "(iVar2,iVar8)" ( identifier , identifier ))) ;) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ))) == LIT) )) (compound_statement { (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) )) (compound_statement { (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 (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 (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) ))) * LIT) + LIT)) ;) }) (else_clause else (compound_statement { (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) ))))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT ^ LIT) )) + LIT)) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression IDENT * LIT)) )))) != LIT) )) (compound_statement { (while_statement while (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != IDENT) )) (compound_statement { (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 (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , 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) )))) = IDENT) ;) (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) ))))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != LIT) )) ;) })) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_00040dc0(void)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  uint extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EDI;\n  int iVar6;\n  undefined8 uVar7;\n  int iVar8;\n  int iVar9;\n  int iVar10;\n  \n  uVar7 = FUN_00020d67();\n  iVar2 = (int)uVar7;\n  iVar6 = unaff_EDI + 0x6fa19;\n  iVar1 = iVar2 + extraout_ECX * 4;\n  iVar8 = *(int *)(iVar1 + 0x198);\n  *(undefined4 *)(iVar1 + 0x198) = 0xffffffff;\n  if ((int)((ulonglong)uVar7 >> 0x20) == 0) {\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }\nLAB_00040e64:\n  iVar3 = 7;\njoined_r0x00040e6f:\n  if (iVar8 == -1) {\n    return iVar3;\n  }\n  FUN_000400c0(iVar2,iVar8);\n  return iVar3;\n}" (primitive_type "int") (function_declarator "FUN_00040dc0(void)" (identifier "FUN_00040dc0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  uint extraout_ECX;\n  int iVar4;\n  int iVar5;\n  int unaff_EDI;\n  int iVar6;\n  undefined8 uVar7;\n  int iVar8;\n  int iVar9;\n  int iVar10;\n  \n  uVar7 = FUN_00020d67();\n  iVar2 = (int)uVar7;\n  iVar6 = unaff_EDI + 0x6fa19;\n  iVar1 = iVar2 + extraout_ECX * 4;\n  iVar8 = *(int *)(iVar1 + 0x198);\n  *(undefined4 *)(iVar1 + 0x198) = 0xffffffff;\n  if ((int)((ulonglong)uVar7 >> 0x20) == 0) {\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }\nLAB_00040e64:\n  iVar3 = 7;\njoined_r0x00040e6f:\n  if (iVar8 == -1) {\n    return iVar3;\n  }\n  FUN_000400c0(iVar2,iVar8);\n  return iVar3;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint extraout_ECX;" (type_identifier "uint") (identifier "extraout_ECX") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int unaff_EDI;" (primitive_type "int") (identifier "unaff_EDI") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "undefined8 uVar7;" (type_identifier "undefined8") (identifier "uVar7") (; ";")) (declaration "int iVar8;" (primitive_type "int") (identifier "iVar8") (; ";")) (declaration "int iVar9;" (primitive_type "int") (identifier "iVar9") (; ";")) (declaration "int iVar10;" (primitive_type "int") (identifier "iVar10") (; ";")) (expression_statement "uVar7 = FUN_00020d67();" (assignment_expression "uVar7 = FUN_00020d67()" (identifier "uVar7") (= "=") (call_expression "FUN_00020d67()" (identifier "FUN_00020d67") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar2 = (int)uVar7;" (assignment_expression "iVar2 = (int)uVar7" (identifier "iVar2") (= "=") (cast_expression "(int)uVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar7"))) (; ";")) (expression_statement "iVar6 = unaff_EDI + 0x6fa19;" (assignment_expression "iVar6 = unaff_EDI + 0x6fa19" (identifier "iVar6") (= "=") (binary_expression "unaff_EDI + 0x6fa19" (identifier "unaff_EDI") (+ "+") (number_literal "0x6fa19"))) (; ";")) (expression_statement "iVar1 = iVar2 + extraout_ECX * 4;" (assignment_expression "iVar1 = iVar2 + extraout_ECX * 4" (identifier "iVar1") (= "=") (binary_expression "iVar2 + extraout_ECX * 4" (identifier "iVar2") (+ "+") (binary_expression "extraout_ECX * 4" (identifier "extraout_ECX") (* "*") (number_literal "4")))) (; ";")) (expression_statement "iVar8 = *(int *)(iVar1 + 0x198);" (assignment_expression "iVar8 = *(int *)(iVar1 + 0x198)" (identifier "iVar8") (= "=") (pointer_expression "*(int *)(iVar1 + 0x198)" (* "*") (cast_expression "(int *)(iVar1 + 0x198)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x198)" (( "(") (binary_expression "iVar1 + 0x198" (identifier "iVar1") (+ "+") (number_literal "0x198")) () ")"))))) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x198) = 0xffffffff;" (assignment_expression "*(undefined4 *)(iVar1 + 0x198) = 0xffffffff" (pointer_expression "*(undefined4 *)(iVar1 + 0x198)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x198)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x198)" (( "(") (binary_expression "iVar1 + 0x198" (identifier "iVar1") (+ "+") (number_literal "0x198")) () ")")))) (= "=") (number_literal "0xffffffff")) (; ";")) (if_statement "if ((int)((ulonglong)uVar7 >> 0x20) == 0) {\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }" (if "if") (parenthesized_expression "((int)((ulonglong)uVar7 >> 0x20) == 0)" (( "(") (binary_expression "(int)((ulonglong)uVar7 >> 0x20) == 0" (cast_expression "(int)((ulonglong)uVar7 >> 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((ulonglong)uVar7 >> 0x20)" (( "(") (binary_expression "(ulonglong)uVar7 >> 0x20" (cast_expression "(ulonglong)uVar7" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "uVar7")) (>> ">>") (number_literal "0x20")) () ")"))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar9 = *(int *)(iVar1 + 0x4c);\n    if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }\n    if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }\n  }" ({ "{") (expression_statement "iVar9 = *(int *)(iVar1 + 0x4c);" (assignment_expression "iVar9 = *(int *)(iVar1 + 0x4c)" (identifier "iVar9") (= "=") (pointer_expression "*(int *)(iVar1 + 0x4c)" (* "*") (cast_expression "(int *)(iVar1 + 0x4c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x4c)" (( "(") (binary_expression "iVar1 + 0x4c" (identifier "iVar1") (+ "+") (number_literal "0x4c")) () ")"))))) (; ";")) (if_statement "if (iVar9 == 0) {\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }\n    else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }" (if "if") (parenthesized_expression "(iVar9 == 0)" (( "(") (binary_expression "iVar9 == 0" (identifier "iVar9") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar9 = *(int *)(iVar2 + 0x4c);\n      if (iVar9 == 0) goto LAB_00040e64;\n      iVar4 = *(int *)(iVar9 + 0x1c);\n      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;\n    }" ({ "{") (expression_statement "iVar9 = *(int *)(iVar2 + 0x4c);" (assignment_expression "iVar9 = *(int *)(iVar2 + 0x4c)" (identifier "iVar9") (= "=") (pointer_expression "*(int *)(iVar2 + 0x4c)" (* "*") (cast_expression "(int *)(iVar2 + 0x4c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x4c)" (( "(") (binary_expression "iVar2 + 0x4c" (identifier "iVar2") (+ "+") (number_literal "0x4c")) () ")"))))) (; ";")) (if_statement "if (iVar9 == 0) goto LAB_00040e64;" (if "if") (parenthesized_expression "(iVar9 == 0)" (( "(") (binary_expression "iVar9 == 0" (identifier "iVar9") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00040e64;" (goto "goto") (statement_identifier "LAB_00040e64") (; ";"))) (expression_statement "iVar4 = *(int *)(iVar9 + 0x1c);" (assignment_expression "iVar4 = *(int *)(iVar9 + 0x1c)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(iVar9 + 0x1c)" (* "*") (cast_expression "(int *)(iVar9 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar9 + 0x1c)" (( "(") (binary_expression "iVar9 + 0x1c" (identifier "iVar9") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (expression_statement "iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;" (assignment_expression "iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2" (identifier "iVar5") (= "=") (binary_expression "(uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2" (binary_expression "(uint)(*(int *)(iVar9 + 4) == 2) * 8" (call_expression "(uint)(*(int *)(iVar9 + 4) == 2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*(int *)(iVar9 + 4) == 2)" (( "(") (binary_expression "*(int *)(iVar9 + 4) == 2" (pointer_expression "*(int *)(iVar9 + 4)" (* "*") (cast_expression "(int *)(iVar9 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar9 + 4)" (( "(") (binary_expression "iVar9 + 4" (identifier "iVar9") (+ "+") (number_literal "4")) () ")")))) (== "==") (number_literal "2")) () ")"))) (* "*") (number_literal "8")) (+ "+") (number_literal "2"))) (; ";")) (} "}")) (else_clause "else {\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }" (else "else") (compound_statement "{\n      iVar5 = *(int *)(iVar9 + 4);\n      iVar4 = *(int *)(iVar9 + 0x1c);\n    }" ({ "{") (expression_statement "iVar5 = *(int *)(iVar9 + 4);" (assignment_expression "iVar5 = *(int *)(iVar9 + 4)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(iVar9 + 4)" (* "*") (cast_expression "(int *)(iVar9 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar9 + 4)" (( "(") (binary_expression "iVar9 + 4" (identifier "iVar9") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "iVar4 = *(int *)(iVar9 + 0x1c);" (assignment_expression "iVar4 = *(int *)(iVar9 + 0x1c)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(iVar9 + 0x1c)" (* "*") (cast_expression "(int *)(iVar9 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar9 + 0x1c)" (( "(") (binary_expression "iVar9 + 0x1c" (identifier "iVar9") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (} "}")))) (if_statement "if (iVar4 != 0) {\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }" (if "if") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;\n      iVar9 = (extraout_ECX ^ 1) + 0x10;\n      do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);\n    }" ({ "{") (expression_statement "iVar10 = iVar2 + 0x198 + extraout_ECX * 4;" (assignment_expression "iVar10 = iVar2 + 0x198 + extraout_ECX * 4" (identifier "iVar10") (= "=") (binary_expression "iVar2 + 0x198 + extraout_ECX * 4" (binary_expression "iVar2 + 0x198" (identifier "iVar2") (+ "+") (number_literal "0x198")) (+ "+") (binary_expression "extraout_ECX * 4" (identifier "extraout_ECX") (* "*") (number_literal "4")))) (; ";")) (expression_statement "iVar9 = (extraout_ECX ^ 1) + 0x10;" (assignment_expression "iVar9 = (extraout_ECX ^ 1) + 0x10" (identifier "iVar9") (= "=") (binary_expression "(extraout_ECX ^ 1) + 0x10" (parenthesized_expression "(extraout_ECX ^ 1)" (( "(") (binary_expression "extraout_ECX ^ 1" (identifier "extraout_ECX") (^ "^") (number_literal "1")) () ")")) (+ "+") (number_literal "0x10"))) (; ";")) (do_statement "do {\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      } while (iVar4 != 0);" (do "do") (compound_statement "{\n        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }\n        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);\n        if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }\n        iVar4 = *(int *)(iVar4 + 0x1c);\n      }" ({ "{") (if_statement "if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }" (if "if") (parenthesized_expression "(*(int *)(iVar2 + 0xc + iVar9 * 4) != 0)" (( "(") (binary_expression "*(int *)(iVar2 + 0xc + iVar9 * 4) != 0" (pointer_expression "*(int *)(iVar2 + 0xc + iVar9 * 4)" (* "*") (cast_expression "(int *)(iVar2 + 0xc + iVar9 * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0xc + iVar9 * 4)" (( "(") (binary_expression "iVar2 + 0xc + iVar9 * 4" (binary_expression "iVar2 + 0xc" (identifier "iVar2") (+ "+") (number_literal "0xc")) (+ "+") (binary_expression "iVar9 * 4" (identifier "iVar9") (* "*") (number_literal "4"))) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }\n        }" ({ "{") (while_statement "while (*(int *)(iVar4 + 4) != iVar5) {\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }" (while "while") (parenthesized_expression "(*(int *)(iVar4 + 4) != iVar5)" (( "(") (binary_expression "*(int *)(iVar4 + 4) != iVar5" (pointer_expression "*(int *)(iVar4 + 4)" (* "*") (cast_expression "(int *)(iVar4 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 4)" (( "(") (binary_expression "iVar4 + 4" (identifier "iVar4") (+ "+") (number_literal "4")) () ")")))) (!= "!=") (identifier "iVar5")) () ")")) (compound_statement "{\n            iVar4 = *(int *)(iVar4 + 0x1c);\n            if (iVar4 == 0) goto LAB_00040e64;\n          }" ({ "{") (expression_statement "iVar4 = *(int *)(iVar4 + 0x1c);" (assignment_expression "iVar4 = *(int *)(iVar4 + 0x1c)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(iVar4 + 0x1c)" (* "*") (cast_expression "(int *)(iVar4 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x1c)" (( "(") (binary_expression "iVar4 + 0x1c" (identifier "iVar4") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (if_statement "if (iVar4 == 0) goto LAB_00040e64;" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_00040e64;" (goto "goto") (statement_identifier "LAB_00040e64") (; ";"))) (} "}"))) (} "}"))) (expression_statement "iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);" (assignment_expression "iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10)" (identifier "iVar3") (= "=") (call_expression "FUN_00040350(iVar8,iVar6,iVar9,iVar10)" (identifier "FUN_00040350") (argument_list "(iVar8,iVar6,iVar9,iVar10)" (( "(") (identifier "iVar8") (, ",") (identifier "iVar6") (, ",") (identifier "iVar9") (, ",") (identifier "iVar10") () ")")))) (; ";")) (if_statement "if (iVar3 != 7) {\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }" (if "if") (parenthesized_expression "(iVar3 != 7)" (( "(") (binary_expression "iVar3 != 7" (identifier "iVar3") (!= "!=") (number_literal "7")) () ")")) (compound_statement "{\n          *(int *)(iVar1 + 0x4c) = iVar4;\n          goto joined_r0x00040e6f;\n        }" ({ "{") (expression_statement "*(int *)(iVar1 + 0x4c) = iVar4;" (assignment_expression "*(int *)(iVar1 + 0x4c) = iVar4" (pointer_expression "*(int *)(iVar1 + 0x4c)" (* "*") (cast_expression "(int *)(iVar1 + 0x4c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x4c)" (( "(") (binary_expression "iVar1 + 0x4c" (identifier "iVar1") (+ "+") (number_literal "0x4c")) () ")")))) (= "=") (identifier "iVar4")) (; ";")) (goto_statement "goto joined_r0x00040e6f;" (goto "goto") (statement_identifier "joined_r0x00040e6f") (; ";")) (} "}"))) (expression_statement "iVar4 = *(int *)(iVar4 + 0x1c);" (assignment_expression "iVar4 = *(int *)(iVar4 + 0x1c)" (identifier "iVar4") (= "=") (pointer_expression "*(int *)(iVar4 + 0x1c)" (* "*") (cast_expression "(int *)(iVar4 + 0x1c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar4 + 0x1c)" (( "(") (binary_expression "iVar4 + 0x1c" (identifier "iVar4") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 != 0)" (( "(") (binary_expression "iVar4 != 0" (identifier "iVar4") (!= "!=") (number_literal "0")) () ")")) (; ";")) (} "}"))) (} "}"))) (labeled_statement "LAB_00040e64:\n  iVar3 = 7;" (statement_identifier "LAB_00040e64") (: ":") (expression_statement "iVar3 = 7;" (assignment_expression "iVar3 = 7" (identifier "iVar3") (= "=") (number_literal "7")) (; ";"))) (labeled_statement "joined_r0x00040e6f:\n  if (iVar8 == -1) {\n    return iVar3;\n  }" (statement_identifier "joined_r0x00040e6f") (: ":") (if_statement "if (iVar8 == -1) {\n    return iVar3;\n  }" (if "if") (parenthesized_expression "(iVar8 == -1)" (( "(") (binary_expression "iVar8 == -1" (identifier "iVar8") (== "==") (number_literal "-1")) () ")")) (compound_statement "{\n    return iVar3;\n  }" ({ "{") (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))) (expression_statement "FUN_000400c0(iVar2,iVar8);" (call_expression "FUN_000400c0(iVar2,iVar8)" (identifier "FUN_000400c0") (argument_list "(iVar2,iVar8)" (( "(") (identifier "iVar2") (, ",") (identifier "iVar8") () ")"))) (; ";")) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))

/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

type_1 function_1(type_2 *conn,int sockindex,int tempindex)

{
  int var_9;
  type_3 *var_2;
  type_2 *conn_00;
  type_1 var_7;
  type_4 var_4;
  type_3 *var_3;
  int var_5;
  type_5 uVar4;
  
  uVar4 = var_1();
  conn_00 = (type_2 *)uVar4;
  var_9 = conn_00->tempsock[var_4];
  conn_00->tempsock[var_4] = -1;
  if ((int)((type_6)uVar4 >> 0x20) == 0) {
    var_2 = conn_00->tempaddr[var_4];
    if (var_2 == (type_3 *)0x0) {
      var_2 = conn_00->tempaddr[0];
      if (var_2 == (type_3 *)0x0) goto LAB_00040e64;
      var_3 = var_2->ai_next;
      var_5 = (type_4)(var_2->ai_family == 2) * 8 + 2;
    }
    else {
      var_5 = var_2->ai_family;
      var_3 = var_2->ai_next;
    }
    if (var_3 != (type_3 *)0x0) {
      do {
        if (conn_00->tempaddr[var_4 ^ 1] != (type_3 *)0x0) {
          while (var_3->ai_family != var_5) {
            var_3 = var_3->ai_next;
            if (var_3 == (type_3 *)0x0) goto LAB_00040e64;
          }
        }
        var_7 = var_6(conn_00,var_3,conn_00->tempsock + var_4);
        if (var_7 != var_8) {
          conn_00->tempaddr[var_4] = var_3;
          goto joined_r0x00040e6f;
        }
        var_3 = var_3->ai_next;
      } while (var_3 != (type_3 *)0x0);
    }
  }
LAB_00040e64:
  var_7 = var_8;
joined_r0x00040e6f:
  if (var_9 == -1) {
    return var_7;
  }
  var_10(conn_00,var_9);
  return var_7;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) 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: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (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: (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))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))) right: (number_literal))) consequence: (compound_statement (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: (compound_statement (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 (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: (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (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)))) right: (number_literal)) right: (number_literal))))) alternative: (else_clause (compound_statement (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)))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))) (do_statement body: (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: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))))) right: (number_literal))) consequence: (compound_statement (while_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: (identifier))) body: (compound_statement (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 (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (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: (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: (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)))))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) (labeled_statement label: (statement_identifier) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (return_statement (identifier)))))

int MASKED(void)

{
  int iVar1;
  int iVar2;
  int iVar3;
  uint extraout_ECX;
  int iVar4;
  int iVar5;
  int unaff_EDI;
  int iVar6;
  undefined8 uVar7;
  int iVar8;
  int iVar9;
  int iVar10;
  
  uVar7 = FUN_00020d67();
  iVar2 = (int)uVar7;
  iVar6 = unaff_EDI + 0x6fa19;
  iVar1 = iVar2 + extraout_ECX * 4;
  iVar8 = *(int *)(iVar1 + 0x198);
  *(undefined4 *)(iVar1 + 0x198) = 0xffffffff;
  if ((int)((ulonglong)uVar7 >> 0x20) == 0) {
    iVar9 = *(int *)(iVar1 + 0x4c);
    if (iVar9 == 0) {
      iVar9 = *(int *)(iVar2 + 0x4c);
      if (iVar9 == 0) goto LAB_00040e64;
      iVar4 = *(int *)(iVar9 + 0x1c);
      iVar5 = (uint)(*(int *)(iVar9 + 4) == 2) * 8 + 2;
    }
    else {
      iVar5 = *(int *)(iVar9 + 4);
      iVar4 = *(int *)(iVar9 + 0x1c);
    }
    if (iVar4 != 0) {
      iVar10 = iVar2 + 0x198 + extraout_ECX * 4;
      iVar9 = (extraout_ECX ^ 1) + 0x10;
      do {
        if (*(int *)(iVar2 + 0xc + iVar9 * 4) != 0) {
          while (*(int *)(iVar4 + 4) != iVar5) {
            iVar4 = *(int *)(iVar4 + 0x1c);
            if (iVar4 == 0) goto LAB_00040e64;
          }
        }
        iVar3 = FUN_00040350(iVar8,iVar6,iVar9,iVar10);
        if (iVar3 != 7) {
          *(int *)(iVar1 + 0x4c) = iVar4;
          goto joined_r0x00040e6f;
        }
        iVar4 = *(int *)(iVar4 + 0x1c);
      } while (iVar4 != 0);
    }
  }
LAB_00040e64:
  iVar3 = 7;
joined_r0x00040e6f:
  if (iVar8 == -1) {
    return iVar3;
  }
  FUN_000400c0(iVar2,iVar8);
  return iVar3;
}

