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

Packet * __regparm3 ssh2_chanreq_init(ssh_channel *c,char *type,cchandler_fn_t handler,void *ctx)

{
  outstanding_channel_request *poVar1;
  Packet *pkt;
  outstanding_channel_request *poVar2;
  int in_GS_OFFSET;
  uint __line;
  char *__function;
  undefined1 local_21;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x3d0db;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if ((c->closes & 10) != 0) {
    __function = "ssh2_chanreq_init";
    __line = 0x1f01;
LAB_0003d1b2:
                    /* WARNING: Subroutine does not return */
    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function
                 );
  }
  pkt = ssh2_pkt_init(0x62);
  ssh_pkt_adduint32(pkt,c->remoteid);
  ssh_pkt_addstring(pkt,type);
  local_21 = handler != (cchandler_fn_t)0x0;
  ssh_pkt_adddata(pkt,&local_21,1);
  if (handler != (cchandler_fn_t)0x0) {
    poVar2 = (outstanding_channel_request *)safemalloc(1,0xc);
    if ((c->closes & 10) != 0) {
      __function = "ssh2_queue_chanreq_handler";
      __line = 0x1ee3;
      goto LAB_0003d1b2;
    }
    poVar1 = (c->v).v2.chanreq_head;
    poVar2->handler = handler;
    poVar2->next = (outstanding_channel_request *)0x0;
    poVar2->ctx = ctx;
    if (poVar1 == (outstanding_channel_request *)0x0) {
      (c->v).v2.chanreq_head = poVar2;
    }
    else {
      ((c->v).v2.chanreq_tail)->next = poVar2;
    }
    (c->v).v2.chanreq_tail = poVar2;
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return pkt;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

undefined4 __regparm3 FUN_0003d0d0(int param_1,undefined4 param_2,int param_3,int param_4)

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  int *piVar4;
  int in_GS_OFFSET;
  uint __line;
  char *__function;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if ((*(byte *)(param_1 + 0x14) & 10) != 0) {
    __function = "ssh2_chanreq_init";
    __line = 0x1f01;
LAB_0003d1b2:
                    /* WARNING: Subroutine does not return */
    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function
                 );
  }
  uVar3 = FUN_0003c290();
  FUN_0003c380();
  FUN_0003c3c0();
  FUN_0003c1b0();
  if (param_3 != 0) {
    piVar4 = (int *)FUN_0002e780(1,0xc);
    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {
      __function = "ssh2_queue_chanreq_handler";
      __line = 0x1ee3;
      goto LAB_0003d1b2;
    }
    iVar2 = *(int *)(param_1 + 0x40);
    *piVar4 = param_3;
    piVar4[2] = 0;
    piVar4[1] = param_4;
    if (iVar2 == 0) {
      *(int **)(param_1 + 0x40) = piVar4;
    }
    else {
      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;
    }
    *(int **)(param_1 + 0x44) = piVar4;
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000a39d0();
}


