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

void __regparm3 ssh2_pkt_queue(Ssh_conflict ssh,Packet *pkt)

{
  int iVar1;
  Packet **ppPVar2;
  
  if (ssh->queueing == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");
  }
  iVar1 = ssh->queuelen;
  if (iVar1 < ssh->queuesize) {
    ssh->queuelen = iVar1 + 1;
    ssh->queue[iVar1] = pkt;
    return;
  }
  ssh->queuesize = iVar1 + 0x20U;
  ppPVar2 = (Packet **)saferealloc(ssh->queue,iVar1 + 0x20U,4);
  iVar1 = ssh->queuelen;
  ssh->queue = ppPVar2;
  ssh->queuelen = iVar1 + 1;
  ppPVar2[iVar1] = pkt;
  return;
}



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

void __regparm3 FUN_0002f1c0(int param_1,undefined4 param_2)

{
  int iVar1;
  int iVar2;
  
  if (*(int *)(param_1 + 0x164) == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");
  }
  iVar1 = *(int *)(param_1 + 0x15c);
  if (iVar1 < *(int *)(param_1 + 0x160)) {
    *(int *)(param_1 + 0x15c) = iVar1 + 1;
    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;
    return;
  }
  *(int *)(param_1 + 0x160) = iVar1 + 0x20;
  iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);
  iVar1 = *(int *)(param_1 + 0x15c);
  *(int *)(param_1 + 0x158) = iVar2;
  *(int *)(param_1 + 0x15c) = iVar1 + 1;
  *(undefined4 *)(iVar2 + iVar1 * 4) = param_2;
  return;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV ECX,dword ptr [EAX + 0x164]
