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

SockAddr name_lookup(char *host,int port,char **canonicalname,Conf *conf,int addressfamily,
                    void *frontend,char *reason)

{
  int iVar1;
  char *pcVar2;
  SockAddr pSVar3;
  
  iVar1 = conf_get_int(conf,0xd);
  if (iVar1 == 0) goto LAB_0003016d;
  iVar1 = conf_get_int(conf,0xb);
  if (iVar1 != 0) {
    iVar1 = conf_get_int(conf,0xb);
    if (iVar1 != 2) goto LAB_0003016d;
    iVar1 = conf_get_int(conf,0xd);
    if (iVar1 == 1) goto LAB_0003016d;
  }
  iVar1 = proxy_for_destination((SockAddr)0x0,host,port,conf);
  if (iVar1 != 0) {
    if (frontend != (void *)0x0) {
      pcVar2 = dupprintf("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason);
      logevent(frontend,pcVar2);
      safefree(pcVar2);
    }
    pcVar2 = dupstr(host);
    *canonicalname = pcVar2;
    pSVar3 = sk_nonamelookup(host);
    return pSVar3;
  }
LAB_0003016d:
  if (frontend != (void *)0x0) {
    pcVar2 = " (IPv4)";
    if (addressfamily != 1) {
      pcVar2 = " (IPv6)";
      if (addressfamily != 2) {
        pcVar2 = "";
      }
    }
    pcVar2 = dupprintf("Looking up host \"%s\"%s for %s",host,pcVar2,reason);
    logevent(frontend,pcVar2);
    safefree(pcVar2);
  }
  pSVar3 = sk_namelookup(host,canonicalname,addressfamily);
  return pSVar3;
}



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

void FUN_00030140(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,
                 int param_5,int param_6,undefined4 param_7)

{
  int iVar1;
  char *pcVar2;
  undefined4 uVar3;
  
  iVar1 = FUN_0001ea70(param_4,0xd);
  if (iVar1 == 0) goto LAB_0003016d;
  iVar1 = FUN_0001ea70(param_4,0xb);
  if (iVar1 != 0) {
    iVar1 = FUN_0001ea70(param_4,0xb);
    if (iVar1 != 2) goto LAB_0003016d;
    iVar1 = FUN_0001ea70(param_4,0xd);
    if (iVar1 == 1) goto LAB_0003016d;
  }
  iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);
  if (iVar1 != 0) {
    if (param_6 != 0) {
      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);
      FUN_00058e90(param_6,uVar3);
      FUN_0002da80(uVar3);
    }
    uVar3 = FUN_0002d300(param_1);
    *param_3 = uVar3;
    FUN_000603f0(param_1);
    return;
  }
