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

int __regparm3 ssh_channel_data(ssh_channel *c,int is_stderr,char *data,int length)

{
  int iVar1;
  
  iVar1 = c->type;
  if (iVar1 == 1) {
    iVar1 = x11_send((c->u).x11.xconn,data,length);
    return iVar1;
  }
  if (iVar1 < 2) {
    if (iVar1 != 0) {
      return 0;
    }
    iVar1 = from_backend(c->ssh->frontend,is_stderr,data,length);
    return iVar1;
  }
  if (iVar1 == 2) {
    bufchain_add(&(c->u).a.inbuffer,data,length);
    ssh_agentf_try_forward(c);
    iVar1 = 0;
    if ((c->u).a.pending != (agent_pending_query *)0x0) {
      iVar1 = bufchain_size(&(c->u).a.inbuffer);
    }
  }
  else {
    if (iVar1 != 3) {
      return 0;
    }
    iVar1 = pfd_send((PortForwarding *)(c->u).a.inbuffer.head,data,length);
  }
  return iVar1;
}



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

undefined4 __regparm3
FUN_0003b790(int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = param_1[3];
  if (iVar1 == 1) {
    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);
    return uVar2;
  }
  if (iVar1 < 2) {
    if (iVar1 != 0) {
      return 0;
    }
    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);
    return uVar2;
  }
  if (iVar1 == 2) {
    FUN_0001abf0(param_1 + 0x13,param_3,param_4);
    FUN_0003a210();
    uVar2 = 0;
    if (param_1[0x16] != 0) {
      uVar2 = FUN_0001a810(param_1 + 0x13);
    }
  }
  else {
    if (iVar1 != 3) {
      return 0;
    }
    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);
  }
  return uVar2;
}


