
int Curl_getaddrinfo_ex(char *nodename,char *servname,addrinfo *hints,Curl_addrinfo **result)

{
  sockaddr *psVar1;
  char cVar2;
  char cVar3;
  Curl_addrinfo *pCVar4;
  sockaddr *psVar5;
  int iVar6;
  uint uVar7;
  char *pcVar8;
  uint uVar9;
  addrinfo *paVar10;
  uint uVar11;
  int unaff_EDI;
  Curl_addrinfo *cahead;
  int in_GS_OFFSET;
  Curl_addrinfo *local_44;
  int local_38;
  addrinfo *aihead;
  int local_20;
  
  __x86_get_pc_thunk_di();
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *result = (Curl_addrinfo *)0x0;
  local_38 = getaddrinfo(nodename,servname,(addrinfo *)hints,(addrinfo **)&aihead);
  if (local_38 != 0) goto LAB_00051451;
  if (aihead == (addrinfo *)0x0) {
LAB_000514d0:
    local_38 = -2;
    pCVar4 = (Curl_addrinfo *)0x0;
  }
  else {
    local_44 = (Curl_addrinfo *)0x0;
    cahead = (Curl_addrinfo *)0x0;
    paVar10 = aihead;
    do {
      pCVar4 = local_44;
      if (paVar10->ai_family == 2) {
        uVar11 = 0x10;
LAB_00051332:
        if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&
           (paVar10->ai_addrlen != 0)) {
          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);
          if (pCVar4 != (Curl_addrinfo *)0x0) {
            pCVar4->ai_flags = paVar10->ai_flags;
            pCVar4->ai_family = paVar10->ai_family;
            pCVar4->ai_socktype = paVar10->ai_socktype;
            iVar6 = paVar10->ai_protocol;
            pCVar4->ai_addrlen = uVar11;
            pCVar4->ai_protocol = iVar6;
            pCVar4->ai_addr = (sockaddr *)0x0;
            pCVar4->ai_canonname = (char *)0x0;
            pCVar4->ai_next = (Curl_addrinfo *)0x0;
            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);
            pCVar4->ai_addr = psVar5;
            if (psVar5 != (sockaddr *)0x0) {
              psVar1 = paVar10->ai_addr;
              cVar2 = psVar1->sa_data[0];
              cVar3 = psVar1->sa_data[1];
              psVar5->sa_family = psVar1->sa_family;
              psVar5->sa_data[0] = cVar2;
              psVar5->sa_data[1] = cVar3;
              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =
                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));
              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;
              iVar6 = (int)psVar5 - uVar9;
              uVar7 = 0;
              do {
                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));
                uVar7 = uVar7 + 4;
              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));
              if (paVar10->ai_canonname != (char *)0x0) {
                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);
                pCVar4->ai_canonname = pcVar8;
                if (pcVar8 == (char *)0x0) {
                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);
                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);
                  goto LAB_00051499;
                }
              }
              if (cahead == (Curl_addrinfo *)0x0) {
                cahead = pCVar4;
              }
              if (local_44 != (Curl_addrinfo *)0x0) {
                local_44->ai_next = pCVar4;
              }
              goto LAB_00051420;
            }
            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);
          }
LAB_00051499:
          if (aihead != (addrinfo *)0x0) {
            freeaddrinfo((addrinfo *)aihead);
          }
          pCVar4 = (Curl_addrinfo *)0x0;
          Curl_freeaddrinfo(cahead);
          local_38 = -10;
          goto LAB_0005144b;
        }
      }
      else {
        uVar11 = 0x1c;
        if (paVar10->ai_family == 10) goto LAB_00051332;
      }
LAB_00051420:
      local_44 = pCVar4;
      paVar10 = paVar10->ai_next;
    } while (paVar10 != (addrinfo *)0x0);
    if (aihead != (addrinfo *)0x0) {
      freeaddrinfo((addrinfo *)aihead);
    }
    pCVar4 = cahead;
    if (cahead == (Curl_addrinfo *)0x0) goto LAB_000514d0;
  }
LAB_0005144b:
  *result = pCVar4;
LAB_00051451:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return local_38;
}



int FUN_00051290(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)

{
  sockaddr *psVar1;
  int *piVar2;
  undefined4 *puVar3;
  int iVar4;
  uint uVar5;
  addrinfo *paVar6;
  uint uVar7;
  int unaff_EDI;
  int *piVar8;
  int in_GS_OFFSET;
  int *local_44;
  int local_38;
  addrinfo *local_24;
  int local_20;
  
  FUN_00020d67();
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *param_4 = 0;
  local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);
  if (local_38 != 0) goto LAB_00051451;
  if (local_24 == (addrinfo *)0x0) {
LAB_000514d0:
    local_38 = -2;
    piVar2 = (int *)0x0;
  }
  else {
    local_44 = (int *)0x0;
    piVar8 = (int *)0x0;
    paVar6 = local_24;
    do {
      piVar2 = local_44;
      if (paVar6->ai_family == 2) {
        uVar7 = 0x10;
LAB_00051332:
        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&
           (paVar6->ai_addrlen != 0)) {
          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);
          if (piVar2 != (int *)0x0) {
            *piVar2 = paVar6->ai_flags;
            piVar2[1] = paVar6->ai_family;
            piVar2[2] = paVar6->ai_socktype;
            iVar4 = paVar6->ai_protocol;
            piVar2[4] = uVar7;
            piVar2[3] = iVar4;
            piVar2[6] = 0;
            piVar2[5] = 0;
            piVar2[7] = 0;
            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);
            piVar2[6] = (int)puVar3;
            if (puVar3 != (undefined4 *)0x0) {
              psVar1 = paVar6->ai_addr;
              *puVar3 = *(undefined4 *)psVar1;
              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =
                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));
              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);
              uVar5 = 0;
              do {
                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =
                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));
                uVar5 = uVar5 + 4;
              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));
              if (paVar6->ai_canonname != (char *)0x0) {
                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);
                piVar2[5] = iVar4;
                if (iVar4 == 0) {
                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);
                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);
                  goto LAB_00051499;
                }
              }
              if (piVar8 == (int *)0x0) {
                piVar8 = piVar2;
              }
              if (local_44 != (int *)0x0) {
                local_44[7] = (int)piVar2;
              }
              goto LAB_00051420;
            }
            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);
          }
LAB_00051499:
          if (local_24 != (addrinfo *)0x0) {
            freeaddrinfo(local_24);
          }
          piVar2 = (int *)0x0;
          FUN_00051240(piVar8);
          local_38 = -10;
          goto LAB_0005144b;
        }
      }
      else {
        uVar7 = 0x1c;
        if (paVar6->ai_family == 10) goto LAB_00051332;
      }
LAB_00051420:
      local_44 = piVar2;
      paVar6 = paVar6->ai_next;
    } while (paVar6 != (addrinfo *)0x0);
    if (local_24 != (addrinfo *)0x0) {
      freeaddrinfo(local_24);
    }
    piVar2 = piVar8;
    if (piVar8 == (int *)0x0) goto LAB_000514d0;
  }
LAB_0005144b:
  *param_4 = piVar2;
LAB_00051451:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0007c1a0();
  }
  return local_38;
}


