
/* 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 */

int ssh_share_test_for_upstream(char *host,int port,Conf *conf)

{
  char *ptr;
  char *pi_name;
  int iVar1;
  int in_GS_OFFSET;
  nullplug np;
  char *logtext;
  char *ds_err;
  char *us_err;
  Socket sock;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x78d59;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  np.fn = &ssh_share_test_for_upstream::fn_table;
  ptr = get_remote_username(conf);
  if (port == 0x16) {
    if (ptr == (char *)0x0) {
      pi_name = dupprintf("%s",host);
    }
    else {
      pi_name = dupprintf("%s@%s",ptr,host);
    }
  }
  else if (ptr == (char *)0x0) {
    pi_name = dupprintf("%s:%d",host,port);
  }
  else {
    pi_name = dupprintf("%s@%s:%d",ptr,host,port);
  }
  safefree(ptr);
  sock = (Socket)0x0;
  us_err = (char *)0x0;
  ds_err = (char *)0x0;
  logtext = (char *)0x0;
  iVar1 = platform_ssh_share(pi_name,conf,&np.fn,(Plug)0x0,&sock,&logtext,&ds_err,&us_err,0,1);
  safefree(logtext);
  safefree(ds_err);
  safefree(us_err);
  safefree(pi_name);
  if (iVar1 == 0) {
    if (sock != (Socket)0x0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");
    }
  }
  else {
    if (iVar1 != 1) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");
    }
    (*(*sock)->close)(sock);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

int FUN_00078d50(undefined4 param_1,int param_2,undefined4 param_3)

{
  int iVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  undefined **local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  int *local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x78d59;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_34 = &PTR_FUN_000cc9fc;
  iVar1 = FUN_00028e60(param_3);
  if (param_2 == 0x16) {
    if (iVar1 == 0) {
      uVar2 = FUN_0001cea0("%s",param_1);
    }
    else {
      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);
    }
  }
  else if (iVar1 == 0) {
    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);
  }
  else {
    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);
  }
  FUN_0001dd30(iVar1);
  local_24 = (int *)0x0;
  local_28 = 0;
  local_2c = 0;
  local_30 = 0;
  iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);
  FUN_0001dd30(local_30);
  FUN_0001dd30(local_2c);
  FUN_0001dd30(local_28);
  FUN_0001dd30(uVar2);
  if (iVar1 == 0) {
    if (local_24 != (int *)0x0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");
    }
  }
  else {
    if (iVar1 != 1) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");
    }
    (**(code **)(*local_24 + 4))(local_24);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0008d800();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x000149a0
