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

void ssh2_msg_channel_open_confirmation(Ssh_conflict ssh,Packet *pktin)

{
  int iVar1;
  PortForwarding *pf;
  ssh_channel *c;
  ulong uVar2;
  
  c = ssh_channel_msg(ssh,pktin);
  if (c != (ssh_channel *)0x0) {
    if (c->halfopen == 0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");
    }
    uVar2 = ssh_pkt_getuint32(pktin);
    c->halfopen = 0;
    c->remoteid = uVar2;
    uVar2 = ssh_pkt_getuint32(pktin);
    (c->v).v2.remwindow = uVar2;
    uVar2 = ssh_pkt_getuint32(pktin);
    (c->v).v2.remmaxpkt = uVar2;
    if (c->type == 3) {
      pf = (PortForwarding *)(c->u).a.inbuffer.head;
      if (pf == (PortForwarding *)0x0) {
                    /* WARNING: Subroutine does not return */
        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");
      }
      pfd_confirm(pf);
      iVar1 = c->pending_eof;
    }
    else {
      if (c->type != 5) {
                    /* WARNING: Subroutine does not return */
        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138
                      ,"ssh2_msg_channel_open_confirmation");
      }
      ssh2_channel_check_close(c);
      iVar1 = c->pending_eof;
    }
    if (iVar1 != 0) {
      ssh_channel_try_eof(c);
      return;
    }
  }
  return;
}



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