PUSH EBP
PUSH EDI
CALL 0x00020d67
ADD EDI,0x5f549
PUSH ESI
PUSH EBX
SUB ESP,0x3c
MOV EAX,dword ptr [ESP + 0x5c]
MOV dword ptr [ESP + 0x18],EDI
MOV EBX,EDI
MOV dword ptr [ESP + 0x1c],EAX
MOV EDX,dword ptr GS:[0x14]
MOV dword ptr [ESP + 0x2c],EDX
XOR EDX,EDX
MOV dword ptr [EAX],0x0
LEA EAX,[ESP + 0x28]
PUSH EAX
PUSH dword ptr [ESP + 0x5c]
PUSH dword ptr [ESP + 0x5c]
PUSH dword ptr [ESP + 0x5c]
CALL 0x000193e0
MOV dword ptr [ESP + 0x24],EAX
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x00051451
MOV EBX,dword ptr [ESP + 0x28]
TEST EBX,EBX
JZ 0x000514d0
MOV ESI,EDI
MOV dword ptr [ESP + 0x8],0x0
XOR EDI,EDI
LEA EDX,[ESI + 0x890]
LEA EAX,[ESI + 0x884]
MOV dword ptr [ESP + 0x4],EDX
MOV dword ptr [ESP + 0x10],EAX
LEA ESI,[ESI]
MOV EAX,dword ptr [EBX + 0x4]
CMP EAX,0x2
JZ 0x00051470
MOV ESI,0x1c
CMP EAX,0xa
JNZ 0x00051420
MOV EAX,dword ptr [EBX + 0x14]
TEST EAX,EAX
JZ 0x00051420
MOV EAX,dword ptr [EBX + 0x10]
CMP EAX,ESI
JC 0x00051420
TEST EAX,EAX
JZ 0x00051420
SUB ESP,0xc
PUSH 0x20
MOV EAX,dword ptr [ESP + 0x14]
CALL dword ptr [EAX]
MOV EBP,EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00051499
MOV EAX,dword ptr [EBX]
SUB ESP,0xc
MOV dword ptr [EBP],EAX
MOV EAX,dword ptr [EBX + 0x4]
MOV dword ptr [EBP + 0x4],EAX
MOV EAX,dword ptr [EBX + 0x8]
MOV dword ptr [EBP + 0x8],EAX
MOV EAX,dword ptr [EBX + 0xc]
MOV dword ptr [EBP + 0x10],ESI
MOV dword ptr [EBP + 0xc],EAX
MOV dword ptr [EBP + 0x18],0x0
MOV dword ptr [EBP + 0x14],0x0
MOV dword ptr [EBP + 0x1c],0x0
PUSH ESI
MOV EAX,dword ptr [ESP + 0x14]
CALL dword ptr [EAX]
MOV dword ptr [EBP + 0x18],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00051486
MOV EDX,dword ptr [EBX + 0x14]
MOV ECX,dword ptr [EDX]
MOV dword ptr [EAX],ECX
MOV ECX,dword ptr [EDX + ESI*0x1 + -0x4]
MOV dword ptr [EAX + ESI*0x1 + -0x4],ECX
LEA ECX,[EAX + 0x4]
AND ECX,0xfffffffc
MOV dword ptr [ESP + 0xc],EBX
SUB EAX,ECX
ADD ESI,EAX
SUB EDX,EAX
XOR EAX,EAX
AND ESI,0xfffffffc
MOV EBX,dword ptr [EDX + EAX*0x1]
MOV dword ptr [ECX + EAX*0x1],EBX
ADD EAX,0x4
CMP EAX,ESI
JC 0x000513d3
MOV EBX,dword ptr [ESP + 0xc]
MOV EAX,dword ptr [EBX + 0x18]
TEST EAX,EAX
JZ 0x00051403
SUB ESP,0xc
PUSH EAX
MOV EAX,dword ptr [ESP + 0x20]
CALL dword ptr [EAX]
MOV dword ptr [EBP + 0x14],EAX
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000514df
MOV EAX,dword ptr [ESP + 0x8]
TEST EDI,EDI
CMOVZ EDI,EBP
TEST EAX,EAX
JZ 0x00051480
MOV dword ptr [EAX + 0x1c],EBP
MOV dword ptr [ESP + 0x8],EBP
LEA ESI,[ESI]
NOP
MOV EBX,dword ptr [EBX + 0x1c]
TEST EBX,EBX
JNZ 0x00051318
MOV EAX,dword ptr [ESP + 0x28]
TEST EAX,EAX
JZ 0x00051443
SUB ESP,0xc
PUSH EAX
MOV EBX,dword ptr [ESP + 0x28]
CALL 0x00019250
ADD ESP,0x10
TEST EDI,EDI
JZ 0x000514d0
MOV EAX,dword ptr [ESP + 0x1c]
MOV dword ptr [EAX],EDI
MOV EDI,dword ptr [ESP + 0x2c]
XOR EDI,dword ptr GS:[0x14]
MOV EAX,dword ptr [ESP + 0x14]
JNZ 0x000514fb
ADD ESP,0x3c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV ESI,0x10
JMP 0x00051332
MOV dword ptr [ESP + 0x8],EBP
JMP 0x00051420
SUB ESP,0xc
PUSH EBP
MOV EAX,dword ptr [ESP + 0x28]
LEA EAX,[EAX + 0x88c]
CALL dword ptr [EAX]
ADD ESP,0x10
MOV EAX,dword ptr [ESP + 0x28]
TEST EAX,EAX
JZ 0x000514b1
SUB ESP,0xc
PUSH EAX
MOV EBX,dword ptr [ESP + 0x28]
CALL 0x00019250
ADD ESP,0x10
SUB ESP,0xc
PUSH EDI
MOV EBX,dword ptr [ESP + 0x28]
XOR EDI,EDI
CALL 0x00051240
ADD ESP,0x10
MOV dword ptr [ESP + 0x14],0xfffffff6
JMP 0x0005144b
MOV dword ptr [ESP + 0x14],0xfffffffe
XOR EDI,EDI
JMP 0x0005144b
SUB ESP,0xc
MOV EAX,dword ptr [ESP + 0x24]
PUSH dword ptr [EBP + 0x18]
LEA EBX,[EAX + 0x88c]
CALL dword ptr [EBX]
MOV dword ptr [ESP],EBP
CALL dword ptr [EBX]
ADD ESP,0x10
JMP 0x00051499
CALL 0x0007c1a0
(translation_unit "int FUN_00051290(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)\n\n{\n  sockaddr *psVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  uint uVar5;\n  addrinfo *paVar6;\n  uint uVar7;\n  int unaff_EDI;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_44;\n  int local_38;\n  addrinfo *local_24;\n  int local_20;\n  \n  FUN_00020d67();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_4 = 0;\n  local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);\n  if (local_38 != 0) goto LAB_00051451;\n  if (local_24 == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }\n  else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }\nLAB_0005144b:\n  *param_4 = piVar2;\nLAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }\n  return local_38;\n}\n\n" (function_definition "int FUN_00051290(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)\n\n{\n  sockaddr *psVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  uint uVar5;\n  addrinfo *paVar6;\n  uint uVar7;\n  int unaff_EDI;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_44;\n  int local_38;\n  addrinfo *local_24;\n  int local_20;\n  \n  FUN_00020d67();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_4 = 0;\n  local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);\n  if (local_38 != 0) goto LAB_00051451;\n  if (local_24 == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }\n  else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }\nLAB_0005144b:\n  *param_4 = piVar2;\nLAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }\n  return local_38;\n}" primitive_type (function_declarator "FUN_00051290(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)" identifier (parameter_list "(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "addrinfo *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  sockaddr *psVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  uint uVar5;\n  addrinfo *paVar6;\n  uint uVar7;\n  int unaff_EDI;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_44;\n  int local_38;\n  addrinfo *local_24;\n  int local_20;\n  \n  FUN_00020d67();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_4 = 0;\n  local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);\n  if (local_38 != 0) goto LAB_00051451;\n  if (local_24 == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }\n  else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }\nLAB_0005144b:\n  *param_4 = piVar2;\nLAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }\n  return local_38;\n}" { (declaration "sockaddr *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "addrinfo *paVar6;" type_identifier (pointer_declarator "*paVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int *local_44;" primitive_type (pointer_declarator "*local_44" * identifier) ;) (declaration "int local_38;" primitive_type identifier ;) (declaration "addrinfo *local_24;" type_identifier (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "FUN_00020d67();" (call_expression "FUN_00020d67()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (expression_statement "local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);" (assignment_expression "local_38 = getaddrinfo(param_1,param_2,param_3,&local_24)" identifier = (call_expression "getaddrinfo(param_1,param_2,param_3,&local_24)" identifier (argument_list "(param_1,param_2,param_3,&local_24)" ( identifier , identifier , identifier , (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if (local_38 != 0) goto LAB_00051451;" if (parenthesized_expression "(local_38 != 0)" ( (binary_expression "local_38 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00051451;" goto statement_identifier ;)) (if_statement "if (local_24 == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }\n  else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }" if (parenthesized_expression "(local_24 == (addrinfo *)0x0)" ( (binary_expression "local_24 == (addrinfo *)0x0" identifier == (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }" { (labeled_statement "LAB_000514d0:\n    local_38 = -2;" statement_identifier : (expression_statement "local_38 = -2;" (assignment_expression "local_38 = -2" identifier = number_literal) ;)) (expression_statement "piVar2 = (int *)0x0;" (assignment_expression "piVar2 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }" else (compound_statement "{\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }" { (expression_statement "local_44 = (int *)0x0;" (assignment_expression "local_44 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "piVar8 = (int *)0x0;" (assignment_expression "piVar8 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "paVar6 = local_24;" (assignment_expression "paVar6 = local_24" identifier = identifier) ;) (do_statement "do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);" do (compound_statement "{\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    }" { (expression_statement "piVar2 = local_44;" (assignment_expression "piVar2 = local_44" identifier = identifier) ;) (if_statement "if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }" if (parenthesized_expression "(paVar6->ai_family == 2)" ( (binary_expression "paVar6->ai_family == 2" (field_expression "paVar6->ai_family" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }" { (expression_statement "uVar7 = 0x10;" (assignment_expression "uVar7 = 0x10" identifier = number_literal) ;) (labeled_statement "LAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }" statement_identifier : (if_statement "if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }" if (parenthesized_expression "(((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0))" ( (binary_expression "((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)" (parenthesized_expression "((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen))" ( (binary_expression "(paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)" (parenthesized_expression "(paVar6->ai_addr != (sockaddr *)0x0)" ( (binary_expression "paVar6->ai_addr != (sockaddr *)0x0" (field_expression "paVar6->ai_addr" identifier -> field_identifier) != (cast_expression "(sockaddr *)0x0" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(uVar7 <= paVar6->ai_addrlen)" ( (binary_expression "uVar7 <= paVar6->ai_addrlen" identifier <= (field_expression "paVar6->ai_addrlen" identifier -> field_identifier)) ))) )) && (parenthesized_expression "(paVar6->ai_addrlen != 0)" ( (binary_expression "paVar6->ai_addrlen != 0" (field_expression "paVar6->ai_addrlen" identifier -> field_identifier) != number_literal) ))) )) (compound_statement "{\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }" { (expression_statement "piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);" (assignment_expression "piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20)" identifier = (cast_expression "(int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20)" (parenthesized_expression "(**(code **)(&UNK_0005fdd9 + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdd9 + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdd9 + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdd9 + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdd9 + unaff_EDI)" ( (binary_expression "&UNK_0005fdd9 + unaff_EDI" (pointer_expression "&UNK_0005fdd9" & identifier) + identifier) ))))) )) (argument_list "(0x20)" ( number_literal ))))) ;) (if_statement "if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }" if (parenthesized_expression "(piVar2 != (int *)0x0)" ( (binary_expression "piVar2 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }" { (expression_statement "*piVar2 = paVar6->ai_flags;" (assignment_expression "*piVar2 = paVar6->ai_flags" (pointer_expression "*piVar2" * identifier) = (field_expression "paVar6->ai_flags" identifier -> field_identifier)) ;) (expression_statement "piVar2[1] = paVar6->ai_family;" (assignment_expression "piVar2[1] = paVar6->ai_family" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = (field_expression "paVar6->ai_family" identifier -> field_identifier)) ;) (expression_statement "piVar2[2] = paVar6->ai_socktype;" (assignment_expression "piVar2[2] = paVar6->ai_socktype" (subscript_expression "piVar2[2]" identifier [ number_literal ]) = (field_expression "paVar6->ai_socktype" identifier -> field_identifier)) ;) (expression_statement "iVar4 = paVar6->ai_protocol;" (assignment_expression "iVar4 = paVar6->ai_protocol" identifier = (field_expression "paVar6->ai_protocol" identifier -> field_identifier)) ;) (expression_statement "piVar2[4] = uVar7;" (assignment_expression "piVar2[4] = uVar7" (subscript_expression "piVar2[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar2[3] = iVar4;" (assignment_expression "piVar2[3] = iVar4" (subscript_expression "piVar2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar2[6] = 0;" (assignment_expression "piVar2[6] = 0" (subscript_expression "piVar2[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[5] = 0;" (assignment_expression "piVar2[5] = 0" (subscript_expression "piVar2[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[7] = 0;" (assignment_expression "piVar2[7] = 0" (subscript_expression "piVar2[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);" (assignment_expression "puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7)" identifier = (cast_expression "(undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7)" (parenthesized_expression "(**(code **)(&UNK_0005fdd9 + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdd9 + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdd9 + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdd9 + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdd9 + unaff_EDI)" ( (binary_expression "&UNK_0005fdd9 + unaff_EDI" (pointer_expression "&UNK_0005fdd9" & identifier) + identifier) ))))) )) (argument_list "(uVar7)" ( identifier ))))) ;) (expression_statement "piVar2[6] = (int)puVar3;" (assignment_expression "piVar2[6] = (int)puVar3" (subscript_expression "piVar2[6]" identifier [ number_literal ]) = (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }" if (parenthesized_expression "(puVar3 != (undefined4 *)0x0)" ( (binary_expression "puVar3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }" { (expression_statement "psVar1 = paVar6->ai_addr;" (assignment_expression "psVar1 = paVar6->ai_addr" identifier = (field_expression "paVar6->ai_addr" identifier -> field_identifier)) ;) (expression_statement "*puVar3 = *(undefined4 *)psVar1;" (assignment_expression "*puVar3 = *(undefined4 *)psVar1" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)psVar1" * (cast_expression "(undefined4 *)psVar1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));" (assignment_expression "*(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6))" (pointer_expression "*(undefined4 *)((int)puVar3 + (uVar7 - 4))" * (cast_expression "(undefined4 *)((int)puVar3 + (uVar7 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar3 + (uVar7 - 4))" ( (binary_expression "(int)puVar3 + (uVar7 - 4)" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar7 - 4)" ( (binary_expression "uVar7 - 4" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined4 *)(psVar1->sa_data + (uVar7 - 6))" * (cast_expression "(undefined4 *)(psVar1->sa_data + (uVar7 - 6))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar1->sa_data + (uVar7 - 6))" ( (binary_expression "psVar1->sa_data + (uVar7 - 6)" (field_expression "psVar1->sa_data" identifier -> field_identifier) + (parenthesized_expression "(uVar7 - 6)" ( (binary_expression "uVar7 - 6" identifier - number_literal) ))) ))))) ;) (expression_statement "iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);" (assignment_expression "iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc)" identifier = (binary_expression "(int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc)" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (parenthesized_expression "((uint)(puVar3 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar3 + 1) & 0xfffffffc" (call_expression "(uint)(puVar3 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar3 + 1)" ( (binary_expression "puVar3 + 1" identifier + number_literal) ))) & number_literal) )))) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));" do (compound_statement "{\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              }" { (expression_statement "*(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));" (assignment_expression "*(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4))" (pointer_expression "*(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5)" * (cast_expression "(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5)" ( (binary_expression "((uint)(puVar3 + 1) & 0xfffffffc) + uVar5" (parenthesized_expression "((uint)(puVar3 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar3 + 1) & 0xfffffffc" (call_expression "(uint)(puVar3 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar3 + 1)" ( (binary_expression "puVar3 + 1" identifier + number_literal) ))) & number_literal) )) + identifier) )))) = (pointer_expression "*(undefined4 *)((int)psVar1 + (uVar5 - iVar4))" * (cast_expression "(undefined4 *)((int)psVar1 + (uVar5 - iVar4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)psVar1 + (uVar5 - iVar4))" ( (binary_expression "(int)psVar1 + (uVar5 - iVar4)" (cast_expression "(int)psVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar5 - iVar4)" ( (binary_expression "uVar5 - iVar4" identifier - identifier) ))) ))))) ;) (expression_statement "uVar5 = uVar5 + 4;" (assignment_expression "uVar5 = uVar5 + 4" identifier = (binary_expression "uVar5 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 < (uVar7 + iVar4 & 0xfffffffc))" ( (binary_expression "uVar5 < (uVar7 + iVar4 & 0xfffffffc)" identifier < (parenthesized_expression "(uVar7 + iVar4 & 0xfffffffc)" ( (binary_expression "uVar7 + iVar4 & 0xfffffffc" (binary_expression "uVar7 + iVar4" identifier + identifier) & number_literal) ))) )) ;) (if_statement "if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }" if (parenthesized_expression "(paVar6->ai_canonname != (char *)0x0)" ( (binary_expression "paVar6->ai_canonname != (char *)0x0" (field_expression "paVar6->ai_canonname" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }" { (expression_statement "iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);" (assignment_expression "iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname)" identifier = (call_expression "(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname)" (parenthesized_expression "(**(code **)(&UNK_0005fdcd + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdcd + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdcd + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdcd + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdcd + unaff_EDI)" ( (binary_expression "&UNK_0005fdcd + unaff_EDI" (pointer_expression "&UNK_0005fdcd" & identifier) + identifier) ))))) )) (argument_list "(paVar6->ai_canonname)" ( (field_expression "paVar6->ai_canonname" identifier -> field_identifier) )))) ;) (expression_statement "piVar2[5] = iVar4;" (assignment_expression "piVar2[5] = iVar4" (subscript_expression "piVar2[5]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }" { (expression_statement "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);" (call_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6])" (parenthesized_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdd5 + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdd5 + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdd5 + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdd5 + unaff_EDI)" ( (binary_expression "&UNK_0005fdd5 + unaff_EDI" (pointer_expression "&UNK_0005fdd5" & identifier) + identifier) ))))) )) (argument_list "(piVar2[6])" ( (subscript_expression "piVar2[6]" identifier [ number_literal ]) ))) ;) (expression_statement "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);" (call_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2)" (parenthesized_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdd5 + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdd5 + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdd5 + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdd5 + unaff_EDI)" ( (binary_expression "&UNK_0005fdd5 + unaff_EDI" (pointer_expression "&UNK_0005fdd5" & identifier) + identifier) ))))) )) (argument_list "(piVar2)" ( identifier ))) ;) (goto_statement "goto LAB_00051499;" goto statement_identifier ;) })) })) (if_statement "if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }" if (parenthesized_expression "(piVar8 == (int *)0x0)" ( (binary_expression "piVar8 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                piVar8 = piVar2;\n              }" { (expression_statement "piVar8 = piVar2;" (assignment_expression "piVar8 = piVar2" identifier = identifier) ;) })) (if_statement "if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }" if (parenthesized_expression "(local_44 != (int *)0x0)" ( (binary_expression "local_44 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                local_44[7] = (int)piVar2;\n              }" { (expression_statement "local_44[7] = (int)piVar2;" (assignment_expression "local_44[7] = (int)piVar2" (subscript_expression "local_44[7]" identifier [ number_literal ]) = (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (goto_statement "goto LAB_00051420;" goto statement_identifier ;) })) (expression_statement "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);" (call_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2)" (parenthesized_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdd5 + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdd5 + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdd5 + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdd5 + unaff_EDI)" ( (binary_expression "&UNK_0005fdd5 + unaff_EDI" (pointer_expression "&UNK_0005fdd5" & identifier) + identifier) ))))) )) (argument_list "(piVar2)" ( identifier ))) ;) })) (labeled_statement "LAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }" statement_identifier : (if_statement "if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }" if (parenthesized_expression "(local_24 != (addrinfo *)0x0)" ( (binary_expression "local_24 != (addrinfo *)0x0" identifier != (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            freeaddrinfo(local_24);\n          }" { (expression_statement "freeaddrinfo(local_24);" (call_expression "freeaddrinfo(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) }))) (expression_statement "piVar2 = (int *)0x0;" (assignment_expression "piVar2 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "FUN_00051240(piVar8);" (call_expression "FUN_00051240(piVar8)" identifier (argument_list "(piVar8)" ( identifier ))) ;) (expression_statement "local_38 = -10;" (assignment_expression "local_38 = -10" identifier = number_literal) ;) (goto_statement "goto LAB_0005144b;" goto statement_identifier ;) }))) }) (else_clause "else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }" else (compound_statement "{\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }" { (expression_statement "uVar7 = 0x1c;" (assignment_expression "uVar7 = 0x1c" identifier = number_literal) ;) (if_statement "if (paVar6->ai_family == 10) goto LAB_00051332;" if (parenthesized_expression "(paVar6->ai_family == 10)" ( (binary_expression "paVar6->ai_family == 10" (field_expression "paVar6->ai_family" identifier -> field_identifier) == number_literal) )) (goto_statement "goto LAB_00051332;" goto statement_identifier ;)) }))) (labeled_statement "LAB_00051420:\n      local_44 = piVar2;" statement_identifier : (expression_statement "local_44 = piVar2;" (assignment_expression "local_44 = piVar2" identifier = identifier) ;)) (expression_statement "paVar6 = paVar6->ai_next;" (assignment_expression "paVar6 = paVar6->ai_next" identifier = (field_expression "paVar6->ai_next" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(paVar6 != (addrinfo *)0x0)" ( (binary_expression "paVar6 != (addrinfo *)0x0" identifier != (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (if_statement "if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }" if (parenthesized_expression "(local_24 != (addrinfo *)0x0)" ( (binary_expression "local_24 != (addrinfo *)0x0" identifier != (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      freeaddrinfo(local_24);\n    }" { (expression_statement "freeaddrinfo(local_24);" (call_expression "freeaddrinfo(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) })) (expression_statement "piVar2 = piVar8;" (assignment_expression "piVar2 = piVar8" identifier = identifier) ;) (if_statement "if (piVar8 == (int *)0x0) goto LAB_000514d0;" if (parenthesized_expression "(piVar8 == (int *)0x0)" ( (binary_expression "piVar8 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000514d0;" goto statement_identifier ;)) }))) (labeled_statement "LAB_0005144b:\n  *param_4 = piVar2;" statement_identifier : (expression_statement "*param_4 = piVar2;" (assignment_expression "*param_4 = piVar2" (pointer_expression "*param_4" * identifier) = identifier) ;)) (labeled_statement "LAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_0007c1a0();\n  }" { comment (expression_statement "FUN_0007c1a0();" (call_expression "FUN_0007c1a0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return local_38;" return identifier ;) })))
(translation_unit "int Curl_getaddrinfo_ex(char *nodename,char *servname,addrinfo *hints,Curl_addrinfo **result)\n\n{\n  sockaddr *psVar1;\n  char cVar2;\n  char cVar3;\n  Curl_addrinfo *pCVar4;\n  sockaddr *psVar5;\n  int iVar6;\n  uint uVar7;\n  char *pcVar8;\n  uint uVar9;\n  addrinfo *paVar10;\n  uint uVar11;\n  int unaff_EDI;\n  Curl_addrinfo *cahead;\n  int in_GS_OFFSET;\n  Curl_addrinfo *local_44;\n  int local_38;\n  addrinfo *aihead;\n  int local_20;\n  \n  __x86_get_pc_thunk_di();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *result = (Curl_addrinfo *)0x0;\n  local_38 = getaddrinfo(nodename,servname,(addrinfo *)hints,(addrinfo **)&aihead);\n  if (local_38 != 0) goto LAB_00051451;\n  if (aihead == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    pCVar4 = (Curl_addrinfo *)0x0;\n  }\n  else {\n    local_44 = (Curl_addrinfo *)0x0;\n    cahead = (Curl_addrinfo *)0x0;\n    paVar10 = aihead;\n    do {\n      pCVar4 = local_44;\n      if (paVar10->ai_family == 2) {\n        uVar11 = 0x10;\nLAB_00051332:\n        if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)) {\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar11 = 0x1c;\n        if (paVar10->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = pCVar4;\n      paVar10 = paVar10->ai_next;\n    } while (paVar10 != (addrinfo *)0x0);\n    if (aihead != (addrinfo *)0x0) {\n      freeaddrinfo((addrinfo *)aihead);\n    }\n    pCVar4 = cahead;\n    if (cahead == (Curl_addrinfo *)0x0) goto LAB_000514d0;\n  }\nLAB_0005144b:\n  *result = pCVar4;\nLAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_38;\n}\n\n" (function_definition "int Curl_getaddrinfo_ex(char *nodename,char *servname,addrinfo *hints,Curl_addrinfo **result)\n\n{\n  sockaddr *psVar1;\n  char cVar2;\n  char cVar3;\n  Curl_addrinfo *pCVar4;\n  sockaddr *psVar5;\n  int iVar6;\n  uint uVar7;\n  char *pcVar8;\n  uint uVar9;\n  addrinfo *paVar10;\n  uint uVar11;\n  int unaff_EDI;\n  Curl_addrinfo *cahead;\n  int in_GS_OFFSET;\n  Curl_addrinfo *local_44;\n  int local_38;\n  addrinfo *aihead;\n  int local_20;\n  \n  __x86_get_pc_thunk_di();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *result = (Curl_addrinfo *)0x0;\n  local_38 = getaddrinfo(nodename,servname,(addrinfo *)hints,(addrinfo **)&aihead);\n  if (local_38 != 0) goto LAB_00051451;\n  if (aihead == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    pCVar4 = (Curl_addrinfo *)0x0;\n  }\n  else {\n    local_44 = (Curl_addrinfo *)0x0;\n    cahead = (Curl_addrinfo *)0x0;\n    paVar10 = aihead;\n    do {\n      pCVar4 = local_44;\n      if (paVar10->ai_family == 2) {\n        uVar11 = 0x10;\nLAB_00051332:\n        if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)) {\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar11 = 0x1c;\n        if (paVar10->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = pCVar4;\n      paVar10 = paVar10->ai_next;\n    } while (paVar10 != (addrinfo *)0x0);\n    if (aihead != (addrinfo *)0x0) {\n      freeaddrinfo((addrinfo *)aihead);\n    }\n    pCVar4 = cahead;\n    if (cahead == (Curl_addrinfo *)0x0) goto LAB_000514d0;\n  }\nLAB_0005144b:\n  *result = pCVar4;\nLAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_38;\n}" primitive_type (function_declarator "Curl_getaddrinfo_ex(char *nodename,char *servname,addrinfo *hints,Curl_addrinfo **result)" identifier (parameter_list "(char *nodename,char *servname,addrinfo *hints,Curl_addrinfo **result)" ( (parameter_declaration "char *nodename" primitive_type (pointer_declarator "*nodename" * identifier)) , (parameter_declaration "char *servname" primitive_type (pointer_declarator "*servname" * identifier)) , (parameter_declaration "addrinfo *hints" type_identifier (pointer_declarator "*hints" * identifier)) , (parameter_declaration "Curl_addrinfo **result" type_identifier (pointer_declarator "**result" * (pointer_declarator "*result" * identifier))) ))) (compound_statement "{\n  sockaddr *psVar1;\n  char cVar2;\n  char cVar3;\n  Curl_addrinfo *pCVar4;\n  sockaddr *psVar5;\n  int iVar6;\n  uint uVar7;\n  char *pcVar8;\n  uint uVar9;\n  addrinfo *paVar10;\n  uint uVar11;\n  int unaff_EDI;\n  Curl_addrinfo *cahead;\n  int in_GS_OFFSET;\n  Curl_addrinfo *local_44;\n  int local_38;\n  addrinfo *aihead;\n  int local_20;\n  \n  __x86_get_pc_thunk_di();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *result = (Curl_addrinfo *)0x0;\n  local_38 = getaddrinfo(nodename,servname,(addrinfo *)hints,(addrinfo **)&aihead);\n  if (local_38 != 0) goto LAB_00051451;\n  if (aihead == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    pCVar4 = (Curl_addrinfo *)0x0;\n  }\n  else {\n    local_44 = (Curl_addrinfo *)0x0;\n    cahead = (Curl_addrinfo *)0x0;\n    paVar10 = aihead;\n    do {\n      pCVar4 = local_44;\n      if (paVar10->ai_family == 2) {\n        uVar11 = 0x10;\nLAB_00051332:\n        if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)) {\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar11 = 0x1c;\n        if (paVar10->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = pCVar4;\n      paVar10 = paVar10->ai_next;\n    } while (paVar10 != (addrinfo *)0x0);\n    if (aihead != (addrinfo *)0x0) {\n      freeaddrinfo((addrinfo *)aihead);\n    }\n    pCVar4 = cahead;\n    if (cahead == (Curl_addrinfo *)0x0) goto LAB_000514d0;\n  }\nLAB_0005144b:\n  *result = pCVar4;\nLAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return local_38;\n}" { (declaration "sockaddr *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (declaration "Curl_addrinfo *pCVar4;" type_identifier (pointer_declarator "*pCVar4" * identifier) ;) (declaration "sockaddr *psVar5;" type_identifier (pointer_declarator "*psVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "char *pcVar8;" primitive_type (pointer_declarator "*pcVar8" * identifier) ;) (declaration "uint uVar9;" type_identifier identifier ;) (declaration "addrinfo *paVar10;" type_identifier (pointer_declarator "*paVar10" * identifier) ;) (declaration "uint uVar11;" type_identifier identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "Curl_addrinfo *cahead;" type_identifier (pointer_declarator "*cahead" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "Curl_addrinfo *local_44;" type_identifier (pointer_declarator "*local_44" * identifier) ;) (declaration "int local_38;" primitive_type identifier ;) (declaration "addrinfo *aihead;" type_identifier (pointer_declarator "*aihead" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "__x86_get_pc_thunk_di();" (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "*result = (Curl_addrinfo *)0x0;" (assignment_expression "*result = (Curl_addrinfo *)0x0" (pointer_expression "*result" * identifier) = (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_38 = getaddrinfo(nodename,servname,(addrinfo *)hints,(addrinfo **)&aihead);" (assignment_expression "local_38 = getaddrinfo(nodename,servname,(addrinfo *)hints,(addrinfo **)&aihead)" identifier = (call_expression "getaddrinfo(nodename,servname,(addrinfo *)hints,(addrinfo **)&aihead)" identifier (argument_list "(nodename,servname,(addrinfo *)hints,(addrinfo **)&aihead)" ( identifier , identifier , (cast_expression "(addrinfo *)hints" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (cast_expression "(addrinfo **)&aihead" ( (type_descriptor "addrinfo **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (pointer_expression "&aihead" & identifier)) )))) ;) (if_statement "if (local_38 != 0) goto LAB_00051451;" if (parenthesized_expression "(local_38 != 0)" ( (binary_expression "local_38 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00051451;" goto statement_identifier ;)) (if_statement "if (aihead == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    pCVar4 = (Curl_addrinfo *)0x0;\n  }\n  else {\n    local_44 = (Curl_addrinfo *)0x0;\n    cahead = (Curl_addrinfo *)0x0;\n    paVar10 = aihead;\n    do {\n      pCVar4 = local_44;\n      if (paVar10->ai_family == 2) {\n        uVar11 = 0x10;\nLAB_00051332:\n        if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)) {\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar11 = 0x1c;\n        if (paVar10->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = pCVar4;\n      paVar10 = paVar10->ai_next;\n    } while (paVar10 != (addrinfo *)0x0);\n    if (aihead != (addrinfo *)0x0) {\n      freeaddrinfo((addrinfo *)aihead);\n    }\n    pCVar4 = cahead;\n    if (cahead == (Curl_addrinfo *)0x0) goto LAB_000514d0;\n  }" if (parenthesized_expression "(aihead == (addrinfo *)0x0)" ( (binary_expression "aihead == (addrinfo *)0x0" identifier == (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000514d0:\n    local_38 = -2;\n    pCVar4 = (Curl_addrinfo *)0x0;\n  }" { (labeled_statement "LAB_000514d0:\n    local_38 = -2;" statement_identifier : (expression_statement "local_38 = -2;" (assignment_expression "local_38 = -2" identifier = number_literal) ;)) (expression_statement "pCVar4 = (Curl_addrinfo *)0x0;" (assignment_expression "pCVar4 = (Curl_addrinfo *)0x0" identifier = (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    local_44 = (Curl_addrinfo *)0x0;\n    cahead = (Curl_addrinfo *)0x0;\n    paVar10 = aihead;\n    do {\n      pCVar4 = local_44;\n      if (paVar10->ai_family == 2) {\n        uVar11 = 0x10;\nLAB_00051332:\n        if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)) {\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar11 = 0x1c;\n        if (paVar10->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = pCVar4;\n      paVar10 = paVar10->ai_next;\n    } while (paVar10 != (addrinfo *)0x0);\n    if (aihead != (addrinfo *)0x0) {\n      freeaddrinfo((addrinfo *)aihead);\n    }\n    pCVar4 = cahead;\n    if (cahead == (Curl_addrinfo *)0x0) goto LAB_000514d0;\n  }" else (compound_statement "{\n    local_44 = (Curl_addrinfo *)0x0;\n    cahead = (Curl_addrinfo *)0x0;\n    paVar10 = aihead;\n    do {\n      pCVar4 = local_44;\n      if (paVar10->ai_family == 2) {\n        uVar11 = 0x10;\nLAB_00051332:\n        if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)) {\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar11 = 0x1c;\n        if (paVar10->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = pCVar4;\n      paVar10 = paVar10->ai_next;\n    } while (paVar10 != (addrinfo *)0x0);\n    if (aihead != (addrinfo *)0x0) {\n      freeaddrinfo((addrinfo *)aihead);\n    }\n    pCVar4 = cahead;\n    if (cahead == (Curl_addrinfo *)0x0) goto LAB_000514d0;\n  }" { (expression_statement "local_44 = (Curl_addrinfo *)0x0;" (assignment_expression "local_44 = (Curl_addrinfo *)0x0" identifier = (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "cahead = (Curl_addrinfo *)0x0;" (assignment_expression "cahead = (Curl_addrinfo *)0x0" identifier = (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "paVar10 = aihead;" (assignment_expression "paVar10 = aihead" identifier = identifier) ;) (do_statement "do {\n      pCVar4 = local_44;\n      if (paVar10->ai_family == 2) {\n        uVar11 = 0x10;\nLAB_00051332:\n        if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)) {\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar11 = 0x1c;\n        if (paVar10->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = pCVar4;\n      paVar10 = paVar10->ai_next;\n    } while (paVar10 != (addrinfo *)0x0);" do (compound_statement "{\n      pCVar4 = local_44;\n      if (paVar10->ai_family == 2) {\n        uVar11 = 0x10;\nLAB_00051332:\n        if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)) {\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar11 = 0x1c;\n        if (paVar10->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = pCVar4;\n      paVar10 = paVar10->ai_next;\n    }" { (expression_statement "pCVar4 = local_44;" (assignment_expression "pCVar4 = local_44" identifier = identifier) ;) (if_statement "if (paVar10->ai_family == 2) {\n        uVar11 = 0x10;\nLAB_00051332:\n        if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)) {\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar11 = 0x1c;\n        if (paVar10->ai_family == 10) goto LAB_00051332;\n      }" if (parenthesized_expression "(paVar10->ai_family == 2)" ( (binary_expression "paVar10->ai_family == 2" (field_expression "paVar10->ai_family" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n        uVar11 = 0x10;\nLAB_00051332:\n        if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)) {\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }" { (expression_statement "uVar11 = 0x10;" (assignment_expression "uVar11 = 0x10" identifier = number_literal) ;) (labeled_statement "LAB_00051332:\n        if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)) {\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }" statement_identifier : (if_statement "if (((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)) {\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }" if (parenthesized_expression "(((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0))" ( (binary_expression "((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)) &&\n           (paVar10->ai_addrlen != 0)" (parenthesized_expression "((paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen))" ( (binary_expression "(paVar10->ai_addr != (sockaddr *)0x0) && (uVar11 <= paVar10->ai_addrlen)" (parenthesized_expression "(paVar10->ai_addr != (sockaddr *)0x0)" ( (binary_expression "paVar10->ai_addr != (sockaddr *)0x0" (field_expression "paVar10->ai_addr" identifier -> field_identifier) != (cast_expression "(sockaddr *)0x0" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(uVar11 <= paVar10->ai_addrlen)" ( (binary_expression "uVar11 <= paVar10->ai_addrlen" identifier <= (field_expression "paVar10->ai_addrlen" identifier -> field_identifier)) ))) )) && (parenthesized_expression "(paVar10->ai_addrlen != 0)" ( (binary_expression "paVar10->ai_addrlen != 0" (field_expression "paVar10->ai_addrlen" identifier -> field_identifier) != number_literal) ))) )) (compound_statement "{\n          pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);\n          if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }\nLAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }\n          pCVar4 = (Curl_addrinfo *)0x0;\n          Curl_freeaddrinfo(cahead);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }" { (expression_statement "pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20);" (assignment_expression "pCVar4 = (Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20)" identifier = (cast_expression "(Curl_addrinfo *)(**(code **)(unaff_EDI + 0x5fdd9))(0x20)" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(unaff_EDI + 0x5fdd9))(0x20)" (parenthesized_expression "(**(code **)(unaff_EDI + 0x5fdd9))" ( (pointer_expression "**(code **)(unaff_EDI + 0x5fdd9)" * (pointer_expression "*(code **)(unaff_EDI + 0x5fdd9)" * (cast_expression "(code **)(unaff_EDI + 0x5fdd9)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EDI + 0x5fdd9)" ( (binary_expression "unaff_EDI + 0x5fdd9" identifier + number_literal) ))))) )) (argument_list "(0x20)" ( number_literal ))))) ;) (if_statement "if (pCVar4 != (Curl_addrinfo *)0x0) {\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }" if (parenthesized_expression "(pCVar4 != (Curl_addrinfo *)0x0)" ( (binary_expression "pCVar4 != (Curl_addrinfo *)0x0" identifier != (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            pCVar4->ai_flags = paVar10->ai_flags;\n            pCVar4->ai_family = paVar10->ai_family;\n            pCVar4->ai_socktype = paVar10->ai_socktype;\n            iVar6 = paVar10->ai_protocol;\n            pCVar4->ai_addrlen = uVar11;\n            pCVar4->ai_protocol = iVar6;\n            pCVar4->ai_addr = (sockaddr *)0x0;\n            pCVar4->ai_canonname = (char *)0x0;\n            pCVar4->ai_next = (Curl_addrinfo *)0x0;\n            psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);\n            pCVar4->ai_addr = psVar5;\n            if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n          }" { (expression_statement "pCVar4->ai_flags = paVar10->ai_flags;" (assignment_expression "pCVar4->ai_flags = paVar10->ai_flags" (field_expression "pCVar4->ai_flags" identifier -> field_identifier) = (field_expression "paVar10->ai_flags" identifier -> field_identifier)) ;) (expression_statement "pCVar4->ai_family = paVar10->ai_family;" (assignment_expression "pCVar4->ai_family = paVar10->ai_family" (field_expression "pCVar4->ai_family" identifier -> field_identifier) = (field_expression "paVar10->ai_family" identifier -> field_identifier)) ;) (expression_statement "pCVar4->ai_socktype = paVar10->ai_socktype;" (assignment_expression "pCVar4->ai_socktype = paVar10->ai_socktype" (field_expression "pCVar4->ai_socktype" identifier -> field_identifier) = (field_expression "paVar10->ai_socktype" identifier -> field_identifier)) ;) (expression_statement "iVar6 = paVar10->ai_protocol;" (assignment_expression "iVar6 = paVar10->ai_protocol" identifier = (field_expression "paVar10->ai_protocol" identifier -> field_identifier)) ;) (expression_statement "pCVar4->ai_addrlen = uVar11;" (assignment_expression "pCVar4->ai_addrlen = uVar11" (field_expression "pCVar4->ai_addrlen" identifier -> field_identifier) = identifier) ;) (expression_statement "pCVar4->ai_protocol = iVar6;" (assignment_expression "pCVar4->ai_protocol = iVar6" (field_expression "pCVar4->ai_protocol" identifier -> field_identifier) = identifier) ;) (expression_statement "pCVar4->ai_addr = (sockaddr *)0x0;" (assignment_expression "pCVar4->ai_addr = (sockaddr *)0x0" (field_expression "pCVar4->ai_addr" identifier -> field_identifier) = (cast_expression "(sockaddr *)0x0" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pCVar4->ai_canonname = (char *)0x0;" (assignment_expression "pCVar4->ai_canonname = (char *)0x0" (field_expression "pCVar4->ai_canonname" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pCVar4->ai_next = (Curl_addrinfo *)0x0;" (assignment_expression "pCVar4->ai_next = (Curl_addrinfo *)0x0" (field_expression "pCVar4->ai_next" identifier -> field_identifier) = (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11);" (assignment_expression "psVar5 = (sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11)" identifier = (cast_expression "(sockaddr *)(**(code **)(unaff_EDI + 0x5fdd9))(uVar11)" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(unaff_EDI + 0x5fdd9))(uVar11)" (parenthesized_expression "(**(code **)(unaff_EDI + 0x5fdd9))" ( (pointer_expression "**(code **)(unaff_EDI + 0x5fdd9)" * (pointer_expression "*(code **)(unaff_EDI + 0x5fdd9)" * (cast_expression "(code **)(unaff_EDI + 0x5fdd9)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EDI + 0x5fdd9)" ( (binary_expression "unaff_EDI + 0x5fdd9" identifier + number_literal) ))))) )) (argument_list "(uVar11)" ( identifier ))))) ;) (expression_statement "pCVar4->ai_addr = psVar5;" (assignment_expression "pCVar4->ai_addr = psVar5" (field_expression "pCVar4->ai_addr" identifier -> field_identifier) = identifier) ;) (if_statement "if (psVar5 != (sockaddr *)0x0) {\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }" if (parenthesized_expression "(psVar5 != (sockaddr *)0x0)" ( (binary_expression "psVar5 != (sockaddr *)0x0" identifier != (cast_expression "(sockaddr *)0x0" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n              psVar1 = paVar10->ai_addr;\n              cVar2 = psVar1->sa_data[0];\n              cVar3 = psVar1->sa_data[1];\n              psVar5->sa_family = psVar1->sa_family;\n              psVar5->sa_data[0] = cVar2;\n              psVar5->sa_data[1] = cVar3;\n              *(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));\n              uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;\n              iVar6 = (int)psVar5 - uVar9;\n              uVar7 = 0;\n              do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));\n              if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }\n              if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }\n              if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }\n              goto LAB_00051420;\n            }" { (expression_statement "psVar1 = paVar10->ai_addr;" (assignment_expression "psVar1 = paVar10->ai_addr" identifier = (field_expression "paVar10->ai_addr" identifier -> field_identifier)) ;) (expression_statement "cVar2 = psVar1->sa_data[0];" (assignment_expression "cVar2 = psVar1->sa_data[0]" identifier = (subscript_expression "psVar1->sa_data[0]" (field_expression "psVar1->sa_data" identifier -> field_identifier) [ number_literal ])) ;) (expression_statement "cVar3 = psVar1->sa_data[1];" (assignment_expression "cVar3 = psVar1->sa_data[1]" identifier = (subscript_expression "psVar1->sa_data[1]" (field_expression "psVar1->sa_data" identifier -> field_identifier) [ number_literal ])) ;) (expression_statement "psVar5->sa_family = psVar1->sa_family;" (assignment_expression "psVar5->sa_family = psVar1->sa_family" (field_expression "psVar5->sa_family" identifier -> field_identifier) = (field_expression "psVar1->sa_family" identifier -> field_identifier)) ;) (expression_statement "psVar5->sa_data[0] = cVar2;" (assignment_expression "psVar5->sa_data[0] = cVar2" (subscript_expression "psVar5->sa_data[0]" (field_expression "psVar5->sa_data" identifier -> field_identifier) [ number_literal ]) = identifier) ;) (expression_statement "psVar5->sa_data[1] = cVar3;" (assignment_expression "psVar5->sa_data[1] = cVar3" (subscript_expression "psVar5->sa_data[1]" (field_expression "psVar5->sa_data" identifier -> field_identifier) [ number_literal ]) = identifier) ;) (expression_statement "*(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6));" (assignment_expression "*(undefined4 *)(psVar5->sa_data + (uVar11 - 6)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar11 - 6))" (pointer_expression "*(undefined4 *)(psVar5->sa_data + (uVar11 - 6))" * (cast_expression "(undefined4 *)(psVar5->sa_data + (uVar11 - 6))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar5->sa_data + (uVar11 - 6))" ( (binary_expression "psVar5->sa_data + (uVar11 - 6)" (field_expression "psVar5->sa_data" identifier -> field_identifier) + (parenthesized_expression "(uVar11 - 6)" ( (binary_expression "uVar11 - 6" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined4 *)(psVar1->sa_data + (uVar11 - 6))" * (cast_expression "(undefined4 *)(psVar1->sa_data + (uVar11 - 6))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar1->sa_data + (uVar11 - 6))" ( (binary_expression "psVar1->sa_data + (uVar11 - 6)" (field_expression "psVar1->sa_data" identifier -> field_identifier) + (parenthesized_expression "(uVar11 - 6)" ( (binary_expression "uVar11 - 6" identifier - number_literal) ))) ))))) ;) (expression_statement "uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc;" (assignment_expression "uVar9 = (uint)(psVar5->sa_data + 2) & 0xfffffffc" identifier = (binary_expression "(uint)(psVar5->sa_data + 2) & 0xfffffffc" (call_expression "(uint)(psVar5->sa_data + 2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(psVar5->sa_data + 2)" ( (binary_expression "psVar5->sa_data + 2" (field_expression "psVar5->sa_data" identifier -> field_identifier) + number_literal) ))) & number_literal)) ;) (expression_statement "iVar6 = (int)psVar5 - uVar9;" (assignment_expression "iVar6 = (int)psVar5 - uVar9" identifier = (binary_expression "(int)psVar5 - uVar9" (cast_expression "(int)psVar5" ( (type_descriptor "int" primitive_type) ) identifier) - identifier)) ;) (expression_statement "uVar7 = 0;" (assignment_expression "uVar7 = 0" identifier = number_literal) ;) (do_statement "do {\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              } while (uVar7 < (uVar11 + iVar6 & 0xfffffffc));" do (compound_statement "{\n                *(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));\n                uVar7 = uVar7 + 4;\n              }" { (expression_statement "*(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6));" (assignment_expression "*(undefined4 *)(uVar9 + uVar7) = *(undefined4 *)((int)psVar1 + (uVar7 - iVar6))" (pointer_expression "*(undefined4 *)(uVar9 + uVar7)" * (cast_expression "(undefined4 *)(uVar9 + uVar7)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(uVar9 + uVar7)" ( (binary_expression "uVar9 + uVar7" identifier + identifier) )))) = (pointer_expression "*(undefined4 *)((int)psVar1 + (uVar7 - iVar6))" * (cast_expression "(undefined4 *)((int)psVar1 + (uVar7 - iVar6))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)psVar1 + (uVar7 - iVar6))" ( (binary_expression "(int)psVar1 + (uVar7 - iVar6)" (cast_expression "(int)psVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar7 - iVar6)" ( (binary_expression "uVar7 - iVar6" identifier - identifier) ))) ))))) ;) (expression_statement "uVar7 = uVar7 + 4;" (assignment_expression "uVar7 = uVar7 + 4" identifier = (binary_expression "uVar7 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar7 < (uVar11 + iVar6 & 0xfffffffc))" ( (binary_expression "uVar7 < (uVar11 + iVar6 & 0xfffffffc)" identifier < (parenthesized_expression "(uVar11 + iVar6 & 0xfffffffc)" ( (binary_expression "uVar11 + iVar6 & 0xfffffffc" (binary_expression "uVar11 + iVar6" identifier + identifier) & number_literal) ))) )) ;) (if_statement "if (paVar10->ai_canonname != (char *)0x0) {\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }" if (parenthesized_expression "(paVar10->ai_canonname != (char *)0x0)" ( (binary_expression "paVar10->ai_canonname != (char *)0x0" (field_expression "paVar10->ai_canonname" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);\n                pCVar4->ai_canonname = pcVar8;\n                if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }\n              }" { (expression_statement "pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname);" (assignment_expression "pcVar8 = (char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname)" identifier = (cast_expression "(char *)(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar10->ai_canonname)" (parenthesized_expression "(**(code **)(&UNK_0005fdcd + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdcd + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdcd + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdcd + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdcd + unaff_EDI)" ( (binary_expression "&UNK_0005fdcd + unaff_EDI" (pointer_expression "&UNK_0005fdcd" & identifier) + identifier) ))))) )) (argument_list "(paVar10->ai_canonname)" ( (field_expression "paVar10->ai_canonname" identifier -> field_identifier) ))))) ;) (expression_statement "pCVar4->ai_canonname = pcVar8;" (assignment_expression "pCVar4->ai_canonname = pcVar8" (field_expression "pCVar4->ai_canonname" identifier -> field_identifier) = identifier) ;) (if_statement "if (pcVar8 == (char *)0x0) {\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }" if (parenthesized_expression "(pcVar8 == (char *)0x0)" ( (binary_expression "pcVar8 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);\n                  (**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);\n                  goto LAB_00051499;\n                }" { (expression_statement "(**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr);" (call_expression "(**(code **)(unaff_EDI + 0x5fdd5))(pCVar4->ai_addr)" (parenthesized_expression "(**(code **)(unaff_EDI + 0x5fdd5))" ( (pointer_expression "**(code **)(unaff_EDI + 0x5fdd5)" * (pointer_expression "*(code **)(unaff_EDI + 0x5fdd5)" * (cast_expression "(code **)(unaff_EDI + 0x5fdd5)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EDI + 0x5fdd5)" ( (binary_expression "unaff_EDI + 0x5fdd5" identifier + number_literal) ))))) )) (argument_list "(pCVar4->ai_addr)" ( (field_expression "pCVar4->ai_addr" identifier -> field_identifier) ))) ;) (expression_statement "(**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);" (call_expression "(**(code **)(unaff_EDI + 0x5fdd5))(pCVar4)" (parenthesized_expression "(**(code **)(unaff_EDI + 0x5fdd5))" ( (pointer_expression "**(code **)(unaff_EDI + 0x5fdd5)" * (pointer_expression "*(code **)(unaff_EDI + 0x5fdd5)" * (cast_expression "(code **)(unaff_EDI + 0x5fdd5)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EDI + 0x5fdd5)" ( (binary_expression "unaff_EDI + 0x5fdd5" identifier + number_literal) ))))) )) (argument_list "(pCVar4)" ( identifier ))) ;) (goto_statement "goto LAB_00051499;" goto statement_identifier ;) })) })) (if_statement "if (cahead == (Curl_addrinfo *)0x0) {\n                cahead = pCVar4;\n              }" if (parenthesized_expression "(cahead == (Curl_addrinfo *)0x0)" ( (binary_expression "cahead == (Curl_addrinfo *)0x0" identifier == (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                cahead = pCVar4;\n              }" { (expression_statement "cahead = pCVar4;" (assignment_expression "cahead = pCVar4" identifier = identifier) ;) })) (if_statement "if (local_44 != (Curl_addrinfo *)0x0) {\n                local_44->ai_next = pCVar4;\n              }" if (parenthesized_expression "(local_44 != (Curl_addrinfo *)0x0)" ( (binary_expression "local_44 != (Curl_addrinfo *)0x0" identifier != (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                local_44->ai_next = pCVar4;\n              }" { (expression_statement "local_44->ai_next = pCVar4;" (assignment_expression "local_44->ai_next = pCVar4" (field_expression "local_44->ai_next" identifier -> field_identifier) = identifier) ;) })) (goto_statement "goto LAB_00051420;" goto statement_identifier ;) })) (expression_statement "(**(code **)(unaff_EDI + 0x5fdd5))(pCVar4);" (call_expression "(**(code **)(unaff_EDI + 0x5fdd5))(pCVar4)" (parenthesized_expression "(**(code **)(unaff_EDI + 0x5fdd5))" ( (pointer_expression "**(code **)(unaff_EDI + 0x5fdd5)" * (pointer_expression "*(code **)(unaff_EDI + 0x5fdd5)" * (cast_expression "(code **)(unaff_EDI + 0x5fdd5)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(unaff_EDI + 0x5fdd5)" ( (binary_expression "unaff_EDI + 0x5fdd5" identifier + number_literal) ))))) )) (argument_list "(pCVar4)" ( identifier ))) ;) })) (labeled_statement "LAB_00051499:\n          if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }" statement_identifier : (if_statement "if (aihead != (addrinfo *)0x0) {\n            freeaddrinfo((addrinfo *)aihead);\n          }" if (parenthesized_expression "(aihead != (addrinfo *)0x0)" ( (binary_expression "aihead != (addrinfo *)0x0" identifier != (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            freeaddrinfo((addrinfo *)aihead);\n          }" { (expression_statement "freeaddrinfo((addrinfo *)aihead);" (call_expression "freeaddrinfo((addrinfo *)aihead)" identifier (argument_list "((addrinfo *)aihead)" ( (cast_expression "(addrinfo *)aihead" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) }))) (expression_statement "pCVar4 = (Curl_addrinfo *)0x0;" (assignment_expression "pCVar4 = (Curl_addrinfo *)0x0" identifier = (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "Curl_freeaddrinfo(cahead);" (call_expression "Curl_freeaddrinfo(cahead)" identifier (argument_list "(cahead)" ( identifier ))) ;) (expression_statement "local_38 = -10;" (assignment_expression "local_38 = -10" identifier = number_literal) ;) (goto_statement "goto LAB_0005144b;" goto statement_identifier ;) }))) }) (else_clause "else {\n        uVar11 = 0x1c;\n        if (paVar10->ai_family == 10) goto LAB_00051332;\n      }" else (compound_statement "{\n        uVar11 = 0x1c;\n        if (paVar10->ai_family == 10) goto LAB_00051332;\n      }" { (expression_statement "uVar11 = 0x1c;" (assignment_expression "uVar11 = 0x1c" identifier = number_literal) ;) (if_statement "if (paVar10->ai_family == 10) goto LAB_00051332;" if (parenthesized_expression "(paVar10->ai_family == 10)" ( (binary_expression "paVar10->ai_family == 10" (field_expression "paVar10->ai_family" identifier -> field_identifier) == number_literal) )) (goto_statement "goto LAB_00051332;" goto statement_identifier ;)) }))) (labeled_statement "LAB_00051420:\n      local_44 = pCVar4;" statement_identifier : (expression_statement "local_44 = pCVar4;" (assignment_expression "local_44 = pCVar4" identifier = identifier) ;)) (expression_statement "paVar10 = paVar10->ai_next;" (assignment_expression "paVar10 = paVar10->ai_next" identifier = (field_expression "paVar10->ai_next" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(paVar10 != (addrinfo *)0x0)" ( (binary_expression "paVar10 != (addrinfo *)0x0" identifier != (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (if_statement "if (aihead != (addrinfo *)0x0) {\n      freeaddrinfo((addrinfo *)aihead);\n    }" if (parenthesized_expression "(aihead != (addrinfo *)0x0)" ( (binary_expression "aihead != (addrinfo *)0x0" identifier != (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      freeaddrinfo((addrinfo *)aihead);\n    }" { (expression_statement "freeaddrinfo((addrinfo *)aihead);" (call_expression "freeaddrinfo((addrinfo *)aihead)" identifier (argument_list "((addrinfo *)aihead)" ( (cast_expression "(addrinfo *)aihead" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) ))) ;) })) (expression_statement "pCVar4 = cahead;" (assignment_expression "pCVar4 = cahead" identifier = identifier) ;) (if_statement "if (cahead == (Curl_addrinfo *)0x0) goto LAB_000514d0;" if (parenthesized_expression "(cahead == (Curl_addrinfo *)0x0)" ( (binary_expression "cahead == (Curl_addrinfo *)0x0" identifier == (cast_expression "(Curl_addrinfo *)0x0" ( (type_descriptor "Curl_addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000514d0;" goto statement_identifier ;)) }))) (labeled_statement "LAB_0005144b:\n  *result = pCVar4;" statement_identifier : (expression_statement "*result = pCVar4;" (assignment_expression "*result = pCVar4" (pointer_expression "*result" * identifier) = identifier) ;)) (labeled_statement "LAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" { comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return local_38;" return identifier ;) })))
(translation_unit "int FUN_00051290(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)\n\n{\n  sockaddr *psVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  uint uVar5;\n  addrinfo *paVar6;\n  uint uVar7;\n  int unaff_EDI;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_44;\n  int local_38;\n  addrinfo *local_24;\n  int local_20;\n  \n  FUN_00020d67();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_4 = 0;\n  local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);\n  if (local_38 != 0) goto LAB_00051451;\n  if (local_24 == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }\n  else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }\nLAB_0005144b:\n  *param_4 = piVar2;\nLAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return local_38;\n}\n\n" (function_definition "int FUN_00051290(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)\n\n{\n  sockaddr *psVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  uint uVar5;\n  addrinfo *paVar6;\n  uint uVar7;\n  int unaff_EDI;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_44;\n  int local_38;\n  addrinfo *local_24;\n  int local_20;\n  \n  FUN_00020d67();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_4 = 0;\n  local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);\n  if (local_38 != 0) goto LAB_00051451;\n  if (local_24 == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }\n  else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }\nLAB_0005144b:\n  *param_4 = piVar2;\nLAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return local_38;\n}" primitive_type (function_declarator "FUN_00051290(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)" identifier (parameter_list "(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)" ( (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "addrinfo *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  sockaddr *psVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  uint uVar5;\n  addrinfo *paVar6;\n  uint uVar7;\n  int unaff_EDI;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_44;\n  int local_38;\n  addrinfo *local_24;\n  int local_20;\n  \n  FUN_00020d67();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_4 = 0;\n  local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);\n  if (local_38 != 0) goto LAB_00051451;\n  if (local_24 == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }\n  else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }\nLAB_0005144b:\n  *param_4 = piVar2;\nLAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return local_38;\n}" { (declaration "sockaddr *psVar1;" type_identifier (pointer_declarator "*psVar1" * identifier) ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "addrinfo *paVar6;" type_identifier (pointer_declarator "*paVar6" * identifier) ;) (declaration "uint uVar7;" type_identifier identifier ;) (declaration "int unaff_EDI;" primitive_type identifier ;) (declaration "int *piVar8;" primitive_type (pointer_declarator "*piVar8" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int *local_44;" primitive_type (pointer_declarator "*local_44" * identifier) ;) (declaration "int local_38;" primitive_type identifier ;) (declaration "addrinfo *local_24;" type_identifier (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (expression_statement "FUN_00020d67();" (call_expression "FUN_00020d67()" identifier (argument_list "()" ( ))) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" * identifier) = number_literal) ;) (expression_statement "local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);" (assignment_expression "local_38 = getaddrinfo(param_1,param_2,param_3,&local_24)" identifier = (call_expression "getaddrinfo(param_1,param_2,param_3,&local_24)" identifier (argument_list "(param_1,param_2,param_3,&local_24)" ( identifier , identifier , identifier , (pointer_expression "&local_24" & identifier) )))) ;) (if_statement "if (local_38 != 0) goto LAB_00051451;" if (parenthesized_expression "(local_38 != 0)" ( (binary_expression "local_38 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00051451;" goto statement_identifier ;)) (if_statement "if (local_24 == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }\n  else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }" if (parenthesized_expression "(local_24 == (addrinfo *)0x0)" ( (binary_expression "local_24 == (addrinfo *)0x0" identifier == (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }" { (labeled_statement "LAB_000514d0:\n    local_38 = -2;" statement_identifier : (expression_statement "local_38 = -2;" (assignment_expression "local_38 = -2" identifier = number_literal) ;)) (expression_statement "piVar2 = (int *)0x0;" (assignment_expression "piVar2 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }" else (compound_statement "{\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }" { (expression_statement "local_44 = (int *)0x0;" (assignment_expression "local_44 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "piVar8 = (int *)0x0;" (assignment_expression "piVar8 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "paVar6 = local_24;" (assignment_expression "paVar6 = local_24" identifier = identifier) ;) (do_statement "do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);" do (compound_statement "{\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    }" { (expression_statement "piVar2 = local_44;" (assignment_expression "piVar2 = local_44" identifier = identifier) ;) (if_statement "if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }" if (parenthesized_expression "(paVar6->ai_family == 2)" ( (binary_expression "paVar6->ai_family == 2" (field_expression "paVar6->ai_family" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }" { (expression_statement "uVar7 = 0x10;" (assignment_expression "uVar7 = 0x10" identifier = number_literal) ;) (labeled_statement "LAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }" statement_identifier : (if_statement "if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }" if (parenthesized_expression "(((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0))" ( (binary_expression "((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)" (parenthesized_expression "((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen))" ( (binary_expression "(paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)" (parenthesized_expression "(paVar6->ai_addr != (sockaddr *)0x0)" ( (binary_expression "paVar6->ai_addr != (sockaddr *)0x0" (field_expression "paVar6->ai_addr" identifier -> field_identifier) != (cast_expression "(sockaddr *)0x0" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) && (parenthesized_expression "(uVar7 <= paVar6->ai_addrlen)" ( (binary_expression "uVar7 <= paVar6->ai_addrlen" identifier <= (field_expression "paVar6->ai_addrlen" identifier -> field_identifier)) ))) )) && (parenthesized_expression "(paVar6->ai_addrlen != 0)" ( (binary_expression "paVar6->ai_addrlen != 0" (field_expression "paVar6->ai_addrlen" identifier -> field_identifier) != number_literal) ))) )) (compound_statement "{\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }" { (expression_statement "piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);" (assignment_expression "piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20)" identifier = (cast_expression "(int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20)" (parenthesized_expression "(**(code **)(&UNK_0005fdd9 + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdd9 + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdd9 + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdd9 + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdd9 + unaff_EDI)" ( (binary_expression "&UNK_0005fdd9 + unaff_EDI" (pointer_expression "&UNK_0005fdd9" & identifier) + identifier) ))))) )) (argument_list "(0x20)" ( number_literal ))))) ;) (if_statement "if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }" if (parenthesized_expression "(piVar2 != (int *)0x0)" ( (binary_expression "piVar2 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }" { (expression_statement "*piVar2 = paVar6->ai_flags;" (assignment_expression "*piVar2 = paVar6->ai_flags" (pointer_expression "*piVar2" * identifier) = (field_expression "paVar6->ai_flags" identifier -> field_identifier)) ;) (expression_statement "piVar2[1] = paVar6->ai_family;" (assignment_expression "piVar2[1] = paVar6->ai_family" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = (field_expression "paVar6->ai_family" identifier -> field_identifier)) ;) (expression_statement "piVar2[2] = paVar6->ai_socktype;" (assignment_expression "piVar2[2] = paVar6->ai_socktype" (subscript_expression "piVar2[2]" identifier [ number_literal ]) = (field_expression "paVar6->ai_socktype" identifier -> field_identifier)) ;) (expression_statement "iVar4 = paVar6->ai_protocol;" (assignment_expression "iVar4 = paVar6->ai_protocol" identifier = (field_expression "paVar6->ai_protocol" identifier -> field_identifier)) ;) (expression_statement "piVar2[4] = uVar7;" (assignment_expression "piVar2[4] = uVar7" (subscript_expression "piVar2[4]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar2[3] = iVar4;" (assignment_expression "piVar2[3] = iVar4" (subscript_expression "piVar2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar2[6] = 0;" (assignment_expression "piVar2[6] = 0" (subscript_expression "piVar2[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[5] = 0;" (assignment_expression "piVar2[5] = 0" (subscript_expression "piVar2[5]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar2[7] = 0;" (assignment_expression "piVar2[7] = 0" (subscript_expression "piVar2[7]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);" (assignment_expression "puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7)" identifier = (cast_expression "(undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7)" (parenthesized_expression "(**(code **)(&UNK_0005fdd9 + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdd9 + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdd9 + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdd9 + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdd9 + unaff_EDI)" ( (binary_expression "&UNK_0005fdd9 + unaff_EDI" (pointer_expression "&UNK_0005fdd9" & identifier) + identifier) ))))) )) (argument_list "(uVar7)" ( identifier ))))) ;) (expression_statement "piVar2[6] = (int)puVar3;" (assignment_expression "piVar2[6] = (int)puVar3" (subscript_expression "piVar2[6]" identifier [ number_literal ]) = (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }" if (parenthesized_expression "(puVar3 != (undefined4 *)0x0)" ( (binary_expression "puVar3 != (undefined4 *)0x0" identifier != (cast_expression "(undefined4 *)0x0" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }" { (expression_statement "psVar1 = paVar6->ai_addr;" (assignment_expression "psVar1 = paVar6->ai_addr" identifier = (field_expression "paVar6->ai_addr" identifier -> field_identifier)) ;) (expression_statement "*puVar3 = *(undefined4 *)psVar1;" (assignment_expression "*puVar3 = *(undefined4 *)psVar1" (pointer_expression "*puVar3" * identifier) = (pointer_expression "*(undefined4 *)psVar1" * (cast_expression "(undefined4 *)psVar1" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "*(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));" (assignment_expression "*(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6))" (pointer_expression "*(undefined4 *)((int)puVar3 + (uVar7 - 4))" * (cast_expression "(undefined4 *)((int)puVar3 + (uVar7 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar3 + (uVar7 - 4))" ( (binary_expression "(int)puVar3 + (uVar7 - 4)" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar7 - 4)" ( (binary_expression "uVar7 - 4" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined4 *)(psVar1->sa_data + (uVar7 - 6))" * (cast_expression "(undefined4 *)(psVar1->sa_data + (uVar7 - 6))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(psVar1->sa_data + (uVar7 - 6))" ( (binary_expression "psVar1->sa_data + (uVar7 - 6)" (field_expression "psVar1->sa_data" identifier -> field_identifier) + (parenthesized_expression "(uVar7 - 6)" ( (binary_expression "uVar7 - 6" identifier - number_literal) ))) ))))) ;) (expression_statement "iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);" (assignment_expression "iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc)" identifier = (binary_expression "(int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc)" (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (parenthesized_expression "((uint)(puVar3 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar3 + 1) & 0xfffffffc" (call_expression "(uint)(puVar3 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar3 + 1)" ( (binary_expression "puVar3 + 1" identifier + number_literal) ))) & number_literal) )))) ;) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" identifier = number_literal) ;) (do_statement "do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));" do (compound_statement "{\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              }" { (expression_statement "*(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));" (assignment_expression "*(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4))" (pointer_expression "*(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5)" * (cast_expression "(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5)" ( (binary_expression "((uint)(puVar3 + 1) & 0xfffffffc) + uVar5" (parenthesized_expression "((uint)(puVar3 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar3 + 1) & 0xfffffffc" (call_expression "(uint)(puVar3 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar3 + 1)" ( (binary_expression "puVar3 + 1" identifier + number_literal) ))) & number_literal) )) + identifier) )))) = (pointer_expression "*(undefined4 *)((int)psVar1 + (uVar5 - iVar4))" * (cast_expression "(undefined4 *)((int)psVar1 + (uVar5 - iVar4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)psVar1 + (uVar5 - iVar4))" ( (binary_expression "(int)psVar1 + (uVar5 - iVar4)" (cast_expression "(int)psVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar5 - iVar4)" ( (binary_expression "uVar5 - iVar4" identifier - identifier) ))) ))))) ;) (expression_statement "uVar5 = uVar5 + 4;" (assignment_expression "uVar5 = uVar5 + 4" identifier = (binary_expression "uVar5 + 4" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar5 < (uVar7 + iVar4 & 0xfffffffc))" ( (binary_expression "uVar5 < (uVar7 + iVar4 & 0xfffffffc)" identifier < (parenthesized_expression "(uVar7 + iVar4 & 0xfffffffc)" ( (binary_expression "uVar7 + iVar4 & 0xfffffffc" (binary_expression "uVar7 + iVar4" identifier + identifier) & number_literal) ))) )) ;) (if_statement "if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }" if (parenthesized_expression "(paVar6->ai_canonname != (char *)0x0)" ( (binary_expression "paVar6->ai_canonname != (char *)0x0" (field_expression "paVar6->ai_canonname" identifier -> field_identifier) != (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }" { (expression_statement "iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);" (assignment_expression "iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname)" identifier = (call_expression "(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname)" (parenthesized_expression "(**(code **)(&UNK_0005fdcd + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdcd + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdcd + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdcd + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdcd + unaff_EDI)" ( (binary_expression "&UNK_0005fdcd + unaff_EDI" (pointer_expression "&UNK_0005fdcd" & identifier) + identifier) ))))) )) (argument_list "(paVar6->ai_canonname)" ( (field_expression "paVar6->ai_canonname" identifier -> field_identifier) )))) ;) (expression_statement "piVar2[5] = iVar4;" (assignment_expression "piVar2[5] = iVar4" (subscript_expression "piVar2[5]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }" { (expression_statement "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);" (call_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6])" (parenthesized_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdd5 + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdd5 + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdd5 + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdd5 + unaff_EDI)" ( (binary_expression "&UNK_0005fdd5 + unaff_EDI" (pointer_expression "&UNK_0005fdd5" & identifier) + identifier) ))))) )) (argument_list "(piVar2[6])" ( (subscript_expression "piVar2[6]" identifier [ number_literal ]) ))) ;) (expression_statement "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);" (call_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2)" (parenthesized_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdd5 + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdd5 + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdd5 + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdd5 + unaff_EDI)" ( (binary_expression "&UNK_0005fdd5 + unaff_EDI" (pointer_expression "&UNK_0005fdd5" & identifier) + identifier) ))))) )) (argument_list "(piVar2)" ( identifier ))) ;) (goto_statement "goto LAB_00051499;" goto statement_identifier ;) })) })) (if_statement "if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }" if (parenthesized_expression "(piVar8 == (int *)0x0)" ( (binary_expression "piVar8 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                piVar8 = piVar2;\n              }" { (expression_statement "piVar8 = piVar2;" (assignment_expression "piVar8 = piVar2" identifier = identifier) ;) })) (if_statement "if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }" if (parenthesized_expression "(local_44 != (int *)0x0)" ( (binary_expression "local_44 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                local_44[7] = (int)piVar2;\n              }" { (expression_statement "local_44[7] = (int)piVar2;" (assignment_expression "local_44[7] = (int)piVar2" (subscript_expression "local_44[7]" identifier [ number_literal ]) = (cast_expression "(int)piVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (goto_statement "goto LAB_00051420;" goto statement_identifier ;) })) (expression_statement "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);" (call_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2)" (parenthesized_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))" ( (pointer_expression "**(code **)(&UNK_0005fdd5 + unaff_EDI)" * (pointer_expression "*(code **)(&UNK_0005fdd5 + unaff_EDI)" * (cast_expression "(code **)(&UNK_0005fdd5 + unaff_EDI)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(&UNK_0005fdd5 + unaff_EDI)" ( (binary_expression "&UNK_0005fdd5 + unaff_EDI" (pointer_expression "&UNK_0005fdd5" & identifier) + identifier) ))))) )) (argument_list "(piVar2)" ( identifier ))) ;) })) (labeled_statement "LAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }" statement_identifier : (if_statement "if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }" if (parenthesized_expression "(local_24 != (addrinfo *)0x0)" ( (binary_expression "local_24 != (addrinfo *)0x0" identifier != (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n            freeaddrinfo(local_24);\n          }" { (expression_statement "freeaddrinfo(local_24);" (call_expression "freeaddrinfo(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) }))) (expression_statement "piVar2 = (int *)0x0;" (assignment_expression "piVar2 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "FUN_00051240(piVar8);" (call_expression "FUN_00051240(piVar8)" identifier (argument_list "(piVar8)" ( identifier ))) ;) (expression_statement "local_38 = -10;" (assignment_expression "local_38 = -10" identifier = number_literal) ;) (goto_statement "goto LAB_0005144b;" goto statement_identifier ;) }))) }) (else_clause "else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }" else (compound_statement "{\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }" { (expression_statement "uVar7 = 0x1c;" (assignment_expression "uVar7 = 0x1c" identifier = number_literal) ;) (if_statement "if (paVar6->ai_family == 10) goto LAB_00051332;" if (parenthesized_expression "(paVar6->ai_family == 10)" ( (binary_expression "paVar6->ai_family == 10" (field_expression "paVar6->ai_family" identifier -> field_identifier) == number_literal) )) (goto_statement "goto LAB_00051332;" goto statement_identifier ;)) }))) (labeled_statement "LAB_00051420:\n      local_44 = piVar2;" statement_identifier : (expression_statement "local_44 = piVar2;" (assignment_expression "local_44 = piVar2" identifier = identifier) ;)) (expression_statement "paVar6 = paVar6->ai_next;" (assignment_expression "paVar6 = paVar6->ai_next" identifier = (field_expression "paVar6->ai_next" identifier -> field_identifier)) ;) }) while (parenthesized_expression "(paVar6 != (addrinfo *)0x0)" ( (binary_expression "paVar6 != (addrinfo *)0x0" identifier != (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) ;) (if_statement "if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }" if (parenthesized_expression "(local_24 != (addrinfo *)0x0)" ( (binary_expression "local_24 != (addrinfo *)0x0" identifier != (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      freeaddrinfo(local_24);\n    }" { (expression_statement "freeaddrinfo(local_24);" (call_expression "freeaddrinfo(local_24)" identifier (argument_list "(local_24)" ( identifier ))) ;) })) (expression_statement "piVar2 = piVar8;" (assignment_expression "piVar2 = piVar8" identifier = identifier) ;) (if_statement "if (piVar8 == (int *)0x0) goto LAB_000514d0;" if (parenthesized_expression "(piVar8 == (int *)0x0)" ( (binary_expression "piVar8 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (goto_statement "goto LAB_000514d0;" goto statement_identifier ;)) }))) (labeled_statement "LAB_0005144b:\n  *param_4 = piVar2;" statement_identifier : (expression_statement "*param_4 = piVar2;" (assignment_expression "*param_4 = piVar2" (pointer_expression "*param_4" * identifier) = identifier) ;)) (labeled_statement "LAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }" statement_identifier : (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }" if (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" identifier != (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    FUN_0007c1a0();\n  }" { (expression_statement "FUN_0007c1a0();" (call_expression "FUN_0007c1a0()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return local_38;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (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 * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (field_expression IDENT -> field_identifier) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (field_expression IDENT -> field_identifier) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) && (parenthesized_expression ( (binary_expression IDENT <= (field_expression IDENT -> field_identifier)) ))) )) && (parenthesized_expression ( (binary_expression (field_expression IDENT -> field_identifier) != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + IDENT) ))))) )) (argument_list ( LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (field_expression IDENT -> field_identifier)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (field_expression IDENT -> field_identifier)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (field_expression IDENT -> field_identifier)) ;) (expression_statement (assignment_expression IDENT = (field_expression IDENT -> field_identifier)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + IDENT) ))))) )) (argument_list ( IDENT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (field_expression IDENT -> field_identifier)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression IDENT - LIT) ))) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (field_expression IDENT -> field_identifier) + (parenthesized_expression ( (binary_expression IDENT - LIT) ))) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )) + IDENT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression IDENT - IDENT) ))) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT < (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) & LIT) ))) )) ;) (if_statement if (parenthesized_expression ( (binary_expression (field_expression IDENT -> field_identifier) != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + IDENT) ))))) )) (argument_list ( (field_expression IDENT -> field_identifier) )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + IDENT) ))))) )) (argument_list ( (subscript_expression IDENT [ LIT ]) ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + IDENT) ))))) )) (argument_list ( IDENT ))) ;) (goto_statement goto statement_identifier ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) })) (goto_statement goto statement_identifier ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression & IDENT) + IDENT) ))))) )) (argument_list ( IDENT ))) ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (field_expression IDENT -> field_identifier) == LIT) )) (goto_statement goto statement_identifier ;)) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (expression_statement (assignment_expression IDENT = (field_expression IDENT -> field_identifier)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (goto_statement goto statement_identifier ;)) }))) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;)) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "int FUN_00051290(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)\n\n{\n  sockaddr *psVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  uint uVar5;\n  addrinfo *paVar6;\n  uint uVar7;\n  int unaff_EDI;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_44;\n  int local_38;\n  addrinfo *local_24;\n  int local_20;\n  \n  FUN_00020d67();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_4 = 0;\n  local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);\n  if (local_38 != 0) goto LAB_00051451;\n  if (local_24 == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }\n  else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }\nLAB_0005144b:\n  *param_4 = piVar2;\nLAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return local_38;\n}" (primitive_type "int") (function_declarator "FUN_00051290(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)" (identifier "FUN_00051290") (parameter_list "(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)" (( "(") (parameter_declaration "char *param_1" (primitive_type "char") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "addrinfo *param_3" (type_identifier "addrinfo") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "undefined4 *param_4" (type_identifier "undefined4") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  sockaddr *psVar1;\n  int *piVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  uint uVar5;\n  addrinfo *paVar6;\n  uint uVar7;\n  int unaff_EDI;\n  int *piVar8;\n  int in_GS_OFFSET;\n  int *local_44;\n  int local_38;\n  addrinfo *local_24;\n  int local_20;\n  \n  FUN_00020d67();\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  *param_4 = 0;\n  local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);\n  if (local_38 != 0) goto LAB_00051451;\n  if (local_24 == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }\n  else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }\nLAB_0005144b:\n  *param_4 = piVar2;\nLAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }\n  return local_38;\n}" ({ "{") (declaration "sockaddr *psVar1;" (type_identifier "sockaddr") (pointer_declarator "*psVar1" (* "*") (identifier "psVar1")) (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "addrinfo *paVar6;" (type_identifier "addrinfo") (pointer_declarator "*paVar6" (* "*") (identifier "paVar6")) (; ";")) (declaration "uint uVar7;" (type_identifier "uint") (identifier "uVar7") (; ";")) (declaration "int unaff_EDI;" (primitive_type "int") (identifier "unaff_EDI") (; ";")) (declaration "int *piVar8;" (primitive_type "int") (pointer_declarator "*piVar8" (* "*") (identifier "piVar8")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int *local_44;" (primitive_type "int") (pointer_declarator "*local_44" (* "*") (identifier "local_44")) (; ";")) (declaration "int local_38;" (primitive_type "int") (identifier "local_38") (; ";")) (declaration "addrinfo *local_24;" (type_identifier "addrinfo") (pointer_declarator "*local_24" (* "*") (identifier "local_24")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (expression_statement "FUN_00020d67();" (call_expression "FUN_00020d67()" (identifier "FUN_00020d67") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "*param_4 = 0;" (assignment_expression "*param_4 = 0" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (number_literal "0")) (; ";")) (expression_statement "local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);" (assignment_expression "local_38 = getaddrinfo(param_1,param_2,param_3,&local_24)" (identifier "local_38") (= "=") (call_expression "getaddrinfo(param_1,param_2,param_3,&local_24)" (identifier "getaddrinfo") (argument_list "(param_1,param_2,param_3,&local_24)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) () ")")))) (; ";")) (if_statement "if (local_38 != 0) goto LAB_00051451;" (if "if") (parenthesized_expression "(local_38 != 0)" (( "(") (binary_expression "local_38 != 0" (identifier "local_38") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00051451;" (goto "goto") (statement_identifier "LAB_00051451") (; ";"))) (if_statement "if (local_24 == (addrinfo *)0x0) {\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }\n  else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }" (if "if") (parenthesized_expression "(local_24 == (addrinfo *)0x0)" (( "(") (binary_expression "local_24 == (addrinfo *)0x0" (identifier "local_24") (== "==") (cast_expression "(addrinfo *)0x0" (( "(") (type_descriptor "addrinfo *" (type_identifier "addrinfo") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\nLAB_000514d0:\n    local_38 = -2;\n    piVar2 = (int *)0x0;\n  }" ({ "{") (labeled_statement "LAB_000514d0:\n    local_38 = -2;" (statement_identifier "LAB_000514d0") (: ":") (expression_statement "local_38 = -2;" (assignment_expression "local_38 = -2" (identifier "local_38") (= "=") (number_literal "-2")) (; ";"))) (expression_statement "piVar2 = (int *)0x0;" (assignment_expression "piVar2 = (int *)0x0" (identifier "piVar2") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")) (else_clause "else {\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }" (else "else") (compound_statement "{\n    local_44 = (int *)0x0;\n    piVar8 = (int *)0x0;\n    paVar6 = local_24;\n    do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);\n    if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }\n    piVar2 = piVar8;\n    if (piVar8 == (int *)0x0) goto LAB_000514d0;\n  }" ({ "{") (expression_statement "local_44 = (int *)0x0;" (assignment_expression "local_44 = (int *)0x0" (identifier "local_44") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "piVar8 = (int *)0x0;" (assignment_expression "piVar8 = (int *)0x0" (identifier "piVar8") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "paVar6 = local_24;" (assignment_expression "paVar6 = local_24" (identifier "paVar6") (= "=") (identifier "local_24")) (; ";")) (do_statement "do {\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    } while (paVar6 != (addrinfo *)0x0);" (do "do") (compound_statement "{\n      piVar2 = local_44;\n      if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }\nLAB_00051420:\n      local_44 = piVar2;\n      paVar6 = paVar6->ai_next;\n    }" ({ "{") (expression_statement "piVar2 = local_44;" (assignment_expression "piVar2 = local_44" (identifier "piVar2") (= "=") (identifier "local_44")) (; ";")) (if_statement "if (paVar6->ai_family == 2) {\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }\n      else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }" (if "if") (parenthesized_expression "(paVar6->ai_family == 2)" (( "(") (binary_expression "paVar6->ai_family == 2" (field_expression "paVar6->ai_family" (identifier "paVar6") (-> "->") (field_identifier "ai_family")) (== "==") (number_literal "2")) () ")")) (compound_statement "{\n        uVar7 = 0x10;\nLAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }\n      }" ({ "{") (expression_statement "uVar7 = 0x10;" (assignment_expression "uVar7 = 0x10" (identifier "uVar7") (= "=") (number_literal "0x10")) (; ";")) (labeled_statement "LAB_00051332:\n        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }" (statement_identifier "LAB_00051332") (: ":") (if_statement "if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)) {\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }" (if "if") (parenthesized_expression "(((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0))" (( "(") (binary_expression "((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&\n           (paVar6->ai_addrlen != 0)" (parenthesized_expression "((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen))" (( "(") (binary_expression "(paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)" (parenthesized_expression "(paVar6->ai_addr != (sockaddr *)0x0)" (( "(") (binary_expression "paVar6->ai_addr != (sockaddr *)0x0" (field_expression "paVar6->ai_addr" (identifier "paVar6") (-> "->") (field_identifier "ai_addr")) (!= "!=") (cast_expression "(sockaddr *)0x0" (( "(") (type_descriptor "sockaddr *" (type_identifier "sockaddr") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (&& "&&") (parenthesized_expression "(uVar7 <= paVar6->ai_addrlen)" (( "(") (binary_expression "uVar7 <= paVar6->ai_addrlen" (identifier "uVar7") (<= "<=") (field_expression "paVar6->ai_addrlen" (identifier "paVar6") (-> "->") (field_identifier "ai_addrlen"))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(paVar6->ai_addrlen != 0)" (( "(") (binary_expression "paVar6->ai_addrlen != 0" (field_expression "paVar6->ai_addrlen" (identifier "paVar6") (-> "->") (field_identifier "ai_addrlen")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);\n          if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }\nLAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }\n          piVar2 = (int *)0x0;\n          FUN_00051240(piVar8);\n          local_38 = -10;\n          goto LAB_0005144b;\n        }" ({ "{") (expression_statement "piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);" (assignment_expression "piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20)" (identifier "piVar2") (= "=") (cast_expression "(int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20)" (parenthesized_expression "(**(code **)(&UNK_0005fdd9 + unaff_EDI))" (( "(") (pointer_expression "**(code **)(&UNK_0005fdd9 + unaff_EDI)" (* "*") (pointer_expression "*(code **)(&UNK_0005fdd9 + unaff_EDI)" (* "*") (cast_expression "(code **)(&UNK_0005fdd9 + unaff_EDI)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(&UNK_0005fdd9 + unaff_EDI)" (( "(") (binary_expression "&UNK_0005fdd9 + unaff_EDI" (pointer_expression "&UNK_0005fdd9" (& "&") (identifier "UNK_0005fdd9")) (+ "+") (identifier "unaff_EDI")) () ")"))))) () ")")) (argument_list "(0x20)" (( "(") (number_literal "0x20") () ")"))))) (; ";")) (if_statement "if (piVar2 != (int *)0x0) {\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }" (if "if") (parenthesized_expression "(piVar2 != (int *)0x0)" (( "(") (binary_expression "piVar2 != (int *)0x0" (identifier "piVar2") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n            *piVar2 = paVar6->ai_flags;\n            piVar2[1] = paVar6->ai_family;\n            piVar2[2] = paVar6->ai_socktype;\n            iVar4 = paVar6->ai_protocol;\n            piVar2[4] = uVar7;\n            piVar2[3] = iVar4;\n            piVar2[6] = 0;\n            piVar2[5] = 0;\n            piVar2[7] = 0;\n            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);\n            piVar2[6] = (int)puVar3;\n            if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }\n            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n          }" ({ "{") (expression_statement "*piVar2 = paVar6->ai_flags;" (assignment_expression "*piVar2 = paVar6->ai_flags" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (field_expression "paVar6->ai_flags" (identifier "paVar6") (-> "->") (field_identifier "ai_flags"))) (; ";")) (expression_statement "piVar2[1] = paVar6->ai_family;" (assignment_expression "piVar2[1] = paVar6->ai_family" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (field_expression "paVar6->ai_family" (identifier "paVar6") (-> "->") (field_identifier "ai_family"))) (; ";")) (expression_statement "piVar2[2] = paVar6->ai_socktype;" (assignment_expression "piVar2[2] = paVar6->ai_socktype" (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")) (= "=") (field_expression "paVar6->ai_socktype" (identifier "paVar6") (-> "->") (field_identifier "ai_socktype"))) (; ";")) (expression_statement "iVar4 = paVar6->ai_protocol;" (assignment_expression "iVar4 = paVar6->ai_protocol" (identifier "iVar4") (= "=") (field_expression "paVar6->ai_protocol" (identifier "paVar6") (-> "->") (field_identifier "ai_protocol"))) (; ";")) (expression_statement "piVar2[4] = uVar7;" (assignment_expression "piVar2[4] = uVar7" (subscript_expression "piVar2[4]" (identifier "piVar2") ([ "[") (number_literal "4") (] "]")) (= "=") (identifier "uVar7")) (; ";")) (expression_statement "piVar2[3] = iVar4;" (assignment_expression "piVar2[3] = iVar4" (subscript_expression "piVar2[3]" (identifier "piVar2") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "iVar4")) (; ";")) (expression_statement "piVar2[6] = 0;" (assignment_expression "piVar2[6] = 0" (subscript_expression "piVar2[6]" (identifier "piVar2") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar2[5] = 0;" (assignment_expression "piVar2[5] = 0" (subscript_expression "piVar2[5]" (identifier "piVar2") ([ "[") (number_literal "5") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar2[7] = 0;" (assignment_expression "piVar2[7] = 0" (subscript_expression "piVar2[7]" (identifier "piVar2") ([ "[") (number_literal "7") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);" (assignment_expression "puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7)" (parenthesized_expression "(**(code **)(&UNK_0005fdd9 + unaff_EDI))" (( "(") (pointer_expression "**(code **)(&UNK_0005fdd9 + unaff_EDI)" (* "*") (pointer_expression "*(code **)(&UNK_0005fdd9 + unaff_EDI)" (* "*") (cast_expression "(code **)(&UNK_0005fdd9 + unaff_EDI)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(&UNK_0005fdd9 + unaff_EDI)" (( "(") (binary_expression "&UNK_0005fdd9 + unaff_EDI" (pointer_expression "&UNK_0005fdd9" (& "&") (identifier "UNK_0005fdd9")) (+ "+") (identifier "unaff_EDI")) () ")"))))) () ")")) (argument_list "(uVar7)" (( "(") (identifier "uVar7") () ")"))))) (; ";")) (expression_statement "piVar2[6] = (int)puVar3;" (assignment_expression "piVar2[6] = (int)puVar3" (subscript_expression "piVar2[6]" (identifier "piVar2") ([ "[") (number_literal "6") (] "]")) (= "=") (cast_expression "(int)puVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar3"))) (; ";")) (if_statement "if (puVar3 != (undefined4 *)0x0) {\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }" (if "if") (parenthesized_expression "(puVar3 != (undefined4 *)0x0)" (( "(") (binary_expression "puVar3 != (undefined4 *)0x0" (identifier "puVar3") (!= "!=") (cast_expression "(undefined4 *)0x0" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n              psVar1 = paVar6->ai_addr;\n              *puVar3 = *(undefined4 *)psVar1;\n              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));\n              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);\n              uVar5 = 0;\n              do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));\n              if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }\n              if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }\n              if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }\n              goto LAB_00051420;\n            }" ({ "{") (expression_statement "psVar1 = paVar6->ai_addr;" (assignment_expression "psVar1 = paVar6->ai_addr" (identifier "psVar1") (= "=") (field_expression "paVar6->ai_addr" (identifier "paVar6") (-> "->") (field_identifier "ai_addr"))) (; ";")) (expression_statement "*puVar3 = *(undefined4 *)psVar1;" (assignment_expression "*puVar3 = *(undefined4 *)psVar1" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (pointer_expression "*(undefined4 *)psVar1" (* "*") (cast_expression "(undefined4 *)psVar1" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "psVar1")))) (; ";")) (expression_statement "*(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));" (assignment_expression "*(undefined4 *)((int)puVar3 + (uVar7 - 4)) =\n                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6))" (pointer_expression "*(undefined4 *)((int)puVar3 + (uVar7 - 4))" (* "*") (cast_expression "(undefined4 *)((int)puVar3 + (uVar7 - 4))" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar3 + (uVar7 - 4))" (( "(") (binary_expression "(int)puVar3 + (uVar7 - 4)" (cast_expression "(int)puVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar3")) (+ "+") (parenthesized_expression "(uVar7 - 4)" (( "(") (binary_expression "uVar7 - 4" (identifier "uVar7") (- "-") (number_literal "4")) () ")"))) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(psVar1->sa_data + (uVar7 - 6))" (* "*") (cast_expression "(undefined4 *)(psVar1->sa_data + (uVar7 - 6))" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(psVar1->sa_data + (uVar7 - 6))" (( "(") (binary_expression "psVar1->sa_data + (uVar7 - 6)" (field_expression "psVar1->sa_data" (identifier "psVar1") (-> "->") (field_identifier "sa_data")) (+ "+") (parenthesized_expression "(uVar7 - 6)" (( "(") (binary_expression "uVar7 - 6" (identifier "uVar7") (- "-") (number_literal "6")) () ")"))) () ")"))))) (; ";")) (expression_statement "iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);" (assignment_expression "iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc)" (identifier "iVar4") (= "=") (binary_expression "(int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc)" (cast_expression "(int)puVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar3")) (- "-") (parenthesized_expression "((uint)(puVar3 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar3 + 1) & 0xfffffffc" (call_expression "(uint)(puVar3 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar3 + 1)" (( "(") (binary_expression "puVar3 + 1" (identifier "puVar3") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")))) (; ";")) (expression_statement "uVar5 = 0;" (assignment_expression "uVar5 = 0" (identifier "uVar5") (= "=") (number_literal "0")) (; ";")) (do_statement "do {\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));" (do "do") (compound_statement "{\n                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));\n                uVar5 = uVar5 + 4;\n              }" ({ "{") (expression_statement "*(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));" (assignment_expression "*(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =\n                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4))" (pointer_expression "*(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5)" (* "*") (cast_expression "(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5)" (( "(") (binary_expression "((uint)(puVar3 + 1) & 0xfffffffc) + uVar5" (parenthesized_expression "((uint)(puVar3 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar3 + 1) & 0xfffffffc" (call_expression "(uint)(puVar3 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar3 + 1)" (( "(") (binary_expression "puVar3 + 1" (identifier "puVar3") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")) (+ "+") (identifier "uVar5")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)((int)psVar1 + (uVar5 - iVar4))" (* "*") (cast_expression "(undefined4 *)((int)psVar1 + (uVar5 - iVar4))" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)psVar1 + (uVar5 - iVar4))" (( "(") (binary_expression "(int)psVar1 + (uVar5 - iVar4)" (cast_expression "(int)psVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "psVar1")) (+ "+") (parenthesized_expression "(uVar5 - iVar4)" (( "(") (binary_expression "uVar5 - iVar4" (identifier "uVar5") (- "-") (identifier "iVar4")) () ")"))) () ")"))))) (; ";")) (expression_statement "uVar5 = uVar5 + 4;" (assignment_expression "uVar5 = uVar5 + 4" (identifier "uVar5") (= "=") (binary_expression "uVar5 + 4" (identifier "uVar5") (+ "+") (number_literal "4"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar5 < (uVar7 + iVar4 & 0xfffffffc))" (( "(") (binary_expression "uVar5 < (uVar7 + iVar4 & 0xfffffffc)" (identifier "uVar5") (< "<") (parenthesized_expression "(uVar7 + iVar4 & 0xfffffffc)" (( "(") (binary_expression "uVar7 + iVar4 & 0xfffffffc" (binary_expression "uVar7 + iVar4" (identifier "uVar7") (+ "+") (identifier "iVar4")) (& "&") (number_literal "0xfffffffc")) () ")"))) () ")")) (; ";")) (if_statement "if (paVar6->ai_canonname != (char *)0x0) {\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }" (if "if") (parenthesized_expression "(paVar6->ai_canonname != (char *)0x0)" (( "(") (binary_expression "paVar6->ai_canonname != (char *)0x0" (field_expression "paVar6->ai_canonname" (identifier "paVar6") (-> "->") (field_identifier "ai_canonname")) (!= "!=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);\n                piVar2[5] = iVar4;\n                if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }\n              }" ({ "{") (expression_statement "iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);" (assignment_expression "iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname)" (identifier "iVar4") (= "=") (call_expression "(**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname)" (parenthesized_expression "(**(code **)(&UNK_0005fdcd + unaff_EDI))" (( "(") (pointer_expression "**(code **)(&UNK_0005fdcd + unaff_EDI)" (* "*") (pointer_expression "*(code **)(&UNK_0005fdcd + unaff_EDI)" (* "*") (cast_expression "(code **)(&UNK_0005fdcd + unaff_EDI)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(&UNK_0005fdcd + unaff_EDI)" (( "(") (binary_expression "&UNK_0005fdcd + unaff_EDI" (pointer_expression "&UNK_0005fdcd" (& "&") (identifier "UNK_0005fdcd")) (+ "+") (identifier "unaff_EDI")) () ")"))))) () ")")) (argument_list "(paVar6->ai_canonname)" (( "(") (field_expression "paVar6->ai_canonname" (identifier "paVar6") (-> "->") (field_identifier "ai_canonname")) () ")")))) (; ";")) (expression_statement "piVar2[5] = iVar4;" (assignment_expression "piVar2[5] = iVar4" (subscript_expression "piVar2[5]" (identifier "piVar2") ([ "[") (number_literal "5") (] "]")) (= "=") (identifier "iVar4")) (; ";")) (if_statement "if (iVar4 == 0) {\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }" (if "if") (parenthesized_expression "(iVar4 == 0)" (( "(") (binary_expression "iVar4 == 0" (identifier "iVar4") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);\n                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);\n                  goto LAB_00051499;\n                }" ({ "{") (expression_statement "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);" (call_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6])" (parenthesized_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))" (( "(") (pointer_expression "**(code **)(&UNK_0005fdd5 + unaff_EDI)" (* "*") (pointer_expression "*(code **)(&UNK_0005fdd5 + unaff_EDI)" (* "*") (cast_expression "(code **)(&UNK_0005fdd5 + unaff_EDI)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(&UNK_0005fdd5 + unaff_EDI)" (( "(") (binary_expression "&UNK_0005fdd5 + unaff_EDI" (pointer_expression "&UNK_0005fdd5" (& "&") (identifier "UNK_0005fdd5")) (+ "+") (identifier "unaff_EDI")) () ")"))))) () ")")) (argument_list "(piVar2[6])" (( "(") (subscript_expression "piVar2[6]" (identifier "piVar2") ([ "[") (number_literal "6") (] "]")) () ")"))) (; ";")) (expression_statement "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);" (call_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2)" (parenthesized_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))" (( "(") (pointer_expression "**(code **)(&UNK_0005fdd5 + unaff_EDI)" (* "*") (pointer_expression "*(code **)(&UNK_0005fdd5 + unaff_EDI)" (* "*") (cast_expression "(code **)(&UNK_0005fdd5 + unaff_EDI)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(&UNK_0005fdd5 + unaff_EDI)" (( "(") (binary_expression "&UNK_0005fdd5 + unaff_EDI" (pointer_expression "&UNK_0005fdd5" (& "&") (identifier "UNK_0005fdd5")) (+ "+") (identifier "unaff_EDI")) () ")"))))) () ")")) (argument_list "(piVar2)" (( "(") (identifier "piVar2") () ")"))) (; ";")) (goto_statement "goto LAB_00051499;" (goto "goto") (statement_identifier "LAB_00051499") (; ";")) (} "}"))) (} "}"))) (if_statement "if (piVar8 == (int *)0x0) {\n                piVar8 = piVar2;\n              }" (if "if") (parenthesized_expression "(piVar8 == (int *)0x0)" (( "(") (binary_expression "piVar8 == (int *)0x0" (identifier "piVar8") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                piVar8 = piVar2;\n              }" ({ "{") (expression_statement "piVar8 = piVar2;" (assignment_expression "piVar8 = piVar2" (identifier "piVar8") (= "=") (identifier "piVar2")) (; ";")) (} "}"))) (if_statement "if (local_44 != (int *)0x0) {\n                local_44[7] = (int)piVar2;\n              }" (if "if") (parenthesized_expression "(local_44 != (int *)0x0)" (( "(") (binary_expression "local_44 != (int *)0x0" (identifier "local_44") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                local_44[7] = (int)piVar2;\n              }" ({ "{") (expression_statement "local_44[7] = (int)piVar2;" (assignment_expression "local_44[7] = (int)piVar2" (subscript_expression "local_44[7]" (identifier "local_44") ([ "[") (number_literal "7") (] "]")) (= "=") (cast_expression "(int)piVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "piVar2"))) (; ";")) (} "}"))) (goto_statement "goto LAB_00051420;" (goto "goto") (statement_identifier "LAB_00051420") (; ";")) (} "}"))) (expression_statement "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);" (call_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2)" (parenthesized_expression "(**(code **)(&UNK_0005fdd5 + unaff_EDI))" (( "(") (pointer_expression "**(code **)(&UNK_0005fdd5 + unaff_EDI)" (* "*") (pointer_expression "*(code **)(&UNK_0005fdd5 + unaff_EDI)" (* "*") (cast_expression "(code **)(&UNK_0005fdd5 + unaff_EDI)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(&UNK_0005fdd5 + unaff_EDI)" (( "(") (binary_expression "&UNK_0005fdd5 + unaff_EDI" (pointer_expression "&UNK_0005fdd5" (& "&") (identifier "UNK_0005fdd5")) (+ "+") (identifier "unaff_EDI")) () ")"))))) () ")")) (argument_list "(piVar2)" (( "(") (identifier "piVar2") () ")"))) (; ";")) (} "}"))) (labeled_statement "LAB_00051499:\n          if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }" (statement_identifier "LAB_00051499") (: ":") (if_statement "if (local_24 != (addrinfo *)0x0) {\n            freeaddrinfo(local_24);\n          }" (if "if") (parenthesized_expression "(local_24 != (addrinfo *)0x0)" (( "(") (binary_expression "local_24 != (addrinfo *)0x0" (identifier "local_24") (!= "!=") (cast_expression "(addrinfo *)0x0" (( "(") (type_descriptor "addrinfo *" (type_identifier "addrinfo") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n            freeaddrinfo(local_24);\n          }" ({ "{") (expression_statement "freeaddrinfo(local_24);" (call_expression "freeaddrinfo(local_24)" (identifier "freeaddrinfo") (argument_list "(local_24)" (( "(") (identifier "local_24") () ")"))) (; ";")) (} "}")))) (expression_statement "piVar2 = (int *)0x0;" (assignment_expression "piVar2 = (int *)0x0" (identifier "piVar2") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "FUN_00051240(piVar8);" (call_expression "FUN_00051240(piVar8)" (identifier "FUN_00051240") (argument_list "(piVar8)" (( "(") (identifier "piVar8") () ")"))) (; ";")) (expression_statement "local_38 = -10;" (assignment_expression "local_38 = -10" (identifier "local_38") (= "=") (number_literal "-10")) (; ";")) (goto_statement "goto LAB_0005144b;" (goto "goto") (statement_identifier "LAB_0005144b") (; ";")) (} "}")))) (} "}")) (else_clause "else {\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }" (else "else") (compound_statement "{\n        uVar7 = 0x1c;\n        if (paVar6->ai_family == 10) goto LAB_00051332;\n      }" ({ "{") (expression_statement "uVar7 = 0x1c;" (assignment_expression "uVar7 = 0x1c" (identifier "uVar7") (= "=") (number_literal "0x1c")) (; ";")) (if_statement "if (paVar6->ai_family == 10) goto LAB_00051332;" (if "if") (parenthesized_expression "(paVar6->ai_family == 10)" (( "(") (binary_expression "paVar6->ai_family == 10" (field_expression "paVar6->ai_family" (identifier "paVar6") (-> "->") (field_identifier "ai_family")) (== "==") (number_literal "10")) () ")")) (goto_statement "goto LAB_00051332;" (goto "goto") (statement_identifier "LAB_00051332") (; ";"))) (} "}")))) (labeled_statement "LAB_00051420:\n      local_44 = piVar2;" (statement_identifier "LAB_00051420") (: ":") (expression_statement "local_44 = piVar2;" (assignment_expression "local_44 = piVar2" (identifier "local_44") (= "=") (identifier "piVar2")) (; ";"))) (expression_statement "paVar6 = paVar6->ai_next;" (assignment_expression "paVar6 = paVar6->ai_next" (identifier "paVar6") (= "=") (field_expression "paVar6->ai_next" (identifier "paVar6") (-> "->") (field_identifier "ai_next"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(paVar6 != (addrinfo *)0x0)" (( "(") (binary_expression "paVar6 != (addrinfo *)0x0" (identifier "paVar6") (!= "!=") (cast_expression "(addrinfo *)0x0" (( "(") (type_descriptor "addrinfo *" (type_identifier "addrinfo") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (; ";")) (if_statement "if (local_24 != (addrinfo *)0x0) {\n      freeaddrinfo(local_24);\n    }" (if "if") (parenthesized_expression "(local_24 != (addrinfo *)0x0)" (( "(") (binary_expression "local_24 != (addrinfo *)0x0" (identifier "local_24") (!= "!=") (cast_expression "(addrinfo *)0x0" (( "(") (type_descriptor "addrinfo *" (type_identifier "addrinfo") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      freeaddrinfo(local_24);\n    }" ({ "{") (expression_statement "freeaddrinfo(local_24);" (call_expression "freeaddrinfo(local_24)" (identifier "freeaddrinfo") (argument_list "(local_24)" (( "(") (identifier "local_24") () ")"))) (; ";")) (} "}"))) (expression_statement "piVar2 = piVar8;" (assignment_expression "piVar2 = piVar8" (identifier "piVar2") (= "=") (identifier "piVar8")) (; ";")) (if_statement "if (piVar8 == (int *)0x0) goto LAB_000514d0;" (if "if") (parenthesized_expression "(piVar8 == (int *)0x0)" (( "(") (binary_expression "piVar8 == (int *)0x0" (identifier "piVar8") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (goto_statement "goto LAB_000514d0;" (goto "goto") (statement_identifier "LAB_000514d0") (; ";"))) (} "}")))) (labeled_statement "LAB_0005144b:\n  *param_4 = piVar2;" (statement_identifier "LAB_0005144b") (: ":") (expression_statement "*param_4 = piVar2;" (assignment_expression "*param_4 = piVar2" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "piVar2")) (; ";"))) (labeled_statement "LAB_00051451:\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }" (statement_identifier "LAB_00051451") (: ":") (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_0007c1a0();\n  }" (if "if") (parenthesized_expression "(local_20 != *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 != *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (!= "!=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n                    \n    FUN_0007c1a0();\n  }" ({ "{") (expression_statement "FUN_0007c1a0();" (call_expression "FUN_0007c1a0()" (identifier "FUN_0007c1a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return local_38;" (return "return") (identifier "local_38") (; ";")) (} "}")))

int function_1(char *nodename,char *servname,type_1 *hints,type_2 **result)

{
  type_3 *psVar1;
  char cVar2;
  char cVar3;
  type_2 *var_8;
  type_3 *var_9;
  int var_12;
  type_4 var_11;
  char *var_13;
  type_4 var_10;
  type_1 *var_18;
  type_4 var_6;
  int var_7;
  type_2 *var_14;
  int var_2;
  type_2 *var_15;
  int var_4;
  type_1 *var_5;
  int var_19;
  
  var_1();
  var_19 = *(int *)(var_2 + 0x14);
  *result = (type_2 *)0x0;
  var_4 = var_3(nodename,servname,(type_1 *)hints,(type_1 **)&var_5);
  if (var_4 != 0) goto LAB_00051451;
  if (var_5 == (type_1 *)0x0) {
LAB_000514d0:
    var_4 = -2;
    var_8 = (type_2 *)0x0;
  }
  else {
    var_15 = (type_2 *)0x0;
    var_14 = (type_2 *)0x0;
    var_18 = var_5;
    do {
      var_8 = var_15;
      if (var_18->ai_family == 2) {
        var_6 = 0x10;
LAB_00051332:
        if (((var_18->ai_addr != (type_3 *)0x0) && (var_6 <= var_18->ai_addrlen)) &&
           (var_18->ai_addrlen != 0)) {
          var_8 = (type_2 *)(**(type_5 **)(var_7 + 0x5fdd9))(0x20);
          if (var_8 != (type_2 *)0x0) {
            var_8->ai_flags = var_18->ai_flags;
            var_8->ai_family = var_18->ai_family;
            var_8->ai_socktype = var_18->ai_socktype;
            var_12 = var_18->ai_protocol;
            var_8->ai_addrlen = var_6;
            var_8->ai_protocol = var_12;
            var_8->ai_addr = (type_3 *)0x0;
            var_8->ai_canonname = (char *)0x0;
            var_8->ai_next = (type_2 *)0x0;
            var_9 = (type_3 *)(**(type_5 **)(var_7 + 0x5fdd9))(var_6);
            var_8->ai_addr = var_9;
            if (var_9 != (type_3 *)0x0) {
              psVar1 = var_18->ai_addr;
              cVar2 = psVar1->sa_data[0];
              cVar3 = psVar1->sa_data[1];
              var_9->sa_family = psVar1->sa_family;
              var_9->sa_data[0] = cVar2;
              var_9->sa_data[1] = cVar3;
              *(type_6 *)(var_9->sa_data + (var_6 - 6)) =
                   *(type_6 *)(psVar1->sa_data + (var_6 - 6));
              var_10 = (type_4)(var_9->sa_data + 2) & 0xfffffffc;
              var_12 = (int)var_9 - var_10;
              var_11 = 0;
              do {
                *(type_6 *)(var_10 + var_11) = *(type_6 *)((int)psVar1 + (var_11 - var_12));
                var_11 = var_11 + 4;
              } while (var_11 < (var_6 + var_12 & 0xfffffffc));
              if (var_18->ai_canonname != (char *)0x0) {
                var_13 = (char *)(**(type_5 **)(&UNK_0005fdcd + var_7))(var_18->ai_canonname);
                var_8->ai_canonname = var_13;
                if (var_13 == (char *)0x0) {
                  (**(type_5 **)(var_7 + 0x5fdd5))(var_8->ai_addr);
                  (**(type_5 **)(var_7 + 0x5fdd5))(var_8);
                  goto LAB_00051499;
                }
              }
              if (var_14 == (type_2 *)0x0) {
                var_14 = var_8;
              }
              if (var_15 != (type_2 *)0x0) {
                var_15->ai_next = var_8;
              }
              goto LAB_00051420;
            }
            (**(type_5 **)(var_7 + 0x5fdd5))(var_8);
          }
LAB_00051499:
          if (var_5 != (type_1 *)0x0) {
            var_16((type_1 *)var_5);
          }
          var_8 = (type_2 *)0x0;
          var_17(var_14);
          var_4 = -10;
          goto LAB_0005144b;
        }
      }
      else {
        var_6 = 0x1c;
        if (var_18->ai_family == 10) goto LAB_00051332;
      }
LAB_00051420:
      var_15 = var_8;
      var_18 = var_18->ai_next;
    } while (var_18 != (type_1 *)0x0);
    if (var_5 != (type_1 *)0x0) {
      var_16((type_1 *)var_5);
    }
    var_8 = var_14;
    if (var_14 == (type_2 *)0x0) goto LAB_000514d0;
  }
LAB_0005144b:
  *result = var_8;
LAB_00051451:
  if (var_19 != *(int *)(var_2 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_20();
  }
  return var_4;
}


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

int MASKED(char *param_1,char *param_2,addrinfo *param_3,undefined4 *param_4)

{
  sockaddr *psVar1;
  int *piVar2;
  undefined4 *puVar3;
  int iVar4;
  uint uVar5;
  addrinfo *paVar6;
  uint uVar7;
  int unaff_EDI;
  int *piVar8;
  int in_GS_OFFSET;
  int *local_44;
  int local_38;
  addrinfo *local_24;
  int local_20;
  
  FUN_00020d67();
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  *param_4 = 0;
  local_38 = getaddrinfo(param_1,param_2,param_3,&local_24);
  if (local_38 != 0) goto LAB_00051451;
  if (local_24 == (addrinfo *)0x0) {
LAB_000514d0:
    local_38 = -2;
    piVar2 = (int *)0x0;
  }
  else {
    local_44 = (int *)0x0;
    piVar8 = (int *)0x0;
    paVar6 = local_24;
    do {
      piVar2 = local_44;
      if (paVar6->ai_family == 2) {
        uVar7 = 0x10;
LAB_00051332:
        if (((paVar6->ai_addr != (sockaddr *)0x0) && (uVar7 <= paVar6->ai_addrlen)) &&
           (paVar6->ai_addrlen != 0)) {
          piVar2 = (int *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(0x20);
          if (piVar2 != (int *)0x0) {
            *piVar2 = paVar6->ai_flags;
            piVar2[1] = paVar6->ai_family;
            piVar2[2] = paVar6->ai_socktype;
            iVar4 = paVar6->ai_protocol;
            piVar2[4] = uVar7;
            piVar2[3] = iVar4;
            piVar2[6] = 0;
            piVar2[5] = 0;
            piVar2[7] = 0;
            puVar3 = (undefined4 *)(**(code **)(&UNK_0005fdd9 + unaff_EDI))(uVar7);
            piVar2[6] = (int)puVar3;
            if (puVar3 != (undefined4 *)0x0) {
              psVar1 = paVar6->ai_addr;
              *puVar3 = *(undefined4 *)psVar1;
              *(undefined4 *)((int)puVar3 + (uVar7 - 4)) =
                   *(undefined4 *)(psVar1->sa_data + (uVar7 - 6));
              iVar4 = (int)puVar3 - ((uint)(puVar3 + 1) & 0xfffffffc);
              uVar5 = 0;
              do {
                *(undefined4 *)(((uint)(puVar3 + 1) & 0xfffffffc) + uVar5) =
                     *(undefined4 *)((int)psVar1 + (uVar5 - iVar4));
                uVar5 = uVar5 + 4;
              } while (uVar5 < (uVar7 + iVar4 & 0xfffffffc));
              if (paVar6->ai_canonname != (char *)0x0) {
                iVar4 = (**(code **)(&UNK_0005fdcd + unaff_EDI))(paVar6->ai_canonname);
                piVar2[5] = iVar4;
                if (iVar4 == 0) {
                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2[6]);
                  (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);
                  goto LAB_00051499;
                }
              }
              if (piVar8 == (int *)0x0) {
                piVar8 = piVar2;
              }
              if (local_44 != (int *)0x0) {
                local_44[7] = (int)piVar2;
              }
              goto LAB_00051420;
            }
            (**(code **)(&UNK_0005fdd5 + unaff_EDI))(piVar2);
          }
LAB_00051499:
          if (local_24 != (addrinfo *)0x0) {
            freeaddrinfo(local_24);
          }
          piVar2 = (int *)0x0;
          FUN_00051240(piVar8);
          local_38 = -10;
          goto LAB_0005144b;
        }
      }
      else {
        uVar7 = 0x1c;
        if (paVar6->ai_family == 10) goto LAB_00051332;
      }
LAB_00051420:
      local_44 = piVar2;
      paVar6 = paVar6->ai_next;
    } while (paVar6 != (addrinfo *)0x0);
    if (local_24 != (addrinfo *)0x0) {
      freeaddrinfo(local_24);
    }
    piVar2 = piVar8;
    if (piVar8 == (int *)0x0) goto LAB_000514d0;
  }
LAB_0005144b:
  *param_4 = piVar2;
LAB_00051451:
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_0007c1a0();
  }
  return local_38;
}

