
/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void ssh_queue_handler(Ssh_conflict ssh,int msg1,int msg2,chandler_fn_t handler,void *ctx)

{
  queued_handler *pqVar1;
  
  pqVar1 = (queued_handler *)safemalloc(1,0x20);
  pqVar1->msg1 = msg1;
  pqVar1->msg2 = msg2;
  pqVar1->handler = handler;
  pqVar1->ctx = ctx;
  pqVar1->next = (queued_handler *)0x0;
  if (ssh->qtail == (queued_handler *)0x0) {
    ssh->qhead = pqVar1;
    if (0 < pqVar1->msg1) {
      ssh->q_saved_handler1 = ssh->packet_dispatch[pqVar1->msg1];
      ssh->packet_dispatch[pqVar1->msg1] = ssh_queueing_handler;
    }
    if (0 < pqVar1->msg2) {
      ssh->q_saved_handler2 = ssh->packet_dispatch[pqVar1->msg2];
      ssh->packet_dispatch[pqVar1->msg2] = ssh_queueing_handler;
    }
  }
  else {
    ssh->qtail->next = pqVar1;
  }
  ssh->qtail = pqVar1;
  return;
}



void FUN_00131164(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)

{
  int *piVar1;
  
  piVar1 = (int *)FUN_00126895(1,0x20);
  *piVar1 = param_2;
  piVar1[1] = param_3;
  *(undefined8 *)(piVar1 + 2) = param_4;
  *(undefined8 *)(piVar1 + 4) = param_5;
  piVar1[6] = 0;
  piVar1[7] = 0;
  if (*(long *)(param_1 + 0xbd0) == 0) {
    *(int **)(param_1 + 0xbc8) = piVar1;
    if (0 < *piVar1) {
      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);
      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;
    }
    if (0 < piVar1[1]) {
      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);
      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;
    }
  }
  else {
    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;
  }
  *(int **)(param_1 + 0xbd0) = piVar1;
  return;
}


PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
MOV R14D,ESI
MOV R13D,EDX
MOV R12,RCX
MOV RBP,R8
MOV ESI,0x20
MOV EDI,0x1
CALL 0x00126895
MOV dword ptr [RAX],R14D
MOV dword ptr [RAX + 0x4],R13D
MOV qword ptr [RAX + 0x8],R12
MOV qword ptr [RAX + 0x10],RBP
MOV qword ptr [RAX + 0x18],0x0
MOV RDX,qword ptr [RBX + 0xbd0]
TEST RDX,RDX
JZ 0x001311c1
MOV qword ptr [RDX + 0x18],RAX
MOV qword ptr [RBX + 0xbd0],RAX
POP RBX
POP RBP
POP R12
POP R13
POP R14
RET
MOV qword ptr [RBX + 0xbc8],RAX
MOV EDX,dword ptr [RAX]
TEST EDX,EDX
JLE 0x001311f2
MOVSXD RDX,EDX
MOV RDX,qword ptr [RBX + RDX*0x8 + 0x3c8]
MOV qword ptr [RBX + 0xbd8],RDX
MOVSXD RDX,dword ptr [RAX]
LEA RCX,[0x130fa4]
MOV qword ptr [RBX + RDX*0x8 + 0x3c8],RCX
MOV EDX,dword ptr [RAX + 0x4]
TEST EDX,EDX
JLE 0x001311b1
MOVSXD RDX,EDX
MOV RDX,qword ptr [RBX + RDX*0x8 + 0x3c8]
MOV qword ptr [RBX + 0xbe0],RDX
MOVSXD RDX,dword ptr [RAX + 0x4]
LEA RCX,[0x130fa4]
MOV qword ptr [RBX + RDX*0x8 + 0x3c8],RCX
JMP 0x001311b1
(translation_unit "void FUN_00131164(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)FUN_00126895(1,0x20);\n  *piVar1 = param_2;\n  piVar1[1] = param_3;\n  *(undefined8 *)(piVar1 + 2) = param_4;\n  *(undefined8 *)(piVar1 + 4) = param_5;\n  piVar1[6] = 0;\n  piVar1[7] = 0;\n  if (*(long *)(param_1 + 0xbd0) == 0) {\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }\n  else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }\n  *(int **)(param_1 + 0xbd0) = piVar1;\n  return;\n}\n\n" (function_definition "void FUN_00131164(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)FUN_00126895(1,0x20);\n  *piVar1 = param_2;\n  piVar1[1] = param_3;\n  *(undefined8 *)(piVar1 + 2) = param_4;\n  *(undefined8 *)(piVar1 + 4) = param_5;\n  piVar1[6] = 0;\n  piVar1[7] = 0;\n  if (*(long *)(param_1 + 0xbd0) == 0) {\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }\n  else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }\n  *(int **)(param_1 + 0xbd0) = piVar1;\n  return;\n}" primitive_type (function_declarator "FUN_00131164(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)" identifier (parameter_list "(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  \n  piVar1 = (int *)FUN_00126895(1,0x20);\n  *piVar1 = param_2;\n  piVar1[1] = param_3;\n  *(undefined8 *)(piVar1 + 2) = param_4;\n  *(undefined8 *)(piVar1 + 4) = param_5;\n  piVar1[6] = 0;\n  piVar1[7] = 0;\n  if (*(long *)(param_1 + 0xbd0) == 0) {\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }\n  else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }\n  *(int **)(param_1 + 0xbd0) = piVar1;\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (expression_statement "piVar1 = (int *)FUN_00126895(1,0x20);" (assignment_expression "piVar1 = (int *)FUN_00126895(1,0x20)" identifier = (cast_expression "(int *)FUN_00126895(1,0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00126895(1,0x20)" identifier (argument_list "(1,0x20)" ( number_literal , number_literal ))))) ;) (expression_statement "*piVar1 = param_2;" (assignment_expression "*piVar1 = param_2" (pointer_expression "*piVar1" * identifier) = identifier) ;) (expression_statement "piVar1[1] = param_3;" (assignment_expression "piVar1[1] = param_3" (subscript_expression "piVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined8 *)(piVar1 + 2) = param_4;" (assignment_expression "*(undefined8 *)(piVar1 + 2) = param_4" (pointer_expression "*(undefined8 *)(piVar1 + 2)" * (cast_expression "(undefined8 *)(piVar1 + 2)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 2)" ( (binary_expression "piVar1 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(piVar1 + 4) = param_5;" (assignment_expression "*(undefined8 *)(piVar1 + 4) = param_5" (pointer_expression "*(undefined8 *)(piVar1 + 4)" * (cast_expression "(undefined8 *)(piVar1 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 4)" ( (binary_expression "piVar1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar1[6] = 0;" (assignment_expression "piVar1[6] = 0" (subscript_expression "piVar1[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar1[7] = 0;" (assignment_expression "piVar1[7] = 0" (subscript_expression "piVar1[7]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (*(long *)(param_1 + 0xbd0) == 0) {\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }\n  else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }" if (parenthesized_expression "(*(long *)(param_1 + 0xbd0) == 0)" ( (binary_expression "*(long *)(param_1 + 0xbd0) == 0" (pointer_expression "*(long *)(param_1 + 0xbd0)" * (cast_expression "(long *)(param_1 + 0xbd0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xbd0)" ( (binary_expression "param_1 + 0xbd0" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }" { (expression_statement "*(int **)(param_1 + 0xbc8) = piVar1;" (assignment_expression "*(int **)(param_1 + 0xbc8) = piVar1" (pointer_expression "*(int **)(param_1 + 0xbc8)" * (cast_expression "(int **)(param_1 + 0xbc8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xbc8)" ( (binary_expression "param_1 + 0xbc8" identifier + number_literal) )))) = identifier) ;) (if_statement "if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }" if (parenthesized_expression "(0 < *piVar1)" ( (binary_expression "0 < *piVar1" number_literal < (pointer_expression "*piVar1" * identifier)) )) (compound_statement "{\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }" { (expression_statement "*(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);" (assignment_expression "*(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8)" (pointer_expression "*(undefined8 *)(param_1 + 0xbd8)" * (cast_expression "(undefined8 *)(param_1 + 0xbd8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xbd8)" ( (binary_expression "param_1 + 0xbd8" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8)" * (cast_expression "(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c8 + (long)*piVar1 * 8)" ( (binary_expression "param_1 + 0x3c8 + (long)*piVar1 * 8" (binary_expression "param_1 + 0x3c8" identifier + number_literal) + (binary_expression "(long)*piVar1 * 8" (cast_expression "(long)*piVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*piVar1" * identifier)) * number_literal)) ))))) ;) (expression_statement "*(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;" (assignment_expression "*(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4" (pointer_expression "*(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8)" * (cast_expression "(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c8 + (long)*piVar1 * 8)" ( (binary_expression "param_1 + 0x3c8 + (long)*piVar1 * 8" (binary_expression "param_1 + 0x3c8" identifier + number_literal) + (binary_expression "(long)*piVar1 * 8" (cast_expression "(long)*piVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*piVar1" * identifier)) * number_literal)) )))) = identifier) ;) })) (if_statement "if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }" if (parenthesized_expression "(0 < piVar1[1])" ( (binary_expression "0 < piVar1[1]" number_literal < (subscript_expression "piVar1[1]" identifier [ number_literal ])) )) (compound_statement "{\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }" { (expression_statement "*(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);" (assignment_expression "*(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" (pointer_expression "*(undefined8 *)(param_1 + 0xbe0)" * (cast_expression "(undefined8 *)(param_1 + 0xbe0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xbe0)" ( (binary_expression "param_1 + 0xbe0" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" * (cast_expression "(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c8 + (long)piVar1[1] * 8)" ( (binary_expression "param_1 + 0x3c8 + (long)piVar1[1] * 8" (binary_expression "param_1 + 0x3c8" identifier + number_literal) + (binary_expression "(long)piVar1[1] * 8" (cast_expression "(long)piVar1[1]" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (subscript_expression "piVar1[1]" identifier [ number_literal ])) * number_literal)) ))))) ;) (expression_statement "*(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;" (assignment_expression "*(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4" (pointer_expression "*(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" * (cast_expression "(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c8 + (long)piVar1[1] * 8)" ( (binary_expression "param_1 + 0x3c8 + (long)piVar1[1] * 8" (binary_expression "param_1 + 0x3c8" identifier + number_literal) + (binary_expression "(long)piVar1[1] * 8" (cast_expression "(long)piVar1[1]" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (subscript_expression "piVar1[1]" identifier [ number_literal ])) * number_literal)) )))) = identifier) ;) })) }) (else_clause "else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }" else (compound_statement "{\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }" { (expression_statement "*(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;" (assignment_expression "*(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1" (pointer_expression "*(int **)(*(long *)(param_1 + 0xbd0) + 0x18)" * (cast_expression "(int **)(*(long *)(param_1 + 0xbd0) + 0x18)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(long *)(param_1 + 0xbd0) + 0x18)" ( (binary_expression "*(long *)(param_1 + 0xbd0) + 0x18" (pointer_expression "*(long *)(param_1 + 0xbd0)" * (cast_expression "(long *)(param_1 + 0xbd0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xbd0)" ( (binary_expression "param_1 + 0xbd0" identifier + number_literal) )))) + number_literal) )))) = identifier) ;) }))) (expression_statement "*(int **)(param_1 + 0xbd0) = piVar1;" (assignment_expression "*(int **)(param_1 + 0xbd0) = piVar1" (pointer_expression "*(int **)(param_1 + 0xbd0)" * (cast_expression "(int **)(param_1 + 0xbd0)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xbd0)" ( (binary_expression "param_1 + 0xbd0" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid ssh_queue_handler(Ssh_conflict ssh,int msg1,int msg2,chandler_fn_t handler,void *ctx)\n\n{\n  queued_handler *pqVar1;\n  \n  pqVar1 = (queued_handler *)safemalloc(1,0x20);\n  pqVar1->msg1 = msg1;\n  pqVar1->msg2 = msg2;\n  pqVar1->handler = handler;\n  pqVar1->ctx = ctx;\n  pqVar1->next = (queued_handler *)0x0;\n  if (ssh->qtail == (queued_handler *)0x0) {\n    ssh->qhead = pqVar1;\n    if (0 < pqVar1->msg1) {\n      ssh->q_saved_handler1 = ssh->packet_dispatch[pqVar1->msg1];\n      ssh->packet_dispatch[pqVar1->msg1] = ssh_queueing_handler;\n    }\n    if (0 < pqVar1->msg2) {\n      ssh->q_saved_handler2 = ssh->packet_dispatch[pqVar1->msg2];\n      ssh->packet_dispatch[pqVar1->msg2] = ssh_queueing_handler;\n    }\n  }\n  else {\n    ssh->qtail->next = pqVar1;\n  }\n  ssh->qtail = pqVar1;\n  return;\n}\n\n" comment (function_definition "void ssh_queue_handler(Ssh_conflict ssh,int msg1,int msg2,chandler_fn_t handler,void *ctx)\n\n{\n  queued_handler *pqVar1;\n  \n  pqVar1 = (queued_handler *)safemalloc(1,0x20);\n  pqVar1->msg1 = msg1;\n  pqVar1->msg2 = msg2;\n  pqVar1->handler = handler;\n  pqVar1->ctx = ctx;\n  pqVar1->next = (queued_handler *)0x0;\n  if (ssh->qtail == (queued_handler *)0x0) {\n    ssh->qhead = pqVar1;\n    if (0 < pqVar1->msg1) {\n      ssh->q_saved_handler1 = ssh->packet_dispatch[pqVar1->msg1];\n      ssh->packet_dispatch[pqVar1->msg1] = ssh_queueing_handler;\n    }\n    if (0 < pqVar1->msg2) {\n      ssh->q_saved_handler2 = ssh->packet_dispatch[pqVar1->msg2];\n      ssh->packet_dispatch[pqVar1->msg2] = ssh_queueing_handler;\n    }\n  }\n  else {\n    ssh->qtail->next = pqVar1;\n  }\n  ssh->qtail = pqVar1;\n  return;\n}" primitive_type (function_declarator "ssh_queue_handler(Ssh_conflict ssh,int msg1,int msg2,chandler_fn_t handler,void *ctx)" identifier (parameter_list "(Ssh_conflict ssh,int msg1,int msg2,chandler_fn_t handler,void *ctx)" ( (parameter_declaration "Ssh_conflict ssh" type_identifier identifier) , (parameter_declaration "int msg1" primitive_type identifier) , (parameter_declaration "int msg2" primitive_type identifier) , (parameter_declaration "chandler_fn_t handler" type_identifier identifier) , (parameter_declaration "void *ctx" primitive_type (pointer_declarator "*ctx" * identifier)) ))) (compound_statement "{\n  queued_handler *pqVar1;\n  \n  pqVar1 = (queued_handler *)safemalloc(1,0x20);\n  pqVar1->msg1 = msg1;\n  pqVar1->msg2 = msg2;\n  pqVar1->handler = handler;\n  pqVar1->ctx = ctx;\n  pqVar1->next = (queued_handler *)0x0;\n  if (ssh->qtail == (queued_handler *)0x0) {\n    ssh->qhead = pqVar1;\n    if (0 < pqVar1->msg1) {\n      ssh->q_saved_handler1 = ssh->packet_dispatch[pqVar1->msg1];\n      ssh->packet_dispatch[pqVar1->msg1] = ssh_queueing_handler;\n    }\n    if (0 < pqVar1->msg2) {\n      ssh->q_saved_handler2 = ssh->packet_dispatch[pqVar1->msg2];\n      ssh->packet_dispatch[pqVar1->msg2] = ssh_queueing_handler;\n    }\n  }\n  else {\n    ssh->qtail->next = pqVar1;\n  }\n  ssh->qtail = pqVar1;\n  return;\n}" { (declaration "queued_handler *pqVar1;" type_identifier (pointer_declarator "*pqVar1" * identifier) ;) (expression_statement "pqVar1 = (queued_handler *)safemalloc(1,0x20);" (assignment_expression "pqVar1 = (queued_handler *)safemalloc(1,0x20)" identifier = (cast_expression "(queued_handler *)safemalloc(1,0x20)" ( (type_descriptor "queued_handler *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x20)" identifier (argument_list "(1,0x20)" ( number_literal , number_literal ))))) ;) (expression_statement "pqVar1->msg1 = msg1;" (assignment_expression "pqVar1->msg1 = msg1" (field_expression "pqVar1->msg1" identifier -> field_identifier) = identifier) ;) (expression_statement "pqVar1->msg2 = msg2;" (assignment_expression "pqVar1->msg2 = msg2" (field_expression "pqVar1->msg2" identifier -> field_identifier) = identifier) ;) (expression_statement "pqVar1->handler = handler;" (assignment_expression "pqVar1->handler = handler" (field_expression "pqVar1->handler" identifier -> field_identifier) = identifier) ;) (expression_statement "pqVar1->ctx = ctx;" (assignment_expression "pqVar1->ctx = ctx" (field_expression "pqVar1->ctx" identifier -> field_identifier) = identifier) ;) (expression_statement "pqVar1->next = (queued_handler *)0x0;" (assignment_expression "pqVar1->next = (queued_handler *)0x0" (field_expression "pqVar1->next" identifier -> field_identifier) = (cast_expression "(queued_handler *)0x0" ( (type_descriptor "queued_handler *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (if_statement "if (ssh->qtail == (queued_handler *)0x0) {\n    ssh->qhead = pqVar1;\n    if (0 < pqVar1->msg1) {\n      ssh->q_saved_handler1 = ssh->packet_dispatch[pqVar1->msg1];\n      ssh->packet_dispatch[pqVar1->msg1] = ssh_queueing_handler;\n    }\n    if (0 < pqVar1->msg2) {\n      ssh->q_saved_handler2 = ssh->packet_dispatch[pqVar1->msg2];\n      ssh->packet_dispatch[pqVar1->msg2] = ssh_queueing_handler;\n    }\n  }\n  else {\n    ssh->qtail->next = pqVar1;\n  }" if (parenthesized_expression "(ssh->qtail == (queued_handler *)0x0)" ( (binary_expression "ssh->qtail == (queued_handler *)0x0" (field_expression "ssh->qtail" identifier -> field_identifier) == (cast_expression "(queued_handler *)0x0" ( (type_descriptor "queued_handler *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    ssh->qhead = pqVar1;\n    if (0 < pqVar1->msg1) {\n      ssh->q_saved_handler1 = ssh->packet_dispatch[pqVar1->msg1];\n      ssh->packet_dispatch[pqVar1->msg1] = ssh_queueing_handler;\n    }\n    if (0 < pqVar1->msg2) {\n      ssh->q_saved_handler2 = ssh->packet_dispatch[pqVar1->msg2];\n      ssh->packet_dispatch[pqVar1->msg2] = ssh_queueing_handler;\n    }\n  }" { (expression_statement "ssh->qhead = pqVar1;" (assignment_expression "ssh->qhead = pqVar1" (field_expression "ssh->qhead" identifier -> field_identifier) = identifier) ;) (if_statement "if (0 < pqVar1->msg1) {\n      ssh->q_saved_handler1 = ssh->packet_dispatch[pqVar1->msg1];\n      ssh->packet_dispatch[pqVar1->msg1] = ssh_queueing_handler;\n    }" if (parenthesized_expression "(0 < pqVar1->msg1)" ( (binary_expression "0 < pqVar1->msg1" number_literal < (field_expression "pqVar1->msg1" identifier -> field_identifier)) )) (compound_statement "{\n      ssh->q_saved_handler1 = ssh->packet_dispatch[pqVar1->msg1];\n      ssh->packet_dispatch[pqVar1->msg1] = ssh_queueing_handler;\n    }" { (expression_statement "ssh->q_saved_handler1 = ssh->packet_dispatch[pqVar1->msg1];" (assignment_expression "ssh->q_saved_handler1 = ssh->packet_dispatch[pqVar1->msg1]" (field_expression "ssh->q_saved_handler1" identifier -> field_identifier) = (subscript_expression "ssh->packet_dispatch[pqVar1->msg1]" (field_expression "ssh->packet_dispatch" identifier -> field_identifier) [ (field_expression "pqVar1->msg1" identifier -> field_identifier) ])) ;) (expression_statement "ssh->packet_dispatch[pqVar1->msg1] = ssh_queueing_handler;" (assignment_expression "ssh->packet_dispatch[pqVar1->msg1] = ssh_queueing_handler" (subscript_expression "ssh->packet_dispatch[pqVar1->msg1]" (field_expression "ssh->packet_dispatch" identifier -> field_identifier) [ (field_expression "pqVar1->msg1" identifier -> field_identifier) ]) = identifier) ;) })) (if_statement "if (0 < pqVar1->msg2) {\n      ssh->q_saved_handler2 = ssh->packet_dispatch[pqVar1->msg2];\n      ssh->packet_dispatch[pqVar1->msg2] = ssh_queueing_handler;\n    }" if (parenthesized_expression "(0 < pqVar1->msg2)" ( (binary_expression "0 < pqVar1->msg2" number_literal < (field_expression "pqVar1->msg2" identifier -> field_identifier)) )) (compound_statement "{\n      ssh->q_saved_handler2 = ssh->packet_dispatch[pqVar1->msg2];\n      ssh->packet_dispatch[pqVar1->msg2] = ssh_queueing_handler;\n    }" { (expression_statement "ssh->q_saved_handler2 = ssh->packet_dispatch[pqVar1->msg2];" (assignment_expression "ssh->q_saved_handler2 = ssh->packet_dispatch[pqVar1->msg2]" (field_expression "ssh->q_saved_handler2" identifier -> field_identifier) = (subscript_expression "ssh->packet_dispatch[pqVar1->msg2]" (field_expression "ssh->packet_dispatch" identifier -> field_identifier) [ (field_expression "pqVar1->msg2" identifier -> field_identifier) ])) ;) (expression_statement "ssh->packet_dispatch[pqVar1->msg2] = ssh_queueing_handler;" (assignment_expression "ssh->packet_dispatch[pqVar1->msg2] = ssh_queueing_handler" (subscript_expression "ssh->packet_dispatch[pqVar1->msg2]" (field_expression "ssh->packet_dispatch" identifier -> field_identifier) [ (field_expression "pqVar1->msg2" identifier -> field_identifier) ]) = identifier) ;) })) }) (else_clause "else {\n    ssh->qtail->next = pqVar1;\n  }" else (compound_statement "{\n    ssh->qtail->next = pqVar1;\n  }" { (expression_statement "ssh->qtail->next = pqVar1;" (assignment_expression "ssh->qtail->next = pqVar1" (field_expression "ssh->qtail->next" (field_expression "ssh->qtail" identifier -> field_identifier) -> field_identifier) = identifier) ;) }))) (expression_statement "ssh->qtail = pqVar1;" (assignment_expression "ssh->qtail = pqVar1" (field_expression "ssh->qtail" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00131164(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)FUN_00126895(1,0x20);\n  *piVar1 = param_2;\n  piVar1[1] = param_3;\n  *(undefined8 *)(piVar1 + 2) = param_4;\n  *(undefined8 *)(piVar1 + 4) = param_5;\n  piVar1[6] = 0;\n  piVar1[7] = 0;\n  if (*(long *)(param_1 + 0xbd0) == 0) {\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }\n  else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }\n  *(int **)(param_1 + 0xbd0) = piVar1;\n  return;\n}\n\n" (function_definition "void FUN_00131164(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)FUN_00126895(1,0x20);\n  *piVar1 = param_2;\n  piVar1[1] = param_3;\n  *(undefined8 *)(piVar1 + 2) = param_4;\n  *(undefined8 *)(piVar1 + 4) = param_5;\n  piVar1[6] = 0;\n  piVar1[7] = 0;\n  if (*(long *)(param_1 + 0xbd0) == 0) {\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }\n  else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }\n  *(int **)(param_1 + 0xbd0) = piVar1;\n  return;\n}" primitive_type (function_declarator "FUN_00131164(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)" identifier (parameter_list "(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) ))) (compound_statement "{\n  int *piVar1;\n  \n  piVar1 = (int *)FUN_00126895(1,0x20);\n  *piVar1 = param_2;\n  piVar1[1] = param_3;\n  *(undefined8 *)(piVar1 + 2) = param_4;\n  *(undefined8 *)(piVar1 + 4) = param_5;\n  piVar1[6] = 0;\n  piVar1[7] = 0;\n  if (*(long *)(param_1 + 0xbd0) == 0) {\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }\n  else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }\n  *(int **)(param_1 + 0xbd0) = piVar1;\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (expression_statement "piVar1 = (int *)FUN_00126895(1,0x20);" (assignment_expression "piVar1 = (int *)FUN_00126895(1,0x20)" identifier = (cast_expression "(int *)FUN_00126895(1,0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00126895(1,0x20)" identifier (argument_list "(1,0x20)" ( number_literal , number_literal ))))) ;) (expression_statement "*piVar1 = param_2;" (assignment_expression "*piVar1 = param_2" (pointer_expression "*piVar1" * identifier) = identifier) ;) (expression_statement "piVar1[1] = param_3;" (assignment_expression "piVar1[1] = param_3" (subscript_expression "piVar1[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined8 *)(piVar1 + 2) = param_4;" (assignment_expression "*(undefined8 *)(piVar1 + 2) = param_4" (pointer_expression "*(undefined8 *)(piVar1 + 2)" * (cast_expression "(undefined8 *)(piVar1 + 2)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 2)" ( (binary_expression "piVar1 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(piVar1 + 4) = param_5;" (assignment_expression "*(undefined8 *)(piVar1 + 4) = param_5" (pointer_expression "*(undefined8 *)(piVar1 + 4)" * (cast_expression "(undefined8 *)(piVar1 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar1 + 4)" ( (binary_expression "piVar1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar1[6] = 0;" (assignment_expression "piVar1[6] = 0" (subscript_expression "piVar1[6]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar1[7] = 0;" (assignment_expression "piVar1[7] = 0" (subscript_expression "piVar1[7]" identifier [ number_literal ]) = number_literal) ;) (if_statement "if (*(long *)(param_1 + 0xbd0) == 0) {\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }\n  else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }" if (parenthesized_expression "(*(long *)(param_1 + 0xbd0) == 0)" ( (binary_expression "*(long *)(param_1 + 0xbd0) == 0" (pointer_expression "*(long *)(param_1 + 0xbd0)" * (cast_expression "(long *)(param_1 + 0xbd0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xbd0)" ( (binary_expression "param_1 + 0xbd0" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }" { (expression_statement "*(int **)(param_1 + 0xbc8) = piVar1;" (assignment_expression "*(int **)(param_1 + 0xbc8) = piVar1" (pointer_expression "*(int **)(param_1 + 0xbc8)" * (cast_expression "(int **)(param_1 + 0xbc8)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xbc8)" ( (binary_expression "param_1 + 0xbc8" identifier + number_literal) )))) = identifier) ;) (if_statement "if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }" if (parenthesized_expression "(0 < *piVar1)" ( (binary_expression "0 < *piVar1" number_literal < (pointer_expression "*piVar1" * identifier)) )) (compound_statement "{\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }" { (expression_statement "*(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);" (assignment_expression "*(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8)" (pointer_expression "*(undefined8 *)(param_1 + 0xbd8)" * (cast_expression "(undefined8 *)(param_1 + 0xbd8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xbd8)" ( (binary_expression "param_1 + 0xbd8" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8)" * (cast_expression "(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c8 + (long)*piVar1 * 8)" ( (binary_expression "param_1 + 0x3c8 + (long)*piVar1 * 8" (binary_expression "param_1 + 0x3c8" identifier + number_literal) + (binary_expression "(long)*piVar1 * 8" (cast_expression "(long)*piVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*piVar1" * identifier)) * number_literal)) ))))) ;) (expression_statement "*(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;" (assignment_expression "*(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4" (pointer_expression "*(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8)" * (cast_expression "(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c8 + (long)*piVar1 * 8)" ( (binary_expression "param_1 + 0x3c8 + (long)*piVar1 * 8" (binary_expression "param_1 + 0x3c8" identifier + number_literal) + (binary_expression "(long)*piVar1 * 8" (cast_expression "(long)*piVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*piVar1" * identifier)) * number_literal)) )))) = identifier) ;) })) (if_statement "if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }" if (parenthesized_expression "(0 < piVar1[1])" ( (binary_expression "0 < piVar1[1]" number_literal < (subscript_expression "piVar1[1]" identifier [ number_literal ])) )) (compound_statement "{\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }" { (expression_statement "*(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);" (assignment_expression "*(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" (pointer_expression "*(undefined8 *)(param_1 + 0xbe0)" * (cast_expression "(undefined8 *)(param_1 + 0xbe0)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xbe0)" ( (binary_expression "param_1 + 0xbe0" identifier + number_literal) )))) = (pointer_expression "*(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" * (cast_expression "(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c8 + (long)piVar1[1] * 8)" ( (binary_expression "param_1 + 0x3c8 + (long)piVar1[1] * 8" (binary_expression "param_1 + 0x3c8" identifier + number_literal) + (binary_expression "(long)piVar1[1] * 8" (cast_expression "(long)piVar1[1]" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (subscript_expression "piVar1[1]" identifier [ number_literal ])) * number_literal)) ))))) ;) (expression_statement "*(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;" (assignment_expression "*(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4" (pointer_expression "*(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" * (cast_expression "(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x3c8 + (long)piVar1[1] * 8)" ( (binary_expression "param_1 + 0x3c8 + (long)piVar1[1] * 8" (binary_expression "param_1 + 0x3c8" identifier + number_literal) + (binary_expression "(long)piVar1[1] * 8" (cast_expression "(long)piVar1[1]" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (subscript_expression "piVar1[1]" identifier [ number_literal ])) * number_literal)) )))) = identifier) ;) })) }) (else_clause "else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }" else (compound_statement "{\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }" { (expression_statement "*(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;" (assignment_expression "*(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1" (pointer_expression "*(int **)(*(long *)(param_1 + 0xbd0) + 0x18)" * (cast_expression "(int **)(*(long *)(param_1 + 0xbd0) + 0x18)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(long *)(param_1 + 0xbd0) + 0x18)" ( (binary_expression "*(long *)(param_1 + 0xbd0) + 0x18" (pointer_expression "*(long *)(param_1 + 0xbd0)" * (cast_expression "(long *)(param_1 + 0xbd0)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xbd0)" ( (binary_expression "param_1 + 0xbd0" identifier + number_literal) )))) + number_literal) )))) = identifier) ;) }))) (expression_statement "*(int **)(param_1 + 0xbd0) = piVar1;" (assignment_expression "*(int **)(param_1 + 0xbd0) = piVar1" (pointer_expression "*(int **)(param_1 + 0xbd0)" * (cast_expression "(int **)(param_1 + 0xbd0)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0xbd0)" ( (binary_expression "param_1 + 0xbd0" identifier + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (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) )))) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * IDENT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (pointer_expression * IDENT)) * LIT)) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (pointer_expression * IDENT)) * LIT)) )))) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (subscript_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) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (subscript_expression IDENT [ LIT ])) * LIT)) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (subscript_expression IDENT [ LIT ])) * LIT)) )))) = IDENT) ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )))) = IDENT) ;) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return ;) })))
(function_definition "void FUN_00131164(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)\n\n{\n  int *piVar1;\n  \n  piVar1 = (int *)FUN_00126895(1,0x20);\n  *piVar1 = param_2;\n  piVar1[1] = param_3;\n  *(undefined8 *)(piVar1 + 2) = param_4;\n  *(undefined8 *)(piVar1 + 4) = param_5;\n  piVar1[6] = 0;\n  piVar1[7] = 0;\n  if (*(long *)(param_1 + 0xbd0) == 0) {\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }\n  else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }\n  *(int **)(param_1 + 0xbd0) = piVar1;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00131164(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)" (identifier "FUN_00131164") (parameter_list "(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "undefined8 param_4" (type_identifier "undefined8") (identifier "param_4")) (, ",") (parameter_declaration "undefined8 param_5" (type_identifier "undefined8") (identifier "param_5")) () ")"))) (compound_statement "{\n  int *piVar1;\n  \n  piVar1 = (int *)FUN_00126895(1,0x20);\n  *piVar1 = param_2;\n  piVar1[1] = param_3;\n  *(undefined8 *)(piVar1 + 2) = param_4;\n  *(undefined8 *)(piVar1 + 4) = param_5;\n  piVar1[6] = 0;\n  piVar1[7] = 0;\n  if (*(long *)(param_1 + 0xbd0) == 0) {\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }\n  else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }\n  *(int **)(param_1 + 0xbd0) = piVar1;\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (expression_statement "piVar1 = (int *)FUN_00126895(1,0x20);" (assignment_expression "piVar1 = (int *)FUN_00126895(1,0x20)" (identifier "piVar1") (= "=") (cast_expression "(int *)FUN_00126895(1,0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00126895(1,0x20)" (identifier "FUN_00126895") (argument_list "(1,0x20)" (( "(") (number_literal "1") (, ",") (number_literal "0x20") () ")"))))) (; ";")) (expression_statement "*piVar1 = param_2;" (assignment_expression "*piVar1 = param_2" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "piVar1[1] = param_3;" (assignment_expression "piVar1[1] = param_3" (subscript_expression "piVar1[1]" (identifier "piVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "*(undefined8 *)(piVar1 + 2) = param_4;" (assignment_expression "*(undefined8 *)(piVar1 + 2) = param_4" (pointer_expression "*(undefined8 *)(piVar1 + 2)" (* "*") (cast_expression "(undefined8 *)(piVar1 + 2)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar1 + 2)" (( "(") (binary_expression "piVar1 + 2" (identifier "piVar1") (+ "+") (number_literal "2")) () ")")))) (= "=") (identifier "param_4")) (; ";")) (expression_statement "*(undefined8 *)(piVar1 + 4) = param_5;" (assignment_expression "*(undefined8 *)(piVar1 + 4) = param_5" (pointer_expression "*(undefined8 *)(piVar1 + 4)" (* "*") (cast_expression "(undefined8 *)(piVar1 + 4)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(piVar1 + 4)" (( "(") (binary_expression "piVar1 + 4" (identifier "piVar1") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "param_5")) (; ";")) (expression_statement "piVar1[6] = 0;" (assignment_expression "piVar1[6] = 0" (subscript_expression "piVar1[6]" (identifier "piVar1") ([ "[") (number_literal "6") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar1[7] = 0;" (assignment_expression "piVar1[7] = 0" (subscript_expression "piVar1[7]" (identifier "piVar1") ([ "[") (number_literal "7") (] "]")) (= "=") (number_literal "0")) (; ";")) (if_statement "if (*(long *)(param_1 + 0xbd0) == 0) {\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }\n  else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }" (if "if") (parenthesized_expression "(*(long *)(param_1 + 0xbd0) == 0)" (( "(") (binary_expression "*(long *)(param_1 + 0xbd0) == 0" (pointer_expression "*(long *)(param_1 + 0xbd0)" (* "*") (cast_expression "(long *)(param_1 + 0xbd0)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xbd0)" (( "(") (binary_expression "param_1 + 0xbd0" (identifier "param_1") (+ "+") (number_literal "0xbd0")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *(int **)(param_1 + 0xbc8) = piVar1;\n    if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }\n    if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }\n  }" ({ "{") (expression_statement "*(int **)(param_1 + 0xbc8) = piVar1;" (assignment_expression "*(int **)(param_1 + 0xbc8) = piVar1" (pointer_expression "*(int **)(param_1 + 0xbc8)" (* "*") (cast_expression "(int **)(param_1 + 0xbc8)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xbc8)" (( "(") (binary_expression "param_1 + 0xbc8" (identifier "param_1") (+ "+") (number_literal "0xbc8")) () ")")))) (= "=") (identifier "piVar1")) (; ";")) (if_statement "if (0 < *piVar1) {\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }" (if "if") (parenthesized_expression "(0 < *piVar1)" (( "(") (binary_expression "0 < *piVar1" (number_literal "0") (< "<") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) () ")")) (compound_statement "{\n      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);\n      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;\n    }" ({ "{") (expression_statement "*(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);" (assignment_expression "*(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8)" (pointer_expression "*(undefined8 *)(param_1 + 0xbd8)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0xbd8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xbd8)" (( "(") (binary_expression "param_1 + 0xbd8" (identifier "param_1") (+ "+") (number_literal "0xbd8")) () ")")))) (= "=") (pointer_expression "*(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c8 + (long)*piVar1 * 8)" (( "(") (binary_expression "param_1 + 0x3c8 + (long)*piVar1 * 8" (binary_expression "param_1 + 0x3c8" (identifier "param_1") (+ "+") (number_literal "0x3c8")) (+ "+") (binary_expression "(long)*piVar1 * 8" (cast_expression "(long)*piVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (* "*") (number_literal "8"))) () ")"))))) (; ";")) (expression_statement "*(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;" (assignment_expression "*(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4" (pointer_expression "*(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8)" (* "*") (cast_expression "(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x3c8 + (long)*piVar1 * 8)" (( "(") (binary_expression "param_1 + 0x3c8 + (long)*piVar1 * 8" (binary_expression "param_1 + 0x3c8" (identifier "param_1") (+ "+") (number_literal "0x3c8")) (+ "+") (binary_expression "(long)*piVar1 * 8" (cast_expression "(long)*piVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) (* "*") (number_literal "8"))) () ")")))) (= "=") (identifier "FUN_00130fa4")) (; ";")) (} "}"))) (if_statement "if (0 < piVar1[1]) {\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }" (if "if") (parenthesized_expression "(0 < piVar1[1])" (( "(") (binary_expression "0 < piVar1[1]" (number_literal "0") (< "<") (subscript_expression "piVar1[1]" (identifier "piVar1") ([ "[") (number_literal "1") (] "]"))) () ")")) (compound_statement "{\n      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);\n      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;\n    }" ({ "{") (expression_statement "*(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);" (assignment_expression "*(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" (pointer_expression "*(undefined8 *)(param_1 + 0xbe0)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0xbe0)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xbe0)" (( "(") (binary_expression "param_1 + 0xbe0" (identifier "param_1") (+ "+") (number_literal "0xbe0")) () ")")))) (= "=") (pointer_expression "*(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c8 + (long)piVar1[1] * 8)" (( "(") (binary_expression "param_1 + 0x3c8 + (long)piVar1[1] * 8" (binary_expression "param_1 + 0x3c8" (identifier "param_1") (+ "+") (number_literal "0x3c8")) (+ "+") (binary_expression "(long)piVar1[1] * 8" (cast_expression "(long)piVar1[1]" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (subscript_expression "piVar1[1]" (identifier "piVar1") ([ "[") (number_literal "1") (] "]"))) (* "*") (number_literal "8"))) () ")"))))) (; ";")) (expression_statement "*(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;" (assignment_expression "*(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4" (pointer_expression "*(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" (* "*") (cast_expression "(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x3c8 + (long)piVar1[1] * 8)" (( "(") (binary_expression "param_1 + 0x3c8 + (long)piVar1[1] * 8" (binary_expression "param_1 + 0x3c8" (identifier "param_1") (+ "+") (number_literal "0x3c8")) (+ "+") (binary_expression "(long)piVar1[1] * 8" (cast_expression "(long)piVar1[1]" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (subscript_expression "piVar1[1]" (identifier "piVar1") ([ "[") (number_literal "1") (] "]"))) (* "*") (number_literal "8"))) () ")")))) (= "=") (identifier "FUN_00130fa4")) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }" (else "else") (compound_statement "{\n    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;\n  }" ({ "{") (expression_statement "*(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;" (assignment_expression "*(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1" (pointer_expression "*(int **)(*(long *)(param_1 + 0xbd0) + 0x18)" (* "*") (cast_expression "(int **)(*(long *)(param_1 + 0xbd0) + 0x18)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(long *)(param_1 + 0xbd0) + 0x18)" (( "(") (binary_expression "*(long *)(param_1 + 0xbd0) + 0x18" (pointer_expression "*(long *)(param_1 + 0xbd0)" (* "*") (cast_expression "(long *)(param_1 + 0xbd0)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xbd0)" (( "(") (binary_expression "param_1 + 0xbd0" (identifier "param_1") (+ "+") (number_literal "0xbd0")) () ")")))) (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "piVar1")) (; ";")) (} "}")))) (expression_statement "*(int **)(param_1 + 0xbd0) = piVar1;" (assignment_expression "*(int **)(param_1 + 0xbd0) = piVar1" (pointer_expression "*(int **)(param_1 + 0xbd0)" (* "*") (cast_expression "(int **)(param_1 + 0xbd0)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0xbd0)" (( "(") (binary_expression "param_1 + 0xbd0" (identifier "param_1") (+ "+") (number_literal "0xbd0")) () ")")))) (= "=") (identifier "piVar1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Enum "anon_enum_32": Some values do not have unique names */

void function_1(type_1 ssh,int msg1,int msg2,type_2 handler,void *ctx)

{
  type_3 *pqVar1;
  
  pqVar1 = (type_3 *)var_1(1,0x20);
  pqVar1->msg1 = msg1;
  pqVar1->msg2 = msg2;
  pqVar1->handler = handler;
  pqVar1->ctx = ctx;
  pqVar1->next = (type_3 *)0x0;
  if (ssh->qtail == (type_3 *)0x0) {
    ssh->qhead = pqVar1;
    if (0 < pqVar1->msg1) {
      ssh->q_saved_handler1 = ssh->packet_dispatch[pqVar1->msg1];
      ssh->packet_dispatch[pqVar1->msg1] = ssh_queueing_handler;
    }
    if (0 < pqVar1->msg2) {
      ssh->q_saved_handler2 = ssh->packet_dispatch[pqVar1->msg2];
      ssh->packet_dispatch[pqVar1->msg2] = ssh_queueing_handler;
    }
  }
  else {
    ssh->qtail->next = pqVar1;
  }
  ssh->qtail = pqVar1;
  return;
}


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

void MASKED(long param_1,int param_2,int param_3,undefined8 param_4,undefined8 param_5)

{
  int *piVar1;
  
  piVar1 = (int *)FUN_00126895(1,0x20);
  *piVar1 = param_2;
  piVar1[1] = param_3;
  *(undefined8 *)(piVar1 + 2) = param_4;
  *(undefined8 *)(piVar1 + 4) = param_5;
  piVar1[6] = 0;
  piVar1[7] = 0;
  if (*(long *)(param_1 + 0xbd0) == 0) {
    *(int **)(param_1 + 0xbc8) = piVar1;
    if (0 < *piVar1) {
      *(undefined8 *)(param_1 + 0xbd8) = *(undefined8 *)(param_1 + 0x3c8 + (long)*piVar1 * 8);
      *(code **)(param_1 + 0x3c8 + (long)*piVar1 * 8) = FUN_00130fa4;
    }
    if (0 < piVar1[1]) {
      *(undefined8 *)(param_1 + 0xbe0) = *(undefined8 *)(param_1 + 0x3c8 + (long)piVar1[1] * 8);
      *(code **)(param_1 + 0x3c8 + (long)piVar1[1] * 8) = FUN_00130fa4;
    }
  }
  else {
    *(int **)(*(long *)(param_1 + 0xbd0) + 0x18) = piVar1;
  }
  *(int **)(param_1 + 0xbd0) = piVar1;
  return;
}

