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

SockAddr sk_namelookup(char *host,char **canonicalname,int address_family)

{
  int iVar1;
  SockAddr pSVar2;
  char *pcVar3;
  int iVar4;
  uint uVar5;
  uint uVar6;
  uint *puVar7;
  uint *puVar8;
  undefined4 *puVar9;
  undefined4 *puVar10;
  int in_GS_OFFSET;
  bool bVar11;
  byte bVar12;
  addrinfo hints;
  char realhost [8192];
  
  bVar12 = 0;
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  pSVar2 = (SockAddr)safemalloc(1,0x210);
  pSVar2->hostname[0x1fc] = '\0';
  pSVar2->hostname[0x1fd] = '\0';
  pSVar2->hostname[0x1fe] = '\0';
  pSVar2->hostname[0x1ff] = '\0';
  puVar9 = (undefined4 *)((uint)&pSVar2->error & 0xfffffffc);
  uVar6 = (uint)((int)pSVar2 + (0x210 - (int)puVar9)) >> 2;
  for (; uVar6 != 0; uVar6 = uVar6 - 1) {
    *puVar9 = 0;
    puVar9 = puVar9 + (uint)bVar12 * -2 + 1;
  }
  pSVar2->refcount = 1;
  pSVar2->superfamily = ADDRTYPE_UNSPEC;
  pSVar2->error = (char *)0x0;
  hints.ai_family = 2;
  realhost._0_4_ = realhost._0_4_ & 0xffffff00;
  hints.ai_flags = 2;
  if ((address_family != 1) && (hints.ai_family = 10, address_family != 2)) {
    hints.ai_family = 0;
  }
  hints.ai_socktype = 1;
  hints.ai_protocol = 0;
  hints.ai_addrlen = 0;
  hints.ai_addr = (sockaddr *)0x0;
  hints.ai_canonname = (char *)0x0;
  hints.ai_next = (addrinfo *)0x0;
  pcVar3 = host_strduptrim(host);
  iVar4 = getaddrinfo(pcVar3,(char *)0x0,(addrinfo *)&hints,(addrinfo **)&pSVar2->ais);
  safefree(pcVar3);
  if (iVar4 == 0) {
    pSVar2->superfamily = ADDRTYPE_IPV6;
    pcVar3 = pSVar2->ais->ai_canonname;
    if (pcVar3 == (char *)0x0) {
      __strncat_chk(realhost,host,0x1fff,0x2000);
    }
    else {
      __strncat_chk(realhost,pcVar3,0x1fff,0x2000);
    }
    realhost[0x1fff] = '\0';
    puVar8 = (uint *)realhost;
    do {
      puVar7 = puVar8;
      uVar5 = *puVar7 + 0xfefefeff & ~*puVar7;
      uVar6 = uVar5 & 0x80808080;
      puVar8 = puVar7 + 1;
    } while (uVar6 == 0);
    bVar11 = (uVar5 & 0x8080) == 0;
    if (bVar11) {
      uVar6 = uVar6 >> 0x10;
    }
    if (bVar11) {
      puVar8 = (uint *)((int)puVar7 + 6);
    }
    uVar6 = (int)puVar8 + (-(int)realhost - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;
    pcVar3 = (char *)safemalloc(uVar6,1);
    *canonicalname = pcVar3;
    if (uVar6 < 4) {
      if (uVar6 != 0) {
        *pcVar3 = realhost[0];
        if ((uVar6 & 2) != 0) {
          *(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));
        }
      }
    }
    else {
      *(undefined4 *)pcVar3 = realhost._0_4_;
      *(undefined4 *)(pcVar3 + (uVar6 - 4)) = *(undefined4 *)(realhost + (uVar6 - 4));
      iVar4 = (int)pcVar3 - (int)((uint)(pcVar3 + 4) & 0xfffffffc);
      puVar9 = (undefined4 *)((int)realhost - iVar4);
      puVar10 = (undefined4 *)((uint)(pcVar3 + 4) & 0xfffffffc);
      for (uVar6 = uVar6 + iVar4 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {
        *puVar10 = *puVar9;
        puVar9 = puVar9 + (uint)bVar12 * -2 + 1;
        puVar10 = puVar10 + (uint)bVar12 * -2 + 1;
      }
    }
  }
  else {
    pcVar3 = gai_strerror(iVar4);
    pSVar2->error = pcVar3;
  }
  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail_local();
  }
  return pSVar2;
}



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

undefined4 * FUN_00070390(undefined4 param_1,int *param_2,int param_3)

{
  undefined4 *puVar1;
  char *pcVar2;
  int iVar3;
  uint uVar4;
  uint *puVar5;
  uint uVar6;
  uint *puVar7;
  undefined4 *puVar8;
  undefined4 *puVar9;
  int in_GS_OFFSET;
  bool bVar10;
  byte bVar11;
  addrinfo local_2040;
  uint local_2020 [2047];
  undefined1 local_21;
  int local_20;
  undefined4 uStack_14;
  
  bVar11 = 0;
  uStack_14 = 0x7039b;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  puVar1 = (undefined4 *)FUN_000313e0(1,0x210);
  puVar1[0x83] = 0;
  puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);
  for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;
      uVar6 != 0; uVar6 = uVar6 - 1) {
    *puVar8 = 0;
    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;
  }
  *puVar1 = 1;
  puVar1[2] = 0;
  puVar1[1] = 0;
  local_2040.ai_family = 2;
  local_2020[0] = local_2020[0] & 0xffffff00;
  local_2040.ai_flags = 2;
  if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {
    local_2040.ai_family = 0;
  }
  local_2040.ai_socktype = 1;
  local_2040.ai_protocol = 0;
  local_2040.ai_addrlen = 0;
  local_2040.ai_addr = (sockaddr *)0x0;
  local_2040.ai_canonname = (char *)0x0;
  local_2040.ai_next = (addrinfo *)0x0;
  pcVar2 = (char *)FUN_00030740(param_1);
  iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));
  FUN_00031580(pcVar2);
  if (iVar3 == 0) {
    puVar1[2] = 2;
    if (*(int *)(puVar1[3] + 0x18) == 0) {
      __strncat_chk(local_2020,param_1,0x1fff,0x2000);
    }
    else {
      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);
    }
    local_21 = 0;
    puVar5 = local_2020;
    do {
      puVar7 = puVar5;
      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;
      uVar6 = uVar4 & 0x80808080;
      puVar5 = puVar7 + 1;
    } while (uVar6 == 0);
    bVar10 = (uVar4 & 0x8080) == 0;
    if (bVar10) {
      uVar6 = uVar6 >> 0x10;
    }
    if (bVar10) {
      puVar5 = (uint *)((int)puVar7 + 6);
    }
    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;
    puVar5 = (uint *)FUN_000313e0(uVar6,1);
    *param_2 = (int)puVar5;
    if (uVar6 < 4) {
      if (uVar6 != 0) {
        *(undefined1 *)puVar5 = (undefined1)local_2020[0];
        if ((uVar6 & 2) != 0) {
          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =
               *(undefined2 *)((int)local_2020 + (uVar6 - 2));
        }
      }
    }
    else {
      *puVar5 = local_2020[0];
      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));
      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);
      puVar8 = (undefined4 *)((int)local_2020 - iVar3);
      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);
      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {
        *puVar9 = *puVar8;
        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;
        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;
      }
    }
  }
  else {
    pcVar2 = gai_strerror(iVar3);
    puVar1[1] = pcVar2;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00077880();
  }
  return puVar1;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001b410