PUSH EBP
PUSH EDI
PUSH ESI
MOV ESI,EAX
PUSH EBX
CALL 0x0001c4f0
ADD EBX,0xd3675
SUB ESP,0x2c
MOV EAX,dword ptr [ESP + 0x40]
MOV dword ptr [ESP + 0xc],EAX
MOV dword ptr [ESP + 0x8],EBX
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x1c],EAX
XOR EAX,EAX
TEST byte ptr [ESI + 0x14],0xa
JNZ 0x0003d1a2
MOV EAX,0x62
MOV EBP,ECX
MOV EBX,EDX
CALL 0x0003c290
MOV EDX,dword ptr [ESI + 0x4]
MOV EDI,EAX
CALL 0x0003c380
MOV EDX,EBX
MOV EAX,EDI
CALL 0x0003c3c0
TEST EBP,EBP
LEA EDX,[ESP + 0x1b]
MOV ECX,0x1
MOV EAX,EDI
SETNZ byte ptr [ESP + 0x1b]
CALL 0x0003c1b0
TEST EBP,EBP
JZ 0x0003d17b
SUB ESP,0x8
PUSH 0xc
PUSH 0x1
MOV EBX,dword ptr [ESP + 0x18]
CALL 0x0002e780
ADD ESP,0x10
TEST byte ptr [ESI + 0x14],0xa
JNZ 0x0003d1c5
MOV ECX,dword ptr [ESP + 0xc]
MOV EDX,dword ptr [ESI + 0x40]
MOV dword ptr [EAX],EBP
MOV dword ptr [EAX + 0x8],0x0
MOV dword ptr [EAX + 0x4],ECX
TEST EDX,EDX
JZ 0x0003d198
MOV EDX,dword ptr [ESI + 0x44]
MOV dword ptr [EDX + 0x8],EAX
MOV dword ptr [ESI + 0x44],EAX
MOV ECX,dword ptr [ESP + 0x1c]
XOR ECX,dword ptr GS:[0x14]
MOV EAX,EDI
JNZ 0x0003d19d
ADD ESP,0x2c
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV dword ptr [ESI + 0x40],EAX
JMP 0x0003d178
CALL 0x000a39d0
MOV EBX,dword ptr [ESP + 0x8]
LEA EAX,[EBX + 0xfffb1c64]
PUSH EAX
PUSH 0x1f01
LEA EAX,[EBX + 0xfffadadb]
PUSH EAX
LEA EAX,[EBX + 0xfffaf884]
PUSH EAX
CALL 0x0001c000
MOV EBX,dword ptr [ESP + 0x8]
LEA EAX,[EBX + 0xfffb1c48]
PUSH EAX
PUSH 0x1ee3
JMP 0x0003d1b2
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 __regparm3 FUN_0003d0d0(int param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  uint __line;\n  char *__function;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }\n  uVar3 = FUN_0003c290();\n  FUN_0003c380();\n  FUN_0003c3c0();\n  FUN_0003c1b0();\n  if (param_3 != 0) {\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a39d0();\n}\n\n" comment (function_definition "undefined4 __regparm3 FUN_0003d0d0(int param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  uint __line;\n  char *__function;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }\n  uVar3 = FUN_0003c290();\n  FUN_0003c380();\n  FUN_0003c3c0();\n  FUN_0003c1b0();\n  if (param_3 != 0) {\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a39d0();\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003d0d0(int param_1,undefined4 param_2,int param_3,int param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  uint __line;\n  char *__function;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }\n  uVar3 = FUN_0003c290();\n  FUN_0003c380();\n  FUN_0003c3c0();\n  FUN_0003c1b0();\n  if (param_3 != 0) {\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_000a39d0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint __line;" type_identifier identifier ;) (declaration "char *__function;" primitive_type (pointer_declarator "*__function" * identifier) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }" if (parenthesized_expression "((*(byte *)(param_1 + 0x14) & 10) != 0)" ( (binary_expression "(*(byte *)(param_1 + 0x14) & 10) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x14) & 10)" ( (binary_expression "*(byte *)(param_1 + 0x14) & 10" (pointer_expression "*(byte *)(param_1 + 0x14)" * (cast_expression "(byte *)(param_1 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }" { (expression_statement "__function = "ssh2_chanreq_init";" (assignment_expression "__function = "ssh2_chanreq_init"" identifier = (string_literal ""ssh2_chanreq_init"" " string_content ")) ;) (expression_statement "__line = 0x1f01;" (assignment_expression "__line = 0x1f01" identifier = number_literal) ;) (labeled_statement "LAB_0003d1b2:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );" statement_identifier : comment (expression_statement "__assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );" (call_expression "__assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 )" identifier (argument_list "("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 )" ( (string_literal ""!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , identifier , identifier ))) ;)) })) (expression_statement "uVar3 = FUN_0003c290();" (assignment_expression "uVar3 = FUN_0003c290()" identifier = (call_expression "FUN_0003c290()" identifier (argument_list "()" ( )))) ;) (expression_statement "FUN_0003c380();" (call_expression "FUN_0003c380()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0003c3c0();" (call_expression "FUN_0003c3c0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0003c1b0();" (call_expression "FUN_0003c1b0()" identifier (argument_list "()" ( ))) ;) (if_statement "if (param_3 != 0) {\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }" { (expression_statement "piVar4 = (int *)FUN_0002e780(1,0xc);" (assignment_expression "piVar4 = (int *)FUN_0002e780(1,0xc)" identifier = (cast_expression "(int *)FUN_0002e780(1,0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002e780(1,0xc)" identifier (argument_list "(1,0xc)" ( number_literal , number_literal ))))) ;) (if_statement "if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }" if (parenthesized_expression "((*(byte *)(param_1 + 0x14) & 10) != 0)" ( (binary_expression "(*(byte *)(param_1 + 0x14) & 10) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x14) & 10)" ( (binary_expression "*(byte *)(param_1 + 0x14) & 10" (pointer_expression "*(byte *)(param_1 + 0x14)" * (cast_expression "(byte *)(param_1 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }" { (expression_statement "__function = "ssh2_queue_chanreq_handler";" (assignment_expression "__function = "ssh2_queue_chanreq_handler"" identifier = (string_literal ""ssh2_queue_chanreq_handler"" " string_content ")) ;) (expression_statement "__line = 0x1ee3;" (assignment_expression "__line = 0x1ee3" identifier = number_literal) ;) (goto_statement "goto LAB_0003d1b2;" goto statement_identifier ;) })) (expression_statement "iVar2 = *(int *)(param_1 + 0x40);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x40)" identifier = (pointer_expression "*(int *)(param_1 + 0x40)" * (cast_expression "(int *)(param_1 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) ))))) ;) (expression_statement "*piVar4 = param_3;" (assignment_expression "*piVar4 = param_3" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "piVar4[2] = 0;" (assignment_expression "piVar4[2] = 0" (subscript_expression "piVar4[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar4[1] = param_4;" (assignment_expression "piVar4[1] = param_4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      *(int **)(param_1 + 0x40) = piVar4;\n    }" { (expression_statement "*(int **)(param_1 + 0x40) = piVar4;" (assignment_expression "*(int **)(param_1 + 0x40) = piVar4" (pointer_expression "*(int **)(param_1 + 0x40)" * (cast_expression "(int **)(param_1 + 0x40)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }" else (compound_statement "{\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }" { (expression_statement "*(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;" (assignment_expression "*(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4" (pointer_expression "*(int **)(*(int *)(param_1 + 0x44) + 8)" * (cast_expression "(int **)(*(int *)(param_1 + 0x44) + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_1 + 0x44) + 8)" ( (binary_expression "*(int *)(param_1 + 0x44) + 8" (pointer_expression "*(int *)(param_1 + 0x44)" * (cast_expression "(int *)(param_1 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) + number_literal) )))) = identifier) ;) }))) (expression_statement "*(int **)(param_1 + 0x44) = piVar4;" (assignment_expression "*(int **)(param_1 + 0x44) = piVar4" (pointer_expression "*(int **)(param_1 + 0x44)" * (cast_expression "(int **)(param_1 + 0x44)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) = identifier) ;) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar3;\n  }" { (return_statement "return uVar3;" return identifier ;) })) comment (expression_statement "FUN_000a39d0();" (call_expression "FUN_000a39d0()" identifier (argument_list "()" ( ))) ;) })))
(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\nPacket * __regparm3 ssh2_chanreq_init(ssh_channel *c,char *type,cchandler_fn_t handler,void *ctx)\n\n{\n  outstanding_channel_request *poVar1;\n  Packet *pkt;\n  outstanding_channel_request *poVar2;\n  int in_GS_OFFSET;\n  uint __line;\n  char *__function;\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3d0db;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((c->closes & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }\n  pkt = ssh2_pkt_init(0x62);\n  ssh_pkt_adduint32(pkt,c->remoteid);\n  ssh_pkt_addstring(pkt,type);\n  local_21 = handler != (cchandler_fn_t)0x0;\n  ssh_pkt_adddata(pkt,&local_21,1);\n  if (handler != (cchandler_fn_t)0x0) {\n    poVar2 = (outstanding_channel_request *)safemalloc(1,0xc);\n    if ((c->closes & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    poVar1 = (c->v).v2.chanreq_head;\n    poVar2->handler = handler;\n    poVar2->next = (outstanding_channel_request *)0x0;\n    poVar2->ctx = ctx;\n    if (poVar1 == (outstanding_channel_request *)0x0) {\n      (c->v).v2.chanreq_head = poVar2;\n    }\n    else {\n      ((c->v).v2.chanreq_tail)->next = poVar2;\n    }\n    (c->v).v2.chanreq_tail = poVar2;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pkt;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (ERROR "Packet * __regparm3 ssh2_chanreq_init(ssh_channel *c,char *type,cchandler_fn_t handler,void *ctx)" (binary_expression "Packet * __regparm3 ssh2_chanreq_init(ssh_channel *c,char *type,cchandler_fn_t handler,void *ctx)" identifier * (ERROR "__regparm3" identifier) (call_expression "ssh2_chanreq_init(ssh_channel *c,char *type,cchandler_fn_t handler,void *ctx)" identifier (argument_list "(ssh_channel *c,char *type,cchandler_fn_t handler,void *ctx)" ( (binary_expression "ssh_channel *c" identifier * identifier) , (binary_expression "char *type" identifier * identifier) , identifier (ERROR "handler" identifier) , (binary_expression "void *ctx" identifier * identifier) ))))) (compound_statement "{\n  outstanding_channel_request *poVar1;\n  Packet *pkt;\n  outstanding_channel_request *poVar2;\n  int in_GS_OFFSET;\n  uint __line;\n  char *__function;\n  undefined1 local_21;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x3d0db;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((c->closes & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }\n  pkt = ssh2_pkt_init(0x62);\n  ssh_pkt_adduint32(pkt,c->remoteid);\n  ssh_pkt_addstring(pkt,type);\n  local_21 = handler != (cchandler_fn_t)0x0;\n  ssh_pkt_adddata(pkt,&local_21,1);\n  if (handler != (cchandler_fn_t)0x0) {\n    poVar2 = (outstanding_channel_request *)safemalloc(1,0xc);\n    if ((c->closes & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    poVar1 = (c->v).v2.chanreq_head;\n    poVar2->handler = handler;\n    poVar2->next = (outstanding_channel_request *)0x0;\n    poVar2->ctx = ctx;\n    if (poVar1 == (outstanding_channel_request *)0x0) {\n      (c->v).v2.chanreq_head = poVar2;\n    }\n    else {\n      ((c->v).v2.chanreq_tail)->next = poVar2;\n    }\n    (c->v).v2.chanreq_tail = poVar2;\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pkt;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "outstanding_channel_request *poVar1;" type_identifier (pointer_declarator "*poVar1" * identifier) ;) (declaration "Packet *pkt;" type_identifier (pointer_declarator "*pkt" * identifier) ;) (declaration "outstanding_channel_request *poVar2;" type_identifier (pointer_declarator "*poVar2" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint __line;" type_identifier identifier ;) (declaration "char *__function;" primitive_type (pointer_declarator "*__function" * identifier) ;) (declaration "undefined1 local_21;" type_identifier identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x3d0db;" (assignment_expression "uStack_14 = 0x3d0db" 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) ))))) ;) (if_statement "if ((c->closes & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }" if (parenthesized_expression "((c->closes & 10) != 0)" ( (binary_expression "(c->closes & 10) != 0" (parenthesized_expression "(c->closes & 10)" ( (binary_expression "c->closes & 10" (field_expression "c->closes" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }" { (expression_statement "__function = "ssh2_chanreq_init";" (assignment_expression "__function = "ssh2_chanreq_init"" identifier = (string_literal ""ssh2_chanreq_init"" " string_content ")) ;) (expression_statement "__line = 0x1f01;" (assignment_expression "__line = 0x1f01" identifier = number_literal) ;) (labeled_statement "LAB_0003d1b2:\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );" statement_identifier : comment (expression_statement "__assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );" (call_expression "__assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 )" identifier (argument_list "("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 )" ( (string_literal ""!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , identifier , identifier ))) ;)) })) (expression_statement "pkt = ssh2_pkt_init(0x62);" (assignment_expression "pkt = ssh2_pkt_init(0x62)" identifier = (call_expression "ssh2_pkt_init(0x62)" identifier (argument_list "(0x62)" ( number_literal )))) ;) (expression_statement "ssh_pkt_adduint32(pkt,c->remoteid);" (call_expression "ssh_pkt_adduint32(pkt,c->remoteid)" identifier (argument_list "(pkt,c->remoteid)" ( identifier , (field_expression "c->remoteid" identifier -> field_identifier) ))) ;) (expression_statement "ssh_pkt_addstring(pkt,type);" (call_expression "ssh_pkt_addstring(pkt,type)" identifier (argument_list "(pkt,type)" ( identifier , identifier ))) ;) (expression_statement "local_21 = handler != (cchandler_fn_t)0x0;" (assignment_expression "local_21 = handler != (cchandler_fn_t)0x0" identifier = (binary_expression "handler != (cchandler_fn_t)0x0" identifier != (cast_expression "(cchandler_fn_t)0x0" ( (type_descriptor "cchandler_fn_t" type_identifier) ) number_literal))) ;) (expression_statement "ssh_pkt_adddata(pkt,&local_21,1);" (call_expression "ssh_pkt_adddata(pkt,&local_21,1)" identifier (argument_list "(pkt,&local_21,1)" ( identifier , (pointer_expression "&local_21" & identifier) , number_literal ))) ;) (if_statement "if (handler != (cchandler_fn_t)0x0) {\n    poVar2 = (outstanding_channel_request *)safemalloc(1,0xc);\n    if ((c->closes & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    poVar1 = (c->v).v2.chanreq_head;\n    poVar2->handler = handler;\n    poVar2->next = (outstanding_channel_request *)0x0;\n    poVar2->ctx = ctx;\n    if (poVar1 == (outstanding_channel_request *)0x0) {\n      (c->v).v2.chanreq_head = poVar2;\n    }\n    else {\n      ((c->v).v2.chanreq_tail)->next = poVar2;\n    }\n    (c->v).v2.chanreq_tail = poVar2;\n  }" if (parenthesized_expression "(handler != (cchandler_fn_t)0x0)" ( (binary_expression "handler != (cchandler_fn_t)0x0" identifier != (cast_expression "(cchandler_fn_t)0x0" ( (type_descriptor "cchandler_fn_t" type_identifier) ) number_literal)) )) (compound_statement "{\n    poVar2 = (outstanding_channel_request *)safemalloc(1,0xc);\n    if ((c->closes & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    poVar1 = (c->v).v2.chanreq_head;\n    poVar2->handler = handler;\n    poVar2->next = (outstanding_channel_request *)0x0;\n    poVar2->ctx = ctx;\n    if (poVar1 == (outstanding_channel_request *)0x0) {\n      (c->v).v2.chanreq_head = poVar2;\n    }\n    else {\n      ((c->v).v2.chanreq_tail)->next = poVar2;\n    }\n    (c->v).v2.chanreq_tail = poVar2;\n  }" { (expression_statement "poVar2 = (outstanding_channel_request *)safemalloc(1,0xc);" (assignment_expression "poVar2 = (outstanding_channel_request *)safemalloc(1,0xc)" identifier = (cast_expression "(outstanding_channel_request *)safemalloc(1,0xc)" ( (type_descriptor "outstanding_channel_request *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0xc)" identifier (argument_list "(1,0xc)" ( number_literal , number_literal ))))) ;) (if_statement "if ((c->closes & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }" if (parenthesized_expression "((c->closes & 10) != 0)" ( (binary_expression "(c->closes & 10) != 0" (parenthesized_expression "(c->closes & 10)" ( (binary_expression "c->closes & 10" (field_expression "c->closes" identifier -> field_identifier) & number_literal) )) != number_literal) )) (compound_statement "{\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }" { (expression_statement "__function = "ssh2_queue_chanreq_handler";" (assignment_expression "__function = "ssh2_queue_chanreq_handler"" identifier = (string_literal ""ssh2_queue_chanreq_handler"" " string_content ")) ;) (expression_statement "__line = 0x1ee3;" (assignment_expression "__line = 0x1ee3" identifier = number_literal) ;) (goto_statement "goto LAB_0003d1b2;" goto statement_identifier ;) })) (expression_statement "poVar1 = (c->v).v2.chanreq_head;" (assignment_expression "poVar1 = (c->v).v2.chanreq_head" identifier = (field_expression "(c->v).v2.chanreq_head" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier)) ;) (expression_statement "poVar2->handler = handler;" (assignment_expression "poVar2->handler = handler" (field_expression "poVar2->handler" identifier -> field_identifier) = identifier) ;) (expression_statement "poVar2->next = (outstanding_channel_request *)0x0;" (assignment_expression "poVar2->next = (outstanding_channel_request *)0x0" (field_expression "poVar2->next" identifier -> field_identifier) = (cast_expression "(outstanding_channel_request *)0x0" ( (type_descriptor "outstanding_channel_request *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "poVar2->ctx = ctx;" (assignment_expression "poVar2->ctx = ctx" (field_expression "poVar2->ctx" identifier -> field_identifier) = identifier) ;) (if_statement "if (poVar1 == (outstanding_channel_request *)0x0) {\n      (c->v).v2.chanreq_head = poVar2;\n    }\n    else {\n      ((c->v).v2.chanreq_tail)->next = poVar2;\n    }" if (parenthesized_expression "(poVar1 == (outstanding_channel_request *)0x0)" ( (binary_expression "poVar1 == (outstanding_channel_request *)0x0" identifier == (cast_expression "(outstanding_channel_request *)0x0" ( (type_descriptor "outstanding_channel_request *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      (c->v).v2.chanreq_head = poVar2;\n    }" { (expression_statement "(c->v).v2.chanreq_head = poVar2;" (assignment_expression "(c->v).v2.chanreq_head = poVar2" (field_expression "(c->v).v2.chanreq_head" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) = identifier) ;) }) (else_clause "else {\n      ((c->v).v2.chanreq_tail)->next = poVar2;\n    }" else (compound_statement "{\n      ((c->v).v2.chanreq_tail)->next = poVar2;\n    }" { (expression_statement "((c->v).v2.chanreq_tail)->next = poVar2;" (assignment_expression "((c->v).v2.chanreq_tail)->next = poVar2" (field_expression "((c->v).v2.chanreq_tail)->next" (parenthesized_expression "((c->v).v2.chanreq_tail)" ( (field_expression "(c->v).v2.chanreq_tail" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) )) -> field_identifier) = identifier) ;) }))) (expression_statement "(c->v).v2.chanreq_tail = poVar2;" (assignment_expression "(c->v).v2.chanreq_tail = poVar2" (field_expression "(c->v).v2.chanreq_tail" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) = identifier) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return pkt;\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 pkt;\n  }" { (return_statement "return pkt;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) }))
(translation_unit "undefined4 __regparm3 FUN_0003d0d0(int param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  uint __line;\n  char *__function;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    \n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }\n  uVar3 = FUN_0003c290();\n  FUN_0003c380();\n  FUN_0003c3c0();\n  FUN_0003c1b0();\n  if (param_3 != 0) {\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    \n  FUN_000a39d0();\n}\n\n" (function_definition "undefined4 __regparm3 FUN_0003d0d0(int param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  uint __line;\n  char *__function;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    \n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }\n  uVar3 = FUN_0003c290();\n  FUN_0003c380();\n  FUN_0003c3c0();\n  FUN_0003c1b0();\n  if (param_3 != 0) {\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    \n  FUN_000a39d0();\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_0003d0d0(int param_1,undefined4 param_2,int param_3,int param_4)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  uint __line;\n  char *__function;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    \n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }\n  uVar3 = FUN_0003c290();\n  FUN_0003c380();\n  FUN_0003c3c0();\n  FUN_0003c1b0();\n  if (param_3 != 0) {\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    \n  FUN_000a39d0();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "uint __line;" type_identifier identifier ;) (declaration "char *__function;" primitive_type (pointer_declarator "*__function" * identifier) ;) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    \n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }" if (parenthesized_expression "((*(byte *)(param_1 + 0x14) & 10) != 0)" ( (binary_expression "(*(byte *)(param_1 + 0x14) & 10) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x14) & 10)" ( (binary_expression "*(byte *)(param_1 + 0x14) & 10" (pointer_expression "*(byte *)(param_1 + 0x14)" * (cast_expression "(byte *)(param_1 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    \n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }" { (expression_statement "__function = "ssh2_chanreq_init";" (assignment_expression "__function = "ssh2_chanreq_init"" identifier = (string_literal ""ssh2_chanreq_init"" " string_content ")) ;) (expression_statement "__line = 0x1f01;" (assignment_expression "__line = 0x1f01" identifier = number_literal) ;) (labeled_statement "LAB_0003d1b2:\n                    \n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );" statement_identifier : (expression_statement "__assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );" (call_expression "__assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 )" identifier (argument_list "("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 )" ( (string_literal ""!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , identifier , identifier ))) ;)) })) (expression_statement "uVar3 = FUN_0003c290();" (assignment_expression "uVar3 = FUN_0003c290()" identifier = (call_expression "FUN_0003c290()" identifier (argument_list "()" ( )))) ;) (expression_statement "FUN_0003c380();" (call_expression "FUN_0003c380()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0003c3c0();" (call_expression "FUN_0003c3c0()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_0003c1b0();" (call_expression "FUN_0003c1b0()" identifier (argument_list "()" ( ))) ;) (if_statement "if (param_3 != 0) {\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (compound_statement "{\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }" { (expression_statement "piVar4 = (int *)FUN_0002e780(1,0xc);" (assignment_expression "piVar4 = (int *)FUN_0002e780(1,0xc)" identifier = (cast_expression "(int *)FUN_0002e780(1,0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_0002e780(1,0xc)" identifier (argument_list "(1,0xc)" ( number_literal , number_literal ))))) ;) (if_statement "if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }" if (parenthesized_expression "((*(byte *)(param_1 + 0x14) & 10) != 0)" ( (binary_expression "(*(byte *)(param_1 + 0x14) & 10) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x14) & 10)" ( (binary_expression "*(byte *)(param_1 + 0x14) & 10" (pointer_expression "*(byte *)(param_1 + 0x14)" * (cast_expression "(byte *)(param_1 + 0x14)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }" { (expression_statement "__function = "ssh2_queue_chanreq_handler";" (assignment_expression "__function = "ssh2_queue_chanreq_handler"" identifier = (string_literal ""ssh2_queue_chanreq_handler"" " string_content ")) ;) (expression_statement "__line = 0x1ee3;" (assignment_expression "__line = 0x1ee3" identifier = number_literal) ;) (goto_statement "goto LAB_0003d1b2;" goto statement_identifier ;) })) (expression_statement "iVar2 = *(int *)(param_1 + 0x40);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x40)" identifier = (pointer_expression "*(int *)(param_1 + 0x40)" * (cast_expression "(int *)(param_1 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) ))))) ;) (expression_statement "*piVar4 = param_3;" (assignment_expression "*piVar4 = param_3" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "piVar4[2] = 0;" (assignment_expression "piVar4[2] = 0" (subscript_expression "piVar4[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar4[1] = param_4;" (assignment_expression "piVar4[1] = param_4" (subscript_expression "piVar4[1]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n      *(int **)(param_1 + 0x40) = piVar4;\n    }" { (expression_statement "*(int **)(param_1 + 0x40) = piVar4;" (assignment_expression "*(int **)(param_1 + 0x40) = piVar4" (pointer_expression "*(int **)(param_1 + 0x40)" * (cast_expression "(int **)(param_1 + 0x40)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) = identifier) ;) }) (else_clause "else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }" else (compound_statement "{\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }" { (expression_statement "*(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;" (assignment_expression "*(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4" (pointer_expression "*(int **)(*(int *)(param_1 + 0x44) + 8)" * (cast_expression "(int **)(*(int *)(param_1 + 0x44) + 8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_1 + 0x44) + 8)" ( (binary_expression "*(int *)(param_1 + 0x44) + 8" (pointer_expression "*(int *)(param_1 + 0x44)" * (cast_expression "(int *)(param_1 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) + number_literal) )))) = identifier) ;) }))) (expression_statement "*(int **)(param_1 + 0x44) = piVar4;" (assignment_expression "*(int **)(param_1 + 0x44) = piVar4" (pointer_expression "*(int **)(param_1 + 0x44)" * (cast_expression "(int **)(param_1 + 0x44)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x44)" ( (binary_expression "param_1 + 0x44" identifier + number_literal) )))) = identifier) ;) })) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }" if (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar3;\n  }" { (return_statement "return uVar3;" return identifier ;) })) (expression_statement "FUN_000a39d0();" (call_expression "FUN_000a39d0()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (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 * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , IDENT , IDENT ))) ;)) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (string_literal " string_content ")) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) = IDENT) ;) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined4 __regparm3 FUN_0003d0d0(int param_1,undefined4 param_2,int param_3,int param_4)\n\n{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  uint __line;\n  char *__function;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    \n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }\n  uVar3 = FUN_0003c290();\n  FUN_0003c380();\n  FUN_0003c3c0();\n  FUN_0003c1b0();\n  if (param_3 != 0) {\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    \n  FUN_000a39d0();\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0003d0d0(int param_1,undefined4 param_2,int param_3,int param_4)" (identifier "FUN_0003d0d0") (parameter_list "(int param_1,undefined4 param_2,int param_3,int param_4)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int in_GS_OFFSET;\n  uint __line;\n  char *__function;\n  \n  iVar1 = *(int *)(in_GS_OFFSET + 0x14);\n  if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    \n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }\n  uVar3 = FUN_0003c290();\n  FUN_0003c380();\n  FUN_0003c3c0();\n  FUN_0003c1b0();\n  if (param_3 != 0) {\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }\n  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    \n  FUN_000a39d0();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "uint __line;" (type_identifier "uint") (identifier "__line") (; ";")) (declaration "char *__function;" (primitive_type "char") (pointer_declarator "*__function" (* "*") (identifier "__function")) (; ";")) (expression_statement "iVar1 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "iVar1 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (= "=") (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")) () ")"))))) (; ";")) (if_statement "if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    \n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }" (if "if") (parenthesized_expression "((*(byte *)(param_1 + 0x14) & 10) != 0)" (( "(") (binary_expression "(*(byte *)(param_1 + 0x14) & 10) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x14) & 10)" (( "(") (binary_expression "*(byte *)(param_1 + 0x14) & 10" (pointer_expression "*(byte *)(param_1 + 0x14)" (* "*") (cast_expression "(byte *)(param_1 + 0x14)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (& "&") (number_literal "10")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    __function = "ssh2_chanreq_init";\n    __line = 0x1f01;\nLAB_0003d1b2:\n                    \n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );\n  }" ({ "{") (expression_statement "__function = "ssh2_chanreq_init";" (assignment_expression "__function = "ssh2_chanreq_init"" (identifier "__function") (= "=") (string_literal ""ssh2_chanreq_init"" (" """) (string_content "ssh2_chanreq_init") (" """))) (; ";")) (expression_statement "__line = 0x1f01;" (assignment_expression "__line = 0x1f01" (identifier "__line") (= "=") (number_literal "0x1f01")) (; ";")) (labeled_statement "LAB_0003d1b2:\n                    \n    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );" (statement_identifier "LAB_0003d1b2") (: ":") (expression_statement "__assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 );" (call_expression "__assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 )" (identifier "__assert_fail") (argument_list "("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function\n                 )" (( "(") (string_literal ""!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))"" (" """) (string_content "!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))") (" """)) (, ",") (string_literal ""ssh.c"" (" """) (string_content "ssh.c") (" """)) (, ",") (identifier "__line") (, ",") (identifier "__function") () ")"))) (; ";"))) (} "}"))) (expression_statement "uVar3 = FUN_0003c290();" (assignment_expression "uVar3 = FUN_0003c290()" (identifier "uVar3") (= "=") (call_expression "FUN_0003c290()" (identifier "FUN_0003c290") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "FUN_0003c380();" (call_expression "FUN_0003c380()" (identifier "FUN_0003c380") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0003c3c0();" (call_expression "FUN_0003c3c0()" (identifier "FUN_0003c3c0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_0003c1b0();" (call_expression "FUN_0003c1b0()" (identifier "FUN_0003c1b0") (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (param_3 != 0) {\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    piVar4 = (int *)FUN_0002e780(1,0xc);\n    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }\n    iVar2 = *(int *)(param_1 + 0x40);\n    *piVar4 = param_3;\n    piVar4[2] = 0;\n    piVar4[1] = param_4;\n    if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }\n    *(int **)(param_1 + 0x44) = piVar4;\n  }" ({ "{") (expression_statement "piVar4 = (int *)FUN_0002e780(1,0xc);" (assignment_expression "piVar4 = (int *)FUN_0002e780(1,0xc)" (identifier "piVar4") (= "=") (cast_expression "(int *)FUN_0002e780(1,0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_0002e780(1,0xc)" (identifier "FUN_0002e780") (argument_list "(1,0xc)" (( "(") (number_literal "1") (, ",") (number_literal "0xc") () ")"))))) (; ";")) (if_statement "if ((*(byte *)(param_1 + 0x14) & 10) != 0) {\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }" (if "if") (parenthesized_expression "((*(byte *)(param_1 + 0x14) & 10) != 0)" (( "(") (binary_expression "(*(byte *)(param_1 + 0x14) & 10) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x14) & 10)" (( "(") (binary_expression "*(byte *)(param_1 + 0x14) & 10" (pointer_expression "*(byte *)(param_1 + 0x14)" (* "*") (cast_expression "(byte *)(param_1 + 0x14)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (& "&") (number_literal "10")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      __function = "ssh2_queue_chanreq_handler";\n      __line = 0x1ee3;\n      goto LAB_0003d1b2;\n    }" ({ "{") (expression_statement "__function = "ssh2_queue_chanreq_handler";" (assignment_expression "__function = "ssh2_queue_chanreq_handler"" (identifier "__function") (= "=") (string_literal ""ssh2_queue_chanreq_handler"" (" """) (string_content "ssh2_queue_chanreq_handler") (" """))) (; ";")) (expression_statement "__line = 0x1ee3;" (assignment_expression "__line = 0x1ee3" (identifier "__line") (= "=") (number_literal "0x1ee3")) (; ";")) (goto_statement "goto LAB_0003d1b2;" (goto "goto") (statement_identifier "LAB_0003d1b2") (; ";")) (} "}"))) (expression_statement "iVar2 = *(int *)(param_1 + 0x40);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x40)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x40)" (* "*") (cast_expression "(int *)(param_1 + 0x40)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")"))))) (; ";")) (expression_statement "*piVar4 = param_3;" (assignment_expression "*piVar4 = param_3" (pointer_expression "*piVar4" (* "*") (identifier "piVar4")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "piVar4[2] = 0;" (assignment_expression "piVar4[2] = 0" (subscript_expression "piVar4[2]" (identifier "piVar4") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar4[1] = param_4;" (assignment_expression "piVar4[1] = param_4" (subscript_expression "piVar4[1]" (identifier "piVar4") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_4")) (; ";")) (if_statement "if (iVar2 == 0) {\n      *(int **)(param_1 + 0x40) = piVar4;\n    }\n    else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *(int **)(param_1 + 0x40) = piVar4;\n    }" ({ "{") (expression_statement "*(int **)(param_1 + 0x40) = piVar4;" (assignment_expression "*(int **)(param_1 + 0x40) = piVar4" (pointer_expression "*(int **)(param_1 + 0x40)" (* "*") (cast_expression "(int **)(param_1 + 0x40)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))) (= "=") (identifier "piVar4")) (; ";")) (} "}")) (else_clause "else {\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }" (else "else") (compound_statement "{\n      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;\n    }" ({ "{") (expression_statement "*(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;" (assignment_expression "*(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4" (pointer_expression "*(int **)(*(int *)(param_1 + 0x44) + 8)" (* "*") (cast_expression "(int **)(*(int *)(param_1 + 0x44) + 8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x44) + 8)" (( "(") (binary_expression "*(int *)(param_1 + 0x44) + 8" (pointer_expression "*(int *)(param_1 + 0x44)" (* "*") (cast_expression "(int *)(param_1 + 0x44)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")")))) (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "piVar4")) (; ";")) (} "}")))) (expression_statement "*(int **)(param_1 + 0x44) = piVar4;" (assignment_expression "*(int **)(param_1 + 0x44) = piVar4" (pointer_expression "*(int **)(param_1 + 0x44)" (* "*") (cast_expression "(int **)(param_1 + 0x44)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x44)" (( "(") (binary_expression "param_1 + 0x44" (identifier "param_1") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (identifier "piVar4")) (; ";")) (} "}"))) (if_statement "if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }" (if "if") (parenthesized_expression "(iVar1 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "iVar1 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "iVar1") (== "==") (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 uVar3;\n  }" ({ "{") (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "FUN_000a39d0();" (call_expression "FUN_000a39d0()" (identifier "FUN_000a39d0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

type_2 * __regparm3 ssh2_chanreq_init(ssh_channel *c,char *type,type_6 var_6,void *ctx)

{
  type_1 *var_9;
  type_2 *pkt;
  type_1 *poVar2;
  int var_1;
  type_3 __line;
  char *__function;
  type_4 local_21;
  int var_10;
  type_5 uStack_14;
  
  uStack_14 = 0x3d0db;
  var_10 = *(int *)(var_1 + 0x14);
  if ((c->closes & 10) != 0) {
    __function = "ssh2_chanreq_init";
    __line = 0x1f01;
LAB_0003d1b2:
                    /* WARNING: Subroutine does not return */
    var_2("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function
                 );
  }
  pkt = var_3(0x62);
  var_4(pkt,c->remoteid);
  var_5(pkt,type);
  local_21 = var_6 != (type_6)0x0;
  var_7(pkt,&local_21,1);
  if (var_6 != (type_6)0x0) {
    poVar2 = (type_1 *)var_8(1,0xc);
    if ((c->closes & 10) != 0) {
      __function = "ssh2_queue_chanreq_handler";
      __line = 0x1ee3;
      goto LAB_0003d1b2;
    }
    var_9 = (c->v).v2.chanreq_head;
    poVar2->var_6 = var_6;
    poVar2->next = (type_1 *)0x0;
    poVar2->ctx = ctx;
    if (var_9 == (type_1 *)0x0) {
      (c->v).v2.chanreq_head = poVar2;
    }
    else {
      ((c->v).v2.chanreq_tail)->next = poVar2;
    }
    (c->v).v2.chanreq_tail = poVar2;
  }
  if (var_10 == *(int *)(var_1 + 0x14)) {
    return pkt;
  }
                    /* WARNING: Subroutine does not return */
  var_11();
}


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

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

{
  int iVar1;
  int iVar2;
  undefined4 uVar3;
  int *piVar4;
  int in_GS_OFFSET;
  uint __line;
  char *__function;
  
  iVar1 = *(int *)(in_GS_OFFSET + 0x14);
  if ((*(byte *)(param_1 + 0x14) & 10) != 0) {
    __function = "ssh2_chanreq_init";
    __line = 0x1f01;
LAB_0003d1b2:
                    /* WARNING: Subroutine does not return */
    __assert_fail("!(c->closes & (CLOSES_SENT_CLOSE | CLOSES_RCVD_CLOSE))","ssh.c",__line,__function
                 );
  }
  uVar3 = FUN_0003c290();
  FUN_0003c380();
  FUN_0003c3c0();
  FUN_0003c1b0();
  if (param_3 != 0) {
    piVar4 = (int *)FUN_0002e780(1,0xc);
    if ((*(byte *)(param_1 + 0x14) & 10) != 0) {
      __function = "ssh2_queue_chanreq_handler";
      __line = 0x1ee3;
      goto LAB_0003d1b2;
    }
    iVar2 = *(int *)(param_1 + 0x40);
    *piVar4 = param_3;
    piVar4[2] = 0;
    piVar4[1] = param_4;
    if (iVar2 == 0) {
      *(int **)(param_1 + 0x40) = piVar4;
    }
    else {
      *(int **)(*(int *)(param_1 + 0x44) + 8) = piVar4;
    }
    *(int **)(param_1 + 0x44) = piVar4;
  }
  if (iVar1 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_000a39d0();
}