CALL 0x00014980
ADD EBX,0x79ba2
TEST ECX,ECX
JZ 0x0002f234
MOV ESI,EAX
MOV ECX,dword ptr [EAX + 0x15c]
MOV EDI,EDX
MOV EAX,dword ptr [EAX + 0x158]
CMP ECX,dword ptr [ESI + 0x160]
JGE 0x0002f200
LEA EDX,[ECX + 0x1]
MOV dword ptr [ESI + 0x15c],EDX
MOV dword ptr [EAX + ECX*0x4],EDI
POP EBX
POP ESI
POP EDI
RET
SUB ESP,0x4
ADD ECX,0x20
MOV dword ptr [ESI + 0x160],ECX
PUSH 0x4
PUSH ECX
PUSH EAX
CALL 0x0001adc0
MOV ECX,dword ptr [ESI + 0x15c]
ADD ESP,0x10
MOV dword ptr [ESI + 0x158],EAX
LEA EDX,[ECX + 0x1]
MOV dword ptr [ESI + 0x15c],EDX
MOV dword ptr [EAX + ECX*0x4],EDI
POP EBX
POP ESI
POP EDI
RET
LEA EAX,[EBX + 0xfffcf4e0]
PUSH EAX
LEA EAX,[EBX + 0xfffcb1e3]
PUSH 0x9c1
PUSH EAX
LEA EAX,[EBX + 0xfffcb784]
PUSH EAX
CALL 0x00014880
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid __regparm3 FUN_0002f1c0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 0x164) == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }\n  iVar1 = *(int *)(param_1 + 0x15c);\n  if (iVar1 < *(int *)(param_1 + 0x160)) {\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }\n  *(int *)(param_1 + 0x160) = iVar1 + 0x20;\n  iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);\n  iVar1 = *(int *)(param_1 + 0x15c);\n  *(int *)(param_1 + 0x158) = iVar2;\n  *(int *)(param_1 + 0x15c) = iVar1 + 1;\n  *(undefined4 *)(iVar2 + iVar1 * 4) = param_2;\n  return;\n}\n\n" comment (function_definition "void __regparm3 FUN_0002f1c0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 0x164) == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }\n  iVar1 = *(int *)(param_1 + 0x15c);\n  if (iVar1 < *(int *)(param_1 + 0x160)) {\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }\n  *(int *)(param_1 + 0x160) = iVar1 + 0x20;\n  iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);\n  iVar1 = *(int *)(param_1 + 0x15c);\n  *(int *)(param_1 + 0x158) = iVar2;\n  *(int *)(param_1 + 0x15c) = iVar1 + 1;\n  *(undefined4 *)(iVar2 + iVar1 * 4) = param_2;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0002f1c0(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 0x164) == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }\n  iVar1 = *(int *)(param_1 + 0x15c);\n  if (iVar1 < *(int *)(param_1 + 0x160)) {\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }\n  *(int *)(param_1 + 0x160) = iVar1 + 0x20;\n  iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);\n  iVar1 = *(int *)(param_1 + 0x15c);\n  *(int *)(param_1 + 0x158) = iVar2;\n  *(int *)(param_1 + 0x15c) = iVar1 + 1;\n  *(undefined4 *)(iVar2 + iVar1 * 4) = param_2;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (*(int *)(param_1 + 0x164) == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x164) == 0)" ( (binary_expression "*(int *)(param_1 + 0x164) == 0" (pointer_expression "*(int *)(param_1 + 0x164)" * (cast_expression "(int *)(param_1 + 0x164)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x164)" ( (binary_expression "param_1 + 0x164" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }" { comment (expression_statement "__assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");" (call_expression "__assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue")" identifier (argument_list "("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue")" ( (string_literal ""ssh->queueing"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_pkt_queue"" " string_content ") ))) ;) })) (expression_statement "iVar1 = *(int *)(param_1 + 0x15c);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x15c)" identifier = (pointer_expression "*(int *)(param_1 + 0x15c)" * (cast_expression "(int *)(param_1 + 0x15c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x15c)" ( (binary_expression "param_1 + 0x15c" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 < *(int *)(param_1 + 0x160)) {\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }" if (parenthesized_expression "(iVar1 < *(int *)(param_1 + 0x160))" ( (binary_expression "iVar1 < *(int *)(param_1 + 0x160)" identifier < (pointer_expression "*(int *)(param_1 + 0x160)" * (cast_expression "(int *)(param_1 + 0x160)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) ))))) )) (compound_statement "{\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }" { (expression_statement "*(int *)(param_1 + 0x15c) = iVar1 + 1;" (assignment_expression "*(int *)(param_1 + 0x15c) = iVar1 + 1" (pointer_expression "*(int *)(param_1 + 0x15c)" * (cast_expression "(int *)(param_1 + 0x15c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x15c)" ( (binary_expression "param_1 + 0x15c" identifier + number_literal) )))) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x158) + iVar1 * 4)" ( (binary_expression "*(int *)(param_1 + 0x158) + iVar1 * 4" (pointer_expression "*(int *)(param_1 + 0x158)" * (cast_expression "(int *)(param_1 + 0x158)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x158)" ( (binary_expression "param_1 + 0x158" identifier + number_literal) )))) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "*(int *)(param_1 + 0x160) = iVar1 + 0x20;" (assignment_expression "*(int *)(param_1 + 0x160) = iVar1 + 0x20" (pointer_expression "*(int *)(param_1 + 0x160)" * (cast_expression "(int *)(param_1 + 0x160)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) = (binary_expression "iVar1 + 0x20" identifier + number_literal)) ;) (expression_statement "iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);" (assignment_expression "iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4)" identifier = (call_expression "FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4)" identifier (argument_list "(*(int *)(param_1 + 0x158),iVar1 + 0x20,4)" ( (pointer_expression "*(int *)(param_1 + 0x158)" * (cast_expression "(int *)(param_1 + 0x158)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x158)" ( (binary_expression "param_1 + 0x158" identifier + number_literal) )))) , (binary_expression "iVar1 + 0x20" identifier + number_literal) , number_literal )))) ;) (expression_statement "iVar1 = *(int *)(param_1 + 0x15c);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x15c)" identifier = (pointer_expression "*(int *)(param_1 + 0x15c)" * (cast_expression "(int *)(param_1 + 0x15c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x15c)" ( (binary_expression "param_1 + 0x15c" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0x158) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x158) = iVar2" (pointer_expression "*(int *)(param_1 + 0x158)" * (cast_expression "(int *)(param_1 + 0x158)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x158)" ( (binary_expression "param_1 + 0x158" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_1 + 0x15c) = iVar1 + 1;" (assignment_expression "*(int *)(param_1 + 0x15c) = iVar1 + 1" (pointer_expression "*(int *)(param_1 + 0x15c)" * (cast_expression "(int *)(param_1 + 0x15c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x15c)" ( (binary_expression "param_1 + 0x15c" identifier + number_literal) )))) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(iVar2 + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)(iVar2 + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)(iVar2 + iVar1 * 4)" * (cast_expression "(undefined4 *)(iVar2 + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + iVar1 * 4)" ( (binary_expression "iVar2 + iVar1 * 4" identifier + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) = identifier) ;) (return_statement "return;" return ;) })))
(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\nvoid __regparm3 ssh2_pkt_queue(Ssh_conflict ssh,Packet *pkt)\n\n{\n  int iVar1;\n  Packet **ppPVar2;\n  \n  if (ssh->queueing == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }\n  iVar1 = ssh->queuelen;\n  if (iVar1 < ssh->queuesize) {\n    ssh->queuelen = iVar1 + 1;\n    ssh->queue[iVar1] = pkt;\n    return;\n  }\n  ssh->queuesize = iVar1 + 0x20U;\n  ppPVar2 = (Packet **)saferealloc(ssh->queue,iVar1 + 0x20U,4);\n  iVar1 = ssh->queuelen;\n  ssh->queue = ppPVar2;\n  ssh->queuelen = iVar1 + 1;\n  ppPVar2[iVar1] = pkt;\n  return;\n}\n\n" comment comment (function_definition "void __regparm3 ssh2_pkt_queue(Ssh_conflict ssh,Packet *pkt)\n\n{\n  int iVar1;\n  Packet **ppPVar2;\n  \n  if (ssh->queueing == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }\n  iVar1 = ssh->queuelen;\n  if (iVar1 < ssh->queuesize) {\n    ssh->queuelen = iVar1 + 1;\n    ssh->queue[iVar1] = pkt;\n    return;\n  }\n  ssh->queuesize = iVar1 + 0x20U;\n  ppPVar2 = (Packet **)saferealloc(ssh->queue,iVar1 + 0x20U,4);\n  iVar1 = ssh->queuelen;\n  ssh->queue = ppPVar2;\n  ssh->queuelen = iVar1 + 1;\n  ppPVar2[iVar1] = pkt;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "ssh2_pkt_queue(Ssh_conflict ssh,Packet *pkt)" identifier (parameter_list "(Ssh_conflict ssh,Packet *pkt)" ( (parameter_declaration "Ssh_conflict ssh" type_identifier identifier) , (parameter_declaration "Packet *pkt" type_identifier (pointer_declarator "*pkt" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  Packet **ppPVar2;\n  \n  if (ssh->queueing == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }\n  iVar1 = ssh->queuelen;\n  if (iVar1 < ssh->queuesize) {\n    ssh->queuelen = iVar1 + 1;\n    ssh->queue[iVar1] = pkt;\n    return;\n  }\n  ssh->queuesize = iVar1 + 0x20U;\n  ppPVar2 = (Packet **)saferealloc(ssh->queue,iVar1 + 0x20U,4);\n  iVar1 = ssh->queuelen;\n  ssh->queue = ppPVar2;\n  ssh->queuelen = iVar1 + 1;\n  ppPVar2[iVar1] = pkt;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "Packet **ppPVar2;" type_identifier (pointer_declarator "**ppPVar2" * (pointer_declarator "*ppPVar2" * identifier)) ;) (if_statement "if (ssh->queueing == 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }" if (parenthesized_expression "(ssh->queueing == 0)" ( (binary_expression "ssh->queueing == 0" (field_expression "ssh->queueing" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }" { comment (expression_statement "__assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");" (call_expression "__assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue")" identifier (argument_list "("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue")" ( (string_literal ""ssh->queueing"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_pkt_queue"" " string_content ") ))) ;) })) (expression_statement "iVar1 = ssh->queuelen;" (assignment_expression "iVar1 = ssh->queuelen" identifier = (field_expression "ssh->queuelen" identifier -> field_identifier)) ;) (if_statement "if (iVar1 < ssh->queuesize) {\n    ssh->queuelen = iVar1 + 1;\n    ssh->queue[iVar1] = pkt;\n    return;\n  }" if (parenthesized_expression "(iVar1 < ssh->queuesize)" ( (binary_expression "iVar1 < ssh->queuesize" identifier < (field_expression "ssh->queuesize" identifier -> field_identifier)) )) (compound_statement "{\n    ssh->queuelen = iVar1 + 1;\n    ssh->queue[iVar1] = pkt;\n    return;\n  }" { (expression_statement "ssh->queuelen = iVar1 + 1;" (assignment_expression "ssh->queuelen = iVar1 + 1" (field_expression "ssh->queuelen" identifier -> field_identifier) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "ssh->queue[iVar1] = pkt;" (assignment_expression "ssh->queue[iVar1] = pkt" (subscript_expression "ssh->queue[iVar1]" (field_expression "ssh->queue" identifier -> field_identifier) [ identifier ]) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "ssh->queuesize = iVar1 + 0x20U;" (assignment_expression "ssh->queuesize = iVar1 + 0x20U" (field_expression "ssh->queuesize" identifier -> field_identifier) = (binary_expression "iVar1 + 0x20U" identifier + number_literal)) ;) (expression_statement "ppPVar2 = (Packet **)saferealloc(ssh->queue,iVar1 + 0x20U,4);" (assignment_expression "ppPVar2 = (Packet **)saferealloc(ssh->queue,iVar1 + 0x20U,4)" identifier = (cast_expression "(Packet **)saferealloc(ssh->queue,iVar1 + 0x20U,4)" ( (type_descriptor "Packet **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "saferealloc(ssh->queue,iVar1 + 0x20U,4)" identifier (argument_list "(ssh->queue,iVar1 + 0x20U,4)" ( (field_expression "ssh->queue" identifier -> field_identifier) , (binary_expression "iVar1 + 0x20U" identifier + number_literal) , number_literal ))))) ;) (expression_statement "iVar1 = ssh->queuelen;" (assignment_expression "iVar1 = ssh->queuelen" identifier = (field_expression "ssh->queuelen" identifier -> field_identifier)) ;) (expression_statement "ssh->queue = ppPVar2;" (assignment_expression "ssh->queue = ppPVar2" (field_expression "ssh->queue" identifier -> field_identifier) = identifier) ;) (expression_statement "ssh->queuelen = iVar1 + 1;" (assignment_expression "ssh->queuelen = iVar1 + 1" (field_expression "ssh->queuelen" identifier -> field_identifier) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "ppPVar2[iVar1] = pkt;" (assignment_expression "ppPVar2[iVar1] = pkt" (subscript_expression "ppPVar2[iVar1]" identifier [ identifier ]) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm3 FUN_0002f1c0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 0x164) == 0) {\n                    \n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }\n  iVar1 = *(int *)(param_1 + 0x15c);\n  if (iVar1 < *(int *)(param_1 + 0x160)) {\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }\n  *(int *)(param_1 + 0x160) = iVar1 + 0x20;\n  iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);\n  iVar1 = *(int *)(param_1 + 0x15c);\n  *(int *)(param_1 + 0x158) = iVar2;\n  *(int *)(param_1 + 0x15c) = iVar1 + 1;\n  *(undefined4 *)(iVar2 + iVar1 * 4) = param_2;\n  return;\n}\n\n" (function_definition "void __regparm3 FUN_0002f1c0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 0x164) == 0) {\n                    \n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }\n  iVar1 = *(int *)(param_1 + 0x15c);\n  if (iVar1 < *(int *)(param_1 + 0x160)) {\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }\n  *(int *)(param_1 + 0x160) = iVar1 + 0x20;\n  iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);\n  iVar1 = *(int *)(param_1 + 0x15c);\n  *(int *)(param_1 + 0x158) = iVar2;\n  *(int *)(param_1 + 0x15c) = iVar1 + 1;\n  *(undefined4 *)(iVar2 + iVar1 * 4) = param_2;\n  return;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "FUN_0002f1c0(int param_1,undefined4 param_2)" identifier (parameter_list "(int param_1,undefined4 param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 0x164) == 0) {\n                    \n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }\n  iVar1 = *(int *)(param_1 + 0x15c);\n  if (iVar1 < *(int *)(param_1 + 0x160)) {\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }\n  *(int *)(param_1 + 0x160) = iVar1 + 0x20;\n  iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);\n  iVar1 = *(int *)(param_1 + 0x15c);\n  *(int *)(param_1 + 0x158) = iVar2;\n  *(int *)(param_1 + 0x15c) = iVar1 + 1;\n  *(undefined4 *)(iVar2 + iVar1 * 4) = param_2;\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (if_statement "if (*(int *)(param_1 + 0x164) == 0) {\n                    \n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x164) == 0)" ( (binary_expression "*(int *)(param_1 + 0x164) == 0" (pointer_expression "*(int *)(param_1 + 0x164)" * (cast_expression "(int *)(param_1 + 0x164)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x164)" ( (binary_expression "param_1 + 0x164" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n                    \n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }" { (expression_statement "__assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");" (call_expression "__assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue")" identifier (argument_list "("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue")" ( (string_literal ""ssh->queueing"" " string_content ") , (string_literal ""ssh.c"" " string_content ") , number_literal , (string_literal ""ssh2_pkt_queue"" " string_content ") ))) ;) })) (expression_statement "iVar1 = *(int *)(param_1 + 0x15c);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x15c)" identifier = (pointer_expression "*(int *)(param_1 + 0x15c)" * (cast_expression "(int *)(param_1 + 0x15c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x15c)" ( (binary_expression "param_1 + 0x15c" identifier + number_literal) ))))) ;) (if_statement "if (iVar1 < *(int *)(param_1 + 0x160)) {\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }" if (parenthesized_expression "(iVar1 < *(int *)(param_1 + 0x160))" ( (binary_expression "iVar1 < *(int *)(param_1 + 0x160)" identifier < (pointer_expression "*(int *)(param_1 + 0x160)" * (cast_expression "(int *)(param_1 + 0x160)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) ))))) )) (compound_statement "{\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }" { (expression_statement "*(int *)(param_1 + 0x15c) = iVar1 + 1;" (assignment_expression "*(int *)(param_1 + 0x15c) = iVar1 + 1" (pointer_expression "*(int *)(param_1 + 0x15c)" * (cast_expression "(int *)(param_1 + 0x15c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x15c)" ( (binary_expression "param_1 + 0x15c" identifier + number_literal) )))) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4)" * (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)(param_1 + 0x158) + iVar1 * 4)" ( (binary_expression "*(int *)(param_1 + 0x158) + iVar1 * 4" (pointer_expression "*(int *)(param_1 + 0x158)" * (cast_expression "(int *)(param_1 + 0x158)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x158)" ( (binary_expression "param_1 + 0x158" identifier + number_literal) )))) + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "*(int *)(param_1 + 0x160) = iVar1 + 0x20;" (assignment_expression "*(int *)(param_1 + 0x160) = iVar1 + 0x20" (pointer_expression "*(int *)(param_1 + 0x160)" * (cast_expression "(int *)(param_1 + 0x160)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) = (binary_expression "iVar1 + 0x20" identifier + number_literal)) ;) (expression_statement "iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);" (assignment_expression "iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4)" identifier = (call_expression "FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4)" identifier (argument_list "(*(int *)(param_1 + 0x158),iVar1 + 0x20,4)" ( (pointer_expression "*(int *)(param_1 + 0x158)" * (cast_expression "(int *)(param_1 + 0x158)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x158)" ( (binary_expression "param_1 + 0x158" identifier + number_literal) )))) , (binary_expression "iVar1 + 0x20" identifier + number_literal) , number_literal )))) ;) (expression_statement "iVar1 = *(int *)(param_1 + 0x15c);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x15c)" identifier = (pointer_expression "*(int *)(param_1 + 0x15c)" * (cast_expression "(int *)(param_1 + 0x15c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x15c)" ( (binary_expression "param_1 + 0x15c" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 0x158) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x158) = iVar2" (pointer_expression "*(int *)(param_1 + 0x158)" * (cast_expression "(int *)(param_1 + 0x158)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x158)" ( (binary_expression "param_1 + 0x158" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_1 + 0x15c) = iVar1 + 1;" (assignment_expression "*(int *)(param_1 + 0x15c) = iVar1 + 1" (pointer_expression "*(int *)(param_1 + 0x15c)" * (cast_expression "(int *)(param_1 + 0x15c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x15c)" ( (binary_expression "param_1 + 0x15c" identifier + number_literal) )))) = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (expression_statement "*(undefined4 *)(iVar2 + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)(iVar2 + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)(iVar2 + iVar1 * 4)" * (cast_expression "(undefined4 *)(iVar2 + iVar1 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + iVar1 * 4)" ( (binary_expression "iVar2 + iVar1 * 4" identifier + (binary_expression "iVar1 * 4" identifier * number_literal)) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE 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 { (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 = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (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 { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) )))) = IDENT) ;) (return_statement return ;) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression IDENT + LIT) , LIT )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) = IDENT) ;) (return_statement return ;) })))
(function_definition "void __regparm3 FUN_0002f1c0(int param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 0x164) == 0) {\n                    \n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }\n  iVar1 = *(int *)(param_1 + 0x15c);\n  if (iVar1 < *(int *)(param_1 + 0x160)) {\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }\n  *(int *)(param_1 + 0x160) = iVar1 + 0x20;\n  iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);\n  iVar1 = *(int *)(param_1 + 0x15c);\n  *(int *)(param_1 + 0x158) = iVar2;\n  *(int *)(param_1 + 0x15c) = iVar1 + 1;\n  *(undefined4 *)(iVar2 + iVar1 * 4) = param_2;\n  return;\n}" (primitive_type "void") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_0002f1c0(int param_1,undefined4 param_2)" (identifier "FUN_0002f1c0") (parameter_list "(int param_1,undefined4 param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  \n  if (*(int *)(param_1 + 0x164) == 0) {\n                    \n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }\n  iVar1 = *(int *)(param_1 + 0x15c);\n  if (iVar1 < *(int *)(param_1 + 0x160)) {\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }\n  *(int *)(param_1 + 0x160) = iVar1 + 0x20;\n  iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);\n  iVar1 = *(int *)(param_1 + 0x15c);\n  *(int *)(param_1 + 0x158) = iVar2;\n  *(int *)(param_1 + 0x15c) = iVar1 + 1;\n  *(undefined4 *)(iVar2 + iVar1 * 4) = param_2;\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (if_statement "if (*(int *)(param_1 + 0x164) == 0) {\n                    \n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x164) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x164) == 0" (pointer_expression "*(int *)(param_1 + 0x164)" (* "*") (cast_expression "(int *)(param_1 + 0x164)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x164)" (( "(") (binary_expression "param_1 + 0x164" (identifier "param_1") (+ "+") (number_literal "0x164")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");\n  }" ({ "{") (expression_statement "__assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");" (call_expression "__assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue")" (identifier "__assert_fail") (argument_list "("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue")" (( "(") (string_literal ""ssh->queueing"" (" """) (string_content "ssh->queueing") (" """)) (, ",") (string_literal ""ssh.c"" (" """) (string_content "ssh.c") (" """)) (, ",") (number_literal "0x9c1") (, ",") (string_literal ""ssh2_pkt_queue"" (" """) (string_content "ssh2_pkt_queue") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "iVar1 = *(int *)(param_1 + 0x15c);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x15c)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0x15c)" (* "*") (cast_expression "(int *)(param_1 + 0x15c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x15c)" (( "(") (binary_expression "param_1 + 0x15c" (identifier "param_1") (+ "+") (number_literal "0x15c")) () ")"))))) (; ";")) (if_statement "if (iVar1 < *(int *)(param_1 + 0x160)) {\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }" (if "if") (parenthesized_expression "(iVar1 < *(int *)(param_1 + 0x160))" (( "(") (binary_expression "iVar1 < *(int *)(param_1 + 0x160)" (identifier "iVar1") (< "<") (pointer_expression "*(int *)(param_1 + 0x160)" (* "*") (cast_expression "(int *)(param_1 + 0x160)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x160)" (( "(") (binary_expression "param_1 + 0x160" (identifier "param_1") (+ "+") (number_literal "0x160")) () ")"))))) () ")")) (compound_statement "{\n    *(int *)(param_1 + 0x15c) = iVar1 + 1;\n    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;\n    return;\n  }" ({ "{") (expression_statement "*(int *)(param_1 + 0x15c) = iVar1 + 1;" (assignment_expression "*(int *)(param_1 + 0x15c) = iVar1 + 1" (pointer_expression "*(int *)(param_1 + 0x15c)" (* "*") (cast_expression "(int *)(param_1 + 0x15c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x15c)" (( "(") (binary_expression "param_1 + 0x15c" (identifier "param_1") (+ "+") (number_literal "0x15c")) () ")")))) (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4)" (* "*") (cast_expression "(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)(param_1 + 0x158) + iVar1 * 4)" (( "(") (binary_expression "*(int *)(param_1 + 0x158) + iVar1 * 4" (pointer_expression "*(int *)(param_1 + 0x158)" (* "*") (cast_expression "(int *)(param_1 + 0x158)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x158)" (( "(") (binary_expression "param_1 + 0x158" (identifier "param_1") (+ "+") (number_literal "0x158")) () ")")))) (+ "+") (binary_expression "iVar1 * 4" (identifier "iVar1") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "param_2")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "*(int *)(param_1 + 0x160) = iVar1 + 0x20;" (assignment_expression "*(int *)(param_1 + 0x160) = iVar1 + 0x20" (pointer_expression "*(int *)(param_1 + 0x160)" (* "*") (cast_expression "(int *)(param_1 + 0x160)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x160)" (( "(") (binary_expression "param_1 + 0x160" (identifier "param_1") (+ "+") (number_literal "0x160")) () ")")))) (= "=") (binary_expression "iVar1 + 0x20" (identifier "iVar1") (+ "+") (number_literal "0x20"))) (; ";")) (expression_statement "iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);" (assignment_expression "iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4)" (identifier "iVar2") (= "=") (call_expression "FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4)" (identifier "FUN_0001adc0") (argument_list "(*(int *)(param_1 + 0x158),iVar1 + 0x20,4)" (( "(") (pointer_expression "*(int *)(param_1 + 0x158)" (* "*") (cast_expression "(int *)(param_1 + 0x158)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x158)" (( "(") (binary_expression "param_1 + 0x158" (identifier "param_1") (+ "+") (number_literal "0x158")) () ")")))) (, ",") (binary_expression "iVar1 + 0x20" (identifier "iVar1") (+ "+") (number_literal "0x20")) (, ",") (number_literal "4") () ")")))) (; ";")) (expression_statement "iVar1 = *(int *)(param_1 + 0x15c);" (assignment_expression "iVar1 = *(int *)(param_1 + 0x15c)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(param_1 + 0x15c)" (* "*") (cast_expression "(int *)(param_1 + 0x15c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x15c)" (( "(") (binary_expression "param_1 + 0x15c" (identifier "param_1") (+ "+") (number_literal "0x15c")) () ")"))))) (; ";")) (expression_statement "*(int *)(param_1 + 0x158) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x158) = iVar2" (pointer_expression "*(int *)(param_1 + 0x158)" (* "*") (cast_expression "(int *)(param_1 + 0x158)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x158)" (( "(") (binary_expression "param_1 + 0x158" (identifier "param_1") (+ "+") (number_literal "0x158")) () ")")))) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "*(int *)(param_1 + 0x15c) = iVar1 + 1;" (assignment_expression "*(int *)(param_1 + 0x15c) = iVar1 + 1" (pointer_expression "*(int *)(param_1 + 0x15c)" (* "*") (cast_expression "(int *)(param_1 + 0x15c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x15c)" (( "(") (binary_expression "param_1 + 0x15c" (identifier "param_1") (+ "+") (number_literal "0x15c")) () ")")))) (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(undefined4 *)(iVar2 + iVar1 * 4) = param_2;" (assignment_expression "*(undefined4 *)(iVar2 + iVar1 * 4) = param_2" (pointer_expression "*(undefined4 *)(iVar2 + iVar1 * 4)" (* "*") (cast_expression "(undefined4 *)(iVar2 + iVar1 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + iVar1 * 4)" (( "(") (binary_expression "iVar2 + iVar1 * 4" (identifier "iVar2") (+ "+") (binary_expression "iVar1 * 4" (identifier "iVar1") (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "param_2")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void __regparm3 function_1(type_1 ssh,type_2 *pkt)

{
  int var_2;
  type_2 **ppPVar2;
  
  if (ssh->queueing == 0) {
                    /* WARNING: Subroutine does not return */
    var_1("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");
  }
  var_2 = ssh->queuelen;
  if (var_2 < ssh->queuesize) {
    ssh->queuelen = var_2 + 1;
    ssh->queue[var_2] = pkt;
    return;
  }
  ssh->queuesize = var_2 + 0x20U;
  ppPVar2 = (type_2 **)var_3(ssh->queue,var_2 + 0x20U,4);
  var_2 = ssh->queuelen;
  ssh->queue = ppPVar2;
  ssh->queuelen = var_2 + 1;
  ppPVar2[var_2] = pkt;
  return;
}


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

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

void __regparm3 MASKED(int param_1,undefined4 param_2)

{
  int iVar1;
  int iVar2;
  
  if (*(int *)(param_1 + 0x164) == 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("ssh->queueing","ssh.c",0x9c1,"ssh2_pkt_queue");
  }
  iVar1 = *(int *)(param_1 + 0x15c);
  if (iVar1 < *(int *)(param_1 + 0x160)) {
    *(int *)(param_1 + 0x15c) = iVar1 + 1;
    *(undefined4 *)(*(int *)(param_1 + 0x158) + iVar1 * 4) = param_2;
    return;
  }
  *(int *)(param_1 + 0x160) = iVar1 + 0x20;
  iVar2 = FUN_0001adc0(*(int *)(param_1 + 0x158),iVar1 + 0x20,4);
  iVar1 = *(int *)(param_1 + 0x15c);
  *(int *)(param_1 + 0x158) = iVar2;
  *(int *)(param_1 + 0x15c) = iVar1 + 1;
  *(undefined4 *)(iVar2 + iVar1 * 4) = param_2;
  return;
}