ADD EBX,0x55409
SUB ESP,0x2054
MOV EAX,dword ptr [EBP + 0xc]
MOV ESI,dword ptr [EBP + 0x8]
MOV dword ptr [EBP + 0xffffdfb0],EAX
MOV EAX,GS:[0x14]
MOV dword ptr [EBP + -0x1c],EAX
XOR EAX,EAX
PUSH 0x210
PUSH 0x1
CALL 0x000313e0
ADD ESP,0x10
MOV EDX,EAX
MOV dword ptr [EBP + 0xffffdfb4],EAX
XOR EAX,EAX
MOV dword ptr [EDX + 0x20c],0x0
LEA EDI,[EDX + 0x4]
MOV ECX,EDX
AND EDI,0xfffffffc
SUB ECX,EDI
ADD ECX,0x210
SHR ECX,0x2
STOSD.REP ES:EDI
MOV dword ptr [EDX],0x1
MOV dword ptr [EDX + 0x8],0x0
CMP dword ptr [EBP + 0x10],0x1
MOV dword ptr [EDX + 0x4],0x0
MOV EDX,0x2
MOV byte ptr [EBP + 0xffffdfe4],0x0
MOV dword ptr [EBP + 0xffffdfc4],0x2
JZ 0x00070432
CMP dword ptr [EBP + 0x10],0x2
MOV EDX,0xa
CMOVNZ EDX,EAX
SUB ESP,0xc
MOV dword ptr [EBP + 0xffffdfc8],EDX
PUSH ESI
MOV dword ptr [EBP + 0xffffdfcc],0x1
MOV dword ptr [EBP + 0xffffdfd0],0x0
MOV dword ptr [EBP + 0xffffdfd4],0x0
MOV dword ptr [EBP + 0xffffdfd8],0x0
MOV dword ptr [EBP + 0xffffdfdc],0x0
MOV dword ptr [EBP + 0xffffdfe0],0x0
CALL 0x00030740
MOV EDI,EAX
MOV EAX,dword ptr [EBP + 0xffffdfb4]
ADD EAX,0xc
PUSH EAX
LEA EAX,[EBP + 0xffffdfc4]
PUSH EAX
PUSH 0x0
PUSH EDI
CALL 0x0001a410
ADD ESP,0x14
PUSH EDI
MOV dword ptr [EBP + 0xffffdfac],EAX
CALL 0x00031580
MOV EAX,dword ptr [EBP + 0xffffdfac]
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000705f0
MOV EAX,dword ptr [EBP + 0xffffdfb4]
MOV dword ptr [EAX + 0x8],0x2
MOV EAX,dword ptr [EAX + 0xc]
MOV EAX,dword ptr [EAX + 0x18]
TEST EAX,EAX
JZ 0x000705c8
LEA ESI,[EBP + 0xffffdfe4]
PUSH 0x2000
PUSH 0x1fff
PUSH EAX
PUSH ESI
CALL 0x000196d0
ADD ESP,0x10
MOV EAX,dword ptr [EBP + 0xffffdfb4]
MOV byte ptr [EBP + -0x1d],0x0
MOV ECX,ESI
MOV EDI,EAX
MOV EDX,dword ptr [ECX]
ADD ECX,0x4
LEA EAX,[EDX + 0xfefefeff]
NOT EDX
AND EAX,EDX
AND EAX,0x80808080
JZ 0x000704fb
MOV EDX,EAX
MOV dword ptr [EBP + 0xffffdfb4],EDI
SHR EDX,0x10
TEST EAX,0x8080
CMOVZ EAX,EDX
LEA EDX,[ECX + 0x2]
CMOVZ ECX,EDX
MOV EDX,EAX
ADD DL,AL
SBB ECX,0x3
SUB ESP,0x8
SUB ECX,ESI
PUSH 0x1
LEA EDI,[ECX + 0x1]
PUSH EDI
CALL 0x000313e0
MOV EBX,dword ptr [EBP + 0xffffdfb0]
MOV dword ptr [EBX],EAX
CMP EDI,0x4
JNC 0x00070578
TEST EDI,EDI
JNZ 0x000705a8
ADD ESP,0x10
MOV ESI,dword ptr [EBP + -0x1c]
XOR ESI,dword ptr GS:[0x14]
MOV EAX,dword ptr [EBP + 0xffffdfb4]
JNZ 0x0007060a
LEA ESP,[EBP + -0xc]
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,dword ptr [EBP + 0xffffdfe4]
MOV dword ptr [EAX],EDX
MOV EDX,dword ptr [EBP + EDI*0x1 + 0xffffdfe0]
MOV dword ptr [EAX + EDI*0x1 + -0x4],EDX
LEA EDX,[EAX + 0x4]
AND EDX,0xfffffffc
SUB EAX,EDX
LEA ECX,[EDI + EAX*0x1]
SUB ESI,EAX
MOV EDI,EDX
SHR ECX,0x2
MOVSD.REP ES:EDI,ESI
JMP 0x00070552
MOVZX EDX,byte ptr [ESI]
MOV byte ptr [EAX],DL
TEST EDI,0x2
JZ 0x00070552
MOVZX EDX,word ptr [ESI + EDI*0x1 + -0x2]
MOV word ptr [EAX + EDI*0x1 + -0x2],DX
JMP 0x00070552
PUSH 0x2000
PUSH 0x1fff
PUSH ESI
LEA ESI,[EBP + 0xffffdfe4]
PUSH ESI
CALL 0x000196d0
ADD ESP,0x10
JMP 0x000704ed
SUB ESP,0xc
PUSH EAX
CALL 0x0001a170
MOV ESI,dword ptr [EBP + 0xffffdfb4]
ADD ESP,0x10
MOV dword ptr [ESI + 0x4],EAX
JMP 0x00070555
CALL 0x00077880
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 * FUN_00070390(undefined4 param_1,int *param_2,int param_3)\n\n{\n  undefined4 *puVar1;\n  char *pcVar2;\n  int iVar3;\n  uint uVar4;\n  uint *puVar5;\n  uint uVar6;\n  uint *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  int in_GS_OFFSET;\n  bool bVar10;\n  byte bVar11;\n  addrinfo local_2040;\n  uint local_2020 [2047];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar11 = 0;\n  uStack_14 = 0x7039b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)FUN_000313e0(1,0x210);\n  puVar1[0x83] = 0;\n  puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n  for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n      uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }\n  *puVar1 = 1;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  local_2040.ai_family = 2;\n  local_2020[0] = local_2020[0] & 0xffffff00;\n  local_2040.ai_flags = 2;\n  if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {\n    local_2040.ai_family = 0;\n  }\n  local_2040.ai_socktype = 1;\n  local_2040.ai_protocol = 0;\n  local_2040.ai_addrlen = 0;\n  local_2040.ai_addr = (sockaddr *)0x0;\n  local_2040.ai_canonname = (char *)0x0;\n  local_2040.ai_next = (addrinfo *)0x0;\n  pcVar2 = (char *)FUN_00030740(param_1);\n  iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));\n  FUN_00031580(pcVar2);\n  if (iVar3 == 0) {\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00077880();\n  }\n  return puVar1;\n}\n\n" comment (function_definition "undefined4 * FUN_00070390(undefined4 param_1,int *param_2,int param_3)\n\n{\n  undefined4 *puVar1;\n  char *pcVar2;\n  int iVar3;\n  uint uVar4;\n  uint *puVar5;\n  uint uVar6;\n  uint *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  int in_GS_OFFSET;\n  bool bVar10;\n  byte bVar11;\n  addrinfo local_2040;\n  uint local_2020 [2047];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar11 = 0;\n  uStack_14 = 0x7039b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)FUN_000313e0(1,0x210);\n  puVar1[0x83] = 0;\n  puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n  for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n      uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }\n  *puVar1 = 1;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  local_2040.ai_family = 2;\n  local_2020[0] = local_2020[0] & 0xffffff00;\n  local_2040.ai_flags = 2;\n  if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {\n    local_2040.ai_family = 0;\n  }\n  local_2040.ai_socktype = 1;\n  local_2040.ai_protocol = 0;\n  local_2040.ai_addrlen = 0;\n  local_2040.ai_addr = (sockaddr *)0x0;\n  local_2040.ai_canonname = (char *)0x0;\n  local_2040.ai_next = (addrinfo *)0x0;\n  pcVar2 = (char *)FUN_00030740(param_1);\n  iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));\n  FUN_00031580(pcVar2);\n  if (iVar3 == 0) {\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00077880();\n  }\n  return puVar1;\n}" type_identifier (pointer_declarator "* FUN_00070390(undefined4 param_1,int *param_2,int param_3)" * (function_declarator "FUN_00070390(undefined4 param_1,int *param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,int *param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) )))) (compound_statement "{\n  undefined4 *puVar1;\n  char *pcVar2;\n  int iVar3;\n  uint uVar4;\n  uint *puVar5;\n  uint uVar6;\n  uint *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  int in_GS_OFFSET;\n  bool bVar10;\n  byte bVar11;\n  addrinfo local_2040;\n  uint local_2020 [2047];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar11 = 0;\n  uStack_14 = 0x7039b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)FUN_000313e0(1,0x210);\n  puVar1[0x83] = 0;\n  puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n  for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n      uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }\n  *puVar1 = 1;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  local_2040.ai_family = 2;\n  local_2020[0] = local_2020[0] & 0xffffff00;\n  local_2040.ai_flags = 2;\n  if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {\n    local_2040.ai_family = 0;\n  }\n  local_2040.ai_socktype = 1;\n  local_2040.ai_protocol = 0;\n  local_2040.ai_addrlen = 0;\n  local_2040.ai_addr = (sockaddr *)0x0;\n  local_2040.ai_canonname = (char *)0x0;\n  local_2040.ai_next = (addrinfo *)0x0;\n  pcVar2 = (char *)FUN_00030740(param_1);\n  iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));\n  FUN_00031580(pcVar2);\n  if (iVar3 == 0) {\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00077880();\n  }\n  return puVar1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "uint *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "undefined4 *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar10;" primitive_type identifier ;) (declaration "byte bVar11;" type_identifier identifier ;) (declaration "addrinfo local_2040;" type_identifier identifier ;) (declaration "uint local_2020 [2047];" type_identifier (array_declarator "local_2020 [2047]" identifier [ number_literal ]) ;) (declaration "undefined1 local_21;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "bVar11 = 0;" (assignment_expression "bVar11 = 0" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x7039b;" (assignment_expression "uStack_14 = 0x7039b" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = (undefined4 *)FUN_000313e0(1,0x210);" (assignment_expression "puVar1 = (undefined4 *)FUN_000313e0(1,0x210)" identifier = (cast_expression "(undefined4 *)FUN_000313e0(1,0x210)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000313e0(1,0x210)" identifier (argument_list "(1,0x210)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar1[0x83] = 0;" (assignment_expression "puVar1[0x83] = 0" (subscript_expression "puVar1[0x83]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);" (assignment_expression "puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n      uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }" for ( (assignment_expression "uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2" identifier = (binary_expression "(uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc)))" ( (binary_expression "(int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))" ( (binary_expression "0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc)" number_literal - (cast_expression "(int)((uint)(puVar1 + 1) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) & number_literal) )))) ))) ))) >> number_literal)) ; (binary_expression "uVar6 != 0" identifier != number_literal) ; (assignment_expression "uVar6 = uVar6 - 1" identifier = (binary_expression "uVar6 - 1" identifier - number_literal)) ) (compound_statement "{\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }" { (expression_statement "*puVar8 = 0;" (assignment_expression "*puVar8 = 0" (pointer_expression "*puVar8" * identifier) = number_literal) ;) (expression_statement "puVar8 = puVar8 + (uint)bVar11 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar11 * -2 + 1" identifier = (binary_expression "puVar8 + (uint)bVar11 * -2 + 1" (binary_expression "puVar8 + (uint)bVar11 * -2" identifier + (binary_expression "(uint)bVar11 * -2" (cast_expression "(uint)bVar11" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "*puVar1 = 1;" (assignment_expression "*puVar1 = 1" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_2040.ai_family = 2;" (assignment_expression "local_2040.ai_family = 2" (field_expression "local_2040.ai_family" identifier . field_identifier) = number_literal) ;) (expression_statement "local_2020[0] = local_2020[0] & 0xffffff00;" (assignment_expression "local_2020[0] = local_2020[0] & 0xffffff00" (subscript_expression "local_2020[0]" identifier [ number_literal ]) = (binary_expression "local_2020[0] & 0xffffff00" (subscript_expression "local_2020[0]" identifier [ number_literal ]) & number_literal)) ;) (expression_statement "local_2040.ai_flags = 2;" (assignment_expression "local_2040.ai_flags = 2" (field_expression "local_2040.ai_flags" identifier . field_identifier) = number_literal) ;) (if_statement "if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {\n    local_2040.ai_family = 0;\n  }" if (parenthesized_expression "((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2))" ( (binary_expression "(param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)" (parenthesized_expression "(param_3 != 1)" ( (binary_expression "param_3 != 1" identifier != number_literal) )) && (parenthesized_expression "(local_2040.ai_family = 10, param_3 != 2)" ( (comma_expression "local_2040.ai_family = 10, param_3 != 2" (assignment_expression "local_2040.ai_family = 10" (field_expression "local_2040.ai_family" identifier . field_identifier) = number_literal) , (binary_expression "param_3 != 2" identifier != number_literal)) ))) )) (compound_statement "{\n    local_2040.ai_family = 0;\n  }" { (expression_statement "local_2040.ai_family = 0;" (assignment_expression "local_2040.ai_family = 0" (field_expression "local_2040.ai_family" identifier . field_identifier) = number_literal) ;) })) (expression_statement "local_2040.ai_socktype = 1;" (assignment_expression "local_2040.ai_socktype = 1" (field_expression "local_2040.ai_socktype" identifier . field_identifier) = number_literal) ;) (expression_statement "local_2040.ai_protocol = 0;" (assignment_expression "local_2040.ai_protocol = 0" (field_expression "local_2040.ai_protocol" identifier . field_identifier) = number_literal) ;) (expression_statement "local_2040.ai_addrlen = 0;" (assignment_expression "local_2040.ai_addrlen = 0" (field_expression "local_2040.ai_addrlen" identifier . field_identifier) = number_literal) ;) (expression_statement "local_2040.ai_addr = (sockaddr *)0x0;" (assignment_expression "local_2040.ai_addr = (sockaddr *)0x0" (field_expression "local_2040.ai_addr" identifier . field_identifier) = (cast_expression "(sockaddr *)0x0" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_2040.ai_canonname = (char *)0x0;" (assignment_expression "local_2040.ai_canonname = (char *)0x0" (field_expression "local_2040.ai_canonname" identifier . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_2040.ai_next = (addrinfo *)0x0;" (assignment_expression "local_2040.ai_next = (addrinfo *)0x0" (field_expression "local_2040.ai_next" identifier . field_identifier) = (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pcVar2 = (char *)FUN_00030740(param_1);" (assignment_expression "pcVar2 = (char *)FUN_00030740(param_1)" identifier = (cast_expression "(char *)FUN_00030740(param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00030740(param_1)" identifier (argument_list "(param_1)" ( identifier ))))) ;) (expression_statement "iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));" (assignment_expression "iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3))" identifier = (call_expression "getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3))" identifier (argument_list "(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3))" ( identifier , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (pointer_expression "&local_2040" & identifier) , (cast_expression "(addrinfo **)(puVar1 + 3)" ( (type_descriptor "addrinfo **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + 3)" ( (binary_expression "puVar1 + 3" identifier + number_literal) ))) )))) ;) (expression_statement "FUN_00031580(pcVar2);" (call_expression "FUN_00031580(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) (if_statement "if (iVar3 == 0) {\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }" { (expression_statement "puVar1[2] = 2;" (assignment_expression "puVar1[2] = 2" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }" if (parenthesized_expression "(*(int *)(puVar1[3] + 0x18) == 0)" ( (binary_expression "*(int *)(puVar1[3] + 0x18) == 0" (pointer_expression "*(int *)(puVar1[3] + 0x18)" * (cast_expression "(int *)(puVar1[3] + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[3] + 0x18)" ( (binary_expression "puVar1[3] + 0x18" (subscript_expression "puVar1[3]" identifier [ number_literal ]) + number_literal) )))) == number_literal) )) (compound_statement "{\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }" { (expression_statement "__strncat_chk(local_2020,param_1,0x1fff,0x2000);" (call_expression "__strncat_chk(local_2020,param_1,0x1fff,0x2000)" identifier (argument_list "(local_2020,param_1,0x1fff,0x2000)" ( identifier , identifier , number_literal , number_literal ))) ;) }) (else_clause "else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }" else (compound_statement "{\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }" { (expression_statement "__strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);" (call_expression "__strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000)" identifier (argument_list "(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000)" ( identifier , (pointer_expression "*(int *)(puVar1[3] + 0x18)" * (cast_expression "(int *)(puVar1[3] + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[3] + 0x18)" ( (binary_expression "puVar1[3] + 0x18" (subscript_expression "puVar1[3]" identifier [ number_literal ]) + number_literal) )))) , number_literal , number_literal ))) ;) }))) (expression_statement "local_21 = 0;" (assignment_expression "local_21 = 0" identifier = number_literal) ;) (expression_statement "puVar5 = local_2020;" (assignment_expression "puVar5 = local_2020" identifier = identifier) ;) (do_statement "do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);" do (compound_statement "{\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    }" { (expression_statement "puVar7 = puVar5;" (assignment_expression "puVar7 = puVar5" identifier = identifier) ;) (expression_statement "uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;" (assignment_expression "uVar4 = *puVar7 + 0xfefefeff & ~*puVar7" identifier = (binary_expression "*puVar7 + 0xfefefeff & ~*puVar7" (binary_expression "*puVar7 + 0xfefefeff" (pointer_expression "*puVar7" * identifier) + number_literal) & (unary_expression "~*puVar7" ~ (pointer_expression "*puVar7" * identifier)))) ;) (expression_statement "uVar6 = uVar4 & 0x80808080;" (assignment_expression "uVar6 = uVar4 & 0x80808080" identifier = (binary_expression "uVar4 & 0x80808080" identifier & number_literal)) ;) (expression_statement "puVar5 = puVar7 + 1;" (assignment_expression "puVar5 = puVar7 + 1" identifier = (binary_expression "puVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar6 == 0)" ( (binary_expression "uVar6 == 0" identifier == number_literal) )) ;) (expression_statement "bVar10 = (uVar4 & 0x8080) == 0;" (assignment_expression "bVar10 = (uVar4 & 0x8080) == 0" identifier = (binary_expression "(uVar4 & 0x8080) == 0" (parenthesized_expression "(uVar4 & 0x8080)" ( (binary_expression "uVar4 & 0x8080" identifier & number_literal) )) == number_literal)) ;) (if_statement "if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\n      uVar6 = uVar6 >> 0x10;\n    }" { (expression_statement "uVar6 = uVar6 >> 0x10;" (assignment_expression "uVar6 = uVar6 >> 0x10" identifier = (binary_expression "uVar6 >> 0x10" identifier >> number_literal)) ;) })) (if_statement "if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }" { (expression_statement "puVar5 = (uint *)((int)puVar7 + 6);" (assignment_expression "puVar5 = (uint *)((int)puVar7 + 6)" identifier = (cast_expression "(uint *)((int)puVar7 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar7 + 6)" ( (binary_expression "(int)puVar7 + 6" (cast_expression "(int)puVar7" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) })) (expression_statement "uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;" (assignment_expression "uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2" identifier = (binary_expression "(int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2" (binary_expression "(int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6))" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6))" ( (binary_expression "-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)" (unary_expression "-(int)local_2020" - (cast_expression "(int)local_2020" ( (type_descriptor "int" primitive_type) ) identifier)) - (cast_expression "(uint)CARRY1((byte)uVar6,(byte)uVar6)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY1((byte)uVar6,(byte)uVar6)" identifier (argument_list "((byte)uVar6,(byte)uVar6)" ( (cast_expression "(byte)uVar6" ( (type_descriptor "byte" type_identifier) ) identifier) , (cast_expression "(byte)uVar6" ( (type_descriptor "byte" type_identifier) ) identifier) ))))) ))) + number_literal)) ;) (expression_statement "puVar5 = (uint *)FUN_000313e0(uVar6,1);" (assignment_expression "puVar5 = (uint *)FUN_000313e0(uVar6,1)" identifier = (cast_expression "(uint *)FUN_000313e0(uVar6,1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000313e0(uVar6,1)" identifier (argument_list "(uVar6,1)" ( identifier , number_literal ))))) ;) (expression_statement "*param_2 = (int)puVar5;" (assignment_expression "*param_2 = (int)puVar5" (pointer_expression "*param_2" * identifier) = (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }" if (parenthesized_expression "(uVar6 < 4)" ( (binary_expression "uVar6 < 4" identifier < number_literal) )) (compound_statement "{\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }" { (if_statement "if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }" if (parenthesized_expression "(uVar6 != 0)" ( (binary_expression "uVar6 != 0" identifier != number_literal) )) (compound_statement "{\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }" { (expression_statement "*(undefined1 *)puVar5 = (undefined1)local_2020[0];" (assignment_expression "*(undefined1 *)puVar5 = (undefined1)local_2020[0]" (pointer_expression "*(undefined1 *)puVar5" * (cast_expression "(undefined1 *)puVar5" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (cast_expression "(undefined1)local_2020[0]" ( (type_descriptor "undefined1" type_identifier) ) (subscript_expression "local_2020[0]" identifier [ number_literal ]))) ;) (if_statement "if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }" if (parenthesized_expression "((uVar6 & 2) != 0)" ( (binary_expression "(uVar6 & 2) != 0" (parenthesized_expression "(uVar6 & 2)" ( (binary_expression "uVar6 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }" { (expression_statement "*(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));" (assignment_expression "*(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2))" (pointer_expression "*(undefined2 *)((int)puVar5 + (uVar6 - 2))" * (cast_expression "(undefined2 *)((int)puVar5 + (uVar6 - 2))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar5 + (uVar6 - 2))" ( (binary_expression "(int)puVar5 + (uVar6 - 2)" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar6 - 2)" ( (binary_expression "uVar6 - 2" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined2 *)((int)local_2020 + (uVar6 - 2))" * (cast_expression "(undefined2 *)((int)local_2020 + (uVar6 - 2))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_2020 + (uVar6 - 2))" ( (binary_expression "(int)local_2020 + (uVar6 - 2)" (cast_expression "(int)local_2020" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar6 - 2)" ( (binary_expression "uVar6 - 2" identifier - number_literal) ))) ))))) ;) })) })) }) (else_clause "else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }" else (compound_statement "{\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }" { (expression_statement "*puVar5 = local_2020[0];" (assignment_expression "*puVar5 = local_2020[0]" (pointer_expression "*puVar5" * identifier) = (subscript_expression "local_2020[0]" identifier [ number_literal ])) ;) (expression_statement "*(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));" (assignment_expression "*(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4))" (pointer_expression "*(undefined4 *)((int)puVar5 + (uVar6 - 4))" * (cast_expression "(undefined4 *)((int)puVar5 + (uVar6 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar5 + (uVar6 - 4))" ( (binary_expression "(int)puVar5 + (uVar6 - 4)" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar6 - 4)" ( (binary_expression "uVar6 - 4" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined4 *)((int)local_2020 + (uVar6 - 4))" * (cast_expression "(undefined4 *)((int)local_2020 + (uVar6 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_2020 + (uVar6 - 4))" ( (binary_expression "(int)local_2020 + (uVar6 - 4)" (cast_expression "(int)local_2020" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar6 - 4)" ( (binary_expression "uVar6 - 4" identifier - number_literal) ))) ))))) ;) (expression_statement "iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);" (assignment_expression "iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc)" identifier = (binary_expression "(int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc)" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)((uint)(puVar5 + 1) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(puVar5 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar5 + 1) & 0xfffffffc" (call_expression "(uint)(puVar5 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar5 + 1)" ( (binary_expression "puVar5 + 1" identifier + number_literal) ))) & number_literal) ))))) ;) (expression_statement "puVar8 = (undefined4 *)((int)local_2020 - iVar3);" (assignment_expression "puVar8 = (undefined4 *)((int)local_2020 - iVar3)" identifier = (cast_expression "(undefined4 *)((int)local_2020 - iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_2020 - iVar3)" ( (binary_expression "(int)local_2020 - iVar3" (cast_expression "(int)local_2020" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) )))) ;) (expression_statement "puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);" (assignment_expression "puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(puVar5 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar5 + 1) & 0xfffffffc" (call_expression "(uint)(puVar5 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar5 + 1)" ( (binary_expression "puVar5 + 1" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }" for ( (assignment_expression "uVar6 = uVar6 + iVar3 >> 2" identifier = (binary_expression "uVar6 + iVar3 >> 2" (binary_expression "uVar6 + iVar3" identifier + identifier) >> number_literal)) ; (binary_expression "uVar6 != 0" identifier != number_literal) ; (assignment_expression "uVar6 = uVar6 - 1" identifier = (binary_expression "uVar6 - 1" identifier - number_literal)) ) (compound_statement "{\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }" { (expression_statement "*puVar9 = *puVar8;" (assignment_expression "*puVar9 = *puVar8" (pointer_expression "*puVar9" * identifier) = (pointer_expression "*puVar8" * identifier)) ;) (expression_statement "puVar8 = puVar8 + (uint)bVar11 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar11 * -2 + 1" identifier = (binary_expression "puVar8 + (uint)bVar11 * -2 + 1" (binary_expression "puVar8 + (uint)bVar11 * -2" identifier + (binary_expression "(uint)bVar11 * -2" (cast_expression "(uint)bVar11" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "puVar9 = puVar9 + (uint)bVar11 * -2 + 1;" (assignment_expression "puVar9 = puVar9 + (uint)bVar11 * -2 + 1" identifier = (binary_expression "puVar9 + (uint)bVar11 * -2 + 1" (binary_expression "puVar9 + (uint)bVar11 * -2" identifier + (binary_expression "(uint)bVar11 * -2" (cast_expression "(uint)bVar11" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) }))) }) (else_clause "else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }" else (compound_statement "{\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }" { (expression_statement "pcVar2 = gai_strerror(iVar3);" (assignment_expression "pcVar2 = gai_strerror(iVar3)" identifier = (call_expression "gai_strerror(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "puVar1[1] = pcVar2;" (assignment_expression "puVar1[1] = pcVar2" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) }))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00077880();\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_00077880();\n  }" { comment (expression_statement "FUN_00077880();" (call_expression "FUN_00077880()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nSockAddr sk_namelookup(char *host,char **canonicalname,int address_family)\n\n{\n  int iVar1;\n  SockAddr pSVar2;\n  char *pcVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  uint *puVar7;\n  uint *puVar8;\n  undefined4 *puVar9;\n  undefined4 *puVar10;\n  int in_GS_OFFSET;\n  bool bVar11;\n  byte bVar12;\n  addrinfo hints;\n  char realhost [8192];\n  \n  bVar12 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  pSVar2 = (SockAddr)safemalloc(1,0x210);\n  pSVar2->hostname[0x1fc] = '\0';\n  pSVar2->hostname[0x1fd] = '\0';\n  pSVar2->hostname[0x1fe] = '\0';\n  pSVar2->hostname[0x1ff] = '\0';\n  puVar9 = (undefined4 *)((uint)&pSVar2->error & 0xfffffffc);\n  uVar6 = (uint)((int)pSVar2 + (0x210 - (int)puVar9)) >> 2;\n  for (; uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar9 = 0;\n    puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n  }\n  pSVar2->refcount = 1;\n  pSVar2->superfamily = ADDRTYPE_UNSPEC;\n  pSVar2->error = (char *)0x0;\n  hints.ai_family = 2;\n  realhost._0_4_ = realhost._0_4_ & 0xffffff00;\n  hints.ai_flags = 2;\n  if ((address_family != 1) && (hints.ai_family = 10, address_family != 2)) {\n    hints.ai_family = 0;\n  }\n  hints.ai_socktype = 1;\n  hints.ai_protocol = 0;\n  hints.ai_addrlen = 0;\n  hints.ai_addr = (sockaddr *)0x0;\n  hints.ai_canonname = (char *)0x0;\n  hints.ai_next = (addrinfo *)0x0;\n  pcVar3 = host_strduptrim(host);\n  iVar4 = getaddrinfo(pcVar3,(char *)0x0,(addrinfo *)&hints,(addrinfo **)&pSVar2->ais);\n  safefree(pcVar3);\n  if (iVar4 == 0) {\n    pSVar2->superfamily = ADDRTYPE_IPV6;\n    pcVar3 = pSVar2->ais->ai_canonname;\n    if (pcVar3 == (char *)0x0) {\n      __strncat_chk(realhost,host,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(realhost,pcVar3,0x1fff,0x2000);\n    }\n    realhost[0x1fff] = '\0';\n    puVar8 = (uint *)realhost;\n    do {\n      puVar7 = puVar8;\n      uVar5 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar5 & 0x80808080;\n      puVar8 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar11 = (uVar5 & 0x8080) == 0;\n    if (bVar11) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar11) {\n      puVar8 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar8 + (-(int)realhost - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    pcVar3 = (char *)safemalloc(uVar6,1);\n    *canonicalname = pcVar3;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *pcVar3 = realhost[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *(undefined4 *)pcVar3 = realhost._0_4_;\n      *(undefined4 *)(pcVar3 + (uVar6 - 4)) = *(undefined4 *)(realhost + (uVar6 - 4));\n      iVar4 = (int)pcVar3 - (int)((uint)(pcVar3 + 4) & 0xfffffffc);\n      puVar9 = (undefined4 *)((int)realhost - iVar4);\n      puVar10 = (undefined4 *)((uint)(pcVar3 + 4) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar4 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar10 = *puVar9;\n        puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n        puVar10 = puVar10 + (uint)bVar12 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar3 = gai_strerror(iVar4);\n    pSVar2->error = pcVar3;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return pSVar2;\n}\n\n" comment comment (function_definition "SockAddr sk_namelookup(char *host,char **canonicalname,int address_family)\n\n{\n  int iVar1;\n  SockAddr pSVar2;\n  char *pcVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  uint *puVar7;\n  uint *puVar8;\n  undefined4 *puVar9;\n  undefined4 *puVar10;\n  int in_GS_OFFSET;\n  bool bVar11;\n  byte bVar12;\n  addrinfo hints;\n  char realhost [8192];\n  \n  bVar12 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  pSVar2 = (SockAddr)safemalloc(1,0x210);\n  pSVar2->hostname[0x1fc] = '\0';\n  pSVar2->hostname[0x1fd] = '\0';\n  pSVar2->hostname[0x1fe] = '\0';\n  pSVar2->hostname[0x1ff] = '\0';\n  puVar9 = (undefined4 *)((uint)&pSVar2->error & 0xfffffffc);\n  uVar6 = (uint)((int)pSVar2 + (0x210 - (int)puVar9)) >> 2;\n  for (; uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar9 = 0;\n    puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n  }\n  pSVar2->refcount = 1;\n  pSVar2->superfamily = ADDRTYPE_UNSPEC;\n  pSVar2->error = (char *)0x0;\n  hints.ai_family = 2;\n  realhost._0_4_ = realhost._0_4_ & 0xffffff00;\n  hints.ai_flags = 2;\n  if ((address_family != 1) && (hints.ai_family = 10, address_family != 2)) {\n    hints.ai_family = 0;\n  }\n  hints.ai_socktype = 1;\n  hints.ai_protocol = 0;\n  hints.ai_addrlen = 0;\n  hints.ai_addr = (sockaddr *)0x0;\n  hints.ai_canonname = (char *)0x0;\n  hints.ai_next = (addrinfo *)0x0;\n  pcVar3 = host_strduptrim(host);\n  iVar4 = getaddrinfo(pcVar3,(char *)0x0,(addrinfo *)&hints,(addrinfo **)&pSVar2->ais);\n  safefree(pcVar3);\n  if (iVar4 == 0) {\n    pSVar2->superfamily = ADDRTYPE_IPV6;\n    pcVar3 = pSVar2->ais->ai_canonname;\n    if (pcVar3 == (char *)0x0) {\n      __strncat_chk(realhost,host,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(realhost,pcVar3,0x1fff,0x2000);\n    }\n    realhost[0x1fff] = '\0';\n    puVar8 = (uint *)realhost;\n    do {\n      puVar7 = puVar8;\n      uVar5 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar5 & 0x80808080;\n      puVar8 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar11 = (uVar5 & 0x8080) == 0;\n    if (bVar11) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar11) {\n      puVar8 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar8 + (-(int)realhost - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    pcVar3 = (char *)safemalloc(uVar6,1);\n    *canonicalname = pcVar3;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *pcVar3 = realhost[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *(undefined4 *)pcVar3 = realhost._0_4_;\n      *(undefined4 *)(pcVar3 + (uVar6 - 4)) = *(undefined4 *)(realhost + (uVar6 - 4));\n      iVar4 = (int)pcVar3 - (int)((uint)(pcVar3 + 4) & 0xfffffffc);\n      puVar9 = (undefined4 *)((int)realhost - iVar4);\n      puVar10 = (undefined4 *)((uint)(pcVar3 + 4) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar4 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar10 = *puVar9;\n        puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n        puVar10 = puVar10 + (uint)bVar12 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar3 = gai_strerror(iVar4);\n    pSVar2->error = pcVar3;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return pSVar2;\n}" type_identifier (function_declarator "sk_namelookup(char *host,char **canonicalname,int address_family)" identifier (parameter_list "(char *host,char **canonicalname,int address_family)" ( (parameter_declaration "char *host" primitive_type (pointer_declarator "*host" * identifier)) , (parameter_declaration "char **canonicalname" primitive_type (pointer_declarator "**canonicalname" * (pointer_declarator "*canonicalname" * identifier))) , (parameter_declaration "int address_family" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  SockAddr pSVar2;\n  char *pcVar3;\n  int iVar4;\n  uint uVar5;\n  uint uVar6;\n  uint *puVar7;\n  uint *puVar8;\n  undefined4 *puVar9;\n  undefined4 *puVar10;\n  int in_GS_OFFSET;\n  bool bVar11;\n  byte bVar12;\n  addrinfo hints;\n  char realhost [8192];\n  \n  bVar12 = 0;\n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  pSVar2 = (SockAddr)safemalloc(1,0x210);\n  pSVar2->hostname[0x1fc] = '\0';\n  pSVar2->hostname[0x1fd] = '\0';\n  pSVar2->hostname[0x1fe] = '\0';\n  pSVar2->hostname[0x1ff] = '\0';\n  puVar9 = (undefined4 *)((uint)&pSVar2->error & 0xfffffffc);\n  uVar6 = (uint)((int)pSVar2 + (0x210 - (int)puVar9)) >> 2;\n  for (; uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar9 = 0;\n    puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n  }\n  pSVar2->refcount = 1;\n  pSVar2->superfamily = ADDRTYPE_UNSPEC;\n  pSVar2->error = (char *)0x0;\n  hints.ai_family = 2;\n  realhost._0_4_ = realhost._0_4_ & 0xffffff00;\n  hints.ai_flags = 2;\n  if ((address_family != 1) && (hints.ai_family = 10, address_family != 2)) {\n    hints.ai_family = 0;\n  }\n  hints.ai_socktype = 1;\n  hints.ai_protocol = 0;\n  hints.ai_addrlen = 0;\n  hints.ai_addr = (sockaddr *)0x0;\n  hints.ai_canonname = (char *)0x0;\n  hints.ai_next = (addrinfo *)0x0;\n  pcVar3 = host_strduptrim(host);\n  iVar4 = getaddrinfo(pcVar3,(char *)0x0,(addrinfo *)&hints,(addrinfo **)&pSVar2->ais);\n  safefree(pcVar3);\n  if (iVar4 == 0) {\n    pSVar2->superfamily = ADDRTYPE_IPV6;\n    pcVar3 = pSVar2->ais->ai_canonname;\n    if (pcVar3 == (char *)0x0) {\n      __strncat_chk(realhost,host,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(realhost,pcVar3,0x1fff,0x2000);\n    }\n    realhost[0x1fff] = '\0';\n    puVar8 = (uint *)realhost;\n    do {\n      puVar7 = puVar8;\n      uVar5 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar5 & 0x80808080;\n      puVar8 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar11 = (uVar5 & 0x8080) == 0;\n    if (bVar11) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar11) {\n      puVar8 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar8 + (-(int)realhost - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    pcVar3 = (char *)safemalloc(uVar6,1);\n    *canonicalname = pcVar3;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *pcVar3 = realhost[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *(undefined4 *)pcVar3 = realhost._0_4_;\n      *(undefined4 *)(pcVar3 + (uVar6 - 4)) = *(undefined4 *)(realhost + (uVar6 - 4));\n      iVar4 = (int)pcVar3 - (int)((uint)(pcVar3 + 4) & 0xfffffffc);\n      puVar9 = (undefined4 *)((int)realhost - iVar4);\n      puVar10 = (undefined4 *)((uint)(pcVar3 + 4) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar4 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar10 = *puVar9;\n        puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n        puVar10 = puVar10 + (uint)bVar12 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar3 = gai_strerror(iVar4);\n    pSVar2->error = pcVar3;\n  }\n  if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }\n  return pSVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "SockAddr pSVar2;" type_identifier identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "uint *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "uint *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "undefined4 *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "undefined4 *puVar10;" type_identifier (pointer_declarator "*puVar10" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar11;" primitive_type identifier ;) (declaration "byte bVar12;" type_identifier identifier ;) (declaration "addrinfo hints;" type_identifier identifier ;) (declaration "char realhost [8192];" primitive_type (array_declarator "realhost [8192]" identifier [ number_literal ]) ;) (expression_statement "bVar12 = 0;" (assignment_expression "bVar12 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(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 "pSVar2 = (SockAddr)safemalloc(1,0x210);" (assignment_expression "pSVar2 = (SockAddr)safemalloc(1,0x210)" identifier = (cast_expression "(SockAddr)safemalloc(1,0x210)" ( (type_descriptor "SockAddr" type_identifier) ) (call_expression "safemalloc(1,0x210)" identifier (argument_list "(1,0x210)" ( number_literal , number_literal ))))) ;) (expression_statement "pSVar2->hostname[0x1fc] = '\0';" (assignment_expression "pSVar2->hostname[0x1fc] = '\0'" (subscript_expression "pSVar2->hostname[0x1fc]" (field_expression "pSVar2->hostname" identifier -> field_identifier) [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pSVar2->hostname[0x1fd] = '\0';" (assignment_expression "pSVar2->hostname[0x1fd] = '\0'" (subscript_expression "pSVar2->hostname[0x1fd]" (field_expression "pSVar2->hostname" identifier -> field_identifier) [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pSVar2->hostname[0x1fe] = '\0';" (assignment_expression "pSVar2->hostname[0x1fe] = '\0'" (subscript_expression "pSVar2->hostname[0x1fe]" (field_expression "pSVar2->hostname" identifier -> field_identifier) [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "pSVar2->hostname[0x1ff] = '\0';" (assignment_expression "pSVar2->hostname[0x1ff] = '\0'" (subscript_expression "pSVar2->hostname[0x1ff]" (field_expression "pSVar2->hostname" identifier -> field_identifier) [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar9 = (undefined4 *)((uint)&pSVar2->error & 0xfffffffc);" (assignment_expression "puVar9 = (undefined4 *)((uint)&pSVar2->error & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)&pSVar2->error & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)&pSVar2->error & 0xfffffffc)" ( (binary_expression "(uint)&pSVar2->error & 0xfffffffc" (binary_expression "(uint)&pSVar2->error" (parenthesized_expression "(uint)" ( identifier )) & (field_expression "pSVar2->error" identifier -> field_identifier)) & number_literal) )))) ;) (expression_statement "uVar6 = (uint)((int)pSVar2 + (0x210 - (int)puVar9)) >> 2;" (assignment_expression "uVar6 = (uint)((int)pSVar2 + (0x210 - (int)puVar9)) >> 2" identifier = (binary_expression "(uint)((int)pSVar2 + (0x210 - (int)puVar9)) >> 2" (call_expression "(uint)((int)pSVar2 + (0x210 - (int)puVar9))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)pSVar2 + (0x210 - (int)puVar9))" ( (binary_expression "(int)pSVar2 + (0x210 - (int)puVar9)" (cast_expression "(int)pSVar2" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x210 - (int)puVar9)" ( (binary_expression "0x210 - (int)puVar9" number_literal - (cast_expression "(int)puVar9" ( (type_descriptor "int" primitive_type) ) identifier)) ))) ))) >> number_literal)) ;) (for_statement "for (; uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar9 = 0;\n    puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n  }" for ( ; (binary_expression "uVar6 != 0" identifier != number_literal) ; (assignment_expression "uVar6 = uVar6 - 1" identifier = (binary_expression "uVar6 - 1" identifier - number_literal)) ) (compound_statement "{\n    *puVar9 = 0;\n    puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n  }" { (expression_statement "*puVar9 = 0;" (assignment_expression "*puVar9 = 0" (pointer_expression "*puVar9" * identifier) = number_literal) ;) (expression_statement "puVar9 = puVar9 + (uint)bVar12 * -2 + 1;" (assignment_expression "puVar9 = puVar9 + (uint)bVar12 * -2 + 1" identifier = (binary_expression "puVar9 + (uint)bVar12 * -2 + 1" (binary_expression "puVar9 + (uint)bVar12 * -2" identifier + (binary_expression "(uint)bVar12 * -2" (cast_expression "(uint)bVar12" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "pSVar2->refcount = 1;" (assignment_expression "pSVar2->refcount = 1" (field_expression "pSVar2->refcount" identifier -> field_identifier) = number_literal) ;) (expression_statement "pSVar2->superfamily = ADDRTYPE_UNSPEC;" (assignment_expression "pSVar2->superfamily = ADDRTYPE_UNSPEC" (field_expression "pSVar2->superfamily" identifier -> field_identifier) = identifier) ;) (expression_statement "pSVar2->error = (char *)0x0;" (assignment_expression "pSVar2->error = (char *)0x0" (field_expression "pSVar2->error" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "hints.ai_family = 2;" (assignment_expression "hints.ai_family = 2" (field_expression "hints.ai_family" identifier . field_identifier) = number_literal) ;) (expression_statement "realhost._0_4_ = realhost._0_4_ & 0xffffff00;" (assignment_expression "realhost._0_4_ = realhost._0_4_ & 0xffffff00" (field_expression "realhost._0_4_" identifier . field_identifier) = (binary_expression "realhost._0_4_ & 0xffffff00" (field_expression "realhost._0_4_" identifier . field_identifier) & number_literal)) ;) (expression_statement "hints.ai_flags = 2;" (assignment_expression "hints.ai_flags = 2" (field_expression "hints.ai_flags" identifier . field_identifier) = number_literal) ;) (if_statement "if ((address_family != 1) && (hints.ai_family = 10, address_family != 2)) {\n    hints.ai_family = 0;\n  }" if (parenthesized_expression "((address_family != 1) && (hints.ai_family = 10, address_family != 2))" ( (binary_expression "(address_family != 1) && (hints.ai_family = 10, address_family != 2)" (parenthesized_expression "(address_family != 1)" ( (binary_expression "address_family != 1" identifier != number_literal) )) && (parenthesized_expression "(hints.ai_family = 10, address_family != 2)" ( (comma_expression "hints.ai_family = 10, address_family != 2" (assignment_expression "hints.ai_family = 10" (field_expression "hints.ai_family" identifier . field_identifier) = number_literal) , (binary_expression "address_family != 2" identifier != number_literal)) ))) )) (compound_statement "{\n    hints.ai_family = 0;\n  }" { (expression_statement "hints.ai_family = 0;" (assignment_expression "hints.ai_family = 0" (field_expression "hints.ai_family" identifier . field_identifier) = number_literal) ;) })) (expression_statement "hints.ai_socktype = 1;" (assignment_expression "hints.ai_socktype = 1" (field_expression "hints.ai_socktype" identifier . field_identifier) = number_literal) ;) (expression_statement "hints.ai_protocol = 0;" (assignment_expression "hints.ai_protocol = 0" (field_expression "hints.ai_protocol" identifier . field_identifier) = number_literal) ;) (expression_statement "hints.ai_addrlen = 0;" (assignment_expression "hints.ai_addrlen = 0" (field_expression "hints.ai_addrlen" identifier . field_identifier) = number_literal) ;) (expression_statement "hints.ai_addr = (sockaddr *)0x0;" (assignment_expression "hints.ai_addr = (sockaddr *)0x0" (field_expression "hints.ai_addr" identifier . field_identifier) = (cast_expression "(sockaddr *)0x0" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "hints.ai_canonname = (char *)0x0;" (assignment_expression "hints.ai_canonname = (char *)0x0" (field_expression "hints.ai_canonname" identifier . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "hints.ai_next = (addrinfo *)0x0;" (assignment_expression "hints.ai_next = (addrinfo *)0x0" (field_expression "hints.ai_next" identifier . field_identifier) = (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pcVar3 = host_strduptrim(host);" (assignment_expression "pcVar3 = host_strduptrim(host)" identifier = (call_expression "host_strduptrim(host)" identifier (argument_list "(host)" ( identifier )))) ;) (expression_statement "iVar4 = getaddrinfo(pcVar3,(char *)0x0,(addrinfo *)&hints,(addrinfo **)&pSVar2->ais);" (assignment_expression "iVar4 = getaddrinfo(pcVar3,(char *)0x0,(addrinfo *)&hints,(addrinfo **)&pSVar2->ais)" identifier = (call_expression "getaddrinfo(pcVar3,(char *)0x0,(addrinfo *)&hints,(addrinfo **)&pSVar2->ais)" identifier (argument_list "(pcVar3,(char *)0x0,(addrinfo *)&hints,(addrinfo **)&pSVar2->ais)" ( identifier , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (cast_expression "(addrinfo *)&hints" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&hints" & identifier)) , (cast_expression "(addrinfo **)&pSVar2->ais" ( (type_descriptor "addrinfo **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (pointer_expression "&pSVar2->ais" & (field_expression "pSVar2->ais" identifier -> field_identifier))) )))) ;) (expression_statement "safefree(pcVar3);" (call_expression "safefree(pcVar3)" identifier (argument_list "(pcVar3)" ( identifier ))) ;) (if_statement "if (iVar4 == 0) {\n    pSVar2->superfamily = ADDRTYPE_IPV6;\n    pcVar3 = pSVar2->ais->ai_canonname;\n    if (pcVar3 == (char *)0x0) {\n      __strncat_chk(realhost,host,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(realhost,pcVar3,0x1fff,0x2000);\n    }\n    realhost[0x1fff] = '\0';\n    puVar8 = (uint *)realhost;\n    do {\n      puVar7 = puVar8;\n      uVar5 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar5 & 0x80808080;\n      puVar8 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar11 = (uVar5 & 0x8080) == 0;\n    if (bVar11) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar11) {\n      puVar8 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar8 + (-(int)realhost - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    pcVar3 = (char *)safemalloc(uVar6,1);\n    *canonicalname = pcVar3;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *pcVar3 = realhost[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *(undefined4 *)pcVar3 = realhost._0_4_;\n      *(undefined4 *)(pcVar3 + (uVar6 - 4)) = *(undefined4 *)(realhost + (uVar6 - 4));\n      iVar4 = (int)pcVar3 - (int)((uint)(pcVar3 + 4) & 0xfffffffc);\n      puVar9 = (undefined4 *)((int)realhost - iVar4);\n      puVar10 = (undefined4 *)((uint)(pcVar3 + 4) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar4 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar10 = *puVar9;\n        puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n        puVar10 = puVar10 + (uint)bVar12 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar3 = gai_strerror(iVar4);\n    pSVar2->error = pcVar3;\n  }" if (parenthesized_expression "(iVar4 == 0)" ( (binary_expression "iVar4 == 0" identifier == number_literal) )) (compound_statement "{\n    pSVar2->superfamily = ADDRTYPE_IPV6;\n    pcVar3 = pSVar2->ais->ai_canonname;\n    if (pcVar3 == (char *)0x0) {\n      __strncat_chk(realhost,host,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(realhost,pcVar3,0x1fff,0x2000);\n    }\n    realhost[0x1fff] = '\0';\n    puVar8 = (uint *)realhost;\n    do {\n      puVar7 = puVar8;\n      uVar5 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar5 & 0x80808080;\n      puVar8 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar11 = (uVar5 & 0x8080) == 0;\n    if (bVar11) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar11) {\n      puVar8 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar8 + (-(int)realhost - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    pcVar3 = (char *)safemalloc(uVar6,1);\n    *canonicalname = pcVar3;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *pcVar3 = realhost[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *(undefined4 *)pcVar3 = realhost._0_4_;\n      *(undefined4 *)(pcVar3 + (uVar6 - 4)) = *(undefined4 *)(realhost + (uVar6 - 4));\n      iVar4 = (int)pcVar3 - (int)((uint)(pcVar3 + 4) & 0xfffffffc);\n      puVar9 = (undefined4 *)((int)realhost - iVar4);\n      puVar10 = (undefined4 *)((uint)(pcVar3 + 4) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar4 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar10 = *puVar9;\n        puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n        puVar10 = puVar10 + (uint)bVar12 * -2 + 1;\n      }\n    }\n  }" { (expression_statement "pSVar2->superfamily = ADDRTYPE_IPV6;" (assignment_expression "pSVar2->superfamily = ADDRTYPE_IPV6" (field_expression "pSVar2->superfamily" identifier -> field_identifier) = identifier) ;) (expression_statement "pcVar3 = pSVar2->ais->ai_canonname;" (assignment_expression "pcVar3 = pSVar2->ais->ai_canonname" identifier = (field_expression "pSVar2->ais->ai_canonname" (field_expression "pSVar2->ais" identifier -> field_identifier) -> field_identifier)) ;) (if_statement "if (pcVar3 == (char *)0x0) {\n      __strncat_chk(realhost,host,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(realhost,pcVar3,0x1fff,0x2000);\n    }" if (parenthesized_expression "(pcVar3 == (char *)0x0)" ( (binary_expression "pcVar3 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      __strncat_chk(realhost,host,0x1fff,0x2000);\n    }" { (expression_statement "__strncat_chk(realhost,host,0x1fff,0x2000);" (call_expression "__strncat_chk(realhost,host,0x1fff,0x2000)" identifier (argument_list "(realhost,host,0x1fff,0x2000)" ( identifier , identifier , number_literal , number_literal ))) ;) }) (else_clause "else {\n      __strncat_chk(realhost,pcVar3,0x1fff,0x2000);\n    }" else (compound_statement "{\n      __strncat_chk(realhost,pcVar3,0x1fff,0x2000);\n    }" { (expression_statement "__strncat_chk(realhost,pcVar3,0x1fff,0x2000);" (call_expression "__strncat_chk(realhost,pcVar3,0x1fff,0x2000)" identifier (argument_list "(realhost,pcVar3,0x1fff,0x2000)" ( identifier , identifier , number_literal , number_literal ))) ;) }))) (expression_statement "realhost[0x1fff] = '\0';" (assignment_expression "realhost[0x1fff] = '\0'" (subscript_expression "realhost[0x1fff]" identifier [ number_literal ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "puVar8 = (uint *)realhost;" (assignment_expression "puVar8 = (uint *)realhost" identifier = (cast_expression "(uint *)realhost" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (do_statement "do {\n      puVar7 = puVar8;\n      uVar5 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar5 & 0x80808080;\n      puVar8 = puVar7 + 1;\n    } while (uVar6 == 0);" do (compound_statement "{\n      puVar7 = puVar8;\n      uVar5 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar5 & 0x80808080;\n      puVar8 = puVar7 + 1;\n    }" { (expression_statement "puVar7 = puVar8;" (assignment_expression "puVar7 = puVar8" identifier = identifier) ;) (expression_statement "uVar5 = *puVar7 + 0xfefefeff & ~*puVar7;" (assignment_expression "uVar5 = *puVar7 + 0xfefefeff & ~*puVar7" identifier = (binary_expression "*puVar7 + 0xfefefeff & ~*puVar7" (binary_expression "*puVar7 + 0xfefefeff" (pointer_expression "*puVar7" * identifier) + number_literal) & (unary_expression "~*puVar7" ~ (pointer_expression "*puVar7" * identifier)))) ;) (expression_statement "uVar6 = uVar5 & 0x80808080;" (assignment_expression "uVar6 = uVar5 & 0x80808080" identifier = (binary_expression "uVar5 & 0x80808080" identifier & number_literal)) ;) (expression_statement "puVar8 = puVar7 + 1;" (assignment_expression "puVar8 = puVar7 + 1" identifier = (binary_expression "puVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar6 == 0)" ( (binary_expression "uVar6 == 0" identifier == number_literal) )) ;) (expression_statement "bVar11 = (uVar5 & 0x8080) == 0;" (assignment_expression "bVar11 = (uVar5 & 0x8080) == 0" identifier = (binary_expression "(uVar5 & 0x8080) == 0" (parenthesized_expression "(uVar5 & 0x8080)" ( (binary_expression "uVar5 & 0x8080" identifier & number_literal) )) == number_literal)) ;) (if_statement "if (bVar11) {\n      uVar6 = uVar6 >> 0x10;\n    }" if (parenthesized_expression "(bVar11)" ( identifier )) (compound_statement "{\n      uVar6 = uVar6 >> 0x10;\n    }" { (expression_statement "uVar6 = uVar6 >> 0x10;" (assignment_expression "uVar6 = uVar6 >> 0x10" identifier = (binary_expression "uVar6 >> 0x10" identifier >> number_literal)) ;) })) (if_statement "if (bVar11) {\n      puVar8 = (uint *)((int)puVar7 + 6);\n    }" if (parenthesized_expression "(bVar11)" ( identifier )) (compound_statement "{\n      puVar8 = (uint *)((int)puVar7 + 6);\n    }" { (expression_statement "puVar8 = (uint *)((int)puVar7 + 6);" (assignment_expression "puVar8 = (uint *)((int)puVar7 + 6)" identifier = (cast_expression "(uint *)((int)puVar7 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar7 + 6)" ( (binary_expression "(int)puVar7 + 6" (cast_expression "(int)puVar7" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) })) (expression_statement "uVar6 = (int)puVar8 + (-(int)realhost - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;" (assignment_expression "uVar6 = (int)puVar8 + (-(int)realhost - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2" identifier = (binary_expression "(int)puVar8 + (-(int)realhost - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2" (binary_expression "(int)puVar8 + (-(int)realhost - (uint)CARRY1((byte)uVar6,(byte)uVar6))" (cast_expression "(int)puVar8" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(-(int)realhost - (uint)CARRY1((byte)uVar6,(byte)uVar6))" ( (binary_expression "-(int)realhost - (uint)CARRY1((byte)uVar6,(byte)uVar6)" (unary_expression "-(int)realhost" - (cast_expression "(int)realhost" ( (type_descriptor "int" primitive_type) ) identifier)) - (cast_expression "(uint)CARRY1((byte)uVar6,(byte)uVar6)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY1((byte)uVar6,(byte)uVar6)" identifier (argument_list "((byte)uVar6,(byte)uVar6)" ( (cast_expression "(byte)uVar6" ( (type_descriptor "byte" type_identifier) ) identifier) , (cast_expression "(byte)uVar6" ( (type_descriptor "byte" type_identifier) ) identifier) ))))) ))) + number_literal)) ;) (expression_statement "pcVar3 = (char *)safemalloc(uVar6,1);" (assignment_expression "pcVar3 = (char *)safemalloc(uVar6,1)" identifier = (cast_expression "(char *)safemalloc(uVar6,1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(uVar6,1)" identifier (argument_list "(uVar6,1)" ( identifier , number_literal ))))) ;) (expression_statement "*canonicalname = pcVar3;" (assignment_expression "*canonicalname = pcVar3" (pointer_expression "*canonicalname" * identifier) = identifier) ;) (if_statement "if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *pcVar3 = realhost[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *(undefined4 *)pcVar3 = realhost._0_4_;\n      *(undefined4 *)(pcVar3 + (uVar6 - 4)) = *(undefined4 *)(realhost + (uVar6 - 4));\n      iVar4 = (int)pcVar3 - (int)((uint)(pcVar3 + 4) & 0xfffffffc);\n      puVar9 = (undefined4 *)((int)realhost - iVar4);\n      puVar10 = (undefined4 *)((uint)(pcVar3 + 4) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar4 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar10 = *puVar9;\n        puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n        puVar10 = puVar10 + (uint)bVar12 * -2 + 1;\n      }\n    }" if (parenthesized_expression "(uVar6 < 4)" ( (binary_expression "uVar6 < 4" identifier < number_literal) )) (compound_statement "{\n      if (uVar6 != 0) {\n        *pcVar3 = realhost[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));\n        }\n      }\n    }" { (if_statement "if (uVar6 != 0) {\n        *pcVar3 = realhost[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));\n        }\n      }" if (parenthesized_expression "(uVar6 != 0)" ( (binary_expression "uVar6 != 0" identifier != number_literal) )) (compound_statement "{\n        *pcVar3 = realhost[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));\n        }\n      }" { (expression_statement "*pcVar3 = realhost[0];" (assignment_expression "*pcVar3 = realhost[0]" (pointer_expression "*pcVar3" * identifier) = (subscript_expression "realhost[0]" identifier [ number_literal ])) ;) (if_statement "if ((uVar6 & 2) != 0) {\n          *(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));\n        }" if (parenthesized_expression "((uVar6 & 2) != 0)" ( (binary_expression "(uVar6 & 2) != 0" (parenthesized_expression "(uVar6 & 2)" ( (binary_expression "uVar6 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n          *(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));\n        }" { (expression_statement "*(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2));" (assignment_expression "*(undefined2 *)(pcVar3 + (uVar6 - 2)) = *(undefined2 *)(realhost + (uVar6 - 2))" (pointer_expression "*(undefined2 *)(pcVar3 + (uVar6 - 2))" * (cast_expression "(undefined2 *)(pcVar3 + (uVar6 - 2))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar3 + (uVar6 - 2))" ( (binary_expression "pcVar3 + (uVar6 - 2)" identifier + (parenthesized_expression "(uVar6 - 2)" ( (binary_expression "uVar6 - 2" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined2 *)(realhost + (uVar6 - 2))" * (cast_expression "(undefined2 *)(realhost + (uVar6 - 2))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(realhost + (uVar6 - 2))" ( (binary_expression "realhost + (uVar6 - 2)" identifier + (parenthesized_expression "(uVar6 - 2)" ( (binary_expression "uVar6 - 2" identifier - number_literal) ))) ))))) ;) })) })) }) (else_clause "else {\n      *(undefined4 *)pcVar3 = realhost._0_4_;\n      *(undefined4 *)(pcVar3 + (uVar6 - 4)) = *(undefined4 *)(realhost + (uVar6 - 4));\n      iVar4 = (int)pcVar3 - (int)((uint)(pcVar3 + 4) & 0xfffffffc);\n      puVar9 = (undefined4 *)((int)realhost - iVar4);\n      puVar10 = (undefined4 *)((uint)(pcVar3 + 4) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar4 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar10 = *puVar9;\n        puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n        puVar10 = puVar10 + (uint)bVar12 * -2 + 1;\n      }\n    }" else (compound_statement "{\n      *(undefined4 *)pcVar3 = realhost._0_4_;\n      *(undefined4 *)(pcVar3 + (uVar6 - 4)) = *(undefined4 *)(realhost + (uVar6 - 4));\n      iVar4 = (int)pcVar3 - (int)((uint)(pcVar3 + 4) & 0xfffffffc);\n      puVar9 = (undefined4 *)((int)realhost - iVar4);\n      puVar10 = (undefined4 *)((uint)(pcVar3 + 4) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar4 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar10 = *puVar9;\n        puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n        puVar10 = puVar10 + (uint)bVar12 * -2 + 1;\n      }\n    }" { (expression_statement "*(undefined4 *)pcVar3 = realhost._0_4_;" (assignment_expression "*(undefined4 *)pcVar3 = realhost._0_4_" (pointer_expression "*(undefined4 *)pcVar3" * (cast_expression "(undefined4 *)pcVar3" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (field_expression "realhost._0_4_" identifier . field_identifier)) ;) (expression_statement "*(undefined4 *)(pcVar3 + (uVar6 - 4)) = *(undefined4 *)(realhost + (uVar6 - 4));" (assignment_expression "*(undefined4 *)(pcVar3 + (uVar6 - 4)) = *(undefined4 *)(realhost + (uVar6 - 4))" (pointer_expression "*(undefined4 *)(pcVar3 + (uVar6 - 4))" * (cast_expression "(undefined4 *)(pcVar3 + (uVar6 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pcVar3 + (uVar6 - 4))" ( (binary_expression "pcVar3 + (uVar6 - 4)" identifier + (parenthesized_expression "(uVar6 - 4)" ( (binary_expression "uVar6 - 4" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined4 *)(realhost + (uVar6 - 4))" * (cast_expression "(undefined4 *)(realhost + (uVar6 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(realhost + (uVar6 - 4))" ( (binary_expression "realhost + (uVar6 - 4)" identifier + (parenthesized_expression "(uVar6 - 4)" ( (binary_expression "uVar6 - 4" identifier - number_literal) ))) ))))) ;) (expression_statement "iVar4 = (int)pcVar3 - (int)((uint)(pcVar3 + 4) & 0xfffffffc);" (assignment_expression "iVar4 = (int)pcVar3 - (int)((uint)(pcVar3 + 4) & 0xfffffffc)" identifier = (binary_expression "(int)pcVar3 - (int)((uint)(pcVar3 + 4) & 0xfffffffc)" (cast_expression "(int)pcVar3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)((uint)(pcVar3 + 4) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(pcVar3 + 4) & 0xfffffffc)" ( (binary_expression "(uint)(pcVar3 + 4) & 0xfffffffc" (call_expression "(uint)(pcVar3 + 4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pcVar3 + 4)" ( (binary_expression "pcVar3 + 4" identifier + number_literal) ))) & number_literal) ))))) ;) (expression_statement "puVar9 = (undefined4 *)((int)realhost - iVar4);" (assignment_expression "puVar9 = (undefined4 *)((int)realhost - iVar4)" identifier = (cast_expression "(undefined4 *)((int)realhost - iVar4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)realhost - iVar4)" ( (binary_expression "(int)realhost - iVar4" (cast_expression "(int)realhost" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) )))) ;) (expression_statement "puVar10 = (undefined4 *)((uint)(pcVar3 + 4) & 0xfffffffc);" (assignment_expression "puVar10 = (undefined4 *)((uint)(pcVar3 + 4) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(pcVar3 + 4) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(pcVar3 + 4) & 0xfffffffc)" ( (binary_expression "(uint)(pcVar3 + 4) & 0xfffffffc" (call_expression "(uint)(pcVar3 + 4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pcVar3 + 4)" ( (binary_expression "pcVar3 + 4" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar6 = uVar6 + iVar4 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar10 = *puVar9;\n        puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n        puVar10 = puVar10 + (uint)bVar12 * -2 + 1;\n      }" for ( (assignment_expression "uVar6 = uVar6 + iVar4 >> 2" identifier = (binary_expression "uVar6 + iVar4 >> 2" (binary_expression "uVar6 + iVar4" identifier + identifier) >> number_literal)) ; (binary_expression "uVar6 != 0" identifier != number_literal) ; (assignment_expression "uVar6 = uVar6 - 1" identifier = (binary_expression "uVar6 - 1" identifier - number_literal)) ) (compound_statement "{\n        *puVar10 = *puVar9;\n        puVar9 = puVar9 + (uint)bVar12 * -2 + 1;\n        puVar10 = puVar10 + (uint)bVar12 * -2 + 1;\n      }" { (expression_statement "*puVar10 = *puVar9;" (assignment_expression "*puVar10 = *puVar9" (pointer_expression "*puVar10" * identifier) = (pointer_expression "*puVar9" * identifier)) ;) (expression_statement "puVar9 = puVar9 + (uint)bVar12 * -2 + 1;" (assignment_expression "puVar9 = puVar9 + (uint)bVar12 * -2 + 1" identifier = (binary_expression "puVar9 + (uint)bVar12 * -2 + 1" (binary_expression "puVar9 + (uint)bVar12 * -2" identifier + (binary_expression "(uint)bVar12 * -2" (cast_expression "(uint)bVar12" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "puVar10 = puVar10 + (uint)bVar12 * -2 + 1;" (assignment_expression "puVar10 = puVar10 + (uint)bVar12 * -2 + 1" identifier = (binary_expression "puVar10 + (uint)bVar12 * -2 + 1" (binary_expression "puVar10 + (uint)bVar12 * -2" identifier + (binary_expression "(uint)bVar12 * -2" (cast_expression "(uint)bVar12" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) }))) }) (else_clause "else {\n    pcVar3 = gai_strerror(iVar4);\n    pSVar2->error = pcVar3;\n  }" else (compound_statement "{\n    pcVar3 = gai_strerror(iVar4);\n    pSVar2->error = pcVar3;\n  }" { (expression_statement "pcVar3 = gai_strerror(iVar4);" (assignment_expression "pcVar3 = gai_strerror(iVar4)" identifier = (call_expression "gai_strerror(iVar4)" identifier (argument_list "(iVar4)" ( identifier )))) ;) (expression_statement "pSVar2->error = pcVar3;" (assignment_expression "pSVar2->error = pcVar3" (field_expression "pSVar2->error" identifier -> field_identifier) = identifier) ;) }))) (if_statement "if (iVar1 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail_local();\n  }" if (parenthesized_expression "(iVar1 != *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 != *(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 pSVar2;" return identifier ;) })))
(translation_unit "undefined4 * FUN_00070390(undefined4 param_1,int *param_2,int param_3)\n\n{\n  undefined4 *puVar1;\n  char *pcVar2;\n  int iVar3;\n  uint uVar4;\n  uint *puVar5;\n  uint uVar6;\n  uint *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  int in_GS_OFFSET;\n  bool bVar10;\n  byte bVar11;\n  addrinfo local_2040;\n  uint local_2020 [2047];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar11 = 0;\n  uStack_14 = 0x7039b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)FUN_000313e0(1,0x210);\n  puVar1[0x83] = 0;\n  puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n  for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n      uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }\n  *puVar1 = 1;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  local_2040.ai_family = 2;\n  local_2020[0] = local_2020[0] & 0xffffff00;\n  local_2040.ai_flags = 2;\n  if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {\n    local_2040.ai_family = 0;\n  }\n  local_2040.ai_socktype = 1;\n  local_2040.ai_protocol = 0;\n  local_2040.ai_addrlen = 0;\n  local_2040.ai_addr = (sockaddr *)0x0;\n  local_2040.ai_canonname = (char *)0x0;\n  local_2040.ai_next = (addrinfo *)0x0;\n  pcVar2 = (char *)FUN_00030740(param_1);\n  iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));\n  FUN_00031580(pcVar2);\n  if (iVar3 == 0) {\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00077880();\n  }\n  return puVar1;\n}\n\n" (function_definition "undefined4 * FUN_00070390(undefined4 param_1,int *param_2,int param_3)\n\n{\n  undefined4 *puVar1;\n  char *pcVar2;\n  int iVar3;\n  uint uVar4;\n  uint *puVar5;\n  uint uVar6;\n  uint *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  int in_GS_OFFSET;\n  bool bVar10;\n  byte bVar11;\n  addrinfo local_2040;\n  uint local_2020 [2047];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar11 = 0;\n  uStack_14 = 0x7039b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)FUN_000313e0(1,0x210);\n  puVar1[0x83] = 0;\n  puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n  for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n      uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }\n  *puVar1 = 1;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  local_2040.ai_family = 2;\n  local_2020[0] = local_2020[0] & 0xffffff00;\n  local_2040.ai_flags = 2;\n  if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {\n    local_2040.ai_family = 0;\n  }\n  local_2040.ai_socktype = 1;\n  local_2040.ai_protocol = 0;\n  local_2040.ai_addrlen = 0;\n  local_2040.ai_addr = (sockaddr *)0x0;\n  local_2040.ai_canonname = (char *)0x0;\n  local_2040.ai_next = (addrinfo *)0x0;\n  pcVar2 = (char *)FUN_00030740(param_1);\n  iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));\n  FUN_00031580(pcVar2);\n  if (iVar3 == 0) {\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00077880();\n  }\n  return puVar1;\n}" type_identifier (pointer_declarator "* FUN_00070390(undefined4 param_1,int *param_2,int param_3)" * (function_declarator "FUN_00070390(undefined4 param_1,int *param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,int *param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) )))) (compound_statement "{\n  undefined4 *puVar1;\n  char *pcVar2;\n  int iVar3;\n  uint uVar4;\n  uint *puVar5;\n  uint uVar6;\n  uint *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  int in_GS_OFFSET;\n  bool bVar10;\n  byte bVar11;\n  addrinfo local_2040;\n  uint local_2020 [2047];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar11 = 0;\n  uStack_14 = 0x7039b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)FUN_000313e0(1,0x210);\n  puVar1[0x83] = 0;\n  puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n  for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n      uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }\n  *puVar1 = 1;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  local_2040.ai_family = 2;\n  local_2020[0] = local_2020[0] & 0xffffff00;\n  local_2040.ai_flags = 2;\n  if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {\n    local_2040.ai_family = 0;\n  }\n  local_2040.ai_socktype = 1;\n  local_2040.ai_protocol = 0;\n  local_2040.ai_addrlen = 0;\n  local_2040.ai_addr = (sockaddr *)0x0;\n  local_2040.ai_canonname = (char *)0x0;\n  local_2040.ai_next = (addrinfo *)0x0;\n  pcVar2 = (char *)FUN_00030740(param_1);\n  iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));\n  FUN_00031580(pcVar2);\n  if (iVar3 == 0) {\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00077880();\n  }\n  return puVar1;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "uint *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "uint *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "undefined4 *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "undefined4 *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "bool bVar10;" primitive_type identifier ;) (declaration "byte bVar11;" type_identifier identifier ;) (declaration "addrinfo local_2040;" type_identifier identifier ;) (declaration "uint local_2020 [2047];" type_identifier (array_declarator "local_2020 [2047]" identifier [ number_literal ]) ;) (declaration "undefined1 local_21;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "bVar11 = 0;" (assignment_expression "bVar11 = 0" identifier = number_literal) ;) (expression_statement "uStack_14 = 0x7039b;" (assignment_expression "uStack_14 = 0x7039b" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "puVar1 = (undefined4 *)FUN_000313e0(1,0x210);" (assignment_expression "puVar1 = (undefined4 *)FUN_000313e0(1,0x210)" identifier = (cast_expression "(undefined4 *)FUN_000313e0(1,0x210)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000313e0(1,0x210)" identifier (argument_list "(1,0x210)" ( number_literal , number_literal ))))) ;) (expression_statement "puVar1[0x83] = 0;" (assignment_expression "puVar1[0x83] = 0" (subscript_expression "puVar1[0x83]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);" (assignment_expression "puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n      uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }" for ( (assignment_expression "uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2" identifier = (binary_expression "(uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc)))" ( (binary_expression "(int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))" (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))" ( (binary_expression "0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc)" number_literal - (cast_expression "(int)((uint)(puVar1 + 1) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) ))) & number_literal) )))) ))) ))) >> number_literal)) ; (binary_expression "uVar6 != 0" identifier != number_literal) ; (assignment_expression "uVar6 = uVar6 - 1" identifier = (binary_expression "uVar6 - 1" identifier - number_literal)) ) (compound_statement "{\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }" { (expression_statement "*puVar8 = 0;" (assignment_expression "*puVar8 = 0" (pointer_expression "*puVar8" * identifier) = number_literal) ;) (expression_statement "puVar8 = puVar8 + (uint)bVar11 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar11 * -2 + 1" identifier = (binary_expression "puVar8 + (uint)bVar11 * -2 + 1" (binary_expression "puVar8 + (uint)bVar11 * -2" identifier + (binary_expression "(uint)bVar11 * -2" (cast_expression "(uint)bVar11" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) (expression_statement "*puVar1 = 1;" (assignment_expression "*puVar1 = 1" (pointer_expression "*puVar1" * identifier) = number_literal) ;) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "local_2040.ai_family = 2;" (assignment_expression "local_2040.ai_family = 2" (field_expression "local_2040.ai_family" identifier . field_identifier) = number_literal) ;) (expression_statement "local_2020[0] = local_2020[0] & 0xffffff00;" (assignment_expression "local_2020[0] = local_2020[0] & 0xffffff00" (subscript_expression "local_2020[0]" identifier [ number_literal ]) = (binary_expression "local_2020[0] & 0xffffff00" (subscript_expression "local_2020[0]" identifier [ number_literal ]) & number_literal)) ;) (expression_statement "local_2040.ai_flags = 2;" (assignment_expression "local_2040.ai_flags = 2" (field_expression "local_2040.ai_flags" identifier . field_identifier) = number_literal) ;) (if_statement "if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {\n    local_2040.ai_family = 0;\n  }" if (parenthesized_expression "((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2))" ( (binary_expression "(param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)" (parenthesized_expression "(param_3 != 1)" ( (binary_expression "param_3 != 1" identifier != number_literal) )) && (parenthesized_expression "(local_2040.ai_family = 10, param_3 != 2)" ( (comma_expression "local_2040.ai_family = 10, param_3 != 2" (assignment_expression "local_2040.ai_family = 10" (field_expression "local_2040.ai_family" identifier . field_identifier) = number_literal) , (binary_expression "param_3 != 2" identifier != number_literal)) ))) )) (compound_statement "{\n    local_2040.ai_family = 0;\n  }" { (expression_statement "local_2040.ai_family = 0;" (assignment_expression "local_2040.ai_family = 0" (field_expression "local_2040.ai_family" identifier . field_identifier) = number_literal) ;) })) (expression_statement "local_2040.ai_socktype = 1;" (assignment_expression "local_2040.ai_socktype = 1" (field_expression "local_2040.ai_socktype" identifier . field_identifier) = number_literal) ;) (expression_statement "local_2040.ai_protocol = 0;" (assignment_expression "local_2040.ai_protocol = 0" (field_expression "local_2040.ai_protocol" identifier . field_identifier) = number_literal) ;) (expression_statement "local_2040.ai_addrlen = 0;" (assignment_expression "local_2040.ai_addrlen = 0" (field_expression "local_2040.ai_addrlen" identifier . field_identifier) = number_literal) ;) (expression_statement "local_2040.ai_addr = (sockaddr *)0x0;" (assignment_expression "local_2040.ai_addr = (sockaddr *)0x0" (field_expression "local_2040.ai_addr" identifier . field_identifier) = (cast_expression "(sockaddr *)0x0" ( (type_descriptor "sockaddr *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_2040.ai_canonname = (char *)0x0;" (assignment_expression "local_2040.ai_canonname = (char *)0x0" (field_expression "local_2040.ai_canonname" identifier . field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_2040.ai_next = (addrinfo *)0x0;" (assignment_expression "local_2040.ai_next = (addrinfo *)0x0" (field_expression "local_2040.ai_next" identifier . field_identifier) = (cast_expression "(addrinfo *)0x0" ( (type_descriptor "addrinfo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "pcVar2 = (char *)FUN_00030740(param_1);" (assignment_expression "pcVar2 = (char *)FUN_00030740(param_1)" identifier = (cast_expression "(char *)FUN_00030740(param_1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00030740(param_1)" identifier (argument_list "(param_1)" ( identifier ))))) ;) (expression_statement "iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));" (assignment_expression "iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3))" identifier = (call_expression "getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3))" identifier (argument_list "(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3))" ( identifier , (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , (pointer_expression "&local_2040" & identifier) , (cast_expression "(addrinfo **)(puVar1 + 3)" ( (type_descriptor "addrinfo **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + 3)" ( (binary_expression "puVar1 + 3" identifier + number_literal) ))) )))) ;) (expression_statement "FUN_00031580(pcVar2);" (call_expression "FUN_00031580(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) (if_statement "if (iVar3 == 0) {\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }" { (expression_statement "puVar1[2] = 2;" (assignment_expression "puVar1[2] = 2" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }" if (parenthesized_expression "(*(int *)(puVar1[3] + 0x18) == 0)" ( (binary_expression "*(int *)(puVar1[3] + 0x18) == 0" (pointer_expression "*(int *)(puVar1[3] + 0x18)" * (cast_expression "(int *)(puVar1[3] + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[3] + 0x18)" ( (binary_expression "puVar1[3] + 0x18" (subscript_expression "puVar1[3]" identifier [ number_literal ]) + number_literal) )))) == number_literal) )) (compound_statement "{\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }" { (expression_statement "__strncat_chk(local_2020,param_1,0x1fff,0x2000);" (call_expression "__strncat_chk(local_2020,param_1,0x1fff,0x2000)" identifier (argument_list "(local_2020,param_1,0x1fff,0x2000)" ( identifier , identifier , number_literal , number_literal ))) ;) }) (else_clause "else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }" else (compound_statement "{\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }" { (expression_statement "__strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);" (call_expression "__strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000)" identifier (argument_list "(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000)" ( identifier , (pointer_expression "*(int *)(puVar1[3] + 0x18)" * (cast_expression "(int *)(puVar1[3] + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1[3] + 0x18)" ( (binary_expression "puVar1[3] + 0x18" (subscript_expression "puVar1[3]" identifier [ number_literal ]) + number_literal) )))) , number_literal , number_literal ))) ;) }))) (expression_statement "local_21 = 0;" (assignment_expression "local_21 = 0" identifier = number_literal) ;) (expression_statement "puVar5 = local_2020;" (assignment_expression "puVar5 = local_2020" identifier = identifier) ;) (do_statement "do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);" do (compound_statement "{\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    }" { (expression_statement "puVar7 = puVar5;" (assignment_expression "puVar7 = puVar5" identifier = identifier) ;) (expression_statement "uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;" (assignment_expression "uVar4 = *puVar7 + 0xfefefeff & ~*puVar7" identifier = (binary_expression "*puVar7 + 0xfefefeff & ~*puVar7" (binary_expression "*puVar7 + 0xfefefeff" (pointer_expression "*puVar7" * identifier) + number_literal) & (unary_expression "~*puVar7" ~ (pointer_expression "*puVar7" * identifier)))) ;) (expression_statement "uVar6 = uVar4 & 0x80808080;" (assignment_expression "uVar6 = uVar4 & 0x80808080" identifier = (binary_expression "uVar4 & 0x80808080" identifier & number_literal)) ;) (expression_statement "puVar5 = puVar7 + 1;" (assignment_expression "puVar5 = puVar7 + 1" identifier = (binary_expression "puVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar6 == 0)" ( (binary_expression "uVar6 == 0" identifier == number_literal) )) ;) (expression_statement "bVar10 = (uVar4 & 0x8080) == 0;" (assignment_expression "bVar10 = (uVar4 & 0x8080) == 0" identifier = (binary_expression "(uVar4 & 0x8080) == 0" (parenthesized_expression "(uVar4 & 0x8080)" ( (binary_expression "uVar4 & 0x8080" identifier & number_literal) )) == number_literal)) ;) (if_statement "if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\n      uVar6 = uVar6 >> 0x10;\n    }" { (expression_statement "uVar6 = uVar6 >> 0x10;" (assignment_expression "uVar6 = uVar6 >> 0x10" identifier = (binary_expression "uVar6 >> 0x10" identifier >> number_literal)) ;) })) (if_statement "if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }" { (expression_statement "puVar5 = (uint *)((int)puVar7 + 6);" (assignment_expression "puVar5 = (uint *)((int)puVar7 + 6)" identifier = (cast_expression "(uint *)((int)puVar7 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar7 + 6)" ( (binary_expression "(int)puVar7 + 6" (cast_expression "(int)puVar7" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ;) })) (expression_statement "uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;" (assignment_expression "uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2" identifier = (binary_expression "(int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2" (binary_expression "(int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6))" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6))" ( (binary_expression "-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)" (unary_expression "-(int)local_2020" - (cast_expression "(int)local_2020" ( (type_descriptor "int" primitive_type) ) identifier)) - (cast_expression "(uint)CARRY1((byte)uVar6,(byte)uVar6)" ( (type_descriptor "uint" type_identifier) ) (call_expression "CARRY1((byte)uVar6,(byte)uVar6)" identifier (argument_list "((byte)uVar6,(byte)uVar6)" ( (cast_expression "(byte)uVar6" ( (type_descriptor "byte" type_identifier) ) identifier) , (cast_expression "(byte)uVar6" ( (type_descriptor "byte" type_identifier) ) identifier) ))))) ))) + number_literal)) ;) (expression_statement "puVar5 = (uint *)FUN_000313e0(uVar6,1);" (assignment_expression "puVar5 = (uint *)FUN_000313e0(uVar6,1)" identifier = (cast_expression "(uint *)FUN_000313e0(uVar6,1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000313e0(uVar6,1)" identifier (argument_list "(uVar6,1)" ( identifier , number_literal ))))) ;) (expression_statement "*param_2 = (int)puVar5;" (assignment_expression "*param_2 = (int)puVar5" (pointer_expression "*param_2" * identifier) = (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }" if (parenthesized_expression "(uVar6 < 4)" ( (binary_expression "uVar6 < 4" identifier < number_literal) )) (compound_statement "{\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }" { (if_statement "if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }" if (parenthesized_expression "(uVar6 != 0)" ( (binary_expression "uVar6 != 0" identifier != number_literal) )) (compound_statement "{\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }" { (expression_statement "*(undefined1 *)puVar5 = (undefined1)local_2020[0];" (assignment_expression "*(undefined1 *)puVar5 = (undefined1)local_2020[0]" (pointer_expression "*(undefined1 *)puVar5" * (cast_expression "(undefined1 *)puVar5" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) = (cast_expression "(undefined1)local_2020[0]" ( (type_descriptor "undefined1" type_identifier) ) (subscript_expression "local_2020[0]" identifier [ number_literal ]))) ;) (if_statement "if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }" if (parenthesized_expression "((uVar6 & 2) != 0)" ( (binary_expression "(uVar6 & 2) != 0" (parenthesized_expression "(uVar6 & 2)" ( (binary_expression "uVar6 & 2" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }" { (expression_statement "*(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));" (assignment_expression "*(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2))" (pointer_expression "*(undefined2 *)((int)puVar5 + (uVar6 - 2))" * (cast_expression "(undefined2 *)((int)puVar5 + (uVar6 - 2))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar5 + (uVar6 - 2))" ( (binary_expression "(int)puVar5 + (uVar6 - 2)" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar6 - 2)" ( (binary_expression "uVar6 - 2" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined2 *)((int)local_2020 + (uVar6 - 2))" * (cast_expression "(undefined2 *)((int)local_2020 + (uVar6 - 2))" ( (type_descriptor "undefined2 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_2020 + (uVar6 - 2))" ( (binary_expression "(int)local_2020 + (uVar6 - 2)" (cast_expression "(int)local_2020" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar6 - 2)" ( (binary_expression "uVar6 - 2" identifier - number_literal) ))) ))))) ;) })) })) }) (else_clause "else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }" else (compound_statement "{\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }" { (expression_statement "*puVar5 = local_2020[0];" (assignment_expression "*puVar5 = local_2020[0]" (pointer_expression "*puVar5" * identifier) = (subscript_expression "local_2020[0]" identifier [ number_literal ])) ;) (expression_statement "*(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));" (assignment_expression "*(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4))" (pointer_expression "*(undefined4 *)((int)puVar5 + (uVar6 - 4))" * (cast_expression "(undefined4 *)((int)puVar5 + (uVar6 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)puVar5 + (uVar6 - 4))" ( (binary_expression "(int)puVar5 + (uVar6 - 4)" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar6 - 4)" ( (binary_expression "uVar6 - 4" identifier - number_literal) ))) )))) = (pointer_expression "*(undefined4 *)((int)local_2020 + (uVar6 - 4))" * (cast_expression "(undefined4 *)((int)local_2020 + (uVar6 - 4))" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_2020 + (uVar6 - 4))" ( (binary_expression "(int)local_2020 + (uVar6 - 4)" (cast_expression "(int)local_2020" ( (type_descriptor "int" primitive_type) ) identifier) + (parenthesized_expression "(uVar6 - 4)" ( (binary_expression "uVar6 - 4" identifier - number_literal) ))) ))))) ;) (expression_statement "iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);" (assignment_expression "iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc)" identifier = (binary_expression "(int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc)" (cast_expression "(int)puVar5" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)((uint)(puVar5 + 1) & 0xfffffffc)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((uint)(puVar5 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar5 + 1) & 0xfffffffc" (call_expression "(uint)(puVar5 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar5 + 1)" ( (binary_expression "puVar5 + 1" identifier + number_literal) ))) & number_literal) ))))) ;) (expression_statement "puVar8 = (undefined4 *)((int)local_2020 - iVar3);" (assignment_expression "puVar8 = (undefined4 *)((int)local_2020 - iVar3)" identifier = (cast_expression "(undefined4 *)((int)local_2020 - iVar3)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)local_2020 - iVar3)" ( (binary_expression "(int)local_2020 - iVar3" (cast_expression "(int)local_2020" ( (type_descriptor "int" primitive_type) ) identifier) - identifier) )))) ;) (expression_statement "puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);" (assignment_expression "puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc)" identifier = (cast_expression "(undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((uint)(puVar5 + 1) & 0xfffffffc)" ( (binary_expression "(uint)(puVar5 + 1) & 0xfffffffc" (call_expression "(uint)(puVar5 + 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar5 + 1)" ( (binary_expression "puVar5 + 1" identifier + number_literal) ))) & number_literal) )))) ;) (for_statement "for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }" for ( (assignment_expression "uVar6 = uVar6 + iVar3 >> 2" identifier = (binary_expression "uVar6 + iVar3 >> 2" (binary_expression "uVar6 + iVar3" identifier + identifier) >> number_literal)) ; (binary_expression "uVar6 != 0" identifier != number_literal) ; (assignment_expression "uVar6 = uVar6 - 1" identifier = (binary_expression "uVar6 - 1" identifier - number_literal)) ) (compound_statement "{\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }" { (expression_statement "*puVar9 = *puVar8;" (assignment_expression "*puVar9 = *puVar8" (pointer_expression "*puVar9" * identifier) = (pointer_expression "*puVar8" * identifier)) ;) (expression_statement "puVar8 = puVar8 + (uint)bVar11 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar11 * -2 + 1" identifier = (binary_expression "puVar8 + (uint)bVar11 * -2 + 1" (binary_expression "puVar8 + (uint)bVar11 * -2" identifier + (binary_expression "(uint)bVar11 * -2" (cast_expression "(uint)bVar11" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) (expression_statement "puVar9 = puVar9 + (uint)bVar11 * -2 + 1;" (assignment_expression "puVar9 = puVar9 + (uint)bVar11 * -2 + 1" identifier = (binary_expression "puVar9 + (uint)bVar11 * -2 + 1" (binary_expression "puVar9 + (uint)bVar11 * -2" identifier + (binary_expression "(uint)bVar11 * -2" (cast_expression "(uint)bVar11" ( (type_descriptor "uint" type_identifier) ) identifier) * number_literal)) + number_literal)) ;) })) }))) }) (else_clause "else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }" else (compound_statement "{\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }" { (expression_statement "pcVar2 = gai_strerror(iVar3);" (assignment_expression "pcVar2 = gai_strerror(iVar3)" identifier = (call_expression "gai_strerror(iVar3)" identifier (argument_list "(iVar3)" ( identifier )))) ;) (expression_statement "puVar1[1] = pcVar2;" (assignment_expression "puVar1[1] = pcVar2" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) }))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00077880();\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_00077880();\n  }" { (expression_statement "FUN_00077880();" (call_expression "FUN_00077880()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return puVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (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 (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )))) ;) (for_statement for ( (assignment_expression IDENT = (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression LIT - (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )))) ))) ))) >> LIT)) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT - LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (binary_expression (subscript_expression IDENT [ LIT ]) & LIT)) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression (field_expression IDENT . field_identifier) = LIT) , (binary_expression IDENT != LIT)) ))) )) (compound_statement { (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;) })) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT) , (pointer_expression & IDENT) , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))) )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT ))) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) , LIT , LIT ))) ;) }))) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (pointer_expression * IDENT) + LIT) & (unary_expression ~ (pointer_expression * IDENT)))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT == LIT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) })) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + LIT) )))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression (unary_expression - (cast_expression ( (type_descriptor TYPE) ) IDENT)) - (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) IDENT) , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))))) ))) + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) = (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (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 (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression IDENT - LIT) ))) ))))) ;) })) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) (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 (cast_expression ( (type_descriptor TYPE) ) IDENT) + (parenthesized_expression ( (binary_expression IDENT - LIT) ))) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT + LIT) ))) & LIT) )))) ;) (for_statement for ( (assignment_expression IDENT = (binary_expression (binary_expression IDENT + IDENT) >> LIT)) ; (binary_expression IDENT != LIT) ; (assignment_expression IDENT = (binary_expression IDENT - LIT)) ) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) * LIT)) + LIT)) ;) })) }))) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) }))) (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 "undefined4 * FUN_00070390(undefined4 param_1,int *param_2,int param_3)\n\n{\n  undefined4 *puVar1;\n  char *pcVar2;\n  int iVar3;\n  uint uVar4;\n  uint *puVar5;\n  uint uVar6;\n  uint *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  int in_GS_OFFSET;\n  bool bVar10;\n  byte bVar11;\n  addrinfo local_2040;\n  uint local_2020 [2047];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar11 = 0;\n  uStack_14 = 0x7039b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)FUN_000313e0(1,0x210);\n  puVar1[0x83] = 0;\n  puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n  for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n      uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }\n  *puVar1 = 1;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  local_2040.ai_family = 2;\n  local_2020[0] = local_2020[0] & 0xffffff00;\n  local_2040.ai_flags = 2;\n  if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {\n    local_2040.ai_family = 0;\n  }\n  local_2040.ai_socktype = 1;\n  local_2040.ai_protocol = 0;\n  local_2040.ai_addrlen = 0;\n  local_2040.ai_addr = (sockaddr *)0x0;\n  local_2040.ai_canonname = (char *)0x0;\n  local_2040.ai_next = (addrinfo *)0x0;\n  pcVar2 = (char *)FUN_00030740(param_1);\n  iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));\n  FUN_00031580(pcVar2);\n  if (iVar3 == 0) {\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00077880();\n  }\n  return puVar1;\n}" (type_identifier "undefined4") (pointer_declarator "* FUN_00070390(undefined4 param_1,int *param_2,int param_3)" (* "*") (function_declarator "FUN_00070390(undefined4 param_1,int *param_2,int param_3)" (identifier "FUN_00070390") (parameter_list "(undefined4 param_1,int *param_2,int param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int *param_2" (primitive_type "int") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")")))) (compound_statement "{\n  undefined4 *puVar1;\n  char *pcVar2;\n  int iVar3;\n  uint uVar4;\n  uint *puVar5;\n  uint uVar6;\n  uint *puVar7;\n  undefined4 *puVar8;\n  undefined4 *puVar9;\n  int in_GS_OFFSET;\n  bool bVar10;\n  byte bVar11;\n  addrinfo local_2040;\n  uint local_2020 [2047];\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  bVar11 = 0;\n  uStack_14 = 0x7039b;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  puVar1 = (undefined4 *)FUN_000313e0(1,0x210);\n  puVar1[0x83] = 0;\n  puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);\n  for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n      uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }\n  *puVar1 = 1;\n  puVar1[2] = 0;\n  puVar1[1] = 0;\n  local_2040.ai_family = 2;\n  local_2020[0] = local_2020[0] & 0xffffff00;\n  local_2040.ai_flags = 2;\n  if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {\n    local_2040.ai_family = 0;\n  }\n  local_2040.ai_socktype = 1;\n  local_2040.ai_protocol = 0;\n  local_2040.ai_addrlen = 0;\n  local_2040.ai_addr = (sockaddr *)0x0;\n  local_2040.ai_canonname = (char *)0x0;\n  local_2040.ai_next = (addrinfo *)0x0;\n  pcVar2 = (char *)FUN_00030740(param_1);\n  iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));\n  FUN_00031580(pcVar2);\n  if (iVar3 == 0) {\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }\n  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00077880();\n  }\n  return puVar1;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "uint *puVar5;" (type_identifier "uint") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "uint *puVar7;" (type_identifier "uint") (pointer_declarator "*puVar7" (* "*") (identifier "puVar7")) (; ";")) (declaration "undefined4 *puVar8;" (type_identifier "undefined4") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "undefined4 *puVar9;" (type_identifier "undefined4") (pointer_declarator "*puVar9" (* "*") (identifier "puVar9")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "bool bVar10;" (primitive_type "bool") (identifier "bVar10") (; ";")) (declaration "byte bVar11;" (type_identifier "byte") (identifier "bVar11") (; ";")) (declaration "addrinfo local_2040;" (type_identifier "addrinfo") (identifier "local_2040") (; ";")) (declaration "uint local_2020 [2047];" (type_identifier "uint") (array_declarator "local_2020 [2047]" (identifier "local_2020") ([ "[") (number_literal "2047") (] "]")) (; ";")) (declaration "undefined1 local_21;" (type_identifier "undefined1") (identifier "local_21") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "bVar11 = 0;" (assignment_expression "bVar11 = 0" (identifier "bVar11") (= "=") (number_literal "0")) (; ";")) (expression_statement "uStack_14 = 0x7039b;" (assignment_expression "uStack_14 = 0x7039b" (identifier "uStack_14") (= "=") (number_literal "0x7039b")) (; ";")) (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 "puVar1 = (undefined4 *)FUN_000313e0(1,0x210);" (assignment_expression "puVar1 = (undefined4 *)FUN_000313e0(1,0x210)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)FUN_000313e0(1,0x210)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_000313e0(1,0x210)" (identifier "FUN_000313e0") (argument_list "(1,0x210)" (( "(") (number_literal "1") (, ",") (number_literal "0x210") () ")"))))) (; ";")) (expression_statement "puVar1[0x83] = 0;" (assignment_expression "puVar1[0x83] = 0" (subscript_expression "puVar1[0x83]" (identifier "puVar1") ([ "[") (number_literal "0x83") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);" (assignment_expression "puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc)" (identifier "puVar8") (= "=") (cast_expression "(undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")))) (; ";")) (for_statement "for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;\n      uVar6 != 0; uVar6 = uVar6 - 1) {\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }" (for "for") (( "(") (assignment_expression "uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2" (identifier "uVar6") (= "=") (binary_expression "(uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2" (call_expression "(uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc)))" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc)))" (( "(") (binary_expression "(int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))" (cast_expression "(int)puVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar1")) (+ "+") (parenthesized_expression "(0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))" (( "(") (binary_expression "0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc)" (number_literal "0x210") (- "-") (cast_expression "(int)((uint)(puVar1 + 1) & 0xfffffffc)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((uint)(puVar1 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar1 + 1) & 0xfffffffc" (call_expression "(uint)(puVar1 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")))) () ")"))) () ")"))) (>> ">>") (number_literal "2"))) (; ";") (binary_expression "uVar6 != 0" (identifier "uVar6") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "uVar6 = uVar6 - 1" (identifier "uVar6") (= "=") (binary_expression "uVar6 - 1" (identifier "uVar6") (- "-") (number_literal "1"))) () ")") (compound_statement "{\n    *puVar8 = 0;\n    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n  }" ({ "{") (expression_statement "*puVar8 = 0;" (assignment_expression "*puVar8 = 0" (pointer_expression "*puVar8" (* "*") (identifier "puVar8")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar8 = puVar8 + (uint)bVar11 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar11 * -2 + 1" (identifier "puVar8") (= "=") (binary_expression "puVar8 + (uint)bVar11 * -2 + 1" (binary_expression "puVar8 + (uint)bVar11 * -2" (identifier "puVar8") (+ "+") (binary_expression "(uint)bVar11 * -2" (cast_expression "(uint)bVar11" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar11")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (expression_statement "*puVar1 = 1;" (assignment_expression "*puVar1 = 1" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (number_literal "1")) (; ";")) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[1] = 0;" (assignment_expression "puVar1[1] = 0" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "local_2040.ai_family = 2;" (assignment_expression "local_2040.ai_family = 2" (field_expression "local_2040.ai_family" (identifier "local_2040") (. ".") (field_identifier "ai_family")) (= "=") (number_literal "2")) (; ";")) (expression_statement "local_2020[0] = local_2020[0] & 0xffffff00;" (assignment_expression "local_2020[0] = local_2020[0] & 0xffffff00" (subscript_expression "local_2020[0]" (identifier "local_2020") ([ "[") (number_literal "0") (] "]")) (= "=") (binary_expression "local_2020[0] & 0xffffff00" (subscript_expression "local_2020[0]" (identifier "local_2020") ([ "[") (number_literal "0") (] "]")) (& "&") (number_literal "0xffffff00"))) (; ";")) (expression_statement "local_2040.ai_flags = 2;" (assignment_expression "local_2040.ai_flags = 2" (field_expression "local_2040.ai_flags" (identifier "local_2040") (. ".") (field_identifier "ai_flags")) (= "=") (number_literal "2")) (; ";")) (if_statement "if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {\n    local_2040.ai_family = 0;\n  }" (if "if") (parenthesized_expression "((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2))" (( "(") (binary_expression "(param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)" (parenthesized_expression "(param_3 != 1)" (( "(") (binary_expression "param_3 != 1" (identifier "param_3") (!= "!=") (number_literal "1")) () ")")) (&& "&&") (parenthesized_expression "(local_2040.ai_family = 10, param_3 != 2)" (( "(") (comma_expression "local_2040.ai_family = 10, param_3 != 2" (assignment_expression "local_2040.ai_family = 10" (field_expression "local_2040.ai_family" (identifier "local_2040") (. ".") (field_identifier "ai_family")) (= "=") (number_literal "10")) (, ",") (binary_expression "param_3 != 2" (identifier "param_3") (!= "!=") (number_literal "2"))) () ")"))) () ")")) (compound_statement "{\n    local_2040.ai_family = 0;\n  }" ({ "{") (expression_statement "local_2040.ai_family = 0;" (assignment_expression "local_2040.ai_family = 0" (field_expression "local_2040.ai_family" (identifier "local_2040") (. ".") (field_identifier "ai_family")) (= "=") (number_literal "0")) (; ";")) (} "}"))) (expression_statement "local_2040.ai_socktype = 1;" (assignment_expression "local_2040.ai_socktype = 1" (field_expression "local_2040.ai_socktype" (identifier "local_2040") (. ".") (field_identifier "ai_socktype")) (= "=") (number_literal "1")) (; ";")) (expression_statement "local_2040.ai_protocol = 0;" (assignment_expression "local_2040.ai_protocol = 0" (field_expression "local_2040.ai_protocol" (identifier "local_2040") (. ".") (field_identifier "ai_protocol")) (= "=") (number_literal "0")) (; ";")) (expression_statement "local_2040.ai_addrlen = 0;" (assignment_expression "local_2040.ai_addrlen = 0" (field_expression "local_2040.ai_addrlen" (identifier "local_2040") (. ".") (field_identifier "ai_addrlen")) (= "=") (number_literal "0")) (; ";")) (expression_statement "local_2040.ai_addr = (sockaddr *)0x0;" (assignment_expression "local_2040.ai_addr = (sockaddr *)0x0" (field_expression "local_2040.ai_addr" (identifier "local_2040") (. ".") (field_identifier "ai_addr")) (= "=") (cast_expression "(sockaddr *)0x0" (( "(") (type_descriptor "sockaddr *" (type_identifier "sockaddr") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "local_2040.ai_canonname = (char *)0x0;" (assignment_expression "local_2040.ai_canonname = (char *)0x0" (field_expression "local_2040.ai_canonname" (identifier "local_2040") (. ".") (field_identifier "ai_canonname")) (= "=") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "local_2040.ai_next = (addrinfo *)0x0;" (assignment_expression "local_2040.ai_next = (addrinfo *)0x0" (field_expression "local_2040.ai_next" (identifier "local_2040") (. ".") (field_identifier "ai_next")) (= "=") (cast_expression "(addrinfo *)0x0" (( "(") (type_descriptor "addrinfo *" (type_identifier "addrinfo") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "pcVar2 = (char *)FUN_00030740(param_1);" (assignment_expression "pcVar2 = (char *)FUN_00030740(param_1)" (identifier "pcVar2") (= "=") (cast_expression "(char *)FUN_00030740(param_1)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00030740(param_1)" (identifier "FUN_00030740") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))))) (; ";")) (expression_statement "iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));" (assignment_expression "iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3))" (identifier "iVar3") (= "=") (call_expression "getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3))" (identifier "getaddrinfo") (argument_list "(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3))" (( "(") (identifier "pcVar2") (, ",") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")) (, ",") (pointer_expression "&local_2040" (& "&") (identifier "local_2040")) (, ",") (cast_expression "(addrinfo **)(puVar1 + 3)" (( "(") (type_descriptor "addrinfo **" (type_identifier "addrinfo") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar1 + 3)" (( "(") (binary_expression "puVar1 + 3" (identifier "puVar1") (+ "+") (number_literal "3")) () ")"))) () ")")))) (; ";")) (expression_statement "FUN_00031580(pcVar2);" (call_expression "FUN_00031580(pcVar2)" (identifier "FUN_00031580") (argument_list "(pcVar2)" (( "(") (identifier "pcVar2") () ")"))) (; ";")) (if_statement "if (iVar3 == 0) {\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }\n  else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    puVar1[2] = 2;\n    if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }\n    local_21 = 0;\n    puVar5 = local_2020;\n    do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);\n    bVar10 = (uVar4 & 0x8080) == 0;\n    if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }\n    if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }\n    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;\n    puVar5 = (uint *)FUN_000313e0(uVar6,1);\n    *param_2 = (int)puVar5;\n    if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }\n  }" ({ "{") (expression_statement "puVar1[2] = 2;" (assignment_expression "puVar1[2] = 2" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "2")) (; ";")) (if_statement "if (*(int *)(puVar1[3] + 0x18) == 0) {\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }\n    else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }" (if "if") (parenthesized_expression "(*(int *)(puVar1[3] + 0x18) == 0)" (( "(") (binary_expression "*(int *)(puVar1[3] + 0x18) == 0" (pointer_expression "*(int *)(puVar1[3] + 0x18)" (* "*") (cast_expression "(int *)(puVar1[3] + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1[3] + 0x18)" (( "(") (binary_expression "puVar1[3] + 0x18" (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")) (+ "+") (number_literal "0x18")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      __strncat_chk(local_2020,param_1,0x1fff,0x2000);\n    }" ({ "{") (expression_statement "__strncat_chk(local_2020,param_1,0x1fff,0x2000);" (call_expression "__strncat_chk(local_2020,param_1,0x1fff,0x2000)" (identifier "__strncat_chk") (argument_list "(local_2020,param_1,0x1fff,0x2000)" (( "(") (identifier "local_2020") (, ",") (identifier "param_1") (, ",") (number_literal "0x1fff") (, ",") (number_literal "0x2000") () ")"))) (; ";")) (} "}")) (else_clause "else {\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }" (else "else") (compound_statement "{\n      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);\n    }" ({ "{") (expression_statement "__strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);" (call_expression "__strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000)" (identifier "__strncat_chk") (argument_list "(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000)" (( "(") (identifier "local_2020") (, ",") (pointer_expression "*(int *)(puVar1[3] + 0x18)" (* "*") (cast_expression "(int *)(puVar1[3] + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1[3] + 0x18)" (( "(") (binary_expression "puVar1[3] + 0x18" (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")) (+ "+") (number_literal "0x18")) () ")")))) (, ",") (number_literal "0x1fff") (, ",") (number_literal "0x2000") () ")"))) (; ";")) (} "}")))) (expression_statement "local_21 = 0;" (assignment_expression "local_21 = 0" (identifier "local_21") (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar5 = local_2020;" (assignment_expression "puVar5 = local_2020" (identifier "puVar5") (= "=") (identifier "local_2020")) (; ";")) (do_statement "do {\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    } while (uVar6 == 0);" (do "do") (compound_statement "{\n      puVar7 = puVar5;\n      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;\n      uVar6 = uVar4 & 0x80808080;\n      puVar5 = puVar7 + 1;\n    }" ({ "{") (expression_statement "puVar7 = puVar5;" (assignment_expression "puVar7 = puVar5" (identifier "puVar7") (= "=") (identifier "puVar5")) (; ";")) (expression_statement "uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;" (assignment_expression "uVar4 = *puVar7 + 0xfefefeff & ~*puVar7" (identifier "uVar4") (= "=") (binary_expression "*puVar7 + 0xfefefeff & ~*puVar7" (binary_expression "*puVar7 + 0xfefefeff" (pointer_expression "*puVar7" (* "*") (identifier "puVar7")) (+ "+") (number_literal "0xfefefeff")) (& "&") (unary_expression "~*puVar7" (~ "~") (pointer_expression "*puVar7" (* "*") (identifier "puVar7"))))) (; ";")) (expression_statement "uVar6 = uVar4 & 0x80808080;" (assignment_expression "uVar6 = uVar4 & 0x80808080" (identifier "uVar6") (= "=") (binary_expression "uVar4 & 0x80808080" (identifier "uVar4") (& "&") (number_literal "0x80808080"))) (; ";")) (expression_statement "puVar5 = puVar7 + 1;" (assignment_expression "puVar5 = puVar7 + 1" (identifier "puVar5") (= "=") (binary_expression "puVar7 + 1" (identifier "puVar7") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar6 == 0)" (( "(") (binary_expression "uVar6 == 0" (identifier "uVar6") (== "==") (number_literal "0")) () ")")) (; ";")) (expression_statement "bVar10 = (uVar4 & 0x8080) == 0;" (assignment_expression "bVar10 = (uVar4 & 0x8080) == 0" (identifier "bVar10") (= "=") (binary_expression "(uVar4 & 0x8080) == 0" (parenthesized_expression "(uVar4 & 0x8080)" (( "(") (binary_expression "uVar4 & 0x8080" (identifier "uVar4") (& "&") (number_literal "0x8080")) () ")")) (== "==") (number_literal "0"))) (; ";")) (if_statement "if (bVar10) {\n      uVar6 = uVar6 >> 0x10;\n    }" (if "if") (parenthesized_expression "(bVar10)" (( "(") (identifier "bVar10") () ")")) (compound_statement "{\n      uVar6 = uVar6 >> 0x10;\n    }" ({ "{") (expression_statement "uVar6 = uVar6 >> 0x10;" (assignment_expression "uVar6 = uVar6 >> 0x10" (identifier "uVar6") (= "=") (binary_expression "uVar6 >> 0x10" (identifier "uVar6") (>> ">>") (number_literal "0x10"))) (; ";")) (} "}"))) (if_statement "if (bVar10) {\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }" (if "if") (parenthesized_expression "(bVar10)" (( "(") (identifier "bVar10") () ")")) (compound_statement "{\n      puVar5 = (uint *)((int)puVar7 + 6);\n    }" ({ "{") (expression_statement "puVar5 = (uint *)((int)puVar7 + 6);" (assignment_expression "puVar5 = (uint *)((int)puVar7 + 6)" (identifier "puVar5") (= "=") (cast_expression "(uint *)((int)puVar7 + 6)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar7 + 6)" (( "(") (binary_expression "(int)puVar7 + 6" (cast_expression "(int)puVar7" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar7")) (+ "+") (number_literal "6")) () ")")))) (; ";")) (} "}"))) (expression_statement "uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;" (assignment_expression "uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2" (identifier "uVar6") (= "=") (binary_expression "(int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2" (binary_expression "(int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6))" (cast_expression "(int)puVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar5")) (+ "+") (parenthesized_expression "(-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6))" (( "(") (binary_expression "-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)" (unary_expression "-(int)local_2020" (- "-") (cast_expression "(int)local_2020" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_2020"))) (- "-") (cast_expression "(uint)CARRY1((byte)uVar6,(byte)uVar6)" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (call_expression "CARRY1((byte)uVar6,(byte)uVar6)" (identifier "CARRY1") (argument_list "((byte)uVar6,(byte)uVar6)" (( "(") (cast_expression "(byte)uVar6" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar6")) (, ",") (cast_expression "(byte)uVar6" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar6")) () ")"))))) () ")"))) (+ "+") (number_literal "-2"))) (; ";")) (expression_statement "puVar5 = (uint *)FUN_000313e0(uVar6,1);" (assignment_expression "puVar5 = (uint *)FUN_000313e0(uVar6,1)" (identifier "puVar5") (= "=") (cast_expression "(uint *)FUN_000313e0(uVar6,1)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_000313e0(uVar6,1)" (identifier "FUN_000313e0") (argument_list "(uVar6,1)" (( "(") (identifier "uVar6") (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "*param_2 = (int)puVar5;" (assignment_expression "*param_2 = (int)puVar5" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (cast_expression "(int)puVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar5"))) (; ";")) (if_statement "if (uVar6 < 4) {\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }\n    else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }" (if "if") (parenthesized_expression "(uVar6 < 4)" (( "(") (binary_expression "uVar6 < 4" (identifier "uVar6") (< "<") (number_literal "4")) () ")")) (compound_statement "{\n      if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }\n    }" ({ "{") (if_statement "if (uVar6 != 0) {\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }" (if "if") (parenthesized_expression "(uVar6 != 0)" (( "(") (binary_expression "uVar6 != 0" (identifier "uVar6") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n        *(undefined1 *)puVar5 = (undefined1)local_2020[0];\n        if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }\n      }" ({ "{") (expression_statement "*(undefined1 *)puVar5 = (undefined1)local_2020[0];" (assignment_expression "*(undefined1 *)puVar5 = (undefined1)local_2020[0]" (pointer_expression "*(undefined1 *)puVar5" (* "*") (cast_expression "(undefined1 *)puVar5" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar5"))) (= "=") (cast_expression "(undefined1)local_2020[0]" (( "(") (type_descriptor "undefined1" (type_identifier "undefined1")) () ")") (subscript_expression "local_2020[0]" (identifier "local_2020") ([ "[") (number_literal "0") (] "]")))) (; ";")) (if_statement "if ((uVar6 & 2) != 0) {\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }" (if "if") (parenthesized_expression "((uVar6 & 2) != 0)" (( "(") (binary_expression "(uVar6 & 2) != 0" (parenthesized_expression "(uVar6 & 2)" (( "(") (binary_expression "uVar6 & 2" (identifier "uVar6") (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));\n        }" ({ "{") (expression_statement "*(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2));" (assignment_expression "*(undefined2 *)((int)puVar5 + (uVar6 - 2)) =\n               *(undefined2 *)((int)local_2020 + (uVar6 - 2))" (pointer_expression "*(undefined2 *)((int)puVar5 + (uVar6 - 2))" (* "*") (cast_expression "(undefined2 *)((int)puVar5 + (uVar6 - 2))" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar5 + (uVar6 - 2))" (( "(") (binary_expression "(int)puVar5 + (uVar6 - 2)" (cast_expression "(int)puVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar5")) (+ "+") (parenthesized_expression "(uVar6 - 2)" (( "(") (binary_expression "uVar6 - 2" (identifier "uVar6") (- "-") (number_literal "2")) () ")"))) () ")")))) (= "=") (pointer_expression "*(undefined2 *)((int)local_2020 + (uVar6 - 2))" (* "*") (cast_expression "(undefined2 *)((int)local_2020 + (uVar6 - 2))" (( "(") (type_descriptor "undefined2 *" (type_identifier "undefined2") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)local_2020 + (uVar6 - 2))" (( "(") (binary_expression "(int)local_2020 + (uVar6 - 2)" (cast_expression "(int)local_2020" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_2020")) (+ "+") (parenthesized_expression "(uVar6 - 2)" (( "(") (binary_expression "uVar6 - 2" (identifier "uVar6") (- "-") (number_literal "2")) () ")"))) () ")"))))) (; ";")) (} "}"))) (} "}"))) (} "}")) (else_clause "else {\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }" (else "else") (compound_statement "{\n      *puVar5 = local_2020[0];\n      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));\n      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);\n      puVar8 = (undefined4 *)((int)local_2020 - iVar3);\n      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);\n      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }\n    }" ({ "{") (expression_statement "*puVar5 = local_2020[0];" (assignment_expression "*puVar5 = local_2020[0]" (pointer_expression "*puVar5" (* "*") (identifier "puVar5")) (= "=") (subscript_expression "local_2020[0]" (identifier "local_2020") ([ "[") (number_literal "0") (] "]"))) (; ";")) (expression_statement "*(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));" (assignment_expression "*(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4))" (pointer_expression "*(undefined4 *)((int)puVar5 + (uVar6 - 4))" (* "*") (cast_expression "(undefined4 *)((int)puVar5 + (uVar6 - 4))" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)puVar5 + (uVar6 - 4))" (( "(") (binary_expression "(int)puVar5 + (uVar6 - 4)" (cast_expression "(int)puVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar5")) (+ "+") (parenthesized_expression "(uVar6 - 4)" (( "(") (binary_expression "uVar6 - 4" (identifier "uVar6") (- "-") (number_literal "4")) () ")"))) () ")")))) (= "=") (pointer_expression "*(undefined4 *)((int)local_2020 + (uVar6 - 4))" (* "*") (cast_expression "(undefined4 *)((int)local_2020 + (uVar6 - 4))" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)local_2020 + (uVar6 - 4))" (( "(") (binary_expression "(int)local_2020 + (uVar6 - 4)" (cast_expression "(int)local_2020" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_2020")) (+ "+") (parenthesized_expression "(uVar6 - 4)" (( "(") (binary_expression "uVar6 - 4" (identifier "uVar6") (- "-") (number_literal "4")) () ")"))) () ")"))))) (; ";")) (expression_statement "iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);" (assignment_expression "iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc)" (identifier "iVar3") (= "=") (binary_expression "(int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc)" (cast_expression "(int)puVar5" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar5")) (- "-") (cast_expression "(int)((uint)(puVar5 + 1) & 0xfffffffc)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((uint)(puVar5 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar5 + 1) & 0xfffffffc" (call_expression "(uint)(puVar5 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar5 + 1)" (( "(") (binary_expression "puVar5 + 1" (identifier "puVar5") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")"))))) (; ";")) (expression_statement "puVar8 = (undefined4 *)((int)local_2020 - iVar3);" (assignment_expression "puVar8 = (undefined4 *)((int)local_2020 - iVar3)" (identifier "puVar8") (= "=") (cast_expression "(undefined4 *)((int)local_2020 - iVar3)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)local_2020 - iVar3)" (( "(") (binary_expression "(int)local_2020 - iVar3" (cast_expression "(int)local_2020" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_2020")) (- "-") (identifier "iVar3")) () ")")))) (; ";")) (expression_statement "puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);" (assignment_expression "puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc)" (identifier "puVar9") (= "=") (cast_expression "(undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((uint)(puVar5 + 1) & 0xfffffffc)" (( "(") (binary_expression "(uint)(puVar5 + 1) & 0xfffffffc" (call_expression "(uint)(puVar5 + 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar5 + 1)" (( "(") (binary_expression "puVar5 + 1" (identifier "puVar5") (+ "+") (number_literal "1")) () ")"))) (& "&") (number_literal "0xfffffffc")) () ")")))) (; ";")) (for_statement "for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }" (for "for") (( "(") (assignment_expression "uVar6 = uVar6 + iVar3 >> 2" (identifier "uVar6") (= "=") (binary_expression "uVar6 + iVar3 >> 2" (binary_expression "uVar6 + iVar3" (identifier "uVar6") (+ "+") (identifier "iVar3")) (>> ">>") (number_literal "2"))) (; ";") (binary_expression "uVar6 != 0" (identifier "uVar6") (!= "!=") (number_literal "0")) (; ";") (assignment_expression "uVar6 = uVar6 - 1" (identifier "uVar6") (= "=") (binary_expression "uVar6 - 1" (identifier "uVar6") (- "-") (number_literal "1"))) () ")") (compound_statement "{\n        *puVar9 = *puVar8;\n        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;\n        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;\n      }" ({ "{") (expression_statement "*puVar9 = *puVar8;" (assignment_expression "*puVar9 = *puVar8" (pointer_expression "*puVar9" (* "*") (identifier "puVar9")) (= "=") (pointer_expression "*puVar8" (* "*") (identifier "puVar8"))) (; ";")) (expression_statement "puVar8 = puVar8 + (uint)bVar11 * -2 + 1;" (assignment_expression "puVar8 = puVar8 + (uint)bVar11 * -2 + 1" (identifier "puVar8") (= "=") (binary_expression "puVar8 + (uint)bVar11 * -2 + 1" (binary_expression "puVar8 + (uint)bVar11 * -2" (identifier "puVar8") (+ "+") (binary_expression "(uint)bVar11 * -2" (cast_expression "(uint)bVar11" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar11")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar9 = puVar9 + (uint)bVar11 * -2 + 1;" (assignment_expression "puVar9 = puVar9 + (uint)bVar11 * -2 + 1" (identifier "puVar9") (= "=") (binary_expression "puVar9 + (uint)bVar11 * -2 + 1" (binary_expression "puVar9 + (uint)bVar11 * -2" (identifier "puVar9") (+ "+") (binary_expression "(uint)bVar11 * -2" (cast_expression "(uint)bVar11" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "bVar11")) (* "*") (number_literal "-2"))) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (} "}")))) (} "}")) (else_clause "else {\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }" (else "else") (compound_statement "{\n    pcVar2 = gai_strerror(iVar3);\n    puVar1[1] = pcVar2;\n  }" ({ "{") (expression_statement "pcVar2 = gai_strerror(iVar3);" (assignment_expression "pcVar2 = gai_strerror(iVar3)" (identifier "pcVar2") (= "=") (call_expression "gai_strerror(iVar3)" (identifier "gai_strerror") (argument_list "(iVar3)" (( "(") (identifier "iVar3") () ")")))) (; ";")) (expression_statement "puVar1[1] = pcVar2;" (assignment_expression "puVar1[1] = pcVar2" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "pcVar2")) (; ";")) (} "}")))) (if_statement "if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {\n                    \n    FUN_00077880();\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_00077880();\n  }" ({ "{") (expression_statement "FUN_00077880();" (call_expression "FUN_00077880()" (identifier "FUN_00077880") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return puVar1;" (return "return") (identifier "puVar1") (; ";")) (} "}")))

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

type_1 function_1(char *host,char **canonicalname,int var_5)

{
  int var_18;
  type_1 pSVar2;
  char *var_10;
  int var_9;
  type_2 var_12;
  type_2 var_3;
  type_2 *var_13;
  type_2 *puVar8;
  type_3 *var_4;
  type_3 *var_16;
  int var_1;
  bool bVar11;
  type_4 bVar12;
  type_5 hints;
  char var_15 [8192];
  
  bVar12 = 0;
  var_18 = *(int *)(var_1 + 0x14);
  pSVar2 = (type_1)var_2(1,0x210);
  pSVar2->hostname[0x1fc] = '\0';
  pSVar2->hostname[0x1fd] = '\0';
  pSVar2->hostname[0x1fe] = '\0';
  pSVar2->hostname[0x1ff] = '\0';
  var_4 = (type_3 *)((type_2)&pSVar2->error & 0xfffffffc);
  var_3 = (type_2)((int)pSVar2 + (0x210 - (int)var_4)) >> 2;
  for (; var_3 != 0; var_3 = var_3 - 1) {
    *var_4 = 0;
    var_4 = var_4 + (type_2)bVar12 * -2 + 1;
  }
  pSVar2->refcount = 1;
  pSVar2->superfamily = ADDRTYPE_UNSPEC;
  pSVar2->error = (char *)0x0;
  hints.ai_family = 2;
  var_15._0_4_ = var_15._0_4_ & 0xffffff00;
  hints.ai_flags = 2;
  if ((var_5 != 1) && (hints.ai_family = 10, var_5 != 2)) {
    hints.ai_family = 0;
  }
  hints.ai_socktype = 1;
  hints.ai_protocol = 0;
  hints.ai_addrlen = 0;
  hints.ai_addr = (type_6 *)0x0;
  hints.ai_canonname = (char *)0x0;
  hints.ai_next = (type_5 *)0x0;
  var_10 = var_6(host);
  var_9 = var_7(var_10,(char *)0x0,(type_5 *)&hints,(type_5 **)&pSVar2->ais);
  var_8(var_10);
  if (var_9 == 0) {
    pSVar2->superfamily = ADDRTYPE_IPV6;
    var_10 = pSVar2->ais->ai_canonname;
    if (var_10 == (char *)0x0) {
      var_11(var_15,host,0x1fff,0x2000);
    }
    else {
      var_11(var_15,var_10,0x1fff,0x2000);
    }
    var_15[0x1fff] = '\0';
    puVar8 = (type_2 *)var_15;
    do {
      var_13 = puVar8;
      var_12 = *var_13 + 0xfefefeff & ~*var_13;
      var_3 = var_12 & 0x80808080;
      puVar8 = var_13 + 1;
    } while (var_3 == 0);
    bVar11 = (var_12 & 0x8080) == 0;
    if (bVar11) {
      var_3 = var_3 >> 0x10;
    }
    if (bVar11) {
      puVar8 = (type_2 *)((int)var_13 + 6);
    }
    var_3 = (int)puVar8 + (-(int)var_15 - (type_2)var_14((type_4)var_3,(type_4)var_3)) + -2;
    var_10 = (char *)var_2(var_3,1);
    *canonicalname = var_10;
    if (var_3 < 4) {
      if (var_3 != 0) {
        *var_10 = var_15[0];
        if ((var_3 & 2) != 0) {
          *(type_7 *)(var_10 + (var_3 - 2)) = *(type_7 *)(var_15 + (var_3 - 2));
        }
      }
    }
    else {
      *(type_3 *)var_10 = var_15._0_4_;
      *(type_3 *)(var_10 + (var_3 - 4)) = *(type_3 *)(var_15 + (var_3 - 4));
      var_9 = (int)var_10 - (int)((type_2)(var_10 + 4) & 0xfffffffc);
      var_4 = (type_3 *)((int)var_15 - var_9);
      var_16 = (type_3 *)((type_2)(var_10 + 4) & 0xfffffffc);
      for (var_3 = var_3 + var_9 >> 2; var_3 != 0; var_3 = var_3 - 1) {
        *var_16 = *var_4;
        var_4 = var_4 + (type_2)bVar12 * -2 + 1;
        var_16 = var_16 + (type_2)bVar12 * -2 + 1;
      }
    }
  }
  else {
    var_10 = var_17(var_9);
    pSVar2->error = var_10;
  }
  if (var_18 != *(int *)(var_1 + 0x14)) {
                    /* WARNING: Subroutine does not return */
    var_19();
  }
  return pSVar2;
}


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

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

undefined4 * MASKED(undefined4 param_1,int *param_2,int param_3)

{
  undefined4 *puVar1;
  char *pcVar2;
  int iVar3;
  uint uVar4;
  uint *puVar5;
  uint uVar6;
  uint *puVar7;
  undefined4 *puVar8;
  undefined4 *puVar9;
  int in_GS_OFFSET;
  bool bVar10;
  byte bVar11;
  addrinfo local_2040;
  uint local_2020 [2047];
  undefined1 local_21;
  int local_20;
  undefined4 uStack_14;
  
  bVar11 = 0;
  uStack_14 = 0x7039b;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  puVar1 = (undefined4 *)FUN_000313e0(1,0x210);
  puVar1[0x83] = 0;
  puVar8 = (undefined4 *)((uint)(puVar1 + 1) & 0xfffffffc);
  for (uVar6 = (uint)((int)puVar1 + (0x210 - (int)((uint)(puVar1 + 1) & 0xfffffffc))) >> 2;
      uVar6 != 0; uVar6 = uVar6 - 1) {
    *puVar8 = 0;
    puVar8 = puVar8 + (uint)bVar11 * -2 + 1;
  }
  *puVar1 = 1;
  puVar1[2] = 0;
  puVar1[1] = 0;
  local_2040.ai_family = 2;
  local_2020[0] = local_2020[0] & 0xffffff00;
  local_2040.ai_flags = 2;
  if ((param_3 != 1) && (local_2040.ai_family = 10, param_3 != 2)) {
    local_2040.ai_family = 0;
  }
  local_2040.ai_socktype = 1;
  local_2040.ai_protocol = 0;
  local_2040.ai_addrlen = 0;
  local_2040.ai_addr = (sockaddr *)0x0;
  local_2040.ai_canonname = (char *)0x0;
  local_2040.ai_next = (addrinfo *)0x0;
  pcVar2 = (char *)FUN_00030740(param_1);
  iVar3 = getaddrinfo(pcVar2,(char *)0x0,&local_2040,(addrinfo **)(puVar1 + 3));
  FUN_00031580(pcVar2);
  if (iVar3 == 0) {
    puVar1[2] = 2;
    if (*(int *)(puVar1[3] + 0x18) == 0) {
      __strncat_chk(local_2020,param_1,0x1fff,0x2000);
    }
    else {
      __strncat_chk(local_2020,*(int *)(puVar1[3] + 0x18),0x1fff,0x2000);
    }
    local_21 = 0;
    puVar5 = local_2020;
    do {
      puVar7 = puVar5;
      uVar4 = *puVar7 + 0xfefefeff & ~*puVar7;
      uVar6 = uVar4 & 0x80808080;
      puVar5 = puVar7 + 1;
    } while (uVar6 == 0);
    bVar10 = (uVar4 & 0x8080) == 0;
    if (bVar10) {
      uVar6 = uVar6 >> 0x10;
    }
    if (bVar10) {
      puVar5 = (uint *)((int)puVar7 + 6);
    }
    uVar6 = (int)puVar5 + (-(int)local_2020 - (uint)CARRY1((byte)uVar6,(byte)uVar6)) + -2;
    puVar5 = (uint *)FUN_000313e0(uVar6,1);
    *param_2 = (int)puVar5;
    if (uVar6 < 4) {
      if (uVar6 != 0) {
        *(undefined1 *)puVar5 = (undefined1)local_2020[0];
        if ((uVar6 & 2) != 0) {
          *(undefined2 *)((int)puVar5 + (uVar6 - 2)) =
               *(undefined2 *)((int)local_2020 + (uVar6 - 2));
        }
      }
    }
    else {
      *puVar5 = local_2020[0];
      *(undefined4 *)((int)puVar5 + (uVar6 - 4)) = *(undefined4 *)((int)local_2020 + (uVar6 - 4));
      iVar3 = (int)puVar5 - (int)((uint)(puVar5 + 1) & 0xfffffffc);
      puVar8 = (undefined4 *)((int)local_2020 - iVar3);
      puVar9 = (undefined4 *)((uint)(puVar5 + 1) & 0xfffffffc);
      for (uVar6 = uVar6 + iVar3 >> 2; uVar6 != 0; uVar6 = uVar6 - 1) {
        *puVar9 = *puVar8;
        puVar8 = puVar8 + (uint)bVar11 * -2 + 1;
        puVar9 = puVar9 + (uint)bVar11 * -2 + 1;
      }
    }
  }
  else {
    pcVar2 = gai_strerror(iVar3);
    puVar1[1] = pcVar2;
  }
  if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
                    /* WARNING: Subroutine does not return */
    FUN_00077880();
  }
  return puVar1;
}

