
void frame_downheap(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  int iVar4;
  int iVar5;
  undefined4 *puVar6;
  
  iVar4 = param_4 * 2;
  while( true ) {
    iVar5 = iVar4 + 1;
    if (param_5 <= iVar5) {
      return;
    }
    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);
    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);
    uVar2 = *puVar3;
    if (iVar4 + 2 < param_5) {
      iVar1 = (*param_2)(param_1,uVar2,*puVar6);
      if (iVar1 < 0) {
        uVar2 = *puVar6;
        puVar3 = puVar6;
        iVar5 = iVar4 + 2;
      }
      else {
        uVar2 = *puVar3;
      }
    }
    puVar6 = (undefined4 *)(param_3 + param_4 * 4);
    iVar4 = iVar5 * 2;
    iVar1 = (*param_2)(param_1,*puVar6,uVar2);
    if (-1 < iVar1) break;
    uVar2 = *puVar6;
    *puVar6 = *puVar3;
    *puVar3 = uVar2;
    param_4 = iVar5;
  }
  return;
}



void FUN_00371350(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  int iVar4;
  int iVar5;
  undefined4 *puVar6;
  
  iVar4 = param_4 * 2;
  while( true ) {
    iVar5 = iVar4 + 1;
    if (param_5 <= iVar5) {
      return;
    }
    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);
    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);
    uVar2 = *puVar3;
    if (iVar4 + 2 < param_5) {
      iVar1 = (*param_2)(param_1,uVar2,*puVar6);
      if (iVar1 < 0) {
        uVar2 = *puVar6;
        puVar3 = puVar6;
        iVar5 = iVar4 + 2;
      }
      else {
        uVar2 = *puVar3;
      }
    }
    puVar6 = (undefined4 *)(param_3 + param_4 * 4);
    iVar4 = iVar5 * 2;
    iVar1 = (*param_2)(param_1,*puVar6,uVar2);
    if (-1 < iVar1) break;
    uVar2 = *puVar6;
    *puVar6 = *puVar3;
    *puVar3 = uVar2;
    param_4 = iVar5;
  }
  return;
}