ADD EBX,0x54017
SUB ESP,0x38
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x28],EAX
XOR EAX,EAX
MOV EDI,dword ptr [ESP + 0x54]
MOV ESI,dword ptr [ESP + 0x4c]
LEA EAX,[EBX + 0xfffffc8c]
MOV dword ptr [ESP + 0x14],EAX
PUSH EDI
CALL 0x00028e60
ADD ESP,0x10
CMP dword ptr [ESP + 0x44],0x16
MOV EBP,EAX
JZ 0x00078e80
TEST EAX,EAX
JZ 0x00078ea0
PUSH dword ptr [ESP + 0x44]
PUSH ESI
PUSH EAX
LEA EAX,[EBX + 0xfffcf691]
PUSH EAX
CALL 0x0001cea0
ADD ESP,0x10
MOV ESI,EAX
SUB ESP,0xc
PUSH EBP
CALL 0x0001dd30
MOV dword ptr [ESP + 0x28],0x0
MOV dword ptr [ESP + 0x24],0x0
MOV dword ptr [ESP + 0x20],0x0
MOV dword ptr [ESP + 0x1c],0x0
POP EDX
POP ECX
PUSH 0x1
PUSH 0x0
LEA EAX,[ESP + 0x24]
PUSH EAX
LEA EAX,[ESP + 0x24]
PUSH EAX
LEA EAX,[ESP + 0x24]
PUSH EAX
LEA EAX,[ESP + 0x34]
PUSH EAX
PUSH 0x0
LEA EAX,[ESP + 0x2c]
PUSH EAX
PUSH EDI
PUSH ESI
CALL 0x00088df0
ADD ESP,0x24
PUSH dword ptr [ESP + 0x18]
MOV EDI,EAX
CALL 0x0001dd30
POP EBP
PUSH dword ptr [ESP + 0x1c]
CALL 0x0001dd30
POP EAX
PUSH dword ptr [ESP + 0x20]
CALL 0x0001dd30
MOV dword ptr [ESP],ESI
CALL 0x0001dd30
ADD ESP,0x10
TEST EDI,EDI
JNZ 0x00078e60
MOV EAX,dword ptr [ESP + 0x18]
TEST EAX,EAX
JNZ 0x00078edf
MOV ECX,dword ptr [ESP + 0x1c]
XOR ECX,dword ptr GS:[0x14]
MOV EAX,EDI
JNZ 0x00078eda
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP EDI,0x1
JNZ 0x00078efe
MOV EAX,dword ptr [ESP + 0x18]
SUB ESP,0xc
MOV EDX,dword ptr [EAX]
PUSH EAX
CALL dword ptr [EDX + 0x4]
ADD ESP,0x10
JMP 0x00078e43
TEST EAX,EAX
JZ 0x00078ec0
SUB ESP,0x4
PUSH ESI
PUSH EAX
LEA EAX,[EBX + 0xfffcf68b]
PUSH EAX
CALL 0x0001cea0
ADD ESP,0x10
MOV ESI,EAX
JMP 0x00078db5
SUB ESP,0x4
LEA EAX,[EBX + 0xfffc61e9]
PUSH dword ptr [ESP + 0x48]
PUSH ESI
PUSH EAX
CALL 0x0001cea0
ADD ESP,0x10
MOV ESI,EAX
JMP 0x00078db5
SUB ESP,0x8
LEA EAX,[EBX + 0xfffd1433]
PUSH ESI
PUSH EAX
CALL 0x0001cea0
ADD ESP,0x10
MOV ESI,EAX
JMP 0x00078db5
CALL 0x0008d800
LEA EAX,[EBX + 0xfffcfb14]
PUSH EAX
LEA EAX,[EBX + 0xfffcf5be]
PUSH 0x825
PUSH EAX
LEA EAX,[EBX + 0xfffcf69a]
PUSH EAX
CALL 0x00014880
LEA EAX,[EBX + 0xfffcfb14]
PUSH EAX
LEA EAX,[EBX + 0xfffcf5be]
PUSH 0x828
PUSH EAX
LEA EAX,[EBX + 0xfffcf6a7]
PUSH EAX
CALL 0x00014880
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00078d50(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined **local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x78d59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_34 = &PTR_FUN_000cc9fc;\n  iVar1 = FUN_00028e60(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0001dd30(iVar1);\n  local_24 = (int *)0x0;\n  local_28 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);\n  FUN_0001dd30(local_30);\n  FUN_0001dd30(local_2c);\n  FUN_0001dd30(local_28);\n  FUN_0001dd30(uVar2);\n  if (iVar1 == 0) {\n    if (local_24 != (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008d800();\n}\n\n" comment (function_definition "int FUN_00078d50(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined **local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x78d59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_34 = &PTR_FUN_000cc9fc;\n  iVar1 = FUN_00028e60(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0001dd30(iVar1);\n  local_24 = (int *)0x0;\n  local_28 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);\n  FUN_0001dd30(local_30);\n  FUN_0001dd30(local_2c);\n  FUN_0001dd30(local_28);\n  FUN_0001dd30(uVar2);\n  if (iVar1 == 0) {\n    if (local_24 != (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008d800();\n}" primitive_type (function_declarator "FUN_00078d50(undefined4 param_1,int param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined **local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x78d59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_34 = &PTR_FUN_000cc9fc;\n  iVar1 = FUN_00028e60(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0001dd30(iVar1);\n  local_24 = (int *)0x0;\n  local_28 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);\n  FUN_0001dd30(local_30);\n  FUN_0001dd30(local_2c);\n  FUN_0001dd30(local_28);\n  FUN_0001dd30(uVar2);\n  if (iVar1 == 0) {\n    if (local_24 != (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_0008d800();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined **local_34;" type_identifier (pointer_declarator "**local_34" * (pointer_declarator "*local_34" * identifier)) ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "undefined4 local_2c;" type_identifier identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "int *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x78d59;" (assignment_expression "uStack_14 = 0x78d59" 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 "local_34 = &PTR_FUN_000cc9fc;" (assignment_expression "local_34 = &PTR_FUN_000cc9fc" identifier = (pointer_expression "&PTR_FUN_000cc9fc" & identifier)) ;) (expression_statement "iVar1 = FUN_00028e60(param_3);" (assignment_expression "iVar1 = FUN_00028e60(param_3)" identifier = (call_expression "FUN_00028e60(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (if_statement "if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" if (parenthesized_expression "(param_2 == 0x16)" ( (binary_expression "param_2 == 0x16" identifier == number_literal) )) (compound_statement "{\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }" { (if_statement "if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }" { (expression_statement "uVar2 = FUN_0001cea0("%s",param_1);" (assignment_expression "uVar2 = FUN_0001cea0("%s",param_1)" identifier = (call_expression "FUN_0001cea0("%s",param_1)" identifier (argument_list "("%s",param_1)" ( (string_literal ""%s"" " string_content ") , identifier )))) ;) }) (else_clause "else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }" else (compound_statement "{\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }" { (expression_statement "uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);" (assignment_expression "uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1)" identifier = (call_expression "FUN_0001cea0("%s@%s",iVar1,param_1)" identifier (argument_list "("%s@%s",iVar1,param_1)" ( (string_literal ""%s@%s"" " string_content ") , identifier , identifier )))) ;) }))) }) (else_clause "else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" else (if_statement "if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }" { (expression_statement "uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);" (assignment_expression "uVar2 = FUN_0001cea0("%s:%d",param_1,param_2)" identifier = (call_expression "FUN_0001cea0("%s:%d",param_1,param_2)" identifier (argument_list "("%s:%d",param_1,param_2)" ( (string_literal ""%s:%d"" " string_content ") , identifier , identifier )))) ;) }) (else_clause "else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" else (compound_statement "{\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" { (expression_statement "uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);" (assignment_expression "uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2)" identifier = (call_expression "FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2)" identifier (argument_list "("%s@%s:%d",iVar1,param_1,param_2)" ( (string_literal ""%s@%s:%d"" " string_content ") , identifier , identifier , identifier )))) ;) }))))) (expression_statement "FUN_0001dd30(iVar1);" (call_expression "FUN_0001dd30(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "local_24 = (int *)0x0;" (assignment_expression "local_24 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" identifier = number_literal) ;) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);" (assignment_expression "iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1)" identifier = (call_expression "FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1)" identifier (argument_list "(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1)" ( identifier , identifier , (pointer_expression "&local_34" & identifier) , number_literal , (pointer_expression "&local_24" & identifier) , (pointer_expression "&local_30" & identifier) , (pointer_expression "&local_2c" & identifier) , (pointer_expression "&local_28" & identifier) , number_literal , number_literal )))) ;) (expression_statement "FUN_0001dd30(local_30);" (call_expression "FUN_0001dd30(local_30)" identifier (argument_list "(local_30)" ( identifier ))) ;) (expression_statement "FUN_0001dd30(local_2c);" (call_expression "FUN_0001dd30(local_2c)" identifier (argument_list "(local_2c)" ( identifier ))) ;) (expression_statement "FUN_0001dd30(local_28);" (call_expression "FUN_0001dd30(local_28)" identifier (argument_list "(local_28)" ( identifier ))) ;) (expression_statement "FUN_0001dd30(uVar2);" (call_expression "FUN_0001dd30(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if (iVar1 == 0) {\n    if (local_24 != (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (local_24 != (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }" { (if_statement "if (local_24 != (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }" if (parenthesized_expression "(local_24 != (int *)0x0)" ( (binary_expression "local_24 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }" { comment (expression_statement "__assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");" (call_expression "__assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream")" identifier (argument_list "("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream")" ( (string_literal ""sock == NULL"" " string_content ") , (string_literal ""sshshare.c"" " string_content ") , number_literal , (string_literal ""ssh_share_test_for_upstream"" " string_content ") ))) ;) })) }) (else_clause "else {\n    if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }" else (compound_statement "{\n    if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }" { (if_statement "if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }" if (parenthesized_expression "(iVar1 != 1)" ( (binary_expression "iVar1 != 1" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }" { comment (expression_statement "__assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");" (call_expression "__assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream")" identifier (argument_list "("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream")" ( (string_literal ""result == SHARE_DOWNSTREAM"" " string_content ") , (string_literal ""sshshare.c"" " string_content ") , number_literal , (string_literal ""ssh_share_test_for_upstream"" " string_content ") ))) ;) })) (expression_statement "(**(code **)(*local_24 + 4))(local_24);" (call_expression "(**(code **)(*local_24 + 4))(local_24)" (parenthesized_expression "(**(code **)(*local_24 + 4))" ( (pointer_expression "**(code **)(*local_24 + 4)" * (pointer_expression "*(code **)(*local_24 + 4)" * (cast_expression "(code **)(*local_24 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*local_24 + 4)" ( (binary_expression "*local_24 + 4" (pointer_expression "*local_24" * identifier) + number_literal) ))))) )) (argument_list "(local_24)" ( identifier ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\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    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) comment (expression_statement "FUN_0008d800();" (call_expression "FUN_0008d800()" identifier (argument_list "()" ( ))) ;) })))
(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\nint ssh_share_test_for_upstream(char *host,int port,Conf *conf)\n\n{\n  char *ptr;\n  char *pi_name;\n  int iVar1;\n  int in_GS_OFFSET;\n  nullplug np;\n  char *logtext;\n  char *ds_err;\n  char *us_err;\n  Socket sock;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x78d59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  np.fn = &ssh_share_test_for_upstream::fn_table;\n  ptr = get_remote_username(conf);\n  if (port == 0x16) {\n    if (ptr == (char *)0x0) {\n      pi_name = dupprintf("%s",host);\n    }\n    else {\n      pi_name = dupprintf("%s@%s",ptr,host);\n    }\n  }\n  else if (ptr == (char *)0x0) {\n    pi_name = dupprintf("%s:%d",host,port);\n  }\n  else {\n    pi_name = dupprintf("%s@%s:%d",ptr,host,port);\n  }\n  safefree(ptr);\n  sock = (Socket)0x0;\n  us_err = (char *)0x0;\n  ds_err = (char *)0x0;\n  logtext = (char *)0x0;\n  iVar1 = platform_ssh_share(pi_name,conf,&np.fn,(Plug)0x0,&sock,&logtext,&ds_err,&us_err,0,1);\n  safefree(logtext);\n  safefree(ds_err);\n  safefree(us_err);\n  safefree(pi_name);\n  if (iVar1 == 0) {\n    if (sock != (Socket)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (*(*sock)->close)(sock);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment comment (function_definition "int ssh_share_test_for_upstream(char *host,int port,Conf *conf)\n\n{\n  char *ptr;\n  char *pi_name;\n  int iVar1;\n  int in_GS_OFFSET;\n  nullplug np;\n  char *logtext;\n  char *ds_err;\n  char *us_err;\n  Socket sock;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x78d59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  np.fn = &ssh_share_test_for_upstream::fn_table;\n  ptr = get_remote_username(conf);\n  if (port == 0x16) {\n    if (ptr == (char *)0x0) {\n      pi_name = dupprintf("%s",host);\n    }\n    else {\n      pi_name = dupprintf("%s@%s",ptr,host);\n    }\n  }\n  else if (ptr == (char *)0x0) {\n    pi_name = dupprintf("%s:%d",host,port);\n  }\n  else {\n    pi_name = dupprintf("%s@%s:%d",ptr,host,port);\n  }\n  safefree(ptr);\n  sock = (Socket)0x0;\n  us_err = (char *)0x0;\n  ds_err = (char *)0x0;\n  logtext = (char *)0x0;\n  iVar1 = platform_ssh_share(pi_name,conf,&np.fn,(Plug)0x0,&sock,&logtext,&ds_err,&us_err,0,1);\n  safefree(logtext);\n  safefree(ds_err);\n  safefree(us_err);\n  safefree(pi_name);\n  if (iVar1 == 0) {\n    if (sock != (Socket)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (*(*sock)->close)(sock);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "ssh_share_test_for_upstream(char *host,int port,Conf *conf)" identifier (parameter_list "(char *host,int port,Conf *conf)" ( (parameter_declaration "char *host" primitive_type (pointer_declarator "*host" * identifier)) , (parameter_declaration "int port" primitive_type identifier) , (parameter_declaration "Conf *conf" type_identifier (pointer_declarator "*conf" * identifier)) ))) (compound_statement "{\n  char *ptr;\n  char *pi_name;\n  int iVar1;\n  int in_GS_OFFSET;\n  nullplug np;\n  char *logtext;\n  char *ds_err;\n  char *us_err;\n  Socket sock;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x78d59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  np.fn = &ssh_share_test_for_upstream::fn_table;\n  ptr = get_remote_username(conf);\n  if (port == 0x16) {\n    if (ptr == (char *)0x0) {\n      pi_name = dupprintf("%s",host);\n    }\n    else {\n      pi_name = dupprintf("%s@%s",ptr,host);\n    }\n  }\n  else if (ptr == (char *)0x0) {\n    pi_name = dupprintf("%s:%d",host,port);\n  }\n  else {\n    pi_name = dupprintf("%s@%s:%d",ptr,host,port);\n  }\n  safefree(ptr);\n  sock = (Socket)0x0;\n  us_err = (char *)0x0;\n  ds_err = (char *)0x0;\n  logtext = (char *)0x0;\n  iVar1 = platform_ssh_share(pi_name,conf,&np.fn,(Plug)0x0,&sock,&logtext,&ds_err,&us_err,0,1);\n  safefree(logtext);\n  safefree(ds_err);\n  safefree(us_err);\n  safefree(pi_name);\n  if (iVar1 == 0) {\n    if (sock != (Socket)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (*(*sock)->close)(sock);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "char *ptr;" primitive_type (pointer_declarator "*ptr" * identifier) ;) (declaration "char *pi_name;" primitive_type (pointer_declarator "*pi_name" * identifier) ;) (declaration "int iVar1;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "nullplug np;" type_identifier identifier ;) (declaration "char *logtext;" primitive_type (pointer_declarator "*logtext" * identifier) ;) (declaration "char *ds_err;" primitive_type (pointer_declarator "*ds_err" * identifier) ;) (declaration "char *us_err;" primitive_type (pointer_declarator "*us_err" * identifier) ;) (declaration "Socket sock;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x78d59;" (assignment_expression "uStack_14 = 0x78d59" 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 "np.fn = &ssh_share_test_for_upstream::fn_table;" (assignment_expression "np.fn = &ssh_share_test_for_upstream" (field_expression "np.fn" identifier . field_identifier) = (pointer_expression "&ssh_share_test_for_upstream" & identifier)) (ERROR "::fn_table" : : identifier) ;) (expression_statement "ptr = get_remote_username(conf);" (assignment_expression "ptr = get_remote_username(conf)" identifier = (call_expression "get_remote_username(conf)" identifier (argument_list "(conf)" ( identifier )))) ;) (if_statement "if (port == 0x16) {\n    if (ptr == (char *)0x0) {\n      pi_name = dupprintf("%s",host);\n    }\n    else {\n      pi_name = dupprintf("%s@%s",ptr,host);\n    }\n  }\n  else if (ptr == (char *)0x0) {\n    pi_name = dupprintf("%s:%d",host,port);\n  }\n  else {\n    pi_name = dupprintf("%s@%s:%d",ptr,host,port);\n  }" if (parenthesized_expression "(port == 0x16)" ( (binary_expression "port == 0x16" identifier == number_literal) )) (compound_statement "{\n    if (ptr == (char *)0x0) {\n      pi_name = dupprintf("%s",host);\n    }\n    else {\n      pi_name = dupprintf("%s@%s",ptr,host);\n    }\n  }" { (if_statement "if (ptr == (char *)0x0) {\n      pi_name = dupprintf("%s",host);\n    }\n    else {\n      pi_name = dupprintf("%s@%s",ptr,host);\n    }" if (parenthesized_expression "(ptr == (char *)0x0)" ( (binary_expression "ptr == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      pi_name = dupprintf("%s",host);\n    }" { (expression_statement "pi_name = dupprintf("%s",host);" (assignment_expression "pi_name = dupprintf("%s",host)" identifier = (call_expression "dupprintf("%s",host)" identifier (argument_list "("%s",host)" ( (string_literal ""%s"" " string_content ") , identifier )))) ;) }) (else_clause "else {\n      pi_name = dupprintf("%s@%s",ptr,host);\n    }" else (compound_statement "{\n      pi_name = dupprintf("%s@%s",ptr,host);\n    }" { (expression_statement "pi_name = dupprintf("%s@%s",ptr,host);" (assignment_expression "pi_name = dupprintf("%s@%s",ptr,host)" identifier = (call_expression "dupprintf("%s@%s",ptr,host)" identifier (argument_list "("%s@%s",ptr,host)" ( (string_literal ""%s@%s"" " string_content ") , identifier , identifier )))) ;) }))) }) (else_clause "else if (ptr == (char *)0x0) {\n    pi_name = dupprintf("%s:%d",host,port);\n  }\n  else {\n    pi_name = dupprintf("%s@%s:%d",ptr,host,port);\n  }" else (if_statement "if (ptr == (char *)0x0) {\n    pi_name = dupprintf("%s:%d",host,port);\n  }\n  else {\n    pi_name = dupprintf("%s@%s:%d",ptr,host,port);\n  }" if (parenthesized_expression "(ptr == (char *)0x0)" ( (binary_expression "ptr == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    pi_name = dupprintf("%s:%d",host,port);\n  }" { (expression_statement "pi_name = dupprintf("%s:%d",host,port);" (assignment_expression "pi_name = dupprintf("%s:%d",host,port)" identifier = (call_expression "dupprintf("%s:%d",host,port)" identifier (argument_list "("%s:%d",host,port)" ( (string_literal ""%s:%d"" " string_content ") , identifier , identifier )))) ;) }) (else_clause "else {\n    pi_name = dupprintf("%s@%s:%d",ptr,host,port);\n  }" else (compound_statement "{\n    pi_name = dupprintf("%s@%s:%d",ptr,host,port);\n  }" { (expression_statement "pi_name = dupprintf("%s@%s:%d",ptr,host,port);" (assignment_expression "pi_name = dupprintf("%s@%s:%d",ptr,host,port)" identifier = (call_expression "dupprintf("%s@%s:%d",ptr,host,port)" identifier (argument_list "("%s@%s:%d",ptr,host,port)" ( (string_literal ""%s@%s:%d"" " string_content ") , identifier , identifier , identifier )))) ;) }))))) (expression_statement "safefree(ptr);" (call_expression "safefree(ptr)" identifier (argument_list "(ptr)" ( identifier ))) ;) (expression_statement "sock = (Socket)0x0;" (assignment_expression "sock = (Socket)0x0" identifier = (cast_expression "(Socket)0x0" ( (type_descriptor "Socket" type_identifier) ) number_literal)) ;) (expression_statement "us_err = (char *)0x0;" (assignment_expression "us_err = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "ds_err = (char *)0x0;" (assignment_expression "ds_err = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "logtext = (char *)0x0;" (assignment_expression "logtext = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "iVar1 = platform_ssh_share(pi_name,conf,&np.fn,(Plug)0x0,&sock,&logtext,&ds_err,&us_err,0,1);" (assignment_expression "iVar1 = platform_ssh_share(pi_name,conf,&np.fn,(Plug)0x0,&sock,&logtext,&ds_err,&us_err,0,1)" identifier = (call_expression "platform_ssh_share(pi_name,conf,&np.fn,(Plug)0x0,&sock,&logtext,&ds_err,&us_err,0,1)" identifier (argument_list "(pi_name,conf,&np.fn,(Plug)0x0,&sock,&logtext,&ds_err,&us_err,0,1)" ( identifier , identifier , (pointer_expression "&np.fn" & (field_expression "np.fn" identifier . field_identifier)) , (cast_expression "(Plug)0x0" ( (type_descriptor "Plug" type_identifier) ) number_literal) , (pointer_expression "&sock" & identifier) , (pointer_expression "&logtext" & identifier) , (pointer_expression "&ds_err" & identifier) , (pointer_expression "&us_err" & identifier) , number_literal , number_literal )))) ;) (expression_statement "safefree(logtext);" (call_expression "safefree(logtext)" identifier (argument_list "(logtext)" ( identifier ))) ;) (expression_statement "safefree(ds_err);" (call_expression "safefree(ds_err)" identifier (argument_list "(ds_err)" ( identifier ))) ;) (expression_statement "safefree(us_err);" (call_expression "safefree(us_err)" identifier (argument_list "(us_err)" ( identifier ))) ;) (expression_statement "safefree(pi_name);" (call_expression "safefree(pi_name)" identifier (argument_list "(pi_name)" ( identifier ))) ;) (if_statement "if (iVar1 == 0) {\n    if (sock != (Socket)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (*(*sock)->close)(sock);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (sock != (Socket)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }" { (if_statement "if (sock != (Socket)0x0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }" if (parenthesized_expression "(sock != (Socket)0x0)" ( (binary_expression "sock != (Socket)0x0" identifier != (cast_expression "(Socket)0x0" ( (type_descriptor "Socket" type_identifier) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }" { comment (expression_statement "__assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");" (call_expression "__assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream")" identifier (argument_list "("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream")" ( (string_literal ""sock == NULL"" " string_content ") , (string_literal ""sshshare.c"" " string_content ") , number_literal , (string_literal ""ssh_share_test_for_upstream"" " string_content ") ))) ;) })) }) (else_clause "else {\n    if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (*(*sock)->close)(sock);\n  }" else (compound_statement "{\n    if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (*(*sock)->close)(sock);\n  }" { (if_statement "if (iVar1 != 1) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }" if (parenthesized_expression "(iVar1 != 1)" ( (binary_expression "iVar1 != 1" identifier != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }" { comment (expression_statement "__assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");" (call_expression "__assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream")" identifier (argument_list "("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream")" ( (string_literal ""result == SHARE_DOWNSTREAM"" " string_content ") , (string_literal ""sshshare.c"" " string_content ") , number_literal , (string_literal ""ssh_share_test_for_upstream"" " string_content ") ))) ;) })) (expression_statement "(*(*sock)->close)(sock);" (call_expression "(*(*sock)->close)(sock)" (parenthesized_expression "(*(*sock)->close)" ( (pointer_expression "*(*sock)->close" * (field_expression "(*sock)->close" (parenthesized_expression "(*sock)" ( (pointer_expression "*sock" * identifier) )) -> field_identifier)) )) (argument_list "(sock)" ( identifier ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\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    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int FUN_00078d50(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined **local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x78d59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_34 = &PTR_FUN_000cc9fc;\n  iVar1 = FUN_00028e60(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0001dd30(iVar1);\n  local_24 = (int *)0x0;\n  local_28 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);\n  FUN_0001dd30(local_30);\n  FUN_0001dd30(local_2c);\n  FUN_0001dd30(local_28);\n  FUN_0001dd30(uVar2);\n  if (iVar1 == 0) {\n    if (local_24 != (int *)0x0) {\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_0008d800();\n}\n\n" (function_definition "int FUN_00078d50(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined **local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x78d59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_34 = &PTR_FUN_000cc9fc;\n  iVar1 = FUN_00028e60(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0001dd30(iVar1);\n  local_24 = (int *)0x0;\n  local_28 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);\n  FUN_0001dd30(local_30);\n  FUN_0001dd30(local_2c);\n  FUN_0001dd30(local_28);\n  FUN_0001dd30(uVar2);\n  if (iVar1 == 0) {\n    if (local_24 != (int *)0x0) {\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_0008d800();\n}" primitive_type (function_declarator "FUN_00078d50(undefined4 param_1,int param_2,undefined4 param_3)" identifier (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined **local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x78d59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_34 = &PTR_FUN_000cc9fc;\n  iVar1 = FUN_00028e60(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0001dd30(iVar1);\n  local_24 = (int *)0x0;\n  local_28 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);\n  FUN_0001dd30(local_30);\n  FUN_0001dd30(local_2c);\n  FUN_0001dd30(local_28);\n  FUN_0001dd30(uVar2);\n  if (iVar1 == 0) {\n    if (local_24 != (int *)0x0) {\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_0008d800();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "undefined **local_34;" type_identifier (pointer_declarator "**local_34" * (pointer_declarator "*local_34" * identifier)) ;) (declaration "undefined4 local_30;" type_identifier identifier ;) (declaration "undefined4 local_2c;" type_identifier identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "int *local_24;" primitive_type (pointer_declarator "*local_24" * identifier) ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x78d59;" (assignment_expression "uStack_14 = 0x78d59" 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 "local_34 = &PTR_FUN_000cc9fc;" (assignment_expression "local_34 = &PTR_FUN_000cc9fc" identifier = (pointer_expression "&PTR_FUN_000cc9fc" & identifier)) ;) (expression_statement "iVar1 = FUN_00028e60(param_3);" (assignment_expression "iVar1 = FUN_00028e60(param_3)" identifier = (call_expression "FUN_00028e60(param_3)" identifier (argument_list "(param_3)" ( identifier )))) ;) (if_statement "if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" if (parenthesized_expression "(param_2 == 0x16)" ( (binary_expression "param_2 == 0x16" identifier == number_literal) )) (compound_statement "{\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }" { (if_statement "if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }" { (expression_statement "uVar2 = FUN_0001cea0("%s",param_1);" (assignment_expression "uVar2 = FUN_0001cea0("%s",param_1)" identifier = (call_expression "FUN_0001cea0("%s",param_1)" identifier (argument_list "("%s",param_1)" ( (string_literal ""%s"" " string_content ") , identifier )))) ;) }) (else_clause "else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }" else (compound_statement "{\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }" { (expression_statement "uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);" (assignment_expression "uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1)" identifier = (call_expression "FUN_0001cea0("%s@%s",iVar1,param_1)" identifier (argument_list "("%s@%s",iVar1,param_1)" ( (string_literal ""%s@%s"" " string_content ") , identifier , identifier )))) ;) }))) }) (else_clause "else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" else (if_statement "if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }" { (expression_statement "uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);" (assignment_expression "uVar2 = FUN_0001cea0("%s:%d",param_1,param_2)" identifier = (call_expression "FUN_0001cea0("%s:%d",param_1,param_2)" identifier (argument_list "("%s:%d",param_1,param_2)" ( (string_literal ""%s:%d"" " string_content ") , identifier , identifier )))) ;) }) (else_clause "else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" else (compound_statement "{\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" { (expression_statement "uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);" (assignment_expression "uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2)" identifier = (call_expression "FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2)" identifier (argument_list "("%s@%s:%d",iVar1,param_1,param_2)" ( (string_literal ""%s@%s:%d"" " string_content ") , identifier , identifier , identifier )))) ;) }))))) (expression_statement "FUN_0001dd30(iVar1);" (call_expression "FUN_0001dd30(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) (expression_statement "local_24 = (int *)0x0;" (assignment_expression "local_24 = (int *)0x0" identifier = (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" identifier = number_literal) ;) (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" identifier = number_literal) ;) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);" (assignment_expression "iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1)" identifier = (call_expression "FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1)" identifier (argument_list "(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1)" ( identifier , identifier , (pointer_expression "&local_34" & identifier) , number_literal , (pointer_expression "&local_24" & identifier) , (pointer_expression "&local_30" & identifier) , (pointer_expression "&local_2c" & identifier) , (pointer_expression "&local_28" & identifier) , number_literal , number_literal )))) ;) (expression_statement "FUN_0001dd30(local_30);" (call_expression "FUN_0001dd30(local_30)" identifier (argument_list "(local_30)" ( identifier ))) ;) (expression_statement "FUN_0001dd30(local_2c);" (call_expression "FUN_0001dd30(local_2c)" identifier (argument_list "(local_2c)" ( identifier ))) ;) (expression_statement "FUN_0001dd30(local_28);" (call_expression "FUN_0001dd30(local_28)" identifier (argument_list "(local_28)" ( identifier ))) ;) (expression_statement "FUN_0001dd30(uVar2);" (call_expression "FUN_0001dd30(uVar2)" identifier (argument_list "(uVar2)" ( identifier ))) ;) (if_statement "if (iVar1 == 0) {\n    if (local_24 != (int *)0x0) {\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    if (local_24 != (int *)0x0) {\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }" { (if_statement "if (local_24 != (int *)0x0) {\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }" if (parenthesized_expression "(local_24 != (int *)0x0)" ( (binary_expression "local_24 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }" { (expression_statement "__assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");" (call_expression "__assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream")" identifier (argument_list "("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream")" ( (string_literal ""sock == NULL"" " string_content ") , (string_literal ""sshshare.c"" " string_content ") , number_literal , (string_literal ""ssh_share_test_for_upstream"" " string_content ") ))) ;) })) }) (else_clause "else {\n    if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }" else (compound_statement "{\n    if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }" { (if_statement "if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }" if (parenthesized_expression "(iVar1 != 1)" ( (binary_expression "iVar1 != 1" identifier != number_literal) )) (compound_statement "{\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }" { (expression_statement "__assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");" (call_expression "__assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream")" identifier (argument_list "("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream")" ( (string_literal ""result == SHARE_DOWNSTREAM"" " string_content ") , (string_literal ""sshshare.c"" " string_content ") , number_literal , (string_literal ""ssh_share_test_for_upstream"" " string_content ") ))) ;) })) (expression_statement "(**(code **)(*local_24 + 4))(local_24);" (call_expression "(**(code **)(*local_24 + 4))(local_24)" (parenthesized_expression "(**(code **)(*local_24 + 4))" ( (pointer_expression "**(code **)(*local_24 + 4)" * (pointer_expression "*(code **)(*local_24 + 4)" * (cast_expression "(code **)(*local_24 + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*local_24 + 4)" ( (binary_expression "*local_24 + 4" (pointer_expression "*local_24" * identifier) + number_literal) ))))) )) (argument_list "(local_24)" ( identifier ))) ;) }))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\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    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "FUN_0008d800();" (call_expression "FUN_0008d800()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * (pointer_declarator * IDENT)) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT , IDENT )))) ;) }))) }) (else_clause else (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 ") , IDENT , IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") , IDENT , IDENT , IDENT )))) ;) }))))) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (pointer_expression & IDENT) , LIT , (pointer_expression & IDENT) , (pointer_expression & IDENT) , (pointer_expression & IDENT) , (pointer_expression & IDENT) , LIT , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( 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 { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "int FUN_00078d50(undefined4 param_1,int param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined **local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x78d59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_34 = &PTR_FUN_000cc9fc;\n  iVar1 = FUN_00028e60(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0001dd30(iVar1);\n  local_24 = (int *)0x0;\n  local_28 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);\n  FUN_0001dd30(local_30);\n  FUN_0001dd30(local_2c);\n  FUN_0001dd30(local_28);\n  FUN_0001dd30(uVar2);\n  if (iVar1 == 0) {\n    if (local_24 != (int *)0x0) {\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_0008d800();\n}" (primitive_type "int") (function_declarator "FUN_00078d50(undefined4 param_1,int param_2,undefined4 param_3)" (identifier "FUN_00078d50") (parameter_list "(undefined4 param_1,int param_2,undefined4 param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  int in_GS_OFFSET;\n  undefined **local_34;\n  undefined4 local_30;\n  undefined4 local_2c;\n  undefined4 local_28;\n  int *local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x78d59;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  local_34 = &PTR_FUN_000cc9fc;\n  iVar1 = FUN_00028e60(param_3);\n  if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }\n  FUN_0001dd30(iVar1);\n  local_24 = (int *)0x0;\n  local_28 = 0;\n  local_2c = 0;\n  local_30 = 0;\n  iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);\n  FUN_0001dd30(local_30);\n  FUN_0001dd30(local_2c);\n  FUN_0001dd30(local_28);\n  FUN_0001dd30(uVar2);\n  if (iVar1 == 0) {\n    if (local_24 != (int *)0x0) {\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\n  }\n                    \n  FUN_0008d800();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "undefined **local_34;" (type_identifier "undefined") (pointer_declarator "**local_34" (* "*") (pointer_declarator "*local_34" (* "*") (identifier "local_34"))) (; ";")) (declaration "undefined4 local_30;" (type_identifier "undefined4") (identifier "local_30") (; ";")) (declaration "undefined4 local_2c;" (type_identifier "undefined4") (identifier "local_2c") (; ";")) (declaration "undefined4 local_28;" (type_identifier "undefined4") (identifier "local_28") (; ";")) (declaration "int *local_24;" (primitive_type "int") (pointer_declarator "*local_24" (* "*") (identifier "local_24")) (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x78d59;" (assignment_expression "uStack_14 = 0x78d59" (identifier "uStack_14") (= "=") (number_literal "0x78d59")) (; ";")) (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 "local_34 = &PTR_FUN_000cc9fc;" (assignment_expression "local_34 = &PTR_FUN_000cc9fc" (identifier "local_34") (= "=") (pointer_expression "&PTR_FUN_000cc9fc" (& "&") (identifier "PTR_FUN_000cc9fc"))) (; ";")) (expression_statement "iVar1 = FUN_00028e60(param_3);" (assignment_expression "iVar1 = FUN_00028e60(param_3)" (identifier "iVar1") (= "=") (call_expression "FUN_00028e60(param_3)" (identifier "FUN_00028e60") (argument_list "(param_3)" (( "(") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (param_2 == 0x16) {\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }\n  else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" (if "if") (parenthesized_expression "(param_2 == 0x16)" (( "(") (binary_expression "param_2 == 0x16" (identifier "param_2") (== "==") (number_literal "0x16")) () ")")) (compound_statement "{\n    if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }\n  }" ({ "{") (if_statement "if (iVar1 == 0) {\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }\n    else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = FUN_0001cea0("%s",param_1);\n    }" ({ "{") (expression_statement "uVar2 = FUN_0001cea0("%s",param_1);" (assignment_expression "uVar2 = FUN_0001cea0("%s",param_1)" (identifier "uVar2") (= "=") (call_expression "FUN_0001cea0("%s",param_1)" (identifier "FUN_0001cea0") (argument_list "("%s",param_1)" (( "(") (string_literal ""%s"" (" """) (string_content "%s") (" """)) (, ",") (identifier "param_1") () ")")))) (; ";")) (} "}")) (else_clause "else {\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }" (else "else") (compound_statement "{\n      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);\n    }" ({ "{") (expression_statement "uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);" (assignment_expression "uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1)" (identifier "uVar2") (= "=") (call_expression "FUN_0001cea0("%s@%s",iVar1,param_1)" (identifier "FUN_0001cea0") (argument_list "("%s@%s",iVar1,param_1)" (( "(") (string_literal ""%s@%s"" (" """) (string_content "%s@%s") (" """)) (, ",") (identifier "iVar1") (, ",") (identifier "param_1") () ")")))) (; ";")) (} "}")))) (} "}")) (else_clause "else if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" (else "else") (if_statement "if (iVar1 == 0) {\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }\n  else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);\n  }" ({ "{") (expression_statement "uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);" (assignment_expression "uVar2 = FUN_0001cea0("%s:%d",param_1,param_2)" (identifier "uVar2") (= "=") (call_expression "FUN_0001cea0("%s:%d",param_1,param_2)" (identifier "FUN_0001cea0") (argument_list "("%s:%d",param_1,param_2)" (( "(") (string_literal ""%s:%d"" (" """) (string_content "%s:%d") (" """)) (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" (else "else") (compound_statement "{\n    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);\n  }" ({ "{") (expression_statement "uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);" (assignment_expression "uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2)" (identifier "uVar2") (= "=") (call_expression "FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2)" (identifier "FUN_0001cea0") (argument_list "("%s@%s:%d",iVar1,param_1,param_2)" (( "(") (string_literal ""%s@%s:%d"" (" """) (string_content "%s@%s:%d") (" """)) (, ",") (identifier "iVar1") (, ",") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (} "}")))))) (expression_statement "FUN_0001dd30(iVar1);" (call_expression "FUN_0001dd30(iVar1)" (identifier "FUN_0001dd30") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "local_24 = (int *)0x0;" (assignment_expression "local_24 = (int *)0x0" (identifier "local_24") (= "=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "local_28 = 0;" (assignment_expression "local_28 = 0" (identifier "local_28") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_2c = 0;" (assignment_expression "local_2c = 0" (identifier "local_2c") (= "=") (number_literal "0")) (; ";")) (expression_statement "local_30 = 0;" (assignment_expression "local_30 = 0" (identifier "local_30") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);" (assignment_expression "iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1)" (identifier "iVar1") (= "=") (call_expression "FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1)" (identifier "FUN_00088df0") (argument_list "(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1)" (( "(") (identifier "uVar2") (, ",") (identifier "param_3") (, ",") (pointer_expression "&local_34" (& "&") (identifier "local_34")) (, ",") (number_literal "0") (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) (, ",") (pointer_expression "&local_30" (& "&") (identifier "local_30")) (, ",") (pointer_expression "&local_2c" (& "&") (identifier "local_2c")) (, ",") (pointer_expression "&local_28" (& "&") (identifier "local_28")) (, ",") (number_literal "0") (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "FUN_0001dd30(local_30);" (call_expression "FUN_0001dd30(local_30)" (identifier "FUN_0001dd30") (argument_list "(local_30)" (( "(") (identifier "local_30") () ")"))) (; ";")) (expression_statement "FUN_0001dd30(local_2c);" (call_expression "FUN_0001dd30(local_2c)" (identifier "FUN_0001dd30") (argument_list "(local_2c)" (( "(") (identifier "local_2c") () ")"))) (; ";")) (expression_statement "FUN_0001dd30(local_28);" (call_expression "FUN_0001dd30(local_28)" (identifier "FUN_0001dd30") (argument_list "(local_28)" (( "(") (identifier "local_28") () ")"))) (; ";")) (expression_statement "FUN_0001dd30(uVar2);" (call_expression "FUN_0001dd30(uVar2)" (identifier "FUN_0001dd30") (argument_list "(uVar2)" (( "(") (identifier "uVar2") () ")"))) (; ";")) (if_statement "if (iVar1 == 0) {\n    if (local_24 != (int *)0x0) {\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }\n  else {\n    if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    if (local_24 != (int *)0x0) {\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }\n  }" ({ "{") (if_statement "if (local_24 != (int *)0x0) {\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }" (if "if") (parenthesized_expression "(local_24 != (int *)0x0)" (( "(") (binary_expression "local_24 != (int *)0x0" (identifier "local_24") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");\n    }" ({ "{") (expression_statement "__assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");" (call_expression "__assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream")" (identifier "__assert_fail") (argument_list "("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream")" (( "(") (string_literal ""sock == NULL"" (" """) (string_content "sock == NULL") (" """)) (, ",") (string_literal ""sshshare.c"" (" """) (string_content "sshshare.c") (" """)) (, ",") (number_literal "0x825") (, ",") (string_literal ""ssh_share_test_for_upstream"" (" """) (string_content "ssh_share_test_for_upstream") (" """)) () ")"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }" (else "else") (compound_statement "{\n    if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }\n    (**(code **)(*local_24 + 4))(local_24);\n  }" ({ "{") (if_statement "if (iVar1 != 1) {\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }" (if "if") (parenthesized_expression "(iVar1 != 1)" (( "(") (binary_expression "iVar1 != 1" (identifier "iVar1") (!= "!=") (number_literal "1")) () ")")) (compound_statement "{\n                    \n      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");\n    }" ({ "{") (expression_statement "__assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");" (call_expression "__assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream")" (identifier "__assert_fail") (argument_list "("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream")" (( "(") (string_literal ""result == SHARE_DOWNSTREAM"" (" """) (string_content "result == SHARE_DOWNSTREAM") (" """)) (, ",") (string_literal ""sshshare.c"" (" """) (string_content "sshshare.c") (" """)) (, ",") (number_literal "0x828") (, ",") (string_literal ""ssh_share_test_for_upstream"" (" """) (string_content "ssh_share_test_for_upstream") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "(**(code **)(*local_24 + 4))(local_24);" (call_expression "(**(code **)(*local_24 + 4))(local_24)" (parenthesized_expression "(**(code **)(*local_24 + 4))" (( "(") (pointer_expression "**(code **)(*local_24 + 4)" (* "*") (pointer_expression "*(code **)(*local_24 + 4)" (* "*") (cast_expression "(code **)(*local_24 + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*local_24 + 4)" (( "(") (binary_expression "*local_24 + 4" (pointer_expression "*local_24" (* "*") (identifier "local_24")) (+ "+") (number_literal "4")) () ")"))))) () ")")) (argument_list "(local_24)" (( "(") (identifier "local_24") () ")"))) (; ";")) (} "}")))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar1;\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    return iVar1;\n  }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "FUN_0008d800();" (call_expression "FUN_0008d800()" (identifier "FUN_0008d800") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* 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 */

int function_1(char *host,int var_3,type_1 *conf)

{
  char *var_4;
  char *pi_name;
  int var_8;
  int var_1;
  type_2 np;
  char *logtext;
  char *ds_err;
  char *us_err;
  type_3 var_9;
  int var_11;
  type_4 uStack_14;
  
  uStack_14 = 0x78d59;
  var_11 = *(int *)(var_1 + 0x14);
  np.fn = &function_1::fn_table;
  var_4 = var_2(conf);
  if (var_3 == 0x16) {
    if (var_4 == (char *)0x0) {
      pi_name = var_5("%s",host);
    }
    else {
      pi_name = var_5("%s@%s",var_4,host);
    }
  }
  else if (var_4 == (char *)0x0) {
    pi_name = var_5("%s:%d",host,var_3);
  }
  else {
    pi_name = var_5("%s@%s:%d",var_4,host,var_3);
  }
  var_6(var_4);
  var_9 = (type_3)0x0;
  us_err = (char *)0x0;
  ds_err = (char *)0x0;
  logtext = (char *)0x0;
  var_8 = var_7(pi_name,conf,&np.fn,(type_5)0x0,&var_9,&logtext,&ds_err,&us_err,0,1);
  var_6(logtext);
  var_6(ds_err);
  var_6(us_err);
  var_6(pi_name);
  if (var_8 == 0) {
    if (var_9 != (type_3)0x0) {
                    /* WARNING: Subroutine does not return */
      var_10("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");
    }
  }
  else {
    if (var_8 != 1) {
                    /* WARNING: Subroutine does not return */
      var_10("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");
    }
    (*(*var_9)->close)(var_9);
  }
  if (var_11 == *(int *)(var_1 + 0x14)) {
    return var_8;
  }
                    /* WARNING: Subroutine does not return */
  var_12();
}


(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: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (pointer_declarator declarator: (identifier)))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (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)) (identifier)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (identifier) (identifier))))))))) alternative: (else_clause (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)) (identifier) (identifier)))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (identifier) (identifier) (identifier)))))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (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: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (pointer_expression argument: (identifier)) (number_literal) (pointer_expression argument: (identifier)) (pointer_expression argument: (identifier)) (pointer_expression argument: (identifier)) (pointer_expression argument: (identifier)) (number_literal) (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content)))))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) arguments: (argument_list (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 (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

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

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

{
  int iVar1;
  undefined4 uVar2;
  int in_GS_OFFSET;
  undefined **local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  int *local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x78d59;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  local_34 = &PTR_FUN_000cc9fc;
  iVar1 = FUN_00028e60(param_3);
  if (param_2 == 0x16) {
    if (iVar1 == 0) {
      uVar2 = FUN_0001cea0("%s",param_1);
    }
    else {
      uVar2 = FUN_0001cea0("%s@%s",iVar1,param_1);
    }
  }
  else if (iVar1 == 0) {
    uVar2 = FUN_0001cea0("%s:%d",param_1,param_2);
  }
  else {
    uVar2 = FUN_0001cea0("%s@%s:%d",iVar1,param_1,param_2);
  }
  FUN_0001dd30(iVar1);
  local_24 = (int *)0x0;
  local_28 = 0;
  local_2c = 0;
  local_30 = 0;
  iVar1 = FUN_00088df0(uVar2,param_3,&local_34,0,&local_24,&local_30,&local_2c,&local_28,0,1);
  FUN_0001dd30(local_30);
  FUN_0001dd30(local_2c);
  FUN_0001dd30(local_28);
  FUN_0001dd30(uVar2);
  if (iVar1 == 0) {
    if (local_24 != (int *)0x0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("sock == NULL","sshshare.c",0x825,"ssh_share_test_for_upstream");
    }
  }
  else {
    if (iVar1 != 1) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("result == SHARE_DOWNSTREAM","sshshare.c",0x828,"ssh_share_test_for_upstream");
    }
    (**(code **)(*local_24 + 4))(local_24);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  FUN_0008d800();
}