PUSH EDI
PUSH ESI
MOV ESI,EAX
PUSH EBX
MOV EAX,dword ptr [EAX + 0xc]
CALL 0x00014970
ADD EBX,0x6e5f3
CMP EAX,0x1
JZ 0x0003b800
JLE 0x0003b7d0
CMP EAX,0x2
JZ 0x0003b820
CMP EAX,0x3
JNZ 0x0003b7f0
SUB ESP,0x4
PUSH dword ptr [ESP + 0x14]
PUSH ECX
PUSH dword ptr [ESI + 0x4c]
CALL 0x0001c690
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
TEST EAX,EAX
JNZ 0x0003b7f0
MOV EAX,dword ptr [ESI]
PUSH dword ptr [ESP + 0x10]
PUSH ECX
PUSH EDX
PUSH dword ptr [EAX + 0x110]
CALL 0x000240d0
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
POP EBX
XOR EAX,EAX
POP ESI
POP EDI
RET
SUB ESP,0x4
PUSH dword ptr [ESP + 0x14]
PUSH ECX
PUSH dword ptr [ESI + 0x4c]
CALL 0x0006ec40
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x4
LEA EDI,[ESI + 0x4c]
PUSH dword ptr [ESP + 0x14]
PUSH ECX
PUSH EDI
CALL 0x0001abf0
MOV EAX,ESI
CALL 0x0003a210
MOV EDX,dword ptr [ESI + 0x58]
ADD ESP,0x10
XOR EAX,EAX
TEST EDX,EDX
JZ 0x0003b7c7
SUB ESP,0xc
PUSH EDI
CALL 0x0001a810
ADD ESP,0x10
JMP 0x0003b7c7
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3\nFUN_0003b790(int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = param_1[3];\n  if (iVar1 == 1) {\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }\n  if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }\n  if (iVar1 == 2) {\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }\n  return uVar2;\n}\n\n" comment (function_definition "undefined4 __regparm3\nFUN_0003b790(int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = param_1[3];\n  if (iVar1 == 1) {\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }\n  if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }\n  if (iVar1 == 2) {\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }\n  return uVar2;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003b790(int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = param_1[3];\n  if (iVar1 == 1) {\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }\n  if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }\n  if (iVar1 == 2) {\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = param_1[3];" (assignment_expression "iVar1 = param_1[3]" identifier = (subscript_expression "param_1[3]" identifier [ number_literal ])) ;) (if_statement "if (iVar1 == 1) {\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }" if (parenthesized_expression "(iVar1 == 1)" ( (binary_expression "iVar1 == 1" identifier == number_literal) )) (compound_statement "{\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }" { (expression_statement "uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);" (assignment_expression "uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d)" identifier = (call_expression "FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d)" identifier (argument_list "(param_1[0x13],param_3,param_4,0x3b79d)" ( (subscript_expression "param_1[0x13]" identifier [ number_literal ]) , identifier , identifier , number_literal )))) ;) (return_statement "return uVar2;" return identifier ;) })) (if_statement "if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }" if (parenthesized_expression "(iVar1 < 2)" ( (binary_expression "iVar1 < 2" identifier < number_literal) )) (compound_statement "{\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }" { (if_statement "if (iVar1 != 0) {\n      return 0;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);" (assignment_expression "uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4)" identifier = (call_expression "FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4)" identifier (argument_list "(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4)" ( (pointer_expression "*(undefined4 *)(*param_1 + 0x110)" * (cast_expression "(undefined4 *)(*param_1 + 0x110)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x110)" ( (binary_expression "*param_1 + 0x110" (pointer_expression "*param_1" * identifier) + number_literal) )))) , identifier , identifier , identifier )))) ;) (return_statement "return uVar2;" return identifier ;) })) (if_statement "if (iVar1 == 2) {\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }" if (parenthesized_expression "(iVar1 == 2)" ( (binary_expression "iVar1 == 2" identifier == number_literal) )) (compound_statement "{\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }" { (expression_statement "FUN_0001abf0(param_1 + 0x13,param_3,param_4);" (call_expression "FUN_0001abf0(param_1 + 0x13,param_3,param_4)" identifier (argument_list "(param_1 + 0x13,param_3,param_4)" ( (binary_expression "param_1 + 0x13" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "FUN_0003a210();" (call_expression "FUN_0003a210()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }" if (parenthesized_expression "(param_1[0x16] != 0)" ( (binary_expression "param_1[0x16] != 0" (subscript_expression "param_1[0x16]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }" { (expression_statement "uVar2 = FUN_0001a810(param_1 + 0x13);" (assignment_expression "uVar2 = FUN_0001a810(param_1 + 0x13)" identifier = (call_expression "FUN_0001a810(param_1 + 0x13)" identifier (argument_list "(param_1 + 0x13)" ( (binary_expression "param_1 + 0x13" identifier + number_literal) )))) ;) })) }) (else_clause "else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }" else (compound_statement "{\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }" { (if_statement "if (iVar1 != 3) {\n      return 0;\n    }" if (parenthesized_expression "(iVar1 != 3)" ( (binary_expression "iVar1 != 3" identifier != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);" (assignment_expression "uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4)" identifier = (call_expression "FUN_0001c690(param_1[0x13],param_3,param_4)" identifier (argument_list "(param_1[0x13],param_3,param_4)" ( (subscript_expression "param_1[0x13]" identifier [ number_literal ]) , identifier , identifier )))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nint __regparm3 ssh_channel_data(ssh_channel *c,int is_stderr,char *data,int length)\n\n{\n  int iVar1;\n  \n  iVar1 = c->type;\n  if (iVar1 == 1) {\n    iVar1 = x11_send((c->u).x11.xconn,data,length);\n    return iVar1;\n  }\n  if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    iVar1 = from_backend(c->ssh->frontend,is_stderr,data,length);\n    return iVar1;\n  }\n  if (iVar1 == 2) {\n    bufchain_add(&(c->u).a.inbuffer,data,length);\n    ssh_agentf_try_forward(c);\n    iVar1 = 0;\n    if ((c->u).a.pending != (agent_pending_query *)0x0) {\n      iVar1 = bufchain_size(&(c->u).a.inbuffer);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    iVar1 = pfd_send((PortForwarding *)(c->u).a.inbuffer.head,data,length);\n  }\n  return iVar1;\n}\n\n" comment comment (function_definition "int __regparm3 ssh_channel_data(ssh_channel *c,int is_stderr,char *data,int length)\n\n{\n  int iVar1;\n  \n  iVar1 = c->type;\n  if (iVar1 == 1) {\n    iVar1 = x11_send((c->u).x11.xconn,data,length);\n    return iVar1;\n  }\n  if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    iVar1 = from_backend(c->ssh->frontend,is_stderr,data,length);\n    return iVar1;\n  }\n  if (iVar1 == 2) {\n    bufchain_add(&(c->u).a.inbuffer,data,length);\n    ssh_agentf_try_forward(c);\n    iVar1 = 0;\n    if ((c->u).a.pending != (agent_pending_query *)0x0) {\n      iVar1 = bufchain_size(&(c->u).a.inbuffer);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    iVar1 = pfd_send((PortForwarding *)(c->u).a.inbuffer.head,data,length);\n  }\n  return iVar1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "ssh_channel_data(ssh_channel *c,int is_stderr,char *data,int length)" identifier (parameter_list "(ssh_channel *c,int is_stderr,char *data,int length)" ( (parameter_declaration "ssh_channel *c" type_identifier (pointer_declarator "*c" * identifier)) , (parameter_declaration "int is_stderr" primitive_type identifier) , (parameter_declaration "char *data" primitive_type (pointer_declarator "*data" * identifier)) , (parameter_declaration "int length" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = c->type;\n  if (iVar1 == 1) {\n    iVar1 = x11_send((c->u).x11.xconn,data,length);\n    return iVar1;\n  }\n  if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    iVar1 = from_backend(c->ssh->frontend,is_stderr,data,length);\n    return iVar1;\n  }\n  if (iVar1 == 2) {\n    bufchain_add(&(c->u).a.inbuffer,data,length);\n    ssh_agentf_try_forward(c);\n    iVar1 = 0;\n    if ((c->u).a.pending != (agent_pending_query *)0x0) {\n      iVar1 = bufchain_size(&(c->u).a.inbuffer);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    iVar1 = pfd_send((PortForwarding *)(c->u).a.inbuffer.head,data,length);\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = c->type;" (assignment_expression "iVar1 = c->type" identifier = (field_expression "c->type" identifier -> field_identifier)) ;) (if_statement "if (iVar1 == 1) {\n    iVar1 = x11_send((c->u).x11.xconn,data,length);\n    return iVar1;\n  }" if (parenthesized_expression "(iVar1 == 1)" ( (binary_expression "iVar1 == 1" identifier == number_literal) )) (compound_statement "{\n    iVar1 = x11_send((c->u).x11.xconn,data,length);\n    return iVar1;\n  }" { (expression_statement "iVar1 = x11_send((c->u).x11.xconn,data,length);" (assignment_expression "iVar1 = x11_send((c->u).x11.xconn,data,length)" identifier = (call_expression "x11_send((c->u).x11.xconn,data,length)" identifier (argument_list "((c->u).x11.xconn,data,length)" ( (field_expression "(c->u).x11.xconn" (field_expression "(c->u).x11" (parenthesized_expression "(c->u)" ( (field_expression "c->u" identifier -> field_identifier) )) . field_identifier) . field_identifier) , identifier , identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })) (if_statement "if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    iVar1 = from_backend(c->ssh->frontend,is_stderr,data,length);\n    return iVar1;\n  }" if (parenthesized_expression "(iVar1 < 2)" ( (binary_expression "iVar1 < 2" identifier < number_literal) )) (compound_statement "{\n    if (iVar1 != 0) {\n      return 0;\n    }\n    iVar1 = from_backend(c->ssh->frontend,is_stderr,data,length);\n    return iVar1;\n  }" { (if_statement "if (iVar1 != 0) {\n      return 0;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = from_backend(c->ssh->frontend,is_stderr,data,length);" (assignment_expression "iVar1 = from_backend(c->ssh->frontend,is_stderr,data,length)" identifier = (call_expression "from_backend(c->ssh->frontend,is_stderr,data,length)" identifier (argument_list "(c->ssh->frontend,is_stderr,data,length)" ( (field_expression "c->ssh->frontend" (field_expression "c->ssh" identifier -> field_identifier) -> field_identifier) , identifier , identifier , identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })) (if_statement "if (iVar1 == 2) {\n    bufchain_add(&(c->u).a.inbuffer,data,length);\n    ssh_agentf_try_forward(c);\n    iVar1 = 0;\n    if ((c->u).a.pending != (agent_pending_query *)0x0) {\n      iVar1 = bufchain_size(&(c->u).a.inbuffer);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    iVar1 = pfd_send((PortForwarding *)(c->u).a.inbuffer.head,data,length);\n  }" if (parenthesized_expression "(iVar1 == 2)" ( (binary_expression "iVar1 == 2" identifier == number_literal) )) (compound_statement "{\n    bufchain_add(&(c->u).a.inbuffer,data,length);\n    ssh_agentf_try_forward(c);\n    iVar1 = 0;\n    if ((c->u).a.pending != (agent_pending_query *)0x0) {\n      iVar1 = bufchain_size(&(c->u).a.inbuffer);\n    }\n  }" { (expression_statement "bufchain_add(&(c->u).a.inbuffer,data,length);" (call_expression "bufchain_add(&(c->u).a.inbuffer,data,length)" identifier (argument_list "(&(c->u).a.inbuffer,data,length)" ( (pointer_expression "&(c->u).a.inbuffer" & (field_expression "(c->u).a.inbuffer" (field_expression "(c->u).a" (parenthesized_expression "(c->u)" ( (field_expression "c->u" identifier -> field_identifier) )) . field_identifier) . field_identifier)) , identifier , identifier ))) ;) (expression_statement "ssh_agentf_try_forward(c);" (call_expression "ssh_agentf_try_forward(c)" identifier (argument_list "(c)" ( identifier ))) ;) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (if_statement "if ((c->u).a.pending != (agent_pending_query *)0x0) {\n      iVar1 = bufchain_size(&(c->u).a.inbuffer);\n    }" if (parenthesized_expression "((c->u).a.pending != (agent_pending_query *)0x0)" ( (binary_expression "(c->u).a.pending != (agent_pending_query *)0x0" (field_expression "(c->u).a.pending" (field_expression "(c->u).a" (parenthesized_expression "(c->u)" ( (field_expression "c->u" identifier -> field_identifier) )) . field_identifier) . field_identifier) != (cast_expression "(agent_pending_query *)0x0" ( (type_descriptor "agent_pending_query *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar1 = bufchain_size(&(c->u).a.inbuffer);\n    }" { (expression_statement "iVar1 = bufchain_size(&(c->u).a.inbuffer);" (assignment_expression "iVar1 = bufchain_size(&(c->u).a.inbuffer)" identifier = (call_expression "bufchain_size(&(c->u).a.inbuffer)" identifier (argument_list "(&(c->u).a.inbuffer)" ( (pointer_expression "&(c->u).a.inbuffer" & (field_expression "(c->u).a.inbuffer" (field_expression "(c->u).a" (parenthesized_expression "(c->u)" ( (field_expression "c->u" identifier -> field_identifier) )) . field_identifier) . field_identifier)) )))) ;) })) }) (else_clause "else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    iVar1 = pfd_send((PortForwarding *)(c->u).a.inbuffer.head,data,length);\n  }" else (compound_statement "{\n    if (iVar1 != 3) {\n      return 0;\n    }\n    iVar1 = pfd_send((PortForwarding *)(c->u).a.inbuffer.head,data,length);\n  }" { (if_statement "if (iVar1 != 3) {\n      return 0;\n    }" if (parenthesized_expression "(iVar1 != 3)" ( (binary_expression "iVar1 != 3" identifier != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar1 = pfd_send((PortForwarding *)(c->u).a.inbuffer.head,data,length);" (assignment_expression "iVar1 = pfd_send((PortForwarding *)(c->u).a.inbuffer.head,data,length)" identifier = (call_expression "pfd_send((PortForwarding *)(c->u).a.inbuffer.head,data,length)" identifier (argument_list "((PortForwarding *)(c->u).a.inbuffer.head,data,length)" ( (cast_expression "(PortForwarding *)(c->u).a.inbuffer.head" ( (type_descriptor "PortForwarding *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "(c->u).a.inbuffer.head" (field_expression "(c->u).a.inbuffer" (field_expression "(c->u).a" (parenthesized_expression "(c->u)" ( (field_expression "c->u" identifier -> field_identifier) )) . field_identifier) . field_identifier) . field_identifier)) , identifier , identifier )))) ;) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "undefined4 __regparm3\nFUN_0003b790(int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = param_1[3];\n  if (iVar1 == 1) {\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }\n  if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }\n  if (iVar1 == 2) {\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4 __regparm3\nFUN_0003b790(int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = param_1[3];\n  if (iVar1 == 1) {\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }\n  if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }\n  if (iVar1 == 2) {\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }\n  return uVar2;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003b790(int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" identifier (parameter_list "(int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = param_1[3];\n  if (iVar1 == 1) {\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }\n  if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }\n  if (iVar1 == 2) {\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }\n  return uVar2;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = param_1[3];" (assignment_expression "iVar1 = param_1[3]" identifier = (subscript_expression "param_1[3]" identifier [ number_literal ])) ;) (if_statement "if (iVar1 == 1) {\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }" if (parenthesized_expression "(iVar1 == 1)" ( (binary_expression "iVar1 == 1" identifier == number_literal) )) (compound_statement "{\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }" { (expression_statement "uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);" (assignment_expression "uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d)" identifier = (call_expression "FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d)" identifier (argument_list "(param_1[0x13],param_3,param_4,0x3b79d)" ( (subscript_expression "param_1[0x13]" identifier [ number_literal ]) , identifier , identifier , number_literal )))) ;) (return_statement "return uVar2;" return identifier ;) })) (if_statement "if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }" if (parenthesized_expression "(iVar1 < 2)" ( (binary_expression "iVar1 < 2" identifier < number_literal) )) (compound_statement "{\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }" { (if_statement "if (iVar1 != 0) {\n      return 0;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);" (assignment_expression "uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4)" identifier = (call_expression "FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4)" identifier (argument_list "(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4)" ( (pointer_expression "*(undefined4 *)(*param_1 + 0x110)" * (cast_expression "(undefined4 *)(*param_1 + 0x110)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x110)" ( (binary_expression "*param_1 + 0x110" (pointer_expression "*param_1" * identifier) + number_literal) )))) , identifier , identifier , identifier )))) ;) (return_statement "return uVar2;" return identifier ;) })) (if_statement "if (iVar1 == 2) {\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }" if (parenthesized_expression "(iVar1 == 2)" ( (binary_expression "iVar1 == 2" identifier == number_literal) )) (compound_statement "{\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }" { (expression_statement "FUN_0001abf0(param_1 + 0x13,param_3,param_4);" (call_expression "FUN_0001abf0(param_1 + 0x13,param_3,param_4)" identifier (argument_list "(param_1 + 0x13,param_3,param_4)" ( (binary_expression "param_1 + 0x13" identifier + number_literal) , identifier , identifier ))) ;) (expression_statement "FUN_0003a210();" (call_expression "FUN_0003a210()" identifier (argument_list "()" ( ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }" if (parenthesized_expression "(param_1[0x16] != 0)" ( (binary_expression "param_1[0x16] != 0" (subscript_expression "param_1[0x16]" identifier [ number_literal ]) != number_literal) )) (compound_statement "{\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }" { (expression_statement "uVar2 = FUN_0001a810(param_1 + 0x13);" (assignment_expression "uVar2 = FUN_0001a810(param_1 + 0x13)" identifier = (call_expression "FUN_0001a810(param_1 + 0x13)" identifier (argument_list "(param_1 + 0x13)" ( (binary_expression "param_1 + 0x13" identifier + number_literal) )))) ;) })) }) (else_clause "else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }" else (compound_statement "{\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }" { (if_statement "if (iVar1 != 3) {\n      return 0;\n    }" if (parenthesized_expression "(iVar1 != 3)" ( (binary_expression "iVar1 != 3" identifier != number_literal) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);" (assignment_expression "uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4)" identifier = (call_expression "FUN_0001c690(param_1[0x13],param_3,param_4)" identifier (argument_list "(param_1[0x13],param_3,param_4)" ( (subscript_expression "param_1[0x13]" identifier [ number_literal ]) , identifier , identifier )))) ;) }))) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) , IDENT , IDENT , LIT )))) ;) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) , IDENT , IDENT , IDENT )))) ;) (return_statement return IDENT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) )))) ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) , IDENT , IDENT )))) ;) }))) (return_statement return IDENT ;) })))
(function_definition "undefined4 __regparm3\nFUN_0003b790(int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = param_1[3];\n  if (iVar1 == 1) {\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }\n  if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }\n  if (iVar1 == 2) {\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }\n  return uVar2;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0003b790(int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" (identifier "FUN_0003b790") (parameter_list "(int *param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = param_1[3];\n  if (iVar1 == 1) {\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }\n  if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }\n  if (iVar1 == 2) {\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }\n  return uVar2;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "iVar1 = param_1[3];" (assignment_expression "iVar1 = param_1[3]" (identifier "iVar1") (= "=") (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]"))) (; ";")) (if_statement "if (iVar1 == 1) {\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(iVar1 == 1)" (( "(") (binary_expression "iVar1 == 1" (identifier "iVar1") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);\n    return uVar2;\n  }" ({ "{") (expression_statement "uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);" (assignment_expression "uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d)" (identifier "uVar2") (= "=") (call_expression "FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d)" (identifier "FUN_0006ec40") (argument_list "(param_1[0x13],param_3,param_4,0x3b79d)" (( "(") (subscript_expression "param_1[0x13]" (identifier "param_1") ([ "[") (number_literal "0x13") (] "]")) (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (number_literal "0x3b79d") () ")")))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (if_statement "if (iVar1 < 2) {\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(iVar1 < 2)" (( "(") (binary_expression "iVar1 < 2" (identifier "iVar1") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n    if (iVar1 != 0) {\n      return 0;\n    }\n    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);\n    return uVar2;\n  }" ({ "{") (if_statement "if (iVar1 != 0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);" (assignment_expression "uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4)" (identifier "uVar2") (= "=") (call_expression "FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4)" (identifier "FUN_000240d0") (argument_list "(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4)" (( "(") (pointer_expression "*(undefined4 *)(*param_1 + 0x110)" (* "*") (cast_expression "(undefined4 *)(*param_1 + 0x110)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x110)" (( "(") (binary_expression "*param_1 + 0x110" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x110")) () ")")))) (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")")))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (if_statement "if (iVar1 == 2) {\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }\n  else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }" (if "if") (parenthesized_expression "(iVar1 == 2)" (( "(") (binary_expression "iVar1 == 2" (identifier "iVar1") (== "==") (number_literal "2")) () ")")) (compound_statement "{\n    FUN_0001abf0(param_1 + 0x13,param_3,param_4);\n    FUN_0003a210();\n    uVar2 = 0;\n    if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }\n  }" ({ "{") (expression_statement "FUN_0001abf0(param_1 + 0x13,param_3,param_4);" (call_expression "FUN_0001abf0(param_1 + 0x13,param_3,param_4)" (identifier "FUN_0001abf0") (argument_list "(param_1 + 0x13,param_3,param_4)" (( "(") (binary_expression "param_1 + 0x13" (identifier "param_1") (+ "+") (number_literal "0x13")) (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")"))) (; ";")) (expression_statement "FUN_0003a210();" (call_expression "FUN_0003a210()" (identifier "FUN_0003a210") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_1[0x16] != 0) {\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }" (if "if") (parenthesized_expression "(param_1[0x16] != 0)" (( "(") (binary_expression "param_1[0x16] != 0" (subscript_expression "param_1[0x16]" (identifier "param_1") ([ "[") (number_literal "0x16") (] "]")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = FUN_0001a810(param_1 + 0x13);\n    }" ({ "{") (expression_statement "uVar2 = FUN_0001a810(param_1 + 0x13);" (assignment_expression "uVar2 = FUN_0001a810(param_1 + 0x13)" (identifier "uVar2") (= "=") (call_expression "FUN_0001a810(param_1 + 0x13)" (identifier "FUN_0001a810") (argument_list "(param_1 + 0x13)" (( "(") (binary_expression "param_1 + 0x13" (identifier "param_1") (+ "+") (number_literal "0x13")) () ")")))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }" (else "else") (compound_statement "{\n    if (iVar1 != 3) {\n      return 0;\n    }\n    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);\n  }" ({ "{") (if_statement "if (iVar1 != 3) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(iVar1 != 3)" (( "(") (binary_expression "iVar1 != 3" (identifier "iVar1") (!= "!=") (number_literal "3")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);" (assignment_expression "uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4)" (identifier "uVar2") (= "=") (call_expression "FUN_0001c690(param_1[0x13],param_3,param_4)" (identifier "FUN_0001c690") (argument_list "(param_1[0x13],param_3,param_4)" (( "(") (subscript_expression "param_1[0x13]" (identifier "param_1") ([ "[") (number_literal "0x13") (] "]")) (, ",") (identifier "param_3") (, ",") (identifier "param_4") () ")")))) (; ";")) (} "}")))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

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

int __regparm3 function_1(type_1 *c,int is_stderr,char *data,int length)

{
  int var_1;
  
  var_1 = c->type;
  if (var_1 == 1) {
    var_1 = var_2((c->u).x11.xconn,data,length);
    return var_1;
  }
  if (var_1 < 2) {
    if (var_1 != 0) {
      return 0;
    }
    var_1 = var_3(c->ssh->frontend,is_stderr,data,length);
    return var_1;
  }
  if (var_1 == 2) {
    var_4(&(c->u).a.inbuffer,data,length);
    var_5(c);
    var_1 = 0;
    if ((c->u).a.pending != (type_2 *)0x0) {
      var_1 = var_6(&(c->u).a.inbuffer);
    }
  }
  else {
    if (var_1 != 3) {
      return 0;
    }
    var_1 = var_7((type_3 *)(c->u).a.inbuffer.head,data,length);
  }
  return var_1;
}


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

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

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

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = param_1[3];
  if (iVar1 == 1) {
    uVar2 = FUN_0006ec40(param_1[0x13],param_3,param_4,0x3b79d);
    return uVar2;
  }
  if (iVar1 < 2) {
    if (iVar1 != 0) {
      return 0;
    }
    uVar2 = FUN_000240d0(*(undefined4 *)(*param_1 + 0x110),param_2,param_3,param_4);
    return uVar2;
  }
  if (iVar1 == 2) {
    FUN_0001abf0(param_1 + 0x13,param_3,param_4);
    FUN_0003a210();
    uVar2 = 0;
    if (param_1[0x16] != 0) {
      uVar2 = FUN_0001a810(param_1 + 0x13);
    }
  }
  else {
    if (iVar1 != 3) {
      return 0;
    }
    uVar2 = FUN_0001c690(param_1[0x13],param_3,param_4);
  }
  return uVar2;
}

