
void add_back_pos(POSITION pos)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  undefined4 in_a0;
  undefined4 in_a1;
  undefined4 *puVar3;
  
  puVar3 = *(undefined4 **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74);
  if (1 < *(int *)PTR_sc_height_0004ece8) {
    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;
    do {
      puVar2 = puVar1 + -2;
      puVar1[-1] = puVar1[-3];
      *puVar2 = puVar1[-4];
      puVar1 = puVar2;
    } while (puVar3 + 2 != puVar2);
  }
  puVar3[1] = in_a1;
  *puVar3 = in_a0;
  return;
}



void add_back_pos(undefined4 param_1,undefined4 param_2)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  
  puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);
  if (1 < *(int *)PTR_sc_height_0004ece8) {
    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;
    do {
      puVar2 = puVar1 + -2;
      puVar1[-1] = puVar1[-3];
      *puVar2 = puVar1[-4];
      puVar1 = puVar2;
    } while (puVar3 + 2 != puVar2);
  }
  puVar3[1] = param_2;
  *puVar3 = param_1;
  return;
}


lui gp,0x2
addiu gp,gp,0x77d8
addu gp,gp,t9
lw v0,-0x7ee8(gp)
or t1,a1,zero
lw v1,-0x7fd8(gp)
lw v0,0x0(v0)
lw a1,0x2a74(v1)
slti v1,v0,0x2
bne v1,zero,0x0002f448
_or t0,a0,zero
sll v0,v0,0x3
addiu v1,a1,0x8
addu v0,a1,v0
lw a3,-0xc(v0)
addiu v0,v0,-0x8
lw a2,-0x8(v0)
sw a3,0x4(v0)
bne v1,v0,0x0002f430
_sw a2,0x0(v0)
sw t1,0x4(a1)
jr ra
_sw t0,0x0(a1)
(translation_unit "void add_back_pos(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }\n  puVar3[1] = param_2;\n  *puVar3 = param_1;\n  return;\n}\n\n" (function_definition "void add_back_pos(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }\n  puVar3[1] = param_2;\n  *puVar3 = param_1;\n  return;\n}" primitive_type (function_declarator "add_back_pos(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }\n  puVar3[1] = param_2;\n  *puVar3 = param_1;\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (expression_statement "puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);" (assignment_expression "puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74)" identifier = (pointer_expression "*(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74)" * (cast_expression "(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_0004ebf8 + 0x2a74)" ( (binary_expression "PTR_DAT_0004ebf8 + 0x2a74" identifier + number_literal) ))))) ;) (if_statement "if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }" if (parenthesized_expression "(1 < *(int *)PTR_sc_height_0004ece8)" ( (binary_expression "1 < *(int *)PTR_sc_height_0004ece8" number_literal < (pointer_expression "*(int *)PTR_sc_height_0004ece8" * (cast_expression "(int *)PTR_sc_height_0004ece8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }" { (expression_statement "puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;" (assignment_expression "puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2" identifier = (binary_expression "puVar3 + *(int *)PTR_sc_height_0004ece8 * 2" identifier + (binary_expression "*(int *)PTR_sc_height_0004ece8 * 2" (pointer_expression "*(int *)PTR_sc_height_0004ece8" * (cast_expression "(int *)PTR_sc_height_0004ece8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) * number_literal))) ;) (do_statement "do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);" do (compound_statement "{\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    }" { (expression_statement "puVar2 = puVar1 + -2;" (assignment_expression "puVar2 = puVar1 + -2" identifier = (binary_expression "puVar1 + -2" identifier + number_literal)) ;) (expression_statement "puVar1[-1] = puVar1[-3];" (assignment_expression "puVar1[-1] = puVar1[-3]" (subscript_expression "puVar1[-1]" identifier [ number_literal ]) = (subscript_expression "puVar1[-3]" identifier [ number_literal ])) ;) (expression_statement "*puVar2 = puVar1[-4];" (assignment_expression "*puVar2 = puVar1[-4]" (pointer_expression "*puVar2" * identifier) = (subscript_expression "puVar1[-4]" identifier [ number_literal ])) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(puVar3 + 2 != puVar2)" ( (binary_expression "puVar3 + 2 != puVar2" (binary_expression "puVar3 + 2" identifier + number_literal) != identifier) )) ;) })) (expression_statement "puVar3[1] = param_2;" (assignment_expression "puVar3[1] = param_2" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar3 = param_1;" (assignment_expression "*puVar3 = param_1" (pointer_expression "*puVar3" * identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void add_back_pos(POSITION pos)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 in_a0;\n  undefined4 in_a1;\n  undefined4 *puVar3;\n  \n  puVar3 = *(undefined4 **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74);\n  if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }\n  puVar3[1] = in_a1;\n  *puVar3 = in_a0;\n  return;\n}\n\n" (function_definition "void add_back_pos(POSITION pos)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 in_a0;\n  undefined4 in_a1;\n  undefined4 *puVar3;\n  \n  puVar3 = *(undefined4 **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74);\n  if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }\n  puVar3[1] = in_a1;\n  *puVar3 = in_a0;\n  return;\n}" primitive_type (function_declarator "add_back_pos(POSITION pos)" identifier (parameter_list "(POSITION pos)" ( (parameter_declaration "POSITION pos" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 in_a0;\n  undefined4 in_a1;\n  undefined4 *puVar3;\n  \n  puVar3 = *(undefined4 **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74);\n  if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }\n  puVar3[1] = in_a1;\n  *puVar3 = in_a0;\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 in_a0;" type_identifier identifier ;) (declaration "undefined4 in_a1;" type_identifier identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (expression_statement "puVar3 = *(undefined4 **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74);" (assignment_expression "puVar3 = *(undefined4 **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74)" identifier = (pointer_expression "*(undefined4 **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74)" * (cast_expression "(undefined4 **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74)" ( (binary_expression "PTR_CHAR_ARRAY_0004ebf8 + 0x2a74" identifier + number_literal) ))))) ;) (if_statement "if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }" if (parenthesized_expression "(1 < *(int *)PTR_sc_height_0004ece8)" ( (binary_expression "1 < *(int *)PTR_sc_height_0004ece8" number_literal < (pointer_expression "*(int *)PTR_sc_height_0004ece8" * (cast_expression "(int *)PTR_sc_height_0004ece8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }" { (expression_statement "puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;" (assignment_expression "puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2" identifier = (binary_expression "puVar3 + *(int *)PTR_sc_height_0004ece8 * 2" identifier + (binary_expression "*(int *)PTR_sc_height_0004ece8 * 2" (pointer_expression "*(int *)PTR_sc_height_0004ece8" * (cast_expression "(int *)PTR_sc_height_0004ece8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) * number_literal))) ;) (do_statement "do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);" do (compound_statement "{\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    }" { (expression_statement "puVar2 = puVar1 + -2;" (assignment_expression "puVar2 = puVar1 + -2" identifier = (binary_expression "puVar1 + -2" identifier + number_literal)) ;) (expression_statement "puVar1[-1] = puVar1[-3];" (assignment_expression "puVar1[-1] = puVar1[-3]" (subscript_expression "puVar1[-1]" identifier [ number_literal ]) = (subscript_expression "puVar1[-3]" identifier [ number_literal ])) ;) (expression_statement "*puVar2 = puVar1[-4];" (assignment_expression "*puVar2 = puVar1[-4]" (pointer_expression "*puVar2" * identifier) = (subscript_expression "puVar1[-4]" identifier [ number_literal ])) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(puVar3 + 2 != puVar2)" ( (binary_expression "puVar3 + 2 != puVar2" (binary_expression "puVar3 + 2" identifier + number_literal) != identifier) )) ;) })) (expression_statement "puVar3[1] = in_a1;" (assignment_expression "puVar3[1] = in_a1" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar3 = in_a0;" (assignment_expression "*puVar3 = in_a0" (pointer_expression "*puVar3" * identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void add_back_pos(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }\n  puVar3[1] = param_2;\n  *puVar3 = param_1;\n  return;\n}\n\n" (function_definition "void add_back_pos(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }\n  puVar3[1] = param_2;\n  *puVar3 = param_1;\n  return;\n}" primitive_type (function_declarator "add_back_pos(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }\n  puVar3[1] = param_2;\n  *puVar3 = param_1;\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (expression_statement "puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);" (assignment_expression "puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74)" identifier = (pointer_expression "*(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74)" * (cast_expression "(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_0004ebf8 + 0x2a74)" ( (binary_expression "PTR_DAT_0004ebf8 + 0x2a74" identifier + number_literal) ))))) ;) (if_statement "if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }" if (parenthesized_expression "(1 < *(int *)PTR_sc_height_0004ece8)" ( (binary_expression "1 < *(int *)PTR_sc_height_0004ece8" number_literal < (pointer_expression "*(int *)PTR_sc_height_0004ece8" * (cast_expression "(int *)PTR_sc_height_0004ece8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }" { (expression_statement "puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;" (assignment_expression "puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2" identifier = (binary_expression "puVar3 + *(int *)PTR_sc_height_0004ece8 * 2" identifier + (binary_expression "*(int *)PTR_sc_height_0004ece8 * 2" (pointer_expression "*(int *)PTR_sc_height_0004ece8" * (cast_expression "(int *)PTR_sc_height_0004ece8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) * number_literal))) ;) (do_statement "do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);" do (compound_statement "{\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    }" { (expression_statement "puVar2 = puVar1 + -2;" (assignment_expression "puVar2 = puVar1 + -2" identifier = (binary_expression "puVar1 + -2" identifier + number_literal)) ;) (expression_statement "puVar1[-1] = puVar1[-3];" (assignment_expression "puVar1[-1] = puVar1[-3]" (subscript_expression "puVar1[-1]" identifier [ number_literal ]) = (subscript_expression "puVar1[-3]" identifier [ number_literal ])) ;) (expression_statement "*puVar2 = puVar1[-4];" (assignment_expression "*puVar2 = puVar1[-4]" (pointer_expression "*puVar2" * identifier) = (subscript_expression "puVar1[-4]" identifier [ number_literal ])) ;) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(puVar3 + 2 != puVar2)" ( (binary_expression "puVar3 + 2 != puVar2" (binary_expression "puVar3 + 2" identifier + number_literal) != identifier) )) ;) })) (expression_statement "puVar3[1] = param_2;" (assignment_expression "puVar3[1] = param_2" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*puVar3 = param_1;" (assignment_expression "*puVar3 = param_1" (pointer_expression "*puVar3" * identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) * LIT))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) != IDENT) )) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return ;) })))
(function_definition "void add_back_pos(undefined4 param_1,undefined4 param_2)\n\n{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }\n  puVar3[1] = param_2;\n  *puVar3 = param_1;\n  return;\n}" (primitive_type "void") (function_declarator "add_back_pos(undefined4 param_1,undefined4 param_2)" (identifier "add_back_pos") (parameter_list "(undefined4 param_1,undefined4 param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  undefined4 *puVar2;\n  undefined4 *puVar3;\n  \n  puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }\n  puVar3[1] = param_2;\n  *puVar3 = param_1;\n  return;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (expression_statement "puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);" (assignment_expression "puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74)" (identifier "puVar3") (= "=") (pointer_expression "*(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74)" (* "*") (cast_expression "(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(PTR_DAT_0004ebf8 + 0x2a74)" (( "(") (binary_expression "PTR_DAT_0004ebf8 + 0x2a74" (identifier "PTR_DAT_0004ebf8") (+ "+") (number_literal "0x2a74")) () ")"))))) (; ";")) (if_statement "if (1 < *(int *)PTR_sc_height_0004ece8) {\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }" (if "if") (parenthesized_expression "(1 < *(int *)PTR_sc_height_0004ece8)" (( "(") (binary_expression "1 < *(int *)PTR_sc_height_0004ece8" (number_literal "1") (< "<") (pointer_expression "*(int *)PTR_sc_height_0004ece8" (* "*") (cast_expression "(int *)PTR_sc_height_0004ece8" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sc_height_0004ece8")))) () ")")) (compound_statement "{\n    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;\n    do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);\n  }" ({ "{") (expression_statement "puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;" (assignment_expression "puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2" (identifier "puVar1") (= "=") (binary_expression "puVar3 + *(int *)PTR_sc_height_0004ece8 * 2" (identifier "puVar3") (+ "+") (binary_expression "*(int *)PTR_sc_height_0004ece8 * 2" (pointer_expression "*(int *)PTR_sc_height_0004ece8" (* "*") (cast_expression "(int *)PTR_sc_height_0004ece8" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_sc_height_0004ece8"))) (* "*") (number_literal "2")))) (; ";")) (do_statement "do {\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    } while (puVar3 + 2 != puVar2);" (do "do") (compound_statement "{\n      puVar2 = puVar1 + -2;\n      puVar1[-1] = puVar1[-3];\n      *puVar2 = puVar1[-4];\n      puVar1 = puVar2;\n    }" ({ "{") (expression_statement "puVar2 = puVar1 + -2;" (assignment_expression "puVar2 = puVar1 + -2" (identifier "puVar2") (= "=") (binary_expression "puVar1 + -2" (identifier "puVar1") (+ "+") (number_literal "-2"))) (; ";")) (expression_statement "puVar1[-1] = puVar1[-3];" (assignment_expression "puVar1[-1] = puVar1[-3]" (subscript_expression "puVar1[-1]" (identifier "puVar1") ([ "[") (number_literal "-1") (] "]")) (= "=") (subscript_expression "puVar1[-3]" (identifier "puVar1") ([ "[") (number_literal "-3") (] "]"))) (; ";")) (expression_statement "*puVar2 = puVar1[-4];" (assignment_expression "*puVar2 = puVar1[-4]" (pointer_expression "*puVar2" (* "*") (identifier "puVar2")) (= "=") (subscript_expression "puVar1[-4]" (identifier "puVar1") ([ "[") (number_literal "-4") (] "]"))) (; ";")) (expression_statement "puVar1 = puVar2;" (assignment_expression "puVar1 = puVar2" (identifier "puVar1") (= "=") (identifier "puVar2")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar3 + 2 != puVar2)" (( "(") (binary_expression "puVar3 + 2 != puVar2" (binary_expression "puVar3 + 2" (identifier "puVar3") (+ "+") (number_literal "2")) (!= "!=") (identifier "puVar2")) () ")")) (; ";")) (} "}"))) (expression_statement "puVar3[1] = param_2;" (assignment_expression "puVar3[1] = param_2" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*puVar3 = param_1;" (assignment_expression "*puVar3 = param_1" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (identifier "param_1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 pos)

{
  type_2 *var_3;
  type_2 *var_4;
  type_2 in_a0;
  type_2 in_a1;
  type_2 *var_2;
  
  var_2 = *(type_2 **)(var_1 + 0x2a74);
  if (1 < *(int *)PTR_sc_height_0004ece8) {
    var_3 = var_2 + *(int *)PTR_sc_height_0004ece8 * 2;
    do {
      var_4 = var_3 + -2;
      var_3[-1] = var_3[-3];
      *var_4 = var_3[-4];
      var_3 = var_4;
    } while (var_2 + 2 != var_4);
  }
  var_2[1] = in_a1;
  *var_2 = in_a0;
  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: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (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: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal))))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (identifier)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (return_statement))))

void MASKED(undefined4 param_1,undefined4 param_2)

{
  undefined4 *puVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  
  puVar3 = *(undefined4 **)(PTR_DAT_0004ebf8 + 0x2a74);
  if (1 < *(int *)PTR_sc_height_0004ece8) {
    puVar1 = puVar3 + *(int *)PTR_sc_height_0004ece8 * 2;
    do {
      puVar2 = puVar1 + -2;
      puVar1[-1] = puVar1[-3];
      *puVar2 = puVar1[-4];
      puVar1 = puVar2;
    } while (puVar3 + 2 != puVar2);
  }
  puVar3[1] = param_2;
  *puVar3 = param_1;
  return;
}