void FUN_00049af0(void)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = FUN_00047190();
  if (iVar1 != 0) {
    if (*(int *)(iVar1 + 0x10) == 0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");
    }
    uVar2 = FUN_00039050();
    *(undefined4 *)(iVar1 + 0x10) = 0;
    *(undefined4 *)(iVar1 + 4) = uVar2;
    uVar2 = FUN_00039050();
    *(undefined4 *)(iVar1 + 0x2c) = uVar2;
    uVar2 = FUN_00039050();
    *(undefined4 *)(iVar1 + 0x30) = uVar2;
    if (*(int *)(iVar1 + 0xc) == 3) {
      if (*(int *)(iVar1 + 0x4c) == 0) {
                    /* WARNING: Subroutine does not return */
        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");
      }
      FUN_00030540(*(int *)(iVar1 + 0x4c));
      iVar1 = *(int *)(iVar1 + 0x18);
    }
    else {
      if (*(int *)(iVar1 + 0xc) != 5) {
                    /* WARNING: Subroutine does not return */
        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138
                      ,"ssh2_msg_channel_open_confirmation");
      }
      FUN_00047ca0();
      iVar1 = *(int *)(iVar1 + 0x18);
    }
    if (iVar1 != 0) {
      FUN_00047d90();
      return;
    }
  }
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x14]
CALL 0x0001c4f0
ADD EBX,0xc6c54
MOV EAX,dword ptr [ESP + 0x10]
MOV EDX,EDI
CALL 0x00047190
TEST EAX,EAX
JZ 0x00049b5a
MOV EDX,dword ptr [EAX + 0x10]
MOV ESI,EAX
TEST EDX,EDX
JZ 0x00049b84
MOV EAX,EDI
CALL 0x00039050
MOV dword ptr [ESI + 0x10],0x0
MOV dword ptr [ESI + 0x4],EAX
MOV EAX,EDI
CALL 0x00039050
MOV dword ptr [ESI + 0x2c],EAX
MOV EAX,EDI
CALL 0x00039050
MOV dword ptr [ESI + 0x30],EAX
MOV EAX,dword ptr [ESI + 0xc]
CMP EAX,0x3
JZ 0x00049b60
CMP EAX,0x5
JNZ 0x00049ba3
MOV EAX,ESI
CALL 0x00047ca0
MOV EAX,dword ptr [ESI + 0x18]
TEST EAX,EAX
JNZ 0x00049b7a
POP EBX
POP ESI
POP EDI
RET
MOV EAX,dword ptr [ESI + 0x4c]
TEST EAX,EAX
JZ 0x00049bc2
SUB ESP,0xc
PUSH EAX
CALL 0x00030540
MOV EAX,dword ptr [ESI + 0x18]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00049b5a
POP EBX
MOV EAX,ESI
POP ESI
POP EDI
JMP 0x00047d90
LEA EAX,[EBX + 0xfffb1cf0]
PUSH EAX
LEA EAX,[EBX + 0xfffadadb]
PUSH 0x211a
PUSH EAX
LEA EAX,[EBX + 0xfffae982]
PUSH EAX
CALL 0x0001c000
LEA EAX,[EBX + 0xfffb1cf0]
PUSH EAX
LEA EAX,[EBX + 0xfffadadb]
PUSH 0x2138
PUSH EAX
LEA EAX,[EBX + 0xfffb11c0]
PUSH EAX
CALL 0x0001c000
LEA EAX,[EBX + 0xfffb1cf0]
PUSH EAX
LEA EAX,[EBX + 0xfffadadb]
PUSH 0x2121
PUSH EAX
LEA EAX,[EBX + 0xfffadb34]
PUSH EAX
CALL 0x0001c000
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00049af0(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00047190();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }\n  return;\n}\n\n" comment (function_definition "void FUN_00049af0(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00047190();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00049af0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00047190();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_00047190();" (assignment_expression "iVar1 = FUN_00047190()" identifier = (call_expression "FUN_00047190()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }" { (if_statement "if (*(int *)(iVar1 + 0x10) == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0x10) == 0)" ( (binary_expression "*(int *)(iVar1 + 0x10) == 0" (pointer_expression "*(int *)(iVar1 + 0x10)" * (cast_expression "(int *)(iVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }" { comment (expression_statement "__assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");" (call_expression "__assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation")" identifier (argument_list "("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation")" ( (string_literal ""c->halfopen"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_confirmation"" " string_content ") ))) ;) })) (expression_statement "uVar2 = FUN_00039050();" (assignment_expression "uVar2 = FUN_00039050()" identifier = (call_expression "FUN_00039050()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x10)" * (cast_expression "(undefined4 *)(iVar1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 4) = uVar2;" (assignment_expression "*(undefined4 *)(iVar1 + 4) = uVar2" (pointer_expression "*(undefined4 *)(iVar1 + 4)" * (cast_expression "(undefined4 *)(iVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar2 = FUN_00039050();" (assignment_expression "uVar2 = FUN_00039050()" identifier = (call_expression "FUN_00039050()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x2c) = uVar2;" (assignment_expression "*(undefined4 *)(iVar1 + 0x2c) = uVar2" (pointer_expression "*(undefined4 *)(iVar1 + 0x2c)" * (cast_expression "(undefined4 *)(iVar1 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x2c)" ( (binary_expression "iVar1 + 0x2c" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar2 = FUN_00039050();" (assignment_expression "uVar2 = FUN_00039050()" identifier = (call_expression "FUN_00039050()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x30) = uVar2;" (assignment_expression "*(undefined4 *)(iVar1 + 0x30) = uVar2" (pointer_expression "*(undefined4 *)(iVar1 + 0x30)" * (cast_expression "(undefined4 *)(iVar1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) = identifier) ;) (if_statement "if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) == 3)" ( (binary_expression "*(int *)(iVar1 + 0xc) == 3" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }" { (if_statement "if (*(int *)(iVar1 + 0x4c) == 0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }" if (parenthesized_expression "(*(int *)(iVar1 + 0x4c) == 0)" ( (binary_expression "*(int *)(iVar1 + 0x4c) == 0" (pointer_expression "*(int *)(iVar1 + 0x4c)" * (cast_expression "(int *)(iVar1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }" { comment (expression_statement "__assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");" (call_expression "__assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation")" identifier (argument_list "("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation")" ( (string_literal ""c->u.pfd.pf != NULL"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_confirmation"" " string_content ") ))) ;) })) (expression_statement "FUN_00030540(*(int *)(iVar1 + 0x4c));" (call_expression "FUN_00030540(*(int *)(iVar1 + 0x4c))" identifier (argument_list "(*(int *)(iVar1 + 0x4c))" ( (pointer_expression "*(int *)(iVar1 + 0x4c)" * (cast_expression "(int *)(iVar1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) )))) ))) ;) (expression_statement "iVar1 = *(int *)(iVar1 + 0x18);" (assignment_expression "iVar1 = *(int *)(iVar1 + 0x18)" identifier = (pointer_expression "*(int *)(iVar1 + 0x18)" * (cast_expression "(int *)(iVar1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }" else (compound_statement "{\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }" { (if_statement "if (*(int *)(iVar1 + 0xc) != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 5)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 5" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }" { comment (expression_statement "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");" (call_expression "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation")" identifier (argument_list "("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation")" ( (string_literal ""!\"Funny channel type in ssh2_msg_channel_open_confirmation\""" " string_content escape_sequence string_content escape_sequence ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_confirmation"" " string_content ") ))) ;) })) (expression_statement "FUN_00047ca0();" (call_expression "FUN_00047ca0()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar1 = *(int *)(iVar1 + 0x18);" (assignment_expression "iVar1 = *(int *)(iVar1 + 0x18)" identifier = (pointer_expression "*(int *)(iVar1 + 0x18)" * (cast_expression "(int *)(iVar1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) ))))) ;) }))) (if_statement "if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_00047d90();\n      return;\n    }" { (expression_statement "FUN_00047d90();" (call_expression "FUN_00047d90()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid ssh2_msg_channel_open_confirmation(Ssh_conflict ssh,Packet *pktin)\n\n{\n  int iVar1;\n  PortForwarding *pf;\n  ssh_channel *c;\n  ulong uVar2;\n  \n  c = ssh_channel_msg(ssh,pktin);\n  if (c != (ssh_channel *)0x0) {\n    if (c->halfopen == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = ssh_pkt_getuint32(pktin);\n    c->halfopen = 0;\n    c->remoteid = uVar2;\n    uVar2 = ssh_pkt_getuint32(pktin);\n    (c->v).v2.remwindow = uVar2;\n    uVar2 = ssh_pkt_getuint32(pktin);\n    (c->v).v2.remmaxpkt = uVar2;\n    if (c->type == 3) {\n      pf = (PortForwarding *)(c->u).a.inbuffer.head;\n      if (pf == (PortForwarding *)0x0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      pfd_confirm(pf);\n      iVar1 = c->pending_eof;\n    }\n    else {\n      if (c->type != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      ssh2_channel_check_close(c);\n      iVar1 = c->pending_eof;\n    }\n    if (iVar1 != 0) {\n      ssh_channel_try_eof(c);\n      return;\n    }\n  }\n  return;\n}\n\n" comment comment comment (function_definition "void ssh2_msg_channel_open_confirmation(Ssh_conflict ssh,Packet *pktin)\n\n{\n  int iVar1;\n  PortForwarding *pf;\n  ssh_channel *c;\n  ulong uVar2;\n  \n  c = ssh_channel_msg(ssh,pktin);\n  if (c != (ssh_channel *)0x0) {\n    if (c->halfopen == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = ssh_pkt_getuint32(pktin);\n    c->halfopen = 0;\n    c->remoteid = uVar2;\n    uVar2 = ssh_pkt_getuint32(pktin);\n    (c->v).v2.remwindow = uVar2;\n    uVar2 = ssh_pkt_getuint32(pktin);\n    (c->v).v2.remmaxpkt = uVar2;\n    if (c->type == 3) {\n      pf = (PortForwarding *)(c->u).a.inbuffer.head;\n      if (pf == (PortForwarding *)0x0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      pfd_confirm(pf);\n      iVar1 = c->pending_eof;\n    }\n    else {\n      if (c->type != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      ssh2_channel_check_close(c);\n      iVar1 = c->pending_eof;\n    }\n    if (iVar1 != 0) {\n      ssh_channel_try_eof(c);\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "ssh2_msg_channel_open_confirmation(Ssh_conflict ssh,Packet *pktin)" identifier (parameter_list "(Ssh_conflict ssh,Packet *pktin)" ( (parameter_declaration "Ssh_conflict ssh" type_identifier identifier) , (parameter_declaration "Packet *pktin" type_identifier (pointer_declarator "*pktin" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  PortForwarding *pf;\n  ssh_channel *c;\n  ulong uVar2;\n  \n  c = ssh_channel_msg(ssh,pktin);\n  if (c != (ssh_channel *)0x0) {\n    if (c->halfopen == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = ssh_pkt_getuint32(pktin);\n    c->halfopen = 0;\n    c->remoteid = uVar2;\n    uVar2 = ssh_pkt_getuint32(pktin);\n    (c->v).v2.remwindow = uVar2;\n    uVar2 = ssh_pkt_getuint32(pktin);\n    (c->v).v2.remmaxpkt = uVar2;\n    if (c->type == 3) {\n      pf = (PortForwarding *)(c->u).a.inbuffer.head;\n      if (pf == (PortForwarding *)0x0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      pfd_confirm(pf);\n      iVar1 = c->pending_eof;\n    }\n    else {\n      if (c->type != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      ssh2_channel_check_close(c);\n      iVar1 = c->pending_eof;\n    }\n    if (iVar1 != 0) {\n      ssh_channel_try_eof(c);\n      return;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "PortForwarding *pf;" type_identifier (pointer_declarator "*pf" * identifier) ;) (declaration "ssh_channel *c;" type_identifier (pointer_declarator "*c" * identifier) ;) (declaration "ulong uVar2;" type_identifier identifier ;) (expression_statement "c = ssh_channel_msg(ssh,pktin);" (assignment_expression "c = ssh_channel_msg(ssh,pktin)" identifier = (call_expression "ssh_channel_msg(ssh,pktin)" identifier (argument_list "(ssh,pktin)" ( identifier , identifier )))) ;) (if_statement "if (c != (ssh_channel *)0x0) {\n    if (c->halfopen == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = ssh_pkt_getuint32(pktin);\n    c->halfopen = 0;\n    c->remoteid = uVar2;\n    uVar2 = ssh_pkt_getuint32(pktin);\n    (c->v).v2.remwindow = uVar2;\n    uVar2 = ssh_pkt_getuint32(pktin);\n    (c->v).v2.remmaxpkt = uVar2;\n    if (c->type == 3) {\n      pf = (PortForwarding *)(c->u).a.inbuffer.head;\n      if (pf == (PortForwarding *)0x0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      pfd_confirm(pf);\n      iVar1 = c->pending_eof;\n    }\n    else {\n      if (c->type != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      ssh2_channel_check_close(c);\n      iVar1 = c->pending_eof;\n    }\n    if (iVar1 != 0) {\n      ssh_channel_try_eof(c);\n      return;\n    }\n  }" if (parenthesized_expression "(c != (ssh_channel *)0x0)" ( (binary_expression "c != (ssh_channel *)0x0" identifier != (cast_expression "(ssh_channel *)0x0" ( (type_descriptor "ssh_channel *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (c->halfopen == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = ssh_pkt_getuint32(pktin);\n    c->halfopen = 0;\n    c->remoteid = uVar2;\n    uVar2 = ssh_pkt_getuint32(pktin);\n    (c->v).v2.remwindow = uVar2;\n    uVar2 = ssh_pkt_getuint32(pktin);\n    (c->v).v2.remmaxpkt = uVar2;\n    if (c->type == 3) {\n      pf = (PortForwarding *)(c->u).a.inbuffer.head;\n      if (pf == (PortForwarding *)0x0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      pfd_confirm(pf);\n      iVar1 = c->pending_eof;\n    }\n    else {\n      if (c->type != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      ssh2_channel_check_close(c);\n      iVar1 = c->pending_eof;\n    }\n    if (iVar1 != 0) {\n      ssh_channel_try_eof(c);\n      return;\n    }\n  }" { (if_statement "if (c->halfopen == 0) {\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }" if (parenthesized_expression "(c->halfopen == 0)" ( (binary_expression "c->halfopen == 0" (field_expression "c->halfopen" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }" { comment (expression_statement "__assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");" (call_expression "__assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation")" identifier (argument_list "("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation")" ( (string_literal ""c->halfopen"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_confirmation"" " string_content ") ))) ;) })) (expression_statement "uVar2 = ssh_pkt_getuint32(pktin);" (assignment_expression "uVar2 = ssh_pkt_getuint32(pktin)" identifier = (call_expression "ssh_pkt_getuint32(pktin)" identifier (argument_list "(pktin)" ( identifier )))) ;) (expression_statement "c->halfopen = 0;" (assignment_expression "c->halfopen = 0" (field_expression "c->halfopen" identifier -> field_identifier) = number_literal) ;) (expression_statement "c->remoteid = uVar2;" (assignment_expression "c->remoteid = uVar2" (field_expression "c->remoteid" identifier -> field_identifier) = identifier) ;) (expression_statement "uVar2 = ssh_pkt_getuint32(pktin);" (assignment_expression "uVar2 = ssh_pkt_getuint32(pktin)" identifier = (call_expression "ssh_pkt_getuint32(pktin)" identifier (argument_list "(pktin)" ( identifier )))) ;) (expression_statement "(c->v).v2.remwindow = uVar2;" (assignment_expression "(c->v).v2.remwindow = uVar2" (field_expression "(c->v).v2.remwindow" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) = identifier) ;) (expression_statement "uVar2 = ssh_pkt_getuint32(pktin);" (assignment_expression "uVar2 = ssh_pkt_getuint32(pktin)" identifier = (call_expression "ssh_pkt_getuint32(pktin)" identifier (argument_list "(pktin)" ( identifier )))) ;) (expression_statement "(c->v).v2.remmaxpkt = uVar2;" (assignment_expression "(c->v).v2.remmaxpkt = uVar2" (field_expression "(c->v).v2.remmaxpkt" (field_expression "(c->v).v2" (parenthesized_expression "(c->v)" ( (field_expression "c->v" identifier -> field_identifier) )) . field_identifier) . field_identifier) = identifier) ;) (if_statement "if (c->type == 3) {\n      pf = (PortForwarding *)(c->u).a.inbuffer.head;\n      if (pf == (PortForwarding *)0x0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      pfd_confirm(pf);\n      iVar1 = c->pending_eof;\n    }\n    else {\n      if (c->type != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      ssh2_channel_check_close(c);\n      iVar1 = c->pending_eof;\n    }" if (parenthesized_expression "(c->type == 3)" ( (binary_expression "c->type == 3" (field_expression "c->type" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n      pf = (PortForwarding *)(c->u).a.inbuffer.head;\n      if (pf == (PortForwarding *)0x0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      pfd_confirm(pf);\n      iVar1 = c->pending_eof;\n    }" { (expression_statement "pf = (PortForwarding *)(c->u).a.inbuffer.head;" (assignment_expression "pf = (PortForwarding *)(c->u).a.inbuffer.head" identifier = (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))) ;) (if_statement "if (pf == (PortForwarding *)0x0) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }" if (parenthesized_expression "(pf == (PortForwarding *)0x0)" ( (binary_expression "pf == (PortForwarding *)0x0" identifier == (cast_expression "(PortForwarding *)0x0" ( (type_descriptor "PortForwarding *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }" { comment (expression_statement "__assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");" (call_expression "__assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation")" identifier (argument_list "("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation")" ( (string_literal ""c->u.pfd.pf != NULL"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_confirmation"" " string_content ") ))) ;) })) (expression_statement "pfd_confirm(pf);" (call_expression "pfd_confirm(pf)" identifier (argument_list "(pf)" ( identifier ))) ;) (expression_statement "iVar1 = c->pending_eof;" (assignment_expression "iVar1 = c->pending_eof" identifier = (field_expression "c->pending_eof" identifier -> field_identifier)) ;) }) (else_clause "else {\n      if (c->type != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      ssh2_channel_check_close(c);\n      iVar1 = c->pending_eof;\n    }" else (compound_statement "{\n      if (c->type != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      ssh2_channel_check_close(c);\n      iVar1 = c->pending_eof;\n    }" { (if_statement "if (c->type != 5) {\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }" if (parenthesized_expression "(c->type != 5)" ( (binary_expression "c->type != 5" (field_expression "c->type" identifier -> field_identifier) != number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }" { comment (expression_statement "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");" (call_expression "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation")" identifier (argument_list "("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation")" ( (string_literal ""!\"Funny channel type in ssh2_msg_channel_open_confirmation\""" " string_content escape_sequence string_content escape_sequence ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_confirmation"" " string_content ") ))) ;) })) (expression_statement "ssh2_channel_check_close(c);" (call_expression "ssh2_channel_check_close(c)" identifier (argument_list "(c)" ( identifier ))) ;) (expression_statement "iVar1 = c->pending_eof;" (assignment_expression "iVar1 = c->pending_eof" identifier = (field_expression "c->pending_eof" identifier -> field_identifier)) ;) }))) (if_statement "if (iVar1 != 0) {\n      ssh_channel_try_eof(c);\n      return;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      ssh_channel_try_eof(c);\n      return;\n    }" { (expression_statement "ssh_channel_try_eof(c);" (call_expression "ssh_channel_try_eof(c)" identifier (argument_list "(c)" ( identifier ))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00049af0(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00047190();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }\n  return;\n}\n\n" (function_definition "void FUN_00049af0(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00047190();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00049af0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00047190();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "iVar1 = FUN_00047190();" (assignment_expression "iVar1 = FUN_00047190()" identifier = (call_expression "FUN_00047190()" identifier (argument_list "()" ( )))) ;) (if_statement "if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }" { (if_statement "if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0x10) == 0)" ( (binary_expression "*(int *)(iVar1 + 0x10) == 0" (pointer_expression "*(int *)(iVar1 + 0x10)" * (cast_expression "(int *)(iVar1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }" { (expression_statement "__assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");" (call_expression "__assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation")" identifier (argument_list "("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation")" ( (string_literal ""c->halfopen"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_confirmation"" " string_content ") ))) ;) })) (expression_statement "uVar2 = FUN_00039050();" (assignment_expression "uVar2 = FUN_00039050()" identifier = (call_expression "FUN_00039050()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x10)" * (cast_expression "(undefined4 *)(iVar1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x10)" ( (binary_expression "iVar1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(iVar1 + 4) = uVar2;" (assignment_expression "*(undefined4 *)(iVar1 + 4) = uVar2" (pointer_expression "*(undefined4 *)(iVar1 + 4)" * (cast_expression "(undefined4 *)(iVar1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 4)" ( (binary_expression "iVar1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar2 = FUN_00039050();" (assignment_expression "uVar2 = FUN_00039050()" identifier = (call_expression "FUN_00039050()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x2c) = uVar2;" (assignment_expression "*(undefined4 *)(iVar1 + 0x2c) = uVar2" (pointer_expression "*(undefined4 *)(iVar1 + 0x2c)" * (cast_expression "(undefined4 *)(iVar1 + 0x2c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x2c)" ( (binary_expression "iVar1 + 0x2c" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar2 = FUN_00039050();" (assignment_expression "uVar2 = FUN_00039050()" identifier = (call_expression "FUN_00039050()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(undefined4 *)(iVar1 + 0x30) = uVar2;" (assignment_expression "*(undefined4 *)(iVar1 + 0x30) = uVar2" (pointer_expression "*(undefined4 *)(iVar1 + 0x30)" * (cast_expression "(undefined4 *)(iVar1 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x30)" ( (binary_expression "iVar1 + 0x30" identifier + number_literal) )))) = identifier) ;) (if_statement "if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) == 3)" ( (binary_expression "*(int *)(iVar1 + 0xc) == 3" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }" { (if_statement "if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }" if (parenthesized_expression "(*(int *)(iVar1 + 0x4c) == 0)" ( (binary_expression "*(int *)(iVar1 + 0x4c) == 0" (pointer_expression "*(int *)(iVar1 + 0x4c)" * (cast_expression "(int *)(iVar1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }" { (expression_statement "__assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");" (call_expression "__assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation")" identifier (argument_list "("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation")" ( (string_literal ""c->u.pfd.pf != NULL"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_confirmation"" " string_content ") ))) ;) })) (expression_statement "FUN_00030540(*(int *)(iVar1 + 0x4c));" (call_expression "FUN_00030540(*(int *)(iVar1 + 0x4c))" identifier (argument_list "(*(int *)(iVar1 + 0x4c))" ( (pointer_expression "*(int *)(iVar1 + 0x4c)" * (cast_expression "(int *)(iVar1 + 0x4c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x4c)" ( (binary_expression "iVar1 + 0x4c" identifier + number_literal) )))) ))) ;) (expression_statement "iVar1 = *(int *)(iVar1 + 0x18);" (assignment_expression "iVar1 = *(int *)(iVar1 + 0x18)" identifier = (pointer_expression "*(int *)(iVar1 + 0x18)" * (cast_expression "(int *)(iVar1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) ))))) ;) }) (else_clause "else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }" else (compound_statement "{\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }" { (if_statement "if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 5)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 5" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }" { (expression_statement "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");" (call_expression "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation")" identifier (argument_list "("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation")" ( (string_literal ""!\"Funny channel type in ssh2_msg_channel_open_confirmation\""" " string_content escape_sequence string_content escape_sequence ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_msg_channel_open_confirmation"" " string_content ") ))) ;) })) (expression_statement "FUN_00047ca0();" (call_expression "FUN_00047ca0()" identifier (argument_list "()" ( ))) ;) (expression_statement "iVar1 = *(int *)(iVar1 + 0x18);" (assignment_expression "iVar1 = *(int *)(iVar1 + 0x18)" identifier = (pointer_expression "*(int *)(iVar1 + 0x18)" * (cast_expression "(int *)(iVar1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0x18)" ( (binary_expression "iVar1 + 0x18" identifier + number_literal) ))))) ;) }))) (if_statement "if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n      FUN_00047d90();\n      return;\n    }" { (expression_statement "FUN_00047d90();" (call_expression "FUN_00047d90()" identifier (argument_list "()" ( ))) ;) (return_statement "return;" return ;) })) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content escape_sequence string_content escape_sequence ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (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 IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (return_statement return ;) })) })) (return_statement return ;) })))
(function_definition "void FUN_00049af0(void)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00047190();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00049af0(void)" (identifier "FUN_00049af0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  iVar1 = FUN_00047190();\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "iVar1 = FUN_00047190();" (assignment_expression "iVar1 = FUN_00047190()" (identifier "iVar1") (= "=") (call_expression "FUN_00047190()" (identifier "FUN_00047190") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x10) = 0;\n    *(undefined4 *)(iVar1 + 4) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x2c) = uVar2;\n    uVar2 = FUN_00039050();\n    *(undefined4 *)(iVar1 + 0x30) = uVar2;\n    if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }\n  }" ({ "{") (if_statement "if (*(int *)(iVar1 + 0x10) == 0) {\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0x10) == 0)" (( "(") (binary_expression "*(int *)(iVar1 + 0x10) == 0" (pointer_expression "*(int *)(iVar1 + 0x10)" (* "*") (cast_expression "(int *)(iVar1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x10)" (( "(") (binary_expression "iVar1 + 0x10" (identifier "iVar1") (+ "+") (number_literal "0x10")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");\n    }" ({ "{") (expression_statement "__assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");" (call_expression "__assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation")" (identifier "__assert_fail") (argument_list "("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation")" (( "(") (string_literal ""c->halfopen"" (" """) (string_content "c->halfopen") (" """)) (, ",") (string_literal ""ssh.c"" (" """) (string_content "ssh.c") (" """)) (, ",") (number_literal "0x211a") (, ",") (string_literal ""ssh2_msg_channel_open_confirmation"" (" """) (string_content "ssh2_msg_channel_open_confirmation") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "uVar2 = FUN_00039050();" (assignment_expression "uVar2 = FUN_00039050()" (identifier "uVar2") (= "=") (call_expression "FUN_00039050()" (identifier "FUN_00039050") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(iVar1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(iVar1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x10)" (( "(") (binary_expression "iVar1 + 0x10" (identifier "iVar1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 4) = uVar2;" (assignment_expression "*(undefined4 *)(iVar1 + 4) = uVar2" (pointer_expression "*(undefined4 *)(iVar1 + 4)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 4)" (( "(") (binary_expression "iVar1 + 4" (identifier "iVar1") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "uVar2 = FUN_00039050();" (assignment_expression "uVar2 = FUN_00039050()" (identifier "uVar2") (= "=") (call_expression "FUN_00039050()" (identifier "FUN_00039050") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x2c) = uVar2;" (assignment_expression "*(undefined4 *)(iVar1 + 0x2c) = uVar2" (pointer_expression "*(undefined4 *)(iVar1 + 0x2c)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x2c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x2c)" (( "(") (binary_expression "iVar1 + 0x2c" (identifier "iVar1") (+ "+") (number_literal "0x2c")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "uVar2 = FUN_00039050();" (assignment_expression "uVar2 = FUN_00039050()" (identifier "uVar2") (= "=") (call_expression "FUN_00039050()" (identifier "FUN_00039050") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*(undefined4 *)(iVar1 + 0x30) = uVar2;" (assignment_expression "*(undefined4 *)(iVar1 + 0x30) = uVar2" (pointer_expression "*(undefined4 *)(iVar1 + 0x30)" (* "*") (cast_expression "(undefined4 *)(iVar1 + 0x30)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x30)" (( "(") (binary_expression "iVar1 + 0x30" (identifier "iVar1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (identifier "uVar2")) (; ";")) (if_statement "if (*(int *)(iVar1 + 0xc) == 3) {\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }\n    else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0xc) == 3)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) == 3" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (== "==") (number_literal "3")) () ")")) (compound_statement "{\n      if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00030540(*(int *)(iVar1 + 0x4c));\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }" ({ "{") (if_statement "if (*(int *)(iVar1 + 0x4c) == 0) {\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0x4c) == 0)" (( "(") (binary_expression "*(int *)(iVar1 + 0x4c) == 0" (pointer_expression "*(int *)(iVar1 + 0x4c)" (* "*") (cast_expression "(int *)(iVar1 + 0x4c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x4c)" (( "(") (binary_expression "iVar1 + 0x4c" (identifier "iVar1") (+ "+") (number_literal "0x4c")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");\n      }" ({ "{") (expression_statement "__assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");" (call_expression "__assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation")" (identifier "__assert_fail") (argument_list "("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation")" (( "(") (string_literal ""c->u.pfd.pf != NULL"" (" """) (string_content "c->u.pfd.pf != NULL") (" """)) (, ",") (string_literal ""ssh.c"" (" """) (string_content "ssh.c") (" """)) (, ",") (number_literal "0x2121") (, ",") (string_literal ""ssh2_msg_channel_open_confirmation"" (" """) (string_content "ssh2_msg_channel_open_confirmation") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_00030540(*(int *)(iVar1 + 0x4c));" (call_expression "FUN_00030540(*(int *)(iVar1 + 0x4c))" (identifier "FUN_00030540") (argument_list "(*(int *)(iVar1 + 0x4c))" (( "(") (pointer_expression "*(int *)(iVar1 + 0x4c)" (* "*") (cast_expression "(int *)(iVar1 + 0x4c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x4c)" (( "(") (binary_expression "iVar1 + 0x4c" (identifier "iVar1") (+ "+") (number_literal "0x4c")) () ")")))) () ")"))) (; ";")) (expression_statement "iVar1 = *(int *)(iVar1 + 0x18);" (assignment_expression "iVar1 = *(int *)(iVar1 + 0x18)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(iVar1 + 0x18)" (* "*") (cast_expression "(int *)(iVar1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x18)" (( "(") (binary_expression "iVar1 + 0x18" (identifier "iVar1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (} "}")) (else_clause "else {\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }" (else "else") (compound_statement "{\n      if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }\n      FUN_00047ca0();\n      iVar1 = *(int *)(iVar1 + 0x18);\n    }" ({ "{") (if_statement "if (*(int *)(iVar1 + 0xc) != 5) {\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 5)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) != 5" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "5")) () ")")) (compound_statement "{\n                    \n        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");\n      }" ({ "{") (expression_statement "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation");" (call_expression "__assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation")" (identifier "__assert_fail") (argument_list "("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138\n                      ,"ssh2_msg_channel_open_confirmation")" (( "(") (string_literal ""!\"Funny channel type in ssh2_msg_channel_open_confirmation\""" (" """) (string_content "!") (escape_sequence "\"") (string_content "Funny channel type in ssh2_msg_channel_open_confirmation") (escape_sequence "\"") (" """)) (, ",") (string_literal ""ssh.c"" (" """) (string_content "ssh.c") (" """)) (, ",") (number_literal "0x2138") (, ",") (string_literal ""ssh2_msg_channel_open_confirmation"" (" """) (string_content "ssh2_msg_channel_open_confirmation") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_00047ca0();" (call_expression "FUN_00047ca0()" (identifier "FUN_00047ca0") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "iVar1 = *(int *)(iVar1 + 0x18);" (assignment_expression "iVar1 = *(int *)(iVar1 + 0x18)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(iVar1 + 0x18)" (* "*") (cast_expression "(int *)(iVar1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0x18)" (( "(") (binary_expression "iVar1 + 0x18" (identifier "iVar1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (} "}")))) (if_statement "if (iVar1 != 0) {\n      FUN_00047d90();\n      return;\n    }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00047d90();\n      return;\n    }" ({ "{") (expression_statement "FUN_00047d90();" (call_expression "FUN_00047d90()" (identifier "FUN_00047d90") (argument_list "()" (( "(") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 ssh,type_2 *pktin)

{
  int var_8;
  type_3 *var_5;
  type_4 *var_2;
  type_5 uVar2;
  
  var_2 = var_1(ssh,pktin);
  if (var_2 != (type_4 *)0x0) {
    if (var_2->halfopen == 0) {
                    /* WARNING: Subroutine does not return */
      var_3("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");
    }
    uVar2 = var_4(pktin);
    var_2->halfopen = 0;
    var_2->remoteid = uVar2;
    uVar2 = var_4(pktin);
    (var_2->v).v2.remwindow = uVar2;
    uVar2 = var_4(pktin);
    (var_2->v).v2.remmaxpkt = uVar2;
    if (var_2->type == 3) {
      var_5 = (type_3 *)(var_2->u).a.inbuffer.head;
      if (var_5 == (type_3 *)0x0) {
                    /* WARNING: Subroutine does not return */
        var_3("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");
      }
      var_6(var_5);
      var_8 = var_2->pending_eof;
    }
    else {
      if (var_2->type != 5) {
                    /* WARNING: Subroutine does not return */
        var_3("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138
                      ,"ssh2_msg_channel_open_confirmation");
      }
      var_7(var_2);
      var_8 = var_2->pending_eof;
    }
    if (var_8 != 0) {
      var_9(var_2);
      return;
    }
  }
  return;
}


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

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

void MASKED(void)

{
  int iVar1;
  undefined4 uVar2;
  
  iVar1 = FUN_00047190();
  if (iVar1 != 0) {
    if (*(int *)(iVar1 + 0x10) == 0) {
                    /* WARNING: Subroutine does not return */
      __assert_fail("c->halfopen","ssh.c",0x211a,"ssh2_msg_channel_open_confirmation");
    }
    uVar2 = FUN_00039050();
    *(undefined4 *)(iVar1 + 0x10) = 0;
    *(undefined4 *)(iVar1 + 4) = uVar2;
    uVar2 = FUN_00039050();
    *(undefined4 *)(iVar1 + 0x2c) = uVar2;
    uVar2 = FUN_00039050();
    *(undefined4 *)(iVar1 + 0x30) = uVar2;
    if (*(int *)(iVar1 + 0xc) == 3) {
      if (*(int *)(iVar1 + 0x4c) == 0) {
                    /* WARNING: Subroutine does not return */
        __assert_fail("c->u.pfd.pf != NULL","ssh.c",0x2121,"ssh2_msg_channel_open_confirmation");
      }
      FUN_00030540(*(int *)(iVar1 + 0x4c));
      iVar1 = *(int *)(iVar1 + 0x18);
    }
    else {
      if (*(int *)(iVar1 + 0xc) != 5) {
                    /* WARNING: Subroutine does not return */
        __assert_fail("!\"Funny channel type in ssh2_msg_channel_open_confirmation\"","ssh.c",0x2138
                      ,"ssh2_msg_channel_open_confirmation");
      }
      FUN_00047ca0();
      iVar1 = *(int *)(iVar1 + 0x18);
    }
    if (iVar1 != 0) {
      FUN_00047d90();
      return;
    }
  }
  return;
}

