
int onscreen(POSITION pos)

{
  int iVar1;
  int *piVar2;
  int in_a0;
  uint in_a1;
  int iVar3;
  int iVar4;
  int iVar5;
  
  piVar2 = *(int **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74);
  if ((*piVar2 <= in_a0) && ((*piVar2 != in_a0 || ((uint)piVar2[1] <= in_a1)))) {
    iVar5 = *(int *)PTR_sc_height_0004ece8;
    if (iVar5 < 2) {
      return -1;
    }
    if ((in_a0 < piVar2[2]) || ((piVar2[2] == in_a0 && (in_a1 < (uint)piVar2[3])))) {
      return 0;
    }
    piVar2 = piVar2 + 6;
    iVar1 = 1;
    iVar3 = 2;
    if (iVar5 != 2) {
      do {
        if ((in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))) {
          return iVar1;
        }
        iVar4 = iVar3 + 1;
        piVar2 = piVar2 + 2;
        iVar1 = iVar3;
        iVar3 = iVar4;
      } while (iVar4 != iVar5);
    }
  }
  return -1;
}



int onscreen(int param_1,uint param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);
  if ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {
    iVar5 = *(int *)PTR_sc_height_0004ece8;
    if (iVar5 < 2) {
      return -1;
    }
    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {
      return 0;
    }
    piVar2 = piVar2 + 6;
    iVar1 = 1;
    iVar3 = 2;
    if (iVar5 != 2) {
      do {
        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {
          return iVar1;
        }
        iVar4 = iVar3 + 1;
        piVar2 = piVar2 + 2;
        iVar1 = iVar3;
        iVar3 = iVar4;
      } while (iVar4 != iVar5);
    }
  }
  return -1;
}