addiu sp,sp,-0x40
sw s1,0x1c(sp)
sll s1,a3,0x1
sw s3,0x24(sp)
sw ra,0x3c(sp)
addiu s1,s1,0x1
sw s8,0x38(sp)
sw s7,0x34(sp)
sw s6,0x30(sp)
sw s5,0x2c(sp)
sw s4,0x28(sp)
sw s2,0x20(sp)
sw s0,0x18(sp)
lw s3,0x50(sp)
slt v0,s1,s3
beq v0,zero,0x0037143c
_or s6,a3,zero
or s4,a0,zero
or s5,a1,zero
b 0x00371404
_or s8,a2,zero
or t9,s5,zero
jalr t9
_lw a2,0x0(s7)
bltz v0,0x00371430
_nop
lw a1,0x0(s0)
or s2,s1,zero
sll s6,s6,0x2
or a2,a1,zero
addu s7,s8,s6
or a0,s4,zero
or t9,s5,zero
lw a1,0x0(s7)
jalr t9
_sll s1,s2,0x1
bgez v0,0x0037143c
_addiu s1,s1,0x1
lw v1,0x0(s7)
lw a0,0x0(s0)
or s6,s2,zero
slt v0,s1,s3
sw a0,0x0(s7)
beq v0,zero,0x0037143c
_sw v1,0x0(s0)
sll s0,s1,0x2
addiu s2,s1,0x1
addiu v0,s0,0x4
addu s0,s8,s0
addu s7,s8,v0
slt v0,s2,s3
or a0,s4,zero
bne v0,zero,0x003713a4
_lw a1,0x0(s0)
b 0x003713c0
_or s2,s1,zero
lw a1,0x0(s7)
b 0x003713c0
_or s0,s7,zero
lw ra,0x3c(sp)
lw s8,0x38(sp)
lw s7,0x34(sp)
lw s6,0x30(sp)
lw s5,0x2c(sp)
lw s4,0x28(sp)
lw s3,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x40
(translation_unit "void FUN_00371350(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  \n  iVar4 = param_4 * 2;\n  while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00371350(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  \n  iVar4 = param_4 * 2;\n  while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00371350(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)" identifier (parameter_list "(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  \n  iVar4 = param_4 * 2;\n  while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (expression_statement "iVar4 = param_4 * 2;" (assignment_expression "iVar4 = param_4 * 2" identifier = (binary_expression "param_4 * 2" identifier * number_literal)) ;) (while_statement "while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }" { (expression_statement "iVar5 = iVar4 + 1;" (assignment_expression "iVar5 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (param_5 <= iVar5) {\n      return;\n    }" if (parenthesized_expression "(param_5 <= iVar5)" ( (binary_expression "param_5 <= iVar5" identifier <= identifier) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (expression_statement "puVar3 = (undefined4 *)(param_3 + iVar5 * 4);" (assignment_expression "puVar3 = (undefined4 *)(param_3 + iVar5 * 4)" identifier = (cast_expression "(undefined4 *)(param_3 + iVar5 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + iVar5 * 4)" ( (binary_expression "param_3 + iVar5 * 4" identifier + (binary_expression "iVar5 * 4" identifier * number_literal)) )))) ;) (expression_statement "puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);" (assignment_expression "puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4)" identifier = (cast_expression "(undefined4 *)(param_3 + iVar5 * 4 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + iVar5 * 4 + 4)" ( (binary_expression "param_3 + iVar5 * 4 + 4" (binary_expression "param_3 + iVar5 * 4" identifier + (binary_expression "iVar5 * 4" identifier * number_literal)) + number_literal) )))) ;) (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) (if_statement "if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }" if (parenthesized_expression "(iVar4 + 2 < param_5)" ( (binary_expression "iVar4 + 2 < param_5" (binary_expression "iVar4 + 2" identifier + number_literal) < identifier) )) (compound_statement "{\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }" { (expression_statement "iVar1 = (*param_2)(param_1,uVar2,*puVar6);" (assignment_expression "iVar1 = (*param_2)(param_1,uVar2,*puVar6)" identifier = (call_expression "(*param_2)(param_1,uVar2,*puVar6)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_1,uVar2,*puVar6)" ( identifier , identifier , (pointer_expression "*puVar6" * identifier) )))) ;) (if_statement "if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }" { (expression_statement "uVar2 = *puVar6;" (assignment_expression "uVar2 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (expression_statement "puVar3 = puVar6;" (assignment_expression "puVar3 = puVar6" identifier = identifier) ;) (expression_statement "iVar5 = iVar4 + 2;" (assignment_expression "iVar5 = iVar4 + 2" identifier = (binary_expression "iVar4 + 2" identifier + number_literal)) ;) }) (else_clause "else {\n        uVar2 = *puVar3;\n      }" else (compound_statement "{\n        uVar2 = *puVar3;\n      }" { (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) }))) })) (expression_statement "puVar6 = (undefined4 *)(param_3 + param_4 * 4);" (assignment_expression "puVar6 = (undefined4 *)(param_3 + param_4 * 4)" identifier = (cast_expression "(undefined4 *)(param_3 + param_4 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + param_4 * 4)" ( (binary_expression "param_3 + param_4 * 4" identifier + (binary_expression "param_4 * 4" identifier * number_literal)) )))) ;) (expression_statement "iVar4 = iVar5 * 2;" (assignment_expression "iVar4 = iVar5 * 2" identifier = (binary_expression "iVar5 * 2" identifier * number_literal)) ;) (expression_statement "iVar1 = (*param_2)(param_1,*puVar6,uVar2);" (assignment_expression "iVar1 = (*param_2)(param_1,*puVar6,uVar2)" identifier = (call_expression "(*param_2)(param_1,*puVar6,uVar2)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_1,*puVar6,uVar2)" ( identifier , (pointer_expression "*puVar6" * identifier) , identifier )))) ;) (if_statement "if (-1 < iVar1) break;" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (break_statement "break;" break ;)) (expression_statement "uVar2 = *puVar6;" (assignment_expression "uVar2 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (expression_statement "*puVar6 = *puVar3;" (assignment_expression "*puVar6 = *puVar3" (pointer_expression "*puVar6" * identifier) = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "*puVar3 = uVar2;" (assignment_expression "*puVar3 = uVar2" (pointer_expression "*puVar3" * identifier) = identifier) ;) (expression_statement "param_4 = iVar5;" (assignment_expression "param_4 = iVar5" identifier = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void frame_downheap(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  \n  iVar4 = param_4 * 2;\n  while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }\n  return;\n}\n\n" (function_definition "void frame_downheap(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  \n  iVar4 = param_4 * 2;\n  while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }\n  return;\n}" primitive_type (function_declarator "frame_downheap(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)" identifier (parameter_list "(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  \n  iVar4 = param_4 * 2;\n  while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (expression_statement "iVar4 = param_4 * 2;" (assignment_expression "iVar4 = param_4 * 2" identifier = (binary_expression "param_4 * 2" identifier * number_literal)) ;) (while_statement "while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }" { (expression_statement "iVar5 = iVar4 + 1;" (assignment_expression "iVar5 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (param_5 <= iVar5) {\n      return;\n    }" if (parenthesized_expression "(param_5 <= iVar5)" ( (binary_expression "param_5 <= iVar5" identifier <= identifier) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (expression_statement "puVar3 = (undefined4 *)(param_3 + iVar5 * 4);" (assignment_expression "puVar3 = (undefined4 *)(param_3 + iVar5 * 4)" identifier = (cast_expression "(undefined4 *)(param_3 + iVar5 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + iVar5 * 4)" ( (binary_expression "param_3 + iVar5 * 4" identifier + (binary_expression "iVar5 * 4" identifier * number_literal)) )))) ;) (expression_statement "puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);" (assignment_expression "puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4)" identifier = (cast_expression "(undefined4 *)(param_3 + iVar5 * 4 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + iVar5 * 4 + 4)" ( (binary_expression "param_3 + iVar5 * 4 + 4" (binary_expression "param_3 + iVar5 * 4" identifier + (binary_expression "iVar5 * 4" identifier * number_literal)) + number_literal) )))) ;) (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) (if_statement "if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }" if (parenthesized_expression "(iVar4 + 2 < param_5)" ( (binary_expression "iVar4 + 2 < param_5" (binary_expression "iVar4 + 2" identifier + number_literal) < identifier) )) (compound_statement "{\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }" { (expression_statement "iVar1 = (*param_2)(param_1,uVar2,*puVar6);" (assignment_expression "iVar1 = (*param_2)(param_1,uVar2,*puVar6)" identifier = (call_expression "(*param_2)(param_1,uVar2,*puVar6)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_1,uVar2,*puVar6)" ( identifier , identifier , (pointer_expression "*puVar6" * identifier) )))) ;) (if_statement "if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }" { (expression_statement "uVar2 = *puVar6;" (assignment_expression "uVar2 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (expression_statement "puVar3 = puVar6;" (assignment_expression "puVar3 = puVar6" identifier = identifier) ;) (expression_statement "iVar5 = iVar4 + 2;" (assignment_expression "iVar5 = iVar4 + 2" identifier = (binary_expression "iVar4 + 2" identifier + number_literal)) ;) }) (else_clause "else {\n        uVar2 = *puVar3;\n      }" else (compound_statement "{\n        uVar2 = *puVar3;\n      }" { (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) }))) })) (expression_statement "puVar6 = (undefined4 *)(param_3 + param_4 * 4);" (assignment_expression "puVar6 = (undefined4 *)(param_3 + param_4 * 4)" identifier = (cast_expression "(undefined4 *)(param_3 + param_4 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + param_4 * 4)" ( (binary_expression "param_3 + param_4 * 4" identifier + (binary_expression "param_4 * 4" identifier * number_literal)) )))) ;) (expression_statement "iVar4 = iVar5 * 2;" (assignment_expression "iVar4 = iVar5 * 2" identifier = (binary_expression "iVar5 * 2" identifier * number_literal)) ;) (expression_statement "iVar1 = (*param_2)(param_1,*puVar6,uVar2);" (assignment_expression "iVar1 = (*param_2)(param_1,*puVar6,uVar2)" identifier = (call_expression "(*param_2)(param_1,*puVar6,uVar2)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_1,*puVar6,uVar2)" ( identifier , (pointer_expression "*puVar6" * identifier) , identifier )))) ;) (if_statement "if (-1 < iVar1) break;" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (break_statement "break;" break ;)) (expression_statement "uVar2 = *puVar6;" (assignment_expression "uVar2 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (expression_statement "*puVar6 = *puVar3;" (assignment_expression "*puVar6 = *puVar3" (pointer_expression "*puVar6" * identifier) = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "*puVar3 = uVar2;" (assignment_expression "*puVar3 = uVar2" (pointer_expression "*puVar3" * identifier) = identifier) ;) (expression_statement "param_4 = iVar5;" (assignment_expression "param_4 = iVar5" identifier = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00371350(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  \n  iVar4 = param_4 * 2;\n  while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00371350(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  \n  iVar4 = param_4 * 2;\n  while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00371350(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)" identifier (parameter_list "(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "code *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  \n  iVar4 = param_4 * 2;\n  while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "undefined4 *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (expression_statement "iVar4 = param_4 * 2;" (assignment_expression "iVar4 = param_4 * 2" identifier = (binary_expression "param_4 * 2" identifier * number_literal)) ;) (while_statement "while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }" { (expression_statement "iVar5 = iVar4 + 1;" (assignment_expression "iVar5 = iVar4 + 1" identifier = (binary_expression "iVar4 + 1" identifier + number_literal)) ;) (if_statement "if (param_5 <= iVar5) {\n      return;\n    }" if (parenthesized_expression "(param_5 <= iVar5)" ( (binary_expression "param_5 <= iVar5" identifier <= identifier) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) (expression_statement "puVar3 = (undefined4 *)(param_3 + iVar5 * 4);" (assignment_expression "puVar3 = (undefined4 *)(param_3 + iVar5 * 4)" identifier = (cast_expression "(undefined4 *)(param_3 + iVar5 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + iVar5 * 4)" ( (binary_expression "param_3 + iVar5 * 4" identifier + (binary_expression "iVar5 * 4" identifier * number_literal)) )))) ;) (expression_statement "puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);" (assignment_expression "puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4)" identifier = (cast_expression "(undefined4 *)(param_3 + iVar5 * 4 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + iVar5 * 4 + 4)" ( (binary_expression "param_3 + iVar5 * 4 + 4" (binary_expression "param_3 + iVar5 * 4" identifier + (binary_expression "iVar5 * 4" identifier * number_literal)) + number_literal) )))) ;) (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) (if_statement "if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }" if (parenthesized_expression "(iVar4 + 2 < param_5)" ( (binary_expression "iVar4 + 2 < param_5" (binary_expression "iVar4 + 2" identifier + number_literal) < identifier) )) (compound_statement "{\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }" { (expression_statement "iVar1 = (*param_2)(param_1,uVar2,*puVar6);" (assignment_expression "iVar1 = (*param_2)(param_1,uVar2,*puVar6)" identifier = (call_expression "(*param_2)(param_1,uVar2,*puVar6)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_1,uVar2,*puVar6)" ( identifier , identifier , (pointer_expression "*puVar6" * identifier) )))) ;) (if_statement "if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }" if (parenthesized_expression "(iVar1 < 0)" ( (binary_expression "iVar1 < 0" identifier < number_literal) )) (compound_statement "{\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }" { (expression_statement "uVar2 = *puVar6;" (assignment_expression "uVar2 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (expression_statement "puVar3 = puVar6;" (assignment_expression "puVar3 = puVar6" identifier = identifier) ;) (expression_statement "iVar5 = iVar4 + 2;" (assignment_expression "iVar5 = iVar4 + 2" identifier = (binary_expression "iVar4 + 2" identifier + number_literal)) ;) }) (else_clause "else {\n        uVar2 = *puVar3;\n      }" else (compound_statement "{\n        uVar2 = *puVar3;\n      }" { (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" identifier = (pointer_expression "*puVar3" * identifier)) ;) }))) })) (expression_statement "puVar6 = (undefined4 *)(param_3 + param_4 * 4);" (assignment_expression "puVar6 = (undefined4 *)(param_3 + param_4 * 4)" identifier = (cast_expression "(undefined4 *)(param_3 + param_4 * 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_3 + param_4 * 4)" ( (binary_expression "param_3 + param_4 * 4" identifier + (binary_expression "param_4 * 4" identifier * number_literal)) )))) ;) (expression_statement "iVar4 = iVar5 * 2;" (assignment_expression "iVar4 = iVar5 * 2" identifier = (binary_expression "iVar5 * 2" identifier * number_literal)) ;) (expression_statement "iVar1 = (*param_2)(param_1,*puVar6,uVar2);" (assignment_expression "iVar1 = (*param_2)(param_1,*puVar6,uVar2)" identifier = (call_expression "(*param_2)(param_1,*puVar6,uVar2)" (parenthesized_expression "(*param_2)" ( (pointer_expression "*param_2" * identifier) )) (argument_list "(param_1,*puVar6,uVar2)" ( identifier , (pointer_expression "*puVar6" * identifier) , identifier )))) ;) (if_statement "if (-1 < iVar1) break;" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (break_statement "break;" break ;)) (expression_statement "uVar2 = *puVar6;" (assignment_expression "uVar2 = *puVar6" identifier = (pointer_expression "*puVar6" * identifier)) ;) (expression_statement "*puVar6 = *puVar3;" (assignment_expression "*puVar6 = *puVar3" (pointer_expression "*puVar6" * identifier) = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "*puVar3 = uVar2;" (assignment_expression "*puVar3 = uVar2" (pointer_expression "*puVar3" * identifier) = identifier) ;) (expression_statement "param_4 = iVar5;" (assignment_expression "param_4 = iVar5" identifier = identifier) ;) })) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT , IDENT , (pointer_expression * IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) }))) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT , (pointer_expression * IDENT) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (return_statement return ;) })))
(function_definition "void FUN_00371350(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  \n  iVar4 = param_4 * 2;\n  while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00371350(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)" (identifier "FUN_00371350") (parameter_list "(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "code *param_2" (type_identifier "code") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int iVar5;\n  undefined4 *puVar6;\n  \n  iVar4 = param_4 * 2;\n  while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "undefined4 *puVar6;" (type_identifier "undefined4") (pointer_declarator "*puVar6" (* "*") (identifier "puVar6")) (; ";")) (expression_statement "iVar4 = param_4 * 2;" (assignment_expression "iVar4 = param_4 * 2" (identifier "iVar4") (= "=") (binary_expression "param_4 * 2" (identifier "param_4") (* "*") (number_literal "2"))) (; ";")) (while_statement "while( true ) {\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    iVar5 = iVar4 + 1;\n    if (param_5 <= iVar5) {\n      return;\n    }\n    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);\n    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);\n    uVar2 = *puVar3;\n    if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }\n    puVar6 = (undefined4 *)(param_3 + param_4 * 4);\n    iVar4 = iVar5 * 2;\n    iVar1 = (*param_2)(param_1,*puVar6,uVar2);\n    if (-1 < iVar1) break;\n    uVar2 = *puVar6;\n    *puVar6 = *puVar3;\n    *puVar3 = uVar2;\n    param_4 = iVar5;\n  }" ({ "{") (expression_statement "iVar5 = iVar4 + 1;" (assignment_expression "iVar5 = iVar4 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar4 + 1" (identifier "iVar4") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (param_5 <= iVar5) {\n      return;\n    }" (if "if") (parenthesized_expression "(param_5 <= iVar5)" (( "(") (binary_expression "param_5 <= iVar5" (identifier "param_5") (<= "<=") (identifier "iVar5")) () ")")) (compound_statement "{\n      return;\n    }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "puVar3 = (undefined4 *)(param_3 + iVar5 * 4);" (assignment_expression "puVar3 = (undefined4 *)(param_3 + iVar5 * 4)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)(param_3 + iVar5 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + iVar5 * 4)" (( "(") (binary_expression "param_3 + iVar5 * 4" (identifier "param_3") (+ "+") (binary_expression "iVar5 * 4" (identifier "iVar5") (* "*") (number_literal "4"))) () ")")))) (; ";")) (expression_statement "puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);" (assignment_expression "puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4)" (identifier "puVar6") (= "=") (cast_expression "(undefined4 *)(param_3 + iVar5 * 4 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + iVar5 * 4 + 4)" (( "(") (binary_expression "param_3 + iVar5 * 4 + 4" (binary_expression "param_3 + iVar5 * 4" (identifier "param_3") (+ "+") (binary_expression "iVar5 * 4" (identifier "iVar5") (* "*") (number_literal "4"))) (+ "+") (number_literal "4")) () ")")))) (; ";")) (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" (identifier "uVar2") (= "=") (pointer_expression "*puVar3" (* "*") (identifier "puVar3"))) (; ";")) (if_statement "if (iVar4 + 2 < param_5) {\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }" (if "if") (parenthesized_expression "(iVar4 + 2 < param_5)" (( "(") (binary_expression "iVar4 + 2 < param_5" (binary_expression "iVar4 + 2" (identifier "iVar4") (+ "+") (number_literal "2")) (< "<") (identifier "param_5")) () ")")) (compound_statement "{\n      iVar1 = (*param_2)(param_1,uVar2,*puVar6);\n      if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }\n    }" ({ "{") (expression_statement "iVar1 = (*param_2)(param_1,uVar2,*puVar6);" (assignment_expression "iVar1 = (*param_2)(param_1,uVar2,*puVar6)" (identifier "iVar1") (= "=") (call_expression "(*param_2)(param_1,uVar2,*puVar6)" (parenthesized_expression "(*param_2)" (( "(") (pointer_expression "*param_2" (* "*") (identifier "param_2")) () ")")) (argument_list "(param_1,uVar2,*puVar6)" (( "(") (identifier "param_1") (, ",") (identifier "uVar2") (, ",") (pointer_expression "*puVar6" (* "*") (identifier "puVar6")) () ")")))) (; ";")) (if_statement "if (iVar1 < 0) {\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }\n      else {\n        uVar2 = *puVar3;\n      }" (if "if") (parenthesized_expression "(iVar1 < 0)" (( "(") (binary_expression "iVar1 < 0" (identifier "iVar1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n        uVar2 = *puVar6;\n        puVar3 = puVar6;\n        iVar5 = iVar4 + 2;\n      }" ({ "{") (expression_statement "uVar2 = *puVar6;" (assignment_expression "uVar2 = *puVar6" (identifier "uVar2") (= "=") (pointer_expression "*puVar6" (* "*") (identifier "puVar6"))) (; ";")) (expression_statement "puVar3 = puVar6;" (assignment_expression "puVar3 = puVar6" (identifier "puVar3") (= "=") (identifier "puVar6")) (; ";")) (expression_statement "iVar5 = iVar4 + 2;" (assignment_expression "iVar5 = iVar4 + 2" (identifier "iVar5") (= "=") (binary_expression "iVar4 + 2" (identifier "iVar4") (+ "+") (number_literal "2"))) (; ";")) (} "}")) (else_clause "else {\n        uVar2 = *puVar3;\n      }" (else "else") (compound_statement "{\n        uVar2 = *puVar3;\n      }" ({ "{") (expression_statement "uVar2 = *puVar3;" (assignment_expression "uVar2 = *puVar3" (identifier "uVar2") (= "=") (pointer_expression "*puVar3" (* "*") (identifier "puVar3"))) (; ";")) (} "}")))) (} "}"))) (expression_statement "puVar6 = (undefined4 *)(param_3 + param_4 * 4);" (assignment_expression "puVar6 = (undefined4 *)(param_3 + param_4 * 4)" (identifier "puVar6") (= "=") (cast_expression "(undefined4 *)(param_3 + param_4 * 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_3 + param_4 * 4)" (( "(") (binary_expression "param_3 + param_4 * 4" (identifier "param_3") (+ "+") (binary_expression "param_4 * 4" (identifier "param_4") (* "*") (number_literal "4"))) () ")")))) (; ";")) (expression_statement "iVar4 = iVar5 * 2;" (assignment_expression "iVar4 = iVar5 * 2" (identifier "iVar4") (= "=") (binary_expression "iVar5 * 2" (identifier "iVar5") (* "*") (number_literal "2"))) (; ";")) (expression_statement "iVar1 = (*param_2)(param_1,*puVar6,uVar2);" (assignment_expression "iVar1 = (*param_2)(param_1,*puVar6,uVar2)" (identifier "iVar1") (= "=") (call_expression "(*param_2)(param_1,*puVar6,uVar2)" (parenthesized_expression "(*param_2)" (( "(") (pointer_expression "*param_2" (* "*") (identifier "param_2")) () ")")) (argument_list "(param_1,*puVar6,uVar2)" (( "(") (identifier "param_1") (, ",") (pointer_expression "*puVar6" (* "*") (identifier "puVar6")) (, ",") (identifier "uVar2") () ")")))) (; ";")) (if_statement "if (-1 < iVar1) break;" (if "if") (parenthesized_expression "(-1 < iVar1)" (( "(") (binary_expression "-1 < iVar1" (number_literal "-1") (< "<") (identifier "iVar1")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar2 = *puVar6;" (assignment_expression "uVar2 = *puVar6" (identifier "uVar2") (= "=") (pointer_expression "*puVar6" (* "*") (identifier "puVar6"))) (; ";")) (expression_statement "*puVar6 = *puVar3;" (assignment_expression "*puVar6 = *puVar3" (pointer_expression "*puVar6" (* "*") (identifier "puVar6")) (= "=") (pointer_expression "*puVar3" (* "*") (identifier "puVar3"))) (; ";")) (expression_statement "*puVar3 = uVar2;" (assignment_expression "*puVar3 = uVar2" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "param_4 = iVar5;" (assignment_expression "param_4 = iVar5" (identifier "param_4") (= "=") (identifier "iVar5")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement))) (expression_statement (assignment_expression left: (identifier) right: (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))))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (identifier) (identifier) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier))))))))) (expression_statement (assignment_expression left: (identifier) right: (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))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (return_statement))))

void MASKED(undefined4 param_1,code *param_2,int param_3,int param_4,int param_5)

{
  int iVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  int iVar4;
  int iVar5;
  undefined4 *puVar6;
  
  iVar4 = param_4 * 2;
  while( true ) {
    iVar5 = iVar4 + 1;
    if (param_5 <= iVar5) {
      return;
    }
    puVar3 = (undefined4 *)(param_3 + iVar5 * 4);
    puVar6 = (undefined4 *)(param_3 + iVar5 * 4 + 4);
    uVar2 = *puVar3;
    if (iVar4 + 2 < param_5) {
      iVar1 = (*param_2)(param_1,uVar2,*puVar6);
      if (iVar1 < 0) {
        uVar2 = *puVar6;
        puVar3 = puVar6;
        iVar5 = iVar4 + 2;
      }
      else {
        uVar2 = *puVar3;
      }
    }
    puVar6 = (undefined4 *)(param_3 + param_4 * 4);
    iVar4 = iVar5 * 2;
    iVar1 = (*param_2)(param_1,*puVar6,uVar2);
    if (-1 < iVar1) break;
    uVar2 = *puVar6;
    *puVar6 = *puVar3;
    *puVar3 = uVar2;
    param_4 = iVar5;
  }
  return;
}