LAB_0003016d:
  if (param_6 != 0) {
    pcVar2 = " (IPv4)";
    if (param_5 != 1) {
      pcVar2 = " (IPv6)";
      if (param_5 != 2) {
        pcVar2 = "";
      }
    }
    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);
    FUN_00058e90(param_6,uVar3);
    FUN_0002da80(uVar3);
  }
  FUN_00060170(param_1,param_3,param_5);
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001b410
ADD EBX,0x8065b
SUB ESP,0x14
MOV EDI,dword ptr [ESP + 0x34]
MOV ESI,dword ptr [ESP + 0x28]
MOV EBP,dword ptr [ESP + 0x3c]
PUSH 0xd
PUSH EDI
CALL 0x0001ea70
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000301e0
TEST EBP,EBP
JZ 0x000301ba
CMP dword ptr [ESP + 0x30],0x1
LEA EAX,[EBX + 0xfffcf5e3]
JZ 0x00030192
CMP dword ptr [ESP + 0x30],0x2
LEA EAX,[EBX + 0xfffcf5eb]
LEA EDX,[EBX + 0xfffd4390]
CMOVNZ EAX,EDX
PUSH dword ptr [ESP + 0x38]
PUSH EAX
LEA EAX,[EBX + 0xfffcf5f3]
PUSH ESI
PUSH EAX
CALL 0x0002d860
MOV EDI,EAX
POP EAX
POP EDX
PUSH EDI
PUSH EBP
CALL 0x00058e90
MOV dword ptr [ESP],EDI
CALL 0x0002da80
ADD ESP,0x10
SUB ESP,0x4
PUSH dword ptr [ESP + 0x34]
PUSH dword ptr [ESP + 0x30]
PUSH ESI
CALL 0x00060170
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH 0xb
PUSH EDI
CALL 0x0001ea70
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00030220
SUB ESP,0x8
PUSH 0xb
PUSH EDI
CALL 0x0001ea70
ADD ESP,0x10
CMP EAX,0x2
JNZ 0x0003016d
SUB ESP,0x8
PUSH 0xd
PUSH EDI
CALL 0x0001ea70
ADD ESP,0x10
CMP EAX,0x1
JZ 0x0003016d
PUSH EDI
PUSH dword ptr [ESP + 0x28]
PUSH ESI
PUSH 0x0
CALL 0x0002fd50
ADD ESP,0x10
TEST EAX,EAX
JZ 0x0003016d
TEST EBP,EBP
JZ 0x00030266
SUB ESP,0x4
LEA EAX,[EBX + 0xfffcf404]
PUSH dword ptr [ESP + 0x3c]
PUSH ESI
PUSH EAX
CALL 0x0002d860
POP ECX
MOV EDI,EAX
POP EAX
PUSH EDI
PUSH EBP
CALL 0x00058e90
MOV dword ptr [ESP],EDI
CALL 0x0002da80
ADD ESP,0x10
SUB ESP,0xc
PUSH ESI
CALL 0x0002d300
MOV ECX,dword ptr [ESP + 0x38]
MOV dword ptr [ECX],EAX
MOV dword ptr [ESP],ESI
CALL 0x000603f0
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00030140(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,\n                 int param_5,int param_6,undefined4 param_7)\n\n{\n  int iVar1;\n  char *pcVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_0001ea70(param_4,0xd);\n  if (iVar1 == 0) goto LAB_0003016d;\n  iVar1 = FUN_0001ea70(param_4,0xb);\n  if (iVar1 != 0) {\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }\n  iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);\n  if (iVar1 != 0) {\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }\nLAB_0003016d:\n  if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }\n  FUN_00060170(param_1,param_3,param_5);\n  return;\n}\n\n" comment (function_definition "void FUN_00030140(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,\n                 int param_5,int param_6,undefined4 param_7)\n\n{\n  int iVar1;\n  char *pcVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_0001ea70(param_4,0xd);\n  if (iVar1 == 0) goto LAB_0003016d;\n  iVar1 = FUN_0001ea70(param_4,0xb);\n  if (iVar1 != 0) {\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }\n  iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);\n  if (iVar1 != 0) {\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }\nLAB_0003016d:\n  if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }\n  FUN_00060170(param_1,param_3,param_5);\n  return;\n}" primitive_type (function_declarator "FUN_00030140(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,\n                 int param_5,int param_6,undefined4 param_7)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,\n                 int param_5,int param_6,undefined4 param_7)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "int param_6" primitive_type identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_0001ea70(param_4,0xd);\n  if (iVar1 == 0) goto LAB_0003016d;\n  iVar1 = FUN_0001ea70(param_4,0xb);\n  if (iVar1 != 0) {\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }\n  iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);\n  if (iVar1 != 0) {\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }\nLAB_0003016d:\n  if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }\n  FUN_00060170(param_1,param_3,param_5);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_0001ea70(param_4,0xd);" (assignment_expression "iVar1 = FUN_0001ea70(param_4,0xd)" identifier = (call_expression "FUN_0001ea70(param_4,0xd)" identifier (argument_list "(param_4,0xd)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 == 0) goto LAB_0003016d;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0003016d;" goto statement_identifier ;)) (expression_statement "iVar1 = FUN_0001ea70(param_4,0xb);" (assignment_expression "iVar1 = FUN_0001ea70(param_4,0xb)" identifier = (call_expression "FUN_0001ea70(param_4,0xb)" identifier (argument_list "(param_4,0xb)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }" { (expression_statement "iVar1 = FUN_0001ea70(param_4,0xb);" (assignment_expression "iVar1 = FUN_0001ea70(param_4,0xb)" identifier = (call_expression "FUN_0001ea70(param_4,0xb)" identifier (argument_list "(param_4,0xb)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 2) goto LAB_0003016d;" if (parenthesized_expression "(iVar1 != 2)" ( (binary_expression "iVar1 != 2" identifier != number_literal) )) (goto_statement "goto LAB_0003016d;" goto statement_identifier ;)) (expression_statement "iVar1 = FUN_0001ea70(param_4,0xd);" (assignment_expression "iVar1 = FUN_0001ea70(param_4,0xd)" identifier = (call_expression "FUN_0001ea70(param_4,0xd)" identifier (argument_list "(param_4,0xd)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 == 1) goto LAB_0003016d;" if (parenthesized_expression "(iVar1 == 1)" ( (binary_expression "iVar1 == 1" identifier == number_literal) )) (goto_statement "goto LAB_0003016d;" goto statement_identifier ;)) })) (expression_statement "iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);" (assignment_expression "iVar1 = FUN_0002fd50(0,param_1,param_2,param_4)" identifier = (call_expression "FUN_0002fd50(0,param_1,param_2,param_4)" identifier (argument_list "(0,param_1,param_2,param_4)" ( number_literal , identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }" { (if_statement "if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }" if (parenthesized_expression "(param_6 != 0)" ( (binary_expression "param_6 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }" { (expression_statement "uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);" (assignment_expression "uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7)" identifier = (call_expression "FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7)" identifier (argument_list "("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7)" ( (string_literal ""Leaving host lookup to proxy of \"%s\" (for %s)"" " string_content escape_sequence string_content escape_sequence string_content ") , identifier , identifier )))) ;) (expression_statement "FUN_00058e90(param_6,uVar3);" (call_expression "FUN_00058e90(param_6,uVar3)" identifier (argument_list "(param_6,uVar3)" ( identifier , identifier ))) ;) (expression_statement "FUN_0002da80(uVar3);" (call_expression "FUN_0002da80(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) })) (expression_statement "uVar3 = FUN_0002d300(param_1);" (assignment_expression "uVar3 = FUN_0002d300(param_1)" identifier = (call_expression "FUN_0002d300(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "*param_3 = uVar3;" (assignment_expression "*param_3 = uVar3" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "FUN_000603f0(param_1);" (call_expression "FUN_000603f0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })) (labeled_statement "LAB_0003016d:\n  if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }" statement_identifier : (if_statement "if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }" if (parenthesized_expression "(param_6 != 0)" ( (binary_expression "param_6 != 0" identifier != number_literal) )) (compound_statement "{\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }" { (expression_statement "pcVar2 = " (IPv4)";" (assignment_expression "pcVar2 = " (IPv4)"" identifier = (string_literal "" (IPv4)"" " string_content ")) ;) (if_statement "if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }" if (parenthesized_expression "(param_5 != 1)" ( (binary_expression "param_5 != 1" identifier != number_literal) )) (compound_statement "{\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }" { (expression_statement "pcVar2 = " (IPv6)";" (assignment_expression "pcVar2 = " (IPv6)"" identifier = (string_literal "" (IPv6)"" " string_content ")) ;) (if_statement "if (param_5 != 2) {\n        pcVar2 = "";\n      }" if (parenthesized_expression "(param_5 != 2)" ( (binary_expression "param_5 != 2" identifier != number_literal) )) (compound_statement "{\n        pcVar2 = "";\n      }" { (expression_statement "pcVar2 = "";" (assignment_expression "pcVar2 = """ identifier = (string_literal """" " ")) ;) })) })) (expression_statement "uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);" (assignment_expression "uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7)" identifier = (call_expression "FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7)" identifier (argument_list "("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7)" ( (string_literal ""Looking up host \"%s\"%s for %s"" " string_content escape_sequence string_content escape_sequence string_content ") , identifier , identifier , identifier )))) ;) (expression_statement "FUN_00058e90(param_6,uVar3);" (call_expression "FUN_00058e90(param_6,uVar3)" identifier (argument_list "(param_6,uVar3)" ( identifier , identifier ))) ;) (expression_statement "FUN_0002da80(uVar3);" (call_expression "FUN_0002da80(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) }))) (expression_statement "FUN_00060170(param_1,param_3,param_5);" (call_expression "FUN_00060170(param_1,param_3,param_5)" identifier (argument_list "(param_1,param_3,param_5)" ( identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nSockAddr name_lookup(char *host,int port,char **canonicalname,Conf *conf,int addressfamily,\n                    void *frontend,char *reason)\n\n{\n  int iVar1;\n  char *pcVar2;\n  SockAddr pSVar3;\n  \n  iVar1 = conf_get_int(conf,0xd);\n  if (iVar1 == 0) goto LAB_0003016d;\n  iVar1 = conf_get_int(conf,0xb);\n  if (iVar1 != 0) {\n    iVar1 = conf_get_int(conf,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = conf_get_int(conf,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }\n  iVar1 = proxy_for_destination((SockAddr)0x0,host,port,conf);\n  if (iVar1 != 0) {\n    if (frontend != (void *)0x0) {\n      pcVar2 = dupprintf("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason);\n      logevent(frontend,pcVar2);\n      safefree(pcVar2);\n    }\n    pcVar2 = dupstr(host);\n    *canonicalname = pcVar2;\n    pSVar3 = sk_nonamelookup(host);\n    return pSVar3;\n  }\nLAB_0003016d:\n  if (frontend != (void *)0x0) {\n    pcVar2 = " (IPv4)";\n    if (addressfamily != 1) {\n      pcVar2 = " (IPv6)";\n      if (addressfamily != 2) {\n        pcVar2 = "";\n      }\n    }\n    pcVar2 = dupprintf("Looking up host \"%s\"%s for %s",host,pcVar2,reason);\n    logevent(frontend,pcVar2);\n    safefree(pcVar2);\n  }\n  pSVar3 = sk_namelookup(host,canonicalname,addressfamily);\n  return pSVar3;\n}\n\n" comment comment comment (function_definition "SockAddr name_lookup(char *host,int port,char **canonicalname,Conf *conf,int addressfamily,\n                    void *frontend,char *reason)\n\n{\n  int iVar1;\n  char *pcVar2;\n  SockAddr pSVar3;\n  \n  iVar1 = conf_get_int(conf,0xd);\n  if (iVar1 == 0) goto LAB_0003016d;\n  iVar1 = conf_get_int(conf,0xb);\n  if (iVar1 != 0) {\n    iVar1 = conf_get_int(conf,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = conf_get_int(conf,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }\n  iVar1 = proxy_for_destination((SockAddr)0x0,host,port,conf);\n  if (iVar1 != 0) {\n    if (frontend != (void *)0x0) {\n      pcVar2 = dupprintf("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason);\n      logevent(frontend,pcVar2);\n      safefree(pcVar2);\n    }\n    pcVar2 = dupstr(host);\n    *canonicalname = pcVar2;\n    pSVar3 = sk_nonamelookup(host);\n    return pSVar3;\n  }\nLAB_0003016d:\n  if (frontend != (void *)0x0) {\n    pcVar2 = " (IPv4)";\n    if (addressfamily != 1) {\n      pcVar2 = " (IPv6)";\n      if (addressfamily != 2) {\n        pcVar2 = "";\n      }\n    }\n    pcVar2 = dupprintf("Looking up host \"%s\"%s for %s",host,pcVar2,reason);\n    logevent(frontend,pcVar2);\n    safefree(pcVar2);\n  }\n  pSVar3 = sk_namelookup(host,canonicalname,addressfamily);\n  return pSVar3;\n}" type_identifier (function_declarator "name_lookup(char *host,int port,char **canonicalname,Conf *conf,int addressfamily,\n                    void *frontend,char *reason)" identifier (parameter_list "(char *host,int port,char **canonicalname,Conf *conf,int addressfamily,\n                    void *frontend,char *reason)" ( (parameter_declaration "char *host" primitive_type (pointer_declarator "*host" * identifier)) , (parameter_declaration "int port" primitive_type identifier) , (parameter_declaration "char **canonicalname" primitive_type (pointer_declarator "**canonicalname" * (pointer_declarator "*canonicalname" * identifier))) , (parameter_declaration "Conf *conf" type_identifier (pointer_declarator "*conf" * identifier)) , (parameter_declaration "int addressfamily" primitive_type identifier) , (parameter_declaration "void *frontend" primitive_type (pointer_declarator "*frontend" * identifier)) , (parameter_declaration "char *reason" primitive_type (pointer_declarator "*reason" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  SockAddr pSVar3;\n  \n  iVar1 = conf_get_int(conf,0xd);\n  if (iVar1 == 0) goto LAB_0003016d;\n  iVar1 = conf_get_int(conf,0xb);\n  if (iVar1 != 0) {\n    iVar1 = conf_get_int(conf,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = conf_get_int(conf,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }\n  iVar1 = proxy_for_destination((SockAddr)0x0,host,port,conf);\n  if (iVar1 != 0) {\n    if (frontend != (void *)0x0) {\n      pcVar2 = dupprintf("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason);\n      logevent(frontend,pcVar2);\n      safefree(pcVar2);\n    }\n    pcVar2 = dupstr(host);\n    *canonicalname = pcVar2;\n    pSVar3 = sk_nonamelookup(host);\n    return pSVar3;\n  }\nLAB_0003016d:\n  if (frontend != (void *)0x0) {\n    pcVar2 = " (IPv4)";\n    if (addressfamily != 1) {\n      pcVar2 = " (IPv6)";\n      if (addressfamily != 2) {\n        pcVar2 = "";\n      }\n    }\n    pcVar2 = dupprintf("Looking up host \"%s\"%s for %s",host,pcVar2,reason);\n    logevent(frontend,pcVar2);\n    safefree(pcVar2);\n  }\n  pSVar3 = sk_namelookup(host,canonicalname,addressfamily);\n  return pSVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "SockAddr pSVar3;" type_identifier identifier ;) (expression_statement "iVar1 = conf_get_int(conf,0xd);" (assignment_expression "iVar1 = conf_get_int(conf,0xd)" identifier = (call_expression "conf_get_int(conf,0xd)" identifier (argument_list "(conf,0xd)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 == 0) goto LAB_0003016d;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0003016d;" goto statement_identifier ;)) (expression_statement "iVar1 = conf_get_int(conf,0xb);" (assignment_expression "iVar1 = conf_get_int(conf,0xb)" identifier = (call_expression "conf_get_int(conf,0xb)" identifier (argument_list "(conf,0xb)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar1 = conf_get_int(conf,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = conf_get_int(conf,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = conf_get_int(conf,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = conf_get_int(conf,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }" { (expression_statement "iVar1 = conf_get_int(conf,0xb);" (assignment_expression "iVar1 = conf_get_int(conf,0xb)" identifier = (call_expression "conf_get_int(conf,0xb)" identifier (argument_list "(conf,0xb)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 2) goto LAB_0003016d;" if (parenthesized_expression "(iVar1 != 2)" ( (binary_expression "iVar1 != 2" identifier != number_literal) )) (goto_statement "goto LAB_0003016d;" goto statement_identifier ;)) (expression_statement "iVar1 = conf_get_int(conf,0xd);" (assignment_expression "iVar1 = conf_get_int(conf,0xd)" identifier = (call_expression "conf_get_int(conf,0xd)" identifier (argument_list "(conf,0xd)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 == 1) goto LAB_0003016d;" if (parenthesized_expression "(iVar1 == 1)" ( (binary_expression "iVar1 == 1" identifier == number_literal) )) (goto_statement "goto LAB_0003016d;" goto statement_identifier ;)) })) (expression_statement "iVar1 = proxy_for_destination((SockAddr)0x0,host,port,conf);" (assignment_expression "iVar1 = proxy_for_destination((SockAddr)0x0,host,port,conf)" identifier = (call_expression "proxy_for_destination((SockAddr)0x0,host,port,conf)" identifier (argument_list "((SockAddr)0x0,host,port,conf)" ( (cast_expression "(SockAddr)0x0" ( (type_descriptor "SockAddr" type_identifier) ) number_literal) , identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    if (frontend != (void *)0x0) {\n      pcVar2 = dupprintf("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason);\n      logevent(frontend,pcVar2);\n      safefree(pcVar2);\n    }\n    pcVar2 = dupstr(host);\n    *canonicalname = pcVar2;\n    pSVar3 = sk_nonamelookup(host);\n    return pSVar3;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (frontend != (void *)0x0) {\n      pcVar2 = dupprintf("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason);\n      logevent(frontend,pcVar2);\n      safefree(pcVar2);\n    }\n    pcVar2 = dupstr(host);\n    *canonicalname = pcVar2;\n    pSVar3 = sk_nonamelookup(host);\n    return pSVar3;\n  }" { (if_statement "if (frontend != (void *)0x0) {\n      pcVar2 = dupprintf("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason);\n      logevent(frontend,pcVar2);\n      safefree(pcVar2);\n    }" if (parenthesized_expression "(frontend != (void *)0x0)" ( (binary_expression "frontend != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pcVar2 = dupprintf("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason);\n      logevent(frontend,pcVar2);\n      safefree(pcVar2);\n    }" { (expression_statement "pcVar2 = dupprintf("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason);" (assignment_expression "pcVar2 = dupprintf("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason)" identifier = (call_expression "dupprintf("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason)" identifier (argument_list "("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason)" ( (string_literal ""Leaving host lookup to proxy of \"%s\" (for %s)"" " string_content escape_sequence string_content escape_sequence string_content ") , identifier , identifier )))) ;) (expression_statement "logevent(frontend,pcVar2);" (call_expression "logevent(frontend,pcVar2)" identifier (argument_list "(frontend,pcVar2)" ( identifier , identifier ))) ;) (expression_statement "safefree(pcVar2);" (call_expression "safefree(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) })) (expression_statement "pcVar2 = dupstr(host);" (assignment_expression "pcVar2 = dupstr(host)" identifier = (call_expression "dupstr(host)" identifier (argument_list "(host)" ( identifier )))) ;) (expression_statement "*canonicalname = pcVar2;" (assignment_expression "*canonicalname = pcVar2" (pointer_expression "*canonicalname" * identifier) = identifier) ;) (expression_statement "pSVar3 = sk_nonamelookup(host);" (assignment_expression "pSVar3 = sk_nonamelookup(host)" identifier = (call_expression "sk_nonamelookup(host)" identifier (argument_list "(host)" ( identifier )))) ;) (return_statement "return pSVar3;" return identifier ;) })) (labeled_statement "LAB_0003016d:\n  if (frontend != (void *)0x0) {\n    pcVar2 = " (IPv4)";\n    if (addressfamily != 1) {\n      pcVar2 = " (IPv6)";\n      if (addressfamily != 2) {\n        pcVar2 = "";\n      }\n    }\n    pcVar2 = dupprintf("Looking up host \"%s\"%s for %s",host,pcVar2,reason);\n    logevent(frontend,pcVar2);\n    safefree(pcVar2);\n  }" statement_identifier : (if_statement "if (frontend != (void *)0x0) {\n    pcVar2 = " (IPv4)";\n    if (addressfamily != 1) {\n      pcVar2 = " (IPv6)";\n      if (addressfamily != 2) {\n        pcVar2 = "";\n      }\n    }\n    pcVar2 = dupprintf("Looking up host \"%s\"%s for %s",host,pcVar2,reason);\n    logevent(frontend,pcVar2);\n    safefree(pcVar2);\n  }" if (parenthesized_expression "(frontend != (void *)0x0)" ( (binary_expression "frontend != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pcVar2 = " (IPv4)";\n    if (addressfamily != 1) {\n      pcVar2 = " (IPv6)";\n      if (addressfamily != 2) {\n        pcVar2 = "";\n      }\n    }\n    pcVar2 = dupprintf("Looking up host \"%s\"%s for %s",host,pcVar2,reason);\n    logevent(frontend,pcVar2);\n    safefree(pcVar2);\n  }" { (expression_statement "pcVar2 = " (IPv4)";" (assignment_expression "pcVar2 = " (IPv4)"" identifier = (string_literal "" (IPv4)"" " string_content ")) ;) (if_statement "if (addressfamily != 1) {\n      pcVar2 = " (IPv6)";\n      if (addressfamily != 2) {\n        pcVar2 = "";\n      }\n    }" if (parenthesized_expression "(addressfamily != 1)" ( (binary_expression "addressfamily != 1" identifier != number_literal) )) (compound_statement "{\n      pcVar2 = " (IPv6)";\n      if (addressfamily != 2) {\n        pcVar2 = "";\n      }\n    }" { (expression_statement "pcVar2 = " (IPv6)";" (assignment_expression "pcVar2 = " (IPv6)"" identifier = (string_literal "" (IPv6)"" " string_content ")) ;) (if_statement "if (addressfamily != 2) {\n        pcVar2 = "";\n      }" if (parenthesized_expression "(addressfamily != 2)" ( (binary_expression "addressfamily != 2" identifier != number_literal) )) (compound_statement "{\n        pcVar2 = "";\n      }" { (expression_statement "pcVar2 = "";" (assignment_expression "pcVar2 = """ identifier = (string_literal """" " ")) ;) })) })) (expression_statement "pcVar2 = dupprintf("Looking up host \"%s\"%s for %s",host,pcVar2,reason);" (assignment_expression "pcVar2 = dupprintf("Looking up host \"%s\"%s for %s",host,pcVar2,reason)" identifier = (call_expression "dupprintf("Looking up host \"%s\"%s for %s",host,pcVar2,reason)" identifier (argument_list "("Looking up host \"%s\"%s for %s",host,pcVar2,reason)" ( (string_literal ""Looking up host \"%s\"%s for %s"" " string_content escape_sequence string_content escape_sequence string_content ") , identifier , identifier , identifier )))) ;) (expression_statement "logevent(frontend,pcVar2);" (call_expression "logevent(frontend,pcVar2)" identifier (argument_list "(frontend,pcVar2)" ( identifier , identifier ))) ;) (expression_statement "safefree(pcVar2);" (call_expression "safefree(pcVar2)" identifier (argument_list "(pcVar2)" ( identifier ))) ;) }))) (expression_statement "pSVar3 = sk_namelookup(host,canonicalname,addressfamily);" (assignment_expression "pSVar3 = sk_namelookup(host,canonicalname,addressfamily)" identifier = (call_expression "sk_namelookup(host,canonicalname,addressfamily)" identifier (argument_list "(host,canonicalname,addressfamily)" ( identifier , identifier , identifier )))) ;) (return_statement "return pSVar3;" return identifier ;) })))
(translation_unit "void FUN_00030140(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,\n                 int param_5,int param_6,undefined4 param_7)\n\n{\n  int iVar1;\n  char *pcVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_0001ea70(param_4,0xd);\n  if (iVar1 == 0) goto LAB_0003016d;\n  iVar1 = FUN_0001ea70(param_4,0xb);\n  if (iVar1 != 0) {\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }\n  iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);\n  if (iVar1 != 0) {\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }\nLAB_0003016d:\n  if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }\n  FUN_00060170(param_1,param_3,param_5);\n  return;\n}\n\n" (function_definition "void FUN_00030140(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,\n                 int param_5,int param_6,undefined4 param_7)\n\n{\n  int iVar1;\n  char *pcVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_0001ea70(param_4,0xd);\n  if (iVar1 == 0) goto LAB_0003016d;\n  iVar1 = FUN_0001ea70(param_4,0xb);\n  if (iVar1 != 0) {\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }\n  iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);\n  if (iVar1 != 0) {\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }\nLAB_0003016d:\n  if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }\n  FUN_00060170(param_1,param_3,param_5);\n  return;\n}" primitive_type (function_declarator "FUN_00030140(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,\n                 int param_5,int param_6,undefined4 param_7)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,\n                 int param_5,int param_6,undefined4 param_7)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) , (parameter_declaration "int param_6" primitive_type identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_0001ea70(param_4,0xd);\n  if (iVar1 == 0) goto LAB_0003016d;\n  iVar1 = FUN_0001ea70(param_4,0xb);\n  if (iVar1 != 0) {\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }\n  iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);\n  if (iVar1 != 0) {\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }\nLAB_0003016d:\n  if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }\n  FUN_00060170(param_1,param_3,param_5);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_0001ea70(param_4,0xd);" (assignment_expression "iVar1 = FUN_0001ea70(param_4,0xd)" identifier = (call_expression "FUN_0001ea70(param_4,0xd)" identifier (argument_list "(param_4,0xd)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 == 0) goto LAB_0003016d;" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0003016d;" goto statement_identifier ;)) (expression_statement "iVar1 = FUN_0001ea70(param_4,0xb);" (assignment_expression "iVar1 = FUN_0001ea70(param_4,0xb)" identifier = (call_expression "FUN_0001ea70(param_4,0xb)" identifier (argument_list "(param_4,0xb)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 0) {\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }" { (expression_statement "iVar1 = FUN_0001ea70(param_4,0xb);" (assignment_expression "iVar1 = FUN_0001ea70(param_4,0xb)" identifier = (call_expression "FUN_0001ea70(param_4,0xb)" identifier (argument_list "(param_4,0xb)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 != 2) goto LAB_0003016d;" if (parenthesized_expression "(iVar1 != 2)" ( (binary_expression "iVar1 != 2" identifier != number_literal) )) (goto_statement "goto LAB_0003016d;" goto statement_identifier ;)) (expression_statement "iVar1 = FUN_0001ea70(param_4,0xd);" (assignment_expression "iVar1 = FUN_0001ea70(param_4,0xd)" identifier = (call_expression "FUN_0001ea70(param_4,0xd)" identifier (argument_list "(param_4,0xd)" ( identifier , number_literal )))) ;) (if_statement "if (iVar1 == 1) goto LAB_0003016d;" if (parenthesized_expression "(iVar1 == 1)" ( (binary_expression "iVar1 == 1" identifier == number_literal) )) (goto_statement "goto LAB_0003016d;" goto statement_identifier ;)) })) (expression_statement "iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);" (assignment_expression "iVar1 = FUN_0002fd50(0,param_1,param_2,param_4)" identifier = (call_expression "FUN_0002fd50(0,param_1,param_2,param_4)" identifier (argument_list "(0,param_1,param_2,param_4)" ( number_literal , identifier , identifier , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }" { (if_statement "if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }" if (parenthesized_expression "(param_6 != 0)" ( (binary_expression "param_6 != 0" identifier != number_literal) )) (compound_statement "{\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }" { (expression_statement "uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);" (assignment_expression "uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7)" identifier = (call_expression "FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7)" identifier (argument_list "("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7)" ( (string_literal ""Leaving host lookup to proxy of \"%s\" (for %s)"" " string_content escape_sequence string_content escape_sequence string_content ") , identifier , identifier )))) ;) (expression_statement "FUN_00058e90(param_6,uVar3);" (call_expression "FUN_00058e90(param_6,uVar3)" identifier (argument_list "(param_6,uVar3)" ( identifier , identifier ))) ;) (expression_statement "FUN_0002da80(uVar3);" (call_expression "FUN_0002da80(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) })) (expression_statement "uVar3 = FUN_0002d300(param_1);" (assignment_expression "uVar3 = FUN_0002d300(param_1)" identifier = (call_expression "FUN_0002d300(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "*param_3 = uVar3;" (assignment_expression "*param_3 = uVar3" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "FUN_000603f0(param_1);" (call_expression "FUN_000603f0(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })) (labeled_statement "LAB_0003016d:\n  if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }" statement_identifier : (if_statement "if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }" if (parenthesized_expression "(param_6 != 0)" ( (binary_expression "param_6 != 0" identifier != number_literal) )) (compound_statement "{\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }" { (expression_statement "pcVar2 = " (IPv4)";" (assignment_expression "pcVar2 = " (IPv4)"" identifier = (string_literal "" (IPv4)"" " string_content ")) ;) (if_statement "if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }" if (parenthesized_expression "(param_5 != 1)" ( (binary_expression "param_5 != 1" identifier != number_literal) )) (compound_statement "{\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }" { (expression_statement "pcVar2 = " (IPv6)";" (assignment_expression "pcVar2 = " (IPv6)"" identifier = (string_literal "" (IPv6)"" " string_content ")) ;) (if_statement "if (param_5 != 2) {\n        pcVar2 = "";\n      }" if (parenthesized_expression "(param_5 != 2)" ( (binary_expression "param_5 != 2" identifier != number_literal) )) (compound_statement "{\n        pcVar2 = "";\n      }" { (expression_statement "pcVar2 = "";" (assignment_expression "pcVar2 = """ identifier = (string_literal """" " ")) ;) })) })) (expression_statement "uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);" (assignment_expression "uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7)" identifier = (call_expression "FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7)" identifier (argument_list "("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7)" ( (string_literal ""Looking up host \"%s\"%s for %s"" " string_content escape_sequence string_content escape_sequence string_content ") , identifier , identifier , identifier )))) ;) (expression_statement "FUN_00058e90(param_6,uVar3);" (call_expression "FUN_00058e90(param_6,uVar3)" identifier (argument_list "(param_6,uVar3)" ( identifier , identifier ))) ;) (expression_statement "FUN_0002da80(uVar3);" (call_expression "FUN_0002da80(uVar3)" identifier (argument_list "(uVar3)" ( identifier ))) ;) }))) (expression_statement "FUN_00060170(param_1,param_3,param_5);" (call_expression "FUN_00060170(param_1,param_3,param_5)" identifier (argument_list "(param_1,param_3,param_5)" ( identifier , identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content ") , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " ")) ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence string_content ") , IDENT , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_00030140(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,\n                 int param_5,int param_6,undefined4 param_7)\n\n{\n  int iVar1;\n  char *pcVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_0001ea70(param_4,0xd);\n  if (iVar1 == 0) goto LAB_0003016d;\n  iVar1 = FUN_0001ea70(param_4,0xb);\n  if (iVar1 != 0) {\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }\n  iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);\n  if (iVar1 != 0) {\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }\nLAB_0003016d:\n  if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }\n  FUN_00060170(param_1,param_3,param_5);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00030140(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,\n                 int param_5,int param_6,undefined4 param_7)" (identifier "FUN_00030140") (parameter_list "(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,\n                 int param_5,int param_6,undefined4 param_7)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) (, ",") (parameter_declaration "int param_6" (primitive_type "int") (identifier "param_6")) (, ",") (parameter_declaration "undefined4 param_7" (type_identifier "undefined4") (identifier "param_7")) () ")"))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  undefined4 uVar3;\n  \n  iVar1 = FUN_0001ea70(param_4,0xd);\n  if (iVar1 == 0) goto LAB_0003016d;\n  iVar1 = FUN_0001ea70(param_4,0xb);\n  if (iVar1 != 0) {\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }\n  iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);\n  if (iVar1 != 0) {\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }\nLAB_0003016d:\n  if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }\n  FUN_00060170(param_1,param_3,param_5);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (expression_statement "iVar1 = FUN_0001ea70(param_4,0xd);" (assignment_expression "iVar1 = FUN_0001ea70(param_4,0xd)" (identifier "iVar1") (= "=") (call_expression "FUN_0001ea70(param_4,0xd)" (identifier "FUN_0001ea70") (argument_list "(param_4,0xd)" (( "(") (identifier "param_4") (, ",") (number_literal "0xd") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) goto LAB_0003016d;" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0003016d;" (goto "goto") (statement_identifier "LAB_0003016d") (; ";"))) (expression_statement "iVar1 = FUN_0001ea70(param_4,0xb);" (assignment_expression "iVar1 = FUN_0001ea70(param_4,0xb)" (identifier "iVar1") (= "=") (call_expression "FUN_0001ea70(param_4,0xb)" (identifier "FUN_0001ea70") (argument_list "(param_4,0xb)" (( "(") (identifier "param_4") (, ",") (number_literal "0xb") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = FUN_0001ea70(param_4,0xb);\n    if (iVar1 != 2) goto LAB_0003016d;\n    iVar1 = FUN_0001ea70(param_4,0xd);\n    if (iVar1 == 1) goto LAB_0003016d;\n  }" ({ "{") (expression_statement "iVar1 = FUN_0001ea70(param_4,0xb);" (assignment_expression "iVar1 = FUN_0001ea70(param_4,0xb)" (identifier "iVar1") (= "=") (call_expression "FUN_0001ea70(param_4,0xb)" (identifier "FUN_0001ea70") (argument_list "(param_4,0xb)" (( "(") (identifier "param_4") (, ",") (number_literal "0xb") () ")")))) (; ";")) (if_statement "if (iVar1 != 2) goto LAB_0003016d;" (if "if") (parenthesized_expression "(iVar1 != 2)" (( "(") (binary_expression "iVar1 != 2" (identifier "iVar1") (!= "!=") (number_literal "2")) () ")")) (goto_statement "goto LAB_0003016d;" (goto "goto") (statement_identifier "LAB_0003016d") (; ";"))) (expression_statement "iVar1 = FUN_0001ea70(param_4,0xd);" (assignment_expression "iVar1 = FUN_0001ea70(param_4,0xd)" (identifier "iVar1") (= "=") (call_expression "FUN_0001ea70(param_4,0xd)" (identifier "FUN_0001ea70") (argument_list "(param_4,0xd)" (( "(") (identifier "param_4") (, ",") (number_literal "0xd") () ")")))) (; ";")) (if_statement "if (iVar1 == 1) goto LAB_0003016d;" (if "if") (parenthesized_expression "(iVar1 == 1)" (( "(") (binary_expression "iVar1 == 1" (identifier "iVar1") (== "==") (number_literal "1")) () ")")) (goto_statement "goto LAB_0003016d;" (goto "goto") (statement_identifier "LAB_0003016d") (; ";"))) (} "}"))) (expression_statement "iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);" (assignment_expression "iVar1 = FUN_0002fd50(0,param_1,param_2,param_4)" (identifier "iVar1") (= "=") (call_expression "FUN_0002fd50(0,param_1,param_2,param_4)" (identifier "FUN_0002fd50") (argument_list "(0,param_1,param_2,param_4)" (( "(") (number_literal "0") (, ",") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_4") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }\n    uVar3 = FUN_0002d300(param_1);\n    *param_3 = uVar3;\n    FUN_000603f0(param_1);\n    return;\n  }" ({ "{") (if_statement "if (param_6 != 0) {\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }" (if "if") (parenthesized_expression "(param_6 != 0)" (( "(") (binary_expression "param_6 != 0" (identifier "param_6") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);\n      FUN_00058e90(param_6,uVar3);\n      FUN_0002da80(uVar3);\n    }" ({ "{") (expression_statement "uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);" (assignment_expression "uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7)" (identifier "uVar3") (= "=") (call_expression "FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7)" (identifier "FUN_0002d860") (argument_list "("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7)" (( "(") (string_literal ""Leaving host lookup to proxy of \"%s\" (for %s)"" (" """) (string_content "Leaving host lookup to proxy of ") (escape_sequence "\"") (string_content "%s") (escape_sequence "\"") (string_content " (for %s)") (" """)) (, ",") (identifier "param_1") (, ",") (identifier "param_7") () ")")))) (; ";")) (expression_statement "FUN_00058e90(param_6,uVar3);" (call_expression "FUN_00058e90(param_6,uVar3)" (identifier "FUN_00058e90") (argument_list "(param_6,uVar3)" (( "(") (identifier "param_6") (, ",") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "FUN_0002da80(uVar3);" (call_expression "FUN_0002da80(uVar3)" (identifier "FUN_0002da80") (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")"))) (; ";")) (} "}"))) (expression_statement "uVar3 = FUN_0002d300(param_1);" (assignment_expression "uVar3 = FUN_0002d300(param_1)" (identifier "uVar3") (= "=") (call_expression "FUN_0002d300(param_1)" (identifier "FUN_0002d300") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "*param_3 = uVar3;" (assignment_expression "*param_3 = uVar3" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "uVar3")) (; ";")) (expression_statement "FUN_000603f0(param_1);" (call_expression "FUN_000603f0(param_1)" (identifier "FUN_000603f0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (labeled_statement "LAB_0003016d:\n  if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }" (statement_identifier "LAB_0003016d") (: ":") (if_statement "if (param_6 != 0) {\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }" (if "if") (parenthesized_expression "(param_6 != 0)" (( "(") (binary_expression "param_6 != 0" (identifier "param_6") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    pcVar2 = " (IPv4)";\n    if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }\n    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);\n    FUN_00058e90(param_6,uVar3);\n    FUN_0002da80(uVar3);\n  }" ({ "{") (expression_statement "pcVar2 = " (IPv4)";" (assignment_expression "pcVar2 = " (IPv4)"" (identifier "pcVar2") (= "=") (string_literal "" (IPv4)"" (" """) (string_content " (IPv4)") (" """))) (; ";")) (if_statement "if (param_5 != 1) {\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }" (if "if") (parenthesized_expression "(param_5 != 1)" (( "(") (binary_expression "param_5 != 1" (identifier "param_5") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n      pcVar2 = " (IPv6)";\n      if (param_5 != 2) {\n        pcVar2 = "";\n      }\n    }" ({ "{") (expression_statement "pcVar2 = " (IPv6)";" (assignment_expression "pcVar2 = " (IPv6)"" (identifier "pcVar2") (= "=") (string_literal "" (IPv6)"" (" """) (string_content " (IPv6)") (" """))) (; ";")) (if_statement "if (param_5 != 2) {\n        pcVar2 = "";\n      }" (if "if") (parenthesized_expression "(param_5 != 2)" (( "(") (binary_expression "param_5 != 2" (identifier "param_5") (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n        pcVar2 = "";\n      }" ({ "{") (expression_statement "pcVar2 = "";" (assignment_expression "pcVar2 = """ (identifier "pcVar2") (= "=") (string_literal """" (" """) (" """))) (; ";")) (} "}"))) (} "}"))) (expression_statement "uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);" (assignment_expression "uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7)" (identifier "uVar3") (= "=") (call_expression "FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7)" (identifier "FUN_0002d860") (argument_list "("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7)" (( "(") (string_literal ""Looking up host \"%s\"%s for %s"" (" """) (string_content "Looking up host ") (escape_sequence "\"") (string_content "%s") (escape_sequence "\"") (string_content "%s for %s") (" """)) (, ",") (identifier "param_1") (, ",") (identifier "pcVar2") (, ",") (identifier "param_7") () ")")))) (; ";")) (expression_statement "FUN_00058e90(param_6,uVar3);" (call_expression "FUN_00058e90(param_6,uVar3)" (identifier "FUN_00058e90") (argument_list "(param_6,uVar3)" (( "(") (identifier "param_6") (, ",") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "FUN_0002da80(uVar3);" (call_expression "FUN_0002da80(uVar3)" (identifier "FUN_0002da80") (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")"))) (; ";")) (} "}")))) (expression_statement "FUN_00060170(param_1,param_3,param_5);" (call_expression "FUN_00060170(param_1,param_3,param_5)" (identifier "FUN_00060170") (argument_list "(param_1,param_3,param_5)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") (, ",") (identifier "param_5") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

type_1 function_1(char *host,int port,char **canonicalname,type_2 *conf,int var_10,
                    void *var_4,char *reason)

{
  int var_2;
  char *pcVar2;
  type_1 pSVar3;
  
  var_2 = var_1(conf,0xd);
  if (var_2 == 0) goto LAB_0003016d;
  var_2 = var_1(conf,0xb);
  if (var_2 != 0) {
    var_2 = var_1(conf,0xb);
    if (var_2 != 2) goto LAB_0003016d;
    var_2 = var_1(conf,0xd);
    if (var_2 == 1) goto LAB_0003016d;
  }
  var_2 = var_3((type_1)0x0,host,port,conf);
  if (var_2 != 0) {
    if (var_4 != (void *)0x0) {
      pcVar2 = var_5("Leaving host lookup to proxy of \"%s\" (for %s)",host,reason);
      var_6(var_4,pcVar2);
      var_7(pcVar2);
    }
    pcVar2 = var_8(host);
    *canonicalname = pcVar2;
    pSVar3 = var_9(host);
    return pSVar3;
  }
LAB_0003016d:
  if (var_4 != (void *)0x0) {
    pcVar2 = " (IPv4)";
    if (var_10 != 1) {
      pcVar2 = " (IPv6)";
      if (var_10 != 2) {
        pcVar2 = "";
      }
    }
    pcVar2 = var_5("Looking up host \"%s\"%s for %s",host,pcVar2,reason);
    var_6(var_4,pcVar2);
    var_7(pcVar2);
  }
  pSVar3 = var_11(host,canonicalname,var_10);
  return pSVar3;
}


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

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

void MASKED(undefined4 param_1,undefined4 param_2,undefined4 *param_3,undefined4 param_4,
                 int param_5,int param_6,undefined4 param_7)

{
  int iVar1;
  char *pcVar2;
  undefined4 uVar3;
  
  iVar1 = FUN_0001ea70(param_4,0xd);
  if (iVar1 == 0) goto LAB_0003016d;
  iVar1 = FUN_0001ea70(param_4,0xb);
  if (iVar1 != 0) {
    iVar1 = FUN_0001ea70(param_4,0xb);
    if (iVar1 != 2) goto LAB_0003016d;
    iVar1 = FUN_0001ea70(param_4,0xd);
    if (iVar1 == 1) goto LAB_0003016d;
  }
  iVar1 = FUN_0002fd50(0,param_1,param_2,param_4);
  if (iVar1 != 0) {
    if (param_6 != 0) {
      uVar3 = FUN_0002d860("Leaving host lookup to proxy of \"%s\" (for %s)",param_1,param_7);
      FUN_00058e90(param_6,uVar3);
      FUN_0002da80(uVar3);
    }
    uVar3 = FUN_0002d300(param_1);
    *param_3 = uVar3;
    FUN_000603f0(param_1);
    return;
  }
LAB_0003016d:
  if (param_6 != 0) {
    pcVar2 = " (IPv4)";
    if (param_5 != 1) {
      pcVar2 = " (IPv6)";
      if (param_5 != 2) {
        pcVar2 = "";
      }
    }
    uVar3 = FUN_0002d860("Looking up host \"%s\"%s for %s",param_1,pcVar2,param_7);
    FUN_00058e90(param_6,uVar3);
    FUN_0002da80(uVar3);
  }
  FUN_00060170(param_1,param_3,param_5);
  return;
}