lui gp,0x2
addiu gp,gp,0x7588
addu gp,gp,t9
lw v0,-0x7fd8(gp)
lw v1,0x2a74(v0)
lw v0,0x0(v1)
slt a2,a0,v0
bne a2,zero,0x0002f6dc
_nop
beq v0,a0,0x0002f71c
_nop
lw v0,-0x7ee8(gp)
lw t1,0x0(v0)
slti v0,t1,0x2
bne v0,zero,0x0002f6e4
_li v0,-0x1
lw v0,0x8(v1)
slt a2,a0,v0
bne a2,zero,0x0002f714
_nop
beq v0,a0,0x0002f704
_nop
li v0,0x1
addiu v1,v1,0x10
addiu a2,v0,0x1
beq a2,t1,0x0002f6dc
_addiu v1,v1,0x8
lw a3,-0x8(v1)
slt t0,a0,a3
bne t0,zero,0x0002f6fc
_nop
beq a3,a0,0x0002f6ec
_nop
or v0,a2,zero
addiu a2,v0,0x1
bne a2,t1,0x0002f6b4
_addiu v1,v1,0x8
jr ra
_li v0,-0x1
jr ra
_nop
lw a3,-0x4(v1)
sltu a3,a1,a3
beq a3,zero,0x0002f6cc
_nop
jr ra
_nop
lw v0,0xc(v1)
sltu v0,a1,v0
beq v0,zero,0x0002f6a0
_nop
jr ra
_or v0,zero,zero
lw v0,0x4(v1)
sltu v0,a1,v0
beq v0,zero,0x0002f674
_nop
b 0x0002f6dc
_nop
(translation_unit "int onscreen(int param_1,uint param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }\n  return -1;\n}\n\n" (function_definition "int onscreen(int param_1,uint param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }\n  return -1;\n}" primitive_type (function_declarator "onscreen(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);" (assignment_expression "piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74)" identifier = (pointer_expression "*(int **)(PTR_DAT_0004ebf8 + 0x2a74)" * (cast_expression "(int **)(PTR_DAT_0004ebf8 + 0x2a74)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_0004ebf8 + 0x2a74)" ( (binary_expression "PTR_DAT_0004ebf8 + 0x2a74" identifier + number_literal) ))))) ;) (if_statement "if ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }" if (parenthesized_expression "((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2))))" ( (binary_expression "(*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))" (parenthesized_expression "(*piVar2 <= param_1)" ( (binary_expression "*piVar2 <= param_1" (pointer_expression "*piVar2" * identifier) <= identifier) )) && (parenthesized_expression "((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))" ( (parenthesized_expression "(*piVar2 != param_1 || ((uint)piVar2[1] <= param_2))" ( (binary_expression "*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)" (binary_expression "*piVar2 != param_1" (pointer_expression "*piVar2" * identifier) != identifier) || (parenthesized_expression "((uint)piVar2[1] <= param_2)" ( (binary_expression "(uint)piVar2[1] <= param_2" (cast_expression "(uint)piVar2[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "piVar2[1]" identifier [ number_literal ])) <= identifier) ))) )) ))) )) (compound_statement "{\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }" { (expression_statement "iVar5 = *(int *)PTR_sc_height_0004ece8;" (assignment_expression "iVar5 = *(int *)PTR_sc_height_0004ece8" identifier = (pointer_expression "*(int *)PTR_sc_height_0004ece8" * (cast_expression "(int *)PTR_sc_height_0004ece8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (iVar5 < 2) {\n      return -1;\n    }" if (parenthesized_expression "(iVar5 < 2)" ( (binary_expression "iVar5 < 2" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (if_statement "if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }" if (parenthesized_expression "((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3]))))" ( (binary_expression "(param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))" (parenthesized_expression "(param_1 < piVar2[2])" ( (binary_expression "param_1 < piVar2[2]" identifier < (subscript_expression "piVar2[2]" identifier [ number_literal ])) )) || (parenthesized_expression "((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))" ( (parenthesized_expression "(piVar2[2] == param_1 && (param_2 < (uint)piVar2[3]))" ( (binary_expression "piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])" (binary_expression "piVar2[2] == param_1" (subscript_expression "piVar2[2]" identifier [ number_literal ]) == identifier) && (parenthesized_expression "(param_2 < (uint)piVar2[3])" ( (binary_expression "param_2 < (uint)piVar2[3]" identifier < (cast_expression "(uint)piVar2[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "piVar2[3]" identifier [ number_literal ]))) ))) )) ))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "piVar2 = piVar2 + 6;" (assignment_expression "piVar2 = piVar2 + 6" identifier = (binary_expression "piVar2 + 6" identifier + number_literal)) ;) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (expression_statement "iVar3 = 2;" (assignment_expression "iVar3 = 2" identifier = number_literal) ;) (if_statement "if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }" if (parenthesized_expression "(iVar5 != 2)" ( (binary_expression "iVar5 != 2" identifier != number_literal) )) (compound_statement "{\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }" { (do_statement "do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);" do (compound_statement "{\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      }" { (if_statement "if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }" if (parenthesized_expression "((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1]))))" ( (binary_expression "(param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))" (parenthesized_expression "(param_1 < piVar2[-2])" ( (binary_expression "param_1 < piVar2[-2]" identifier < (subscript_expression "piVar2[-2]" identifier [ number_literal ])) )) || (parenthesized_expression "((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))" ( (parenthesized_expression "(piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1]))" ( (binary_expression "piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])" (binary_expression "piVar2[-2] == param_1" (subscript_expression "piVar2[-2]" identifier [ number_literal ]) == identifier) && (parenthesized_expression "(param_2 < (uint)piVar2[-1])" ( (binary_expression "param_2 < (uint)piVar2[-1]" identifier < (cast_expression "(uint)piVar2[-1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "piVar2[-1]" identifier [ number_literal ]))) ))) )) ))) )) (compound_statement "{\n          return iVar1;\n        }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "piVar2 = piVar2 + 2;" (assignment_expression "piVar2 = piVar2 + 2" identifier = (binary_expression "piVar2 + 2" identifier + number_literal)) ;) (expression_statement "iVar1 = iVar3;" (assignment_expression "iVar1 = iVar3" identifier = identifier) ;) (expression_statement "iVar3 = iVar4;" (assignment_expression "iVar3 = iVar4" identifier = identifier) ;) }) while (parenthesized_expression "(iVar4 != iVar5)" ( (binary_expression "iVar4 != iVar5" identifier != identifier) )) ;) })) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "int onscreen(POSITION pos)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_a0;\n  uint in_a1;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  piVar2 = *(int **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74);\n  if ((*piVar2 <= in_a0) && ((*piVar2 != in_a0 || ((uint)piVar2[1] <= in_a1)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((in_a0 < piVar2[2]) || ((piVar2[2] == in_a0 && (in_a1 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }\n  return -1;\n}\n\n" (function_definition "int onscreen(POSITION pos)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_a0;\n  uint in_a1;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  piVar2 = *(int **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74);\n  if ((*piVar2 <= in_a0) && ((*piVar2 != in_a0 || ((uint)piVar2[1] <= in_a1)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((in_a0 < piVar2[2]) || ((piVar2[2] == in_a0 && (in_a1 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }\n  return -1;\n}" primitive_type (function_declarator "onscreen(POSITION pos)" identifier (parameter_list "(POSITION pos)" ( (parameter_declaration "POSITION pos" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int in_a0;\n  uint in_a1;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  piVar2 = *(int **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74);\n  if ((*piVar2 <= in_a0) && ((*piVar2 != in_a0 || ((uint)piVar2[1] <= in_a1)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((in_a0 < piVar2[2]) || ((piVar2[2] == in_a0 && (in_a1 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int in_a0;" primitive_type identifier ;) (declaration "uint in_a1;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "piVar2 = *(int **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74);" (assignment_expression "piVar2 = *(int **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74)" identifier = (pointer_expression "*(int **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74)" * (cast_expression "(int **)(PTR_CHAR_ARRAY_0004ebf8 + 0x2a74)" ( (type_descriptor "int **" primitive_type (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 ((*piVar2 <= in_a0) && ((*piVar2 != in_a0 || ((uint)piVar2[1] <= in_a1)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((in_a0 < piVar2[2]) || ((piVar2[2] == in_a0 && (in_a1 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }" if (parenthesized_expression "((*piVar2 <= in_a0) && ((*piVar2 != in_a0 || ((uint)piVar2[1] <= in_a1))))" ( (binary_expression "(*piVar2 <= in_a0) && ((*piVar2 != in_a0 || ((uint)piVar2[1] <= in_a1)))" (parenthesized_expression "(*piVar2 <= in_a0)" ( (binary_expression "*piVar2 <= in_a0" (pointer_expression "*piVar2" * identifier) <= identifier) )) && (parenthesized_expression "((*piVar2 != in_a0 || ((uint)piVar2[1] <= in_a1)))" ( (parenthesized_expression "(*piVar2 != in_a0 || ((uint)piVar2[1] <= in_a1))" ( (binary_expression "*piVar2 != in_a0 || ((uint)piVar2[1] <= in_a1)" (binary_expression "*piVar2 != in_a0" (pointer_expression "*piVar2" * identifier) != identifier) || (parenthesized_expression "((uint)piVar2[1] <= in_a1)" ( (binary_expression "(uint)piVar2[1] <= in_a1" (cast_expression "(uint)piVar2[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "piVar2[1]" identifier [ number_literal ])) <= identifier) ))) )) ))) )) (compound_statement "{\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((in_a0 < piVar2[2]) || ((piVar2[2] == in_a0 && (in_a1 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }" { (expression_statement "iVar5 = *(int *)PTR_sc_height_0004ece8;" (assignment_expression "iVar5 = *(int *)PTR_sc_height_0004ece8" identifier = (pointer_expression "*(int *)PTR_sc_height_0004ece8" * (cast_expression "(int *)PTR_sc_height_0004ece8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (iVar5 < 2) {\n      return -1;\n    }" if (parenthesized_expression "(iVar5 < 2)" ( (binary_expression "iVar5 < 2" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (if_statement "if ((in_a0 < piVar2[2]) || ((piVar2[2] == in_a0 && (in_a1 < (uint)piVar2[3])))) {\n      return 0;\n    }" if (parenthesized_expression "((in_a0 < piVar2[2]) || ((piVar2[2] == in_a0 && (in_a1 < (uint)piVar2[3]))))" ( (binary_expression "(in_a0 < piVar2[2]) || ((piVar2[2] == in_a0 && (in_a1 < (uint)piVar2[3])))" (parenthesized_expression "(in_a0 < piVar2[2])" ( (binary_expression "in_a0 < piVar2[2]" identifier < (subscript_expression "piVar2[2]" identifier [ number_literal ])) )) || (parenthesized_expression "((piVar2[2] == in_a0 && (in_a1 < (uint)piVar2[3])))" ( (parenthesized_expression "(piVar2[2] == in_a0 && (in_a1 < (uint)piVar2[3]))" ( (binary_expression "piVar2[2] == in_a0 && (in_a1 < (uint)piVar2[3])" (binary_expression "piVar2[2] == in_a0" (subscript_expression "piVar2[2]" identifier [ number_literal ]) == identifier) && (parenthesized_expression "(in_a1 < (uint)piVar2[3])" ( (binary_expression "in_a1 < (uint)piVar2[3]" identifier < (cast_expression "(uint)piVar2[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "piVar2[3]" identifier [ number_literal ]))) ))) )) ))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "piVar2 = piVar2 + 6;" (assignment_expression "piVar2 = piVar2 + 6" identifier = (binary_expression "piVar2 + 6" identifier + number_literal)) ;) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (expression_statement "iVar3 = 2;" (assignment_expression "iVar3 = 2" identifier = number_literal) ;) (if_statement "if (iVar5 != 2) {\n      do {\n        if ((in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }" if (parenthesized_expression "(iVar5 != 2)" ( (binary_expression "iVar5 != 2" identifier != number_literal) )) (compound_statement "{\n      do {\n        if ((in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }" { (do_statement "do {\n        if ((in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);" do (compound_statement "{\n        if ((in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      }" { (if_statement "if ((in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }" if (parenthesized_expression "((in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1]))))" ( (binary_expression "(in_a0 < piVar2[-2]) || ((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))" (parenthesized_expression "(in_a0 < piVar2[-2])" ( (binary_expression "in_a0 < piVar2[-2]" identifier < (subscript_expression "piVar2[-2]" identifier [ number_literal ])) )) || (parenthesized_expression "((piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])))" ( (parenthesized_expression "(piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1]))" ( (binary_expression "piVar2[-2] == in_a0 && (in_a1 < (uint)piVar2[-1])" (binary_expression "piVar2[-2] == in_a0" (subscript_expression "piVar2[-2]" identifier [ number_literal ]) == identifier) && (parenthesized_expression "(in_a1 < (uint)piVar2[-1])" ( (binary_expression "in_a1 < (uint)piVar2[-1]" identifier < (cast_expression "(uint)piVar2[-1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "piVar2[-1]" identifier [ number_literal ]))) ))) )) ))) )) (compound_statement "{\n          return iVar1;\n        }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "piVar2 = piVar2 + 2;" (assignment_expression "piVar2 = piVar2 + 2" identifier = (binary_expression "piVar2 + 2" identifier + number_literal)) ;) (expression_statement "iVar1 = iVar3;" (assignment_expression "iVar1 = iVar3" identifier = identifier) ;) (expression_statement "iVar3 = iVar4;" (assignment_expression "iVar3 = iVar4" identifier = identifier) ;) }) while (parenthesized_expression "(iVar4 != iVar5)" ( (binary_expression "iVar4 != iVar5" identifier != identifier) )) ;) })) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "int onscreen(int param_1,uint param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }\n  return -1;\n}\n\n" (function_definition "int onscreen(int param_1,uint param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }\n  return -1;\n}" primitive_type (function_declarator "onscreen(int param_1,uint param_2)" identifier (parameter_list "(int param_1,uint param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "uint param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);" (assignment_expression "piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74)" identifier = (pointer_expression "*(int **)(PTR_DAT_0004ebf8 + 0x2a74)" * (cast_expression "(int **)(PTR_DAT_0004ebf8 + 0x2a74)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_0004ebf8 + 0x2a74)" ( (binary_expression "PTR_DAT_0004ebf8 + 0x2a74" identifier + number_literal) ))))) ;) (if_statement "if ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }" if (parenthesized_expression "((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2))))" ( (binary_expression "(*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))" (parenthesized_expression "(*piVar2 <= param_1)" ( (binary_expression "*piVar2 <= param_1" (pointer_expression "*piVar2" * identifier) <= identifier) )) && (parenthesized_expression "((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))" ( (parenthesized_expression "(*piVar2 != param_1 || ((uint)piVar2[1] <= param_2))" ( (binary_expression "*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)" (binary_expression "*piVar2 != param_1" (pointer_expression "*piVar2" * identifier) != identifier) || (parenthesized_expression "((uint)piVar2[1] <= param_2)" ( (binary_expression "(uint)piVar2[1] <= param_2" (cast_expression "(uint)piVar2[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "piVar2[1]" identifier [ number_literal ])) <= identifier) ))) )) ))) )) (compound_statement "{\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }" { (expression_statement "iVar5 = *(int *)PTR_sc_height_0004ece8;" (assignment_expression "iVar5 = *(int *)PTR_sc_height_0004ece8" identifier = (pointer_expression "*(int *)PTR_sc_height_0004ece8" * (cast_expression "(int *)PTR_sc_height_0004ece8" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (if_statement "if (iVar5 < 2) {\n      return -1;\n    }" if (parenthesized_expression "(iVar5 < 2)" ( (binary_expression "iVar5 < 2" identifier < number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (if_statement "if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }" if (parenthesized_expression "((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3]))))" ( (binary_expression "(param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))" (parenthesized_expression "(param_1 < piVar2[2])" ( (binary_expression "param_1 < piVar2[2]" identifier < (subscript_expression "piVar2[2]" identifier [ number_literal ])) )) || (parenthesized_expression "((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))" ( (parenthesized_expression "(piVar2[2] == param_1 && (param_2 < (uint)piVar2[3]))" ( (binary_expression "piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])" (binary_expression "piVar2[2] == param_1" (subscript_expression "piVar2[2]" identifier [ number_literal ]) == identifier) && (parenthesized_expression "(param_2 < (uint)piVar2[3])" ( (binary_expression "param_2 < (uint)piVar2[3]" identifier < (cast_expression "(uint)piVar2[3]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "piVar2[3]" identifier [ number_literal ]))) ))) )) ))) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "piVar2 = piVar2 + 6;" (assignment_expression "piVar2 = piVar2 + 6" identifier = (binary_expression "piVar2 + 6" identifier + number_literal)) ;) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (expression_statement "iVar3 = 2;" (assignment_expression "iVar3 = 2" identifier = number_literal) ;) (if_statement "if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }" if (parenthesized_expression "(iVar5 != 2)" ( (binary_expression "iVar5 != 2" identifier != number_literal) )) (compound_statement "{\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }" { (do_statement "do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);" do (compound_statement "{\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      }" { (if_statement "if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }" if (parenthesized_expression "((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1]))))" ( (binary_expression "(param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))" (parenthesized_expression "(param_1 < piVar2[-2])" ( (binary_expression "param_1 < piVar2[-2]" identifier < (subscript_expression "piVar2[-2]" identifier [ number_literal ])) )) || (parenthesized_expression "((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))" ( (parenthesized_expression "(piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1]))" ( (binary_expression "piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])" (binary_expression "piVar2[-2] == param_1" (subscript_expression "piVar2[-2]" identifier [ number_literal ]) == identifier) && (parenthesized_expression "(param_2 < (uint)piVar2[-1])" ( (binary_expression "param_2 < (uint)piVar2[-1]" identifier < (cast_expression "(uint)piVar2[-1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "piVar2[-1]" identifier [ number_literal ]))) ))) )) ))) )) (compound_statement "{\n          return iVar1;\n        }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" identifier = (binary_expression "iVar3 + 1" identifier + number_literal)) ;) (expression_statement "piVar2 = piVar2 + 2;" (assignment_expression "piVar2 = piVar2 + 2" identifier = (binary_expression "piVar2 + 2" identifier + number_literal)) ;) (expression_statement "iVar1 = iVar3;" (assignment_expression "iVar1 = iVar3" identifier = identifier) ;) (expression_statement "iVar3 = iVar4;" (assignment_expression "iVar3 = iVar4" identifier = identifier) ;) }) while (parenthesized_expression "(iVar4 != iVar5)" ( (binary_expression "iVar4 != iVar5" identifier != identifier) )) ;) })) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE 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 (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) <= IDENT) )) && (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * IDENT) != IDENT) || (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) <= IDENT) ))) )) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < (subscript_expression IDENT [ LIT ])) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) == IDENT) && (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ))) )) ))) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < (subscript_expression IDENT [ LIT ])) )) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) == IDENT) && (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ))) )) ))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) })) (return_statement return LIT ;) })))
(function_definition "int onscreen(int param_1,uint param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }\n  return -1;\n}" (primitive_type "int") (function_declarator "onscreen(int param_1,uint param_2)" (identifier "onscreen") (parameter_list "(int param_1,uint param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int iVar4;\n  int iVar5;\n  \n  piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);\n  if ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }\n  return -1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (expression_statement "piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);" (assignment_expression "piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74)" (identifier "piVar2") (= "=") (pointer_expression "*(int **)(PTR_DAT_0004ebf8 + 0x2a74)" (* "*") (cast_expression "(int **)(PTR_DAT_0004ebf8 + 0x2a74)" (( "(") (type_descriptor "int **" (primitive_type "int") (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 ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }" (if "if") (parenthesized_expression "((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2))))" (( "(") (binary_expression "(*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))" (parenthesized_expression "(*piVar2 <= param_1)" (( "(") (binary_expression "*piVar2 <= param_1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (<= "<=") (identifier "param_1")) () ")")) (&& "&&") (parenthesized_expression "((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))" (( "(") (parenthesized_expression "(*piVar2 != param_1 || ((uint)piVar2[1] <= param_2))" (( "(") (binary_expression "*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)" (binary_expression "*piVar2 != param_1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (!= "!=") (identifier "param_1")) (|| "||") (parenthesized_expression "((uint)piVar2[1] <= param_2)" (( "(") (binary_expression "(uint)piVar2[1] <= param_2" (cast_expression "(uint)piVar2[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]"))) (<= "<=") (identifier "param_2")) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n    iVar5 = *(int *)PTR_sc_height_0004ece8;\n    if (iVar5 < 2) {\n      return -1;\n    }\n    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }\n    piVar2 = piVar2 + 6;\n    iVar1 = 1;\n    iVar3 = 2;\n    if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }\n  }" ({ "{") (expression_statement "iVar5 = *(int *)PTR_sc_height_0004ece8;" (assignment_expression "iVar5 = *(int *)PTR_sc_height_0004ece8" (identifier "iVar5") (= "=") (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")))) (; ";")) (if_statement "if (iVar5 < 2) {\n      return -1;\n    }" (if "if") (parenthesized_expression "(iVar5 < 2)" (( "(") (binary_expression "iVar5 < 2" (identifier "iVar5") (< "<") (number_literal "2")) () ")")) (compound_statement "{\n      return -1;\n    }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (if_statement "if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {\n      return 0;\n    }" (if "if") (parenthesized_expression "((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3]))))" (( "(") (binary_expression "(param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))" (parenthesized_expression "(param_1 < piVar2[2])" (( "(") (binary_expression "param_1 < piVar2[2]" (identifier "param_1") (< "<") (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]"))) () ")")) (|| "||") (parenthesized_expression "((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))" (( "(") (parenthesized_expression "(piVar2[2] == param_1 && (param_2 < (uint)piVar2[3]))" (( "(") (binary_expression "piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])" (binary_expression "piVar2[2] == param_1" (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")) (== "==") (identifier "param_1")) (&& "&&") (parenthesized_expression "(param_2 < (uint)piVar2[3])" (( "(") (binary_expression "param_2 < (uint)piVar2[3]" (identifier "param_2") (< "<") (cast_expression "(uint)piVar2[3]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "piVar2[3]" (identifier "piVar2") ([ "[") (number_literal "3") (] "]")))) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "piVar2 = piVar2 + 6;" (assignment_expression "piVar2 = piVar2 + 6" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 6" (identifier "piVar2") (+ "+") (number_literal "6"))) (; ";")) (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" (identifier "iVar1") (= "=") (number_literal "1")) (; ";")) (expression_statement "iVar3 = 2;" (assignment_expression "iVar3 = 2" (identifier "iVar3") (= "=") (number_literal "2")) (; ";")) (if_statement "if (iVar5 != 2) {\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }" (if "if") (parenthesized_expression "(iVar5 != 2)" (( "(") (binary_expression "iVar5 != 2" (identifier "iVar5") (!= "!=") (number_literal "2")) () ")")) (compound_statement "{\n      do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);\n    }" ({ "{") (do_statement "do {\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      } while (iVar4 != iVar5);" (do "do") (compound_statement "{\n        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }\n        iVar4 = iVar3 + 1;\n        piVar2 = piVar2 + 2;\n        iVar1 = iVar3;\n        iVar3 = iVar4;\n      }" ({ "{") (if_statement "if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {\n          return iVar1;\n        }" (if "if") (parenthesized_expression "((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1]))))" (( "(") (binary_expression "(param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))" (parenthesized_expression "(param_1 < piVar2[-2])" (( "(") (binary_expression "param_1 < piVar2[-2]" (identifier "param_1") (< "<") (subscript_expression "piVar2[-2]" (identifier "piVar2") ([ "[") (number_literal "-2") (] "]"))) () ")")) (|| "||") (parenthesized_expression "((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))" (( "(") (parenthesized_expression "(piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1]))" (( "(") (binary_expression "piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])" (binary_expression "piVar2[-2] == param_1" (subscript_expression "piVar2[-2]" (identifier "piVar2") ([ "[") (number_literal "-2") (] "]")) (== "==") (identifier "param_1")) (&& "&&") (parenthesized_expression "(param_2 < (uint)piVar2[-1])" (( "(") (binary_expression "param_2 < (uint)piVar2[-1]" (identifier "param_2") (< "<") (cast_expression "(uint)piVar2[-1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "piVar2[-1]" (identifier "piVar2") ([ "[") (number_literal "-1") (] "]")))) () ")"))) () ")")) () ")"))) () ")")) (compound_statement "{\n          return iVar1;\n        }" ({ "{") (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "iVar4 = iVar3 + 1;" (assignment_expression "iVar4 = iVar3 + 1" (identifier "iVar4") (= "=") (binary_expression "iVar3 + 1" (identifier "iVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "piVar2 = piVar2 + 2;" (assignment_expression "piVar2 = piVar2 + 2" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 2" (identifier "piVar2") (+ "+") (number_literal "2"))) (; ";")) (expression_statement "iVar1 = iVar3;" (assignment_expression "iVar1 = iVar3" (identifier "iVar1") (= "=") (identifier "iVar3")) (; ";")) (expression_statement "iVar3 = iVar4;" (assignment_expression "iVar3 = iVar4" (identifier "iVar3") (= "=") (identifier "iVar4")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar4 != iVar5)" (( "(") (binary_expression "iVar4 != iVar5" (identifier "iVar4") (!= "!=") (identifier "iVar5")) () ")")) (; ";")) (} "}"))) (} "}"))) (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}")))

int function_1(type_1 pos)

{
  int iVar1;
  int *var_5;
  int var_2;
  type_2 var_3;
  int var_6;
  int var_7;
  int var_4;
  
  var_5 = *(int **)(var_1 + 0x2a74);
  if ((*var_5 <= var_2) && ((*var_5 != var_2 || ((type_2)var_5[1] <= var_3)))) {
    var_4 = *(int *)PTR_sc_height_0004ece8;
    if (var_4 < 2) {
      return -1;
    }
    if ((var_2 < var_5[2]) || ((var_5[2] == var_2 && (var_3 < (type_2)var_5[3])))) {
      return 0;
    }
    var_5 = var_5 + 6;
    iVar1 = 1;
    var_6 = 2;
    if (var_4 != 2) {
      do {
        if ((var_2 < var_5[-2]) || ((var_5[-2] == var_2 && (var_3 < (type_2)var_5[-1])))) {
          return iVar1;
        }
        var_7 = var_6 + 1;
        var_5 = var_5 + 2;
        iVar1 = var_6;
        var_6 = var_7;
      } while (var_7 != var_4);
    }
  }
  return -1;
}


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

int MASKED(int param_1,uint param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  int iVar5;
  
  piVar2 = *(int **)(PTR_DAT_0004ebf8 + 0x2a74);
  if ((*piVar2 <= param_1) && ((*piVar2 != param_1 || ((uint)piVar2[1] <= param_2)))) {
    iVar5 = *(int *)PTR_sc_height_0004ece8;
    if (iVar5 < 2) {
      return -1;
    }
    if ((param_1 < piVar2[2]) || ((piVar2[2] == param_1 && (param_2 < (uint)piVar2[3])))) {
      return 0;
    }
    piVar2 = piVar2 + 6;
    iVar1 = 1;
    iVar3 = 2;
    if (iVar5 != 2) {
      do {
        if ((param_1 < piVar2[-2]) || ((piVar2[-2] == param_1 && (param_2 < (uint)piVar2[-1])))) {
          return iVar1;
        }
        iVar4 = iVar3 + 1;
        piVar2 = piVar2 + 2;
        iVar1 = iVar3;
        iVar3 = iVar4;
      } while (iVar4 != iVar5);
    }
  }
  return -1;
}

