
base_number table_ninf_remap(base_number *tab,int size,base_number ninf)

{
  int iVar1;
  base_number *pbVar2;
  int iVar3;
  int *piVar4;
  
  if (0 < size) {
    iVar1 = 0;
    piVar4 = tab + size;
    pbVar2 = tab;
    do {
      iVar3 = *pbVar2;
      pbVar2 = pbVar2 + 1;
      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {
        iVar1 = iVar3;
      }
    } while (pbVar2 != piVar4);
    do {
      if (*tab == -0x80000000) {
        *tab = iVar1 + -1;
      }
      tab = tab + 1;
    } while (tab != piVar4);
    return iVar1 + -1;
  }
  return -1;
}



int FUN_000541a0(int *param_1,int param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  int *piVar4;
  
  if (0 < param_2) {
    iVar1 = 0;
    piVar4 = param_1 + param_2;
    piVar2 = param_1;
    do {
      iVar3 = *piVar2;
      piVar2 = piVar2 + 1;
      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {
        iVar1 = iVar3;
      }
    } while (piVar2 != piVar4);
    do {
      if (*param_1 == -0x80000000) {
        *param_1 = iVar1 + -1;
      }
      param_1 = param_1 + 1;
    } while (param_1 != piVar4);
    return iVar1 + -1;
  }
  return -1;
}


blez a1,0x00054200
_sll a1,a1,0x2
or v0,zero,zero
addu a2,a0,a1
lui t1,0x8000
or v1,a0,zero
lw a1,0x0(v1)
addiu v1,v1,0x4
slt a3,a1,v0
beq a3,zero,0x000541d0
_xor t0,a1,t1
movn v0,a1,t0
bne v1,a2,0x000541b8
_lui a1,0x8000
addiu v0,v0,-0x1
lw v1,0x0(a0)
bne v1,a1,0x000541ec
_nop
sw v0,0x0(a0)
addiu a0,a0,0x4
bne a0,a2,0x000541dc
_nop
jr ra
_nop
jr ra
_li v0,-0x1
(translation_unit "int FUN_000541a0(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  \n  if (0 < param_2) {\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\n  }\n  return -1;\n}\n\n" (function_definition "int FUN_000541a0(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  \n  if (0 < param_2) {\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\n  }\n  return -1;\n}" primitive_type (function_declarator "FUN_000541a0(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  \n  if (0 < param_2) {\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\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 *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (if_statement "if (0 < param_2) {\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\n  }" if (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) )) (compound_statement "{\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (expression_statement "piVar4 = param_1 + param_2;" (assignment_expression "piVar4 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (expression_statement "piVar2 = param_1;" (assignment_expression "piVar2 = param_1" identifier = identifier) ;) (do_statement "do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);" do (compound_statement "{\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    }" { (expression_statement "iVar3 = *piVar2;" (assignment_expression "iVar3 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) (if_statement "if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }" if (parenthesized_expression "((iVar3 < iVar1) && (iVar3 != -0x80000000))" ( (binary_expression "(iVar3 < iVar1) && (iVar3 != -0x80000000)" (parenthesized_expression "(iVar3 < iVar1)" ( (binary_expression "iVar3 < iVar1" identifier < identifier) )) && (parenthesized_expression "(iVar3 != -0x80000000)" ( (binary_expression "iVar3 != -0x80000000" identifier != number_literal) ))) )) (compound_statement "{\n        iVar1 = iVar3;\n      }" { (expression_statement "iVar1 = iVar3;" (assignment_expression "iVar1 = iVar3" identifier = identifier) ;) })) }) while (parenthesized_expression "(piVar2 != piVar4)" ( (binary_expression "piVar2 != piVar4" identifier != identifier) )) ;) (do_statement "do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);" do (compound_statement "{\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    }" { (if_statement "if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }" if (parenthesized_expression "(*param_1 == -0x80000000)" ( (binary_expression "*param_1 == -0x80000000" (pointer_expression "*param_1" * identifier) == number_literal) )) (compound_statement "{\n        *param_1 = iVar1 + -1;\n      }" { (expression_statement "*param_1 = iVar1 + -1;" (assignment_expression "*param_1 = iVar1 + -1" (pointer_expression "*param_1" * identifier) = (binary_expression "iVar1 + -1" identifier + number_literal)) ;) })) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_1 != piVar4)" ( (binary_expression "param_1 != piVar4" identifier != identifier) )) ;) (return_statement "return iVar1 + -1;" return (binary_expression "iVar1 + -1" identifier + number_literal) ;) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "base_number table_ninf_remap(base_number *tab,int size,base_number ninf)\n\n{\n  int iVar1;\n  base_number *pbVar2;\n  int iVar3;\n  int *piVar4;\n  \n  if (0 < size) {\n    iVar1 = 0;\n    piVar4 = tab + size;\n    pbVar2 = tab;\n    do {\n      iVar3 = *pbVar2;\n      pbVar2 = pbVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (pbVar2 != piVar4);\n    do {\n      if (*tab == -0x80000000) {\n        *tab = iVar1 + -1;\n      }\n      tab = tab + 1;\n    } while (tab != piVar4);\n    return iVar1 + -1;\n  }\n  return -1;\n}\n\n" (function_definition "base_number table_ninf_remap(base_number *tab,int size,base_number ninf)\n\n{\n  int iVar1;\n  base_number *pbVar2;\n  int iVar3;\n  int *piVar4;\n  \n  if (0 < size) {\n    iVar1 = 0;\n    piVar4 = tab + size;\n    pbVar2 = tab;\n    do {\n      iVar3 = *pbVar2;\n      pbVar2 = pbVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (pbVar2 != piVar4);\n    do {\n      if (*tab == -0x80000000) {\n        *tab = iVar1 + -1;\n      }\n      tab = tab + 1;\n    } while (tab != piVar4);\n    return iVar1 + -1;\n  }\n  return -1;\n}" type_identifier (function_declarator "table_ninf_remap(base_number *tab,int size,base_number ninf)" identifier (parameter_list "(base_number *tab,int size,base_number ninf)" ( (parameter_declaration "base_number *tab" type_identifier (pointer_declarator "*tab" * identifier)) , (parameter_declaration "int size" primitive_type identifier) , (parameter_declaration "base_number ninf" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  base_number *pbVar2;\n  int iVar3;\n  int *piVar4;\n  \n  if (0 < size) {\n    iVar1 = 0;\n    piVar4 = tab + size;\n    pbVar2 = tab;\n    do {\n      iVar3 = *pbVar2;\n      pbVar2 = pbVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (pbVar2 != piVar4);\n    do {\n      if (*tab == -0x80000000) {\n        *tab = iVar1 + -1;\n      }\n      tab = tab + 1;\n    } while (tab != piVar4);\n    return iVar1 + -1;\n  }\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "base_number *pbVar2;" type_identifier (pointer_declarator "*pbVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (if_statement "if (0 < size) {\n    iVar1 = 0;\n    piVar4 = tab + size;\n    pbVar2 = tab;\n    do {\n      iVar3 = *pbVar2;\n      pbVar2 = pbVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (pbVar2 != piVar4);\n    do {\n      if (*tab == -0x80000000) {\n        *tab = iVar1 + -1;\n      }\n      tab = tab + 1;\n    } while (tab != piVar4);\n    return iVar1 + -1;\n  }" if (parenthesized_expression "(0 < size)" ( (binary_expression "0 < size" number_literal < identifier) )) (compound_statement "{\n    iVar1 = 0;\n    piVar4 = tab + size;\n    pbVar2 = tab;\n    do {\n      iVar3 = *pbVar2;\n      pbVar2 = pbVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (pbVar2 != piVar4);\n    do {\n      if (*tab == -0x80000000) {\n        *tab = iVar1 + -1;\n      }\n      tab = tab + 1;\n    } while (tab != piVar4);\n    return iVar1 + -1;\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (expression_statement "piVar4 = tab + size;" (assignment_expression "piVar4 = tab + size" identifier = (binary_expression "tab + size" identifier + identifier)) ;) (expression_statement "pbVar2 = tab;" (assignment_expression "pbVar2 = tab" identifier = identifier) ;) (do_statement "do {\n      iVar3 = *pbVar2;\n      pbVar2 = pbVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (pbVar2 != piVar4);" do (compound_statement "{\n      iVar3 = *pbVar2;\n      pbVar2 = pbVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    }" { (expression_statement "iVar3 = *pbVar2;" (assignment_expression "iVar3 = *pbVar2" identifier = (pointer_expression "*pbVar2" * identifier)) ;) (expression_statement "pbVar2 = pbVar2 + 1;" (assignment_expression "pbVar2 = pbVar2 + 1" identifier = (binary_expression "pbVar2 + 1" identifier + number_literal)) ;) (if_statement "if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }" if (parenthesized_expression "((iVar3 < iVar1) && (iVar3 != -0x80000000))" ( (binary_expression "(iVar3 < iVar1) && (iVar3 != -0x80000000)" (parenthesized_expression "(iVar3 < iVar1)" ( (binary_expression "iVar3 < iVar1" identifier < identifier) )) && (parenthesized_expression "(iVar3 != -0x80000000)" ( (binary_expression "iVar3 != -0x80000000" identifier != number_literal) ))) )) (compound_statement "{\n        iVar1 = iVar3;\n      }" { (expression_statement "iVar1 = iVar3;" (assignment_expression "iVar1 = iVar3" identifier = identifier) ;) })) }) while (parenthesized_expression "(pbVar2 != piVar4)" ( (binary_expression "pbVar2 != piVar4" identifier != identifier) )) ;) (do_statement "do {\n      if (*tab == -0x80000000) {\n        *tab = iVar1 + -1;\n      }\n      tab = tab + 1;\n    } while (tab != piVar4);" do (compound_statement "{\n      if (*tab == -0x80000000) {\n        *tab = iVar1 + -1;\n      }\n      tab = tab + 1;\n    }" { (if_statement "if (*tab == -0x80000000) {\n        *tab = iVar1 + -1;\n      }" if (parenthesized_expression "(*tab == -0x80000000)" ( (binary_expression "*tab == -0x80000000" (pointer_expression "*tab" * identifier) == number_literal) )) (compound_statement "{\n        *tab = iVar1 + -1;\n      }" { (expression_statement "*tab = iVar1 + -1;" (assignment_expression "*tab = iVar1 + -1" (pointer_expression "*tab" * identifier) = (binary_expression "iVar1 + -1" identifier + number_literal)) ;) })) (expression_statement "tab = tab + 1;" (assignment_expression "tab = tab + 1" identifier = (binary_expression "tab + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(tab != piVar4)" ( (binary_expression "tab != piVar4" identifier != identifier) )) ;) (return_statement "return iVar1 + -1;" return (binary_expression "iVar1 + -1" identifier + number_literal) ;) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "int FUN_000541a0(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  \n  if (0 < param_2) {\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\n  }\n  return -1;\n}\n\n" (function_definition "int FUN_000541a0(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  \n  if (0 < param_2) {\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\n  }\n  return -1;\n}" primitive_type (function_declarator "FUN_000541a0(int *param_1,int param_2)" identifier (parameter_list "(int *param_1,int param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  \n  if (0 < param_2) {\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\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 *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (if_statement "if (0 < param_2) {\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\n  }" if (parenthesized_expression "(0 < param_2)" ( (binary_expression "0 < param_2" number_literal < identifier) )) (compound_statement "{\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (expression_statement "piVar4 = param_1 + param_2;" (assignment_expression "piVar4 = param_1 + param_2" identifier = (binary_expression "param_1 + param_2" identifier + identifier)) ;) (expression_statement "piVar2 = param_1;" (assignment_expression "piVar2 = param_1" identifier = identifier) ;) (do_statement "do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);" do (compound_statement "{\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    }" { (expression_statement "iVar3 = *piVar2;" (assignment_expression "iVar3 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" identifier = (binary_expression "piVar2 + 1" identifier + number_literal)) ;) (if_statement "if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }" if (parenthesized_expression "((iVar3 < iVar1) && (iVar3 != -0x80000000))" ( (binary_expression "(iVar3 < iVar1) && (iVar3 != -0x80000000)" (parenthesized_expression "(iVar3 < iVar1)" ( (binary_expression "iVar3 < iVar1" identifier < identifier) )) && (parenthesized_expression "(iVar3 != -0x80000000)" ( (binary_expression "iVar3 != -0x80000000" identifier != number_literal) ))) )) (compound_statement "{\n        iVar1 = iVar3;\n      }" { (expression_statement "iVar1 = iVar3;" (assignment_expression "iVar1 = iVar3" identifier = identifier) ;) })) }) while (parenthesized_expression "(piVar2 != piVar4)" ( (binary_expression "piVar2 != piVar4" identifier != identifier) )) ;) (do_statement "do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);" do (compound_statement "{\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    }" { (if_statement "if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }" if (parenthesized_expression "(*param_1 == -0x80000000)" ( (binary_expression "*param_1 == -0x80000000" (pointer_expression "*param_1" * identifier) == number_literal) )) (compound_statement "{\n        *param_1 = iVar1 + -1;\n      }" { (expression_statement "*param_1 = iVar1 + -1;" (assignment_expression "*param_1 = iVar1 + -1" (pointer_expression "*param_1" * identifier) = (binary_expression "iVar1 + -1" identifier + number_literal)) ;) })) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" identifier = (binary_expression "param_1 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(param_1 != piVar4)" ( (binary_expression "param_1 != piVar4" identifier != identifier) )) ;) (return_statement "return iVar1 + -1;" return (binary_expression "iVar1 + -1" identifier + number_literal) ;) })) (return_statement "return -1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT < IDENT) )) && (parenthesized_expression ( (binary_expression IDENT != LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (do_statement do (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + LIT)) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) (return_statement return (binary_expression IDENT + LIT) ;) })) (return_statement return LIT ;) })))
(function_definition "int FUN_000541a0(int *param_1,int param_2)\n\n{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  \n  if (0 < param_2) {\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\n  }\n  return -1;\n}" (primitive_type "int") (function_declarator "FUN_000541a0(int *param_1,int param_2)" (identifier "FUN_000541a0") (parameter_list "(int *param_1,int param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int iVar3;\n  int *piVar4;\n  \n  if (0 < param_2) {\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\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 *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (if_statement "if (0 < param_2) {\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\n  }" (if "if") (parenthesized_expression "(0 < param_2)" (( "(") (binary_expression "0 < param_2" (number_literal "0") (< "<") (identifier "param_2")) () ")")) (compound_statement "{\n    iVar1 = 0;\n    piVar4 = param_1 + param_2;\n    piVar2 = param_1;\n    do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);\n    do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);\n    return iVar1 + -1;\n  }" ({ "{") (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar4 = param_1 + param_2;" (assignment_expression "piVar4 = param_1 + param_2" (identifier "piVar4") (= "=") (binary_expression "param_1 + param_2" (identifier "param_1") (+ "+") (identifier "param_2"))) (; ";")) (expression_statement "piVar2 = param_1;" (assignment_expression "piVar2 = param_1" (identifier "piVar2") (= "=") (identifier "param_1")) (; ";")) (do_statement "do {\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    } while (piVar2 != piVar4);" (do "do") (compound_statement "{\n      iVar3 = *piVar2;\n      piVar2 = piVar2 + 1;\n      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }\n    }" ({ "{") (expression_statement "iVar3 = *piVar2;" (assignment_expression "iVar3 = *piVar2" (identifier "iVar3") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (expression_statement "piVar2 = piVar2 + 1;" (assignment_expression "piVar2 = piVar2 + 1" (identifier "piVar2") (= "=") (binary_expression "piVar2 + 1" (identifier "piVar2") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {\n        iVar1 = iVar3;\n      }" (if "if") (parenthesized_expression "((iVar3 < iVar1) && (iVar3 != -0x80000000))" (( "(") (binary_expression "(iVar3 < iVar1) && (iVar3 != -0x80000000)" (parenthesized_expression "(iVar3 < iVar1)" (( "(") (binary_expression "iVar3 < iVar1" (identifier "iVar3") (< "<") (identifier "iVar1")) () ")")) (&& "&&") (parenthesized_expression "(iVar3 != -0x80000000)" (( "(") (binary_expression "iVar3 != -0x80000000" (identifier "iVar3") (!= "!=") (number_literal "-0x80000000")) () ")"))) () ")")) (compound_statement "{\n        iVar1 = iVar3;\n      }" ({ "{") (expression_statement "iVar1 = iVar3;" (assignment_expression "iVar1 = iVar3" (identifier "iVar1") (= "=") (identifier "iVar3")) (; ";")) (} "}"))) (} "}")) (while "while") (parenthesized_expression "(piVar2 != piVar4)" (( "(") (binary_expression "piVar2 != piVar4" (identifier "piVar2") (!= "!=") (identifier "piVar4")) () ")")) (; ";")) (do_statement "do {\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    } while (param_1 != piVar4);" (do "do") (compound_statement "{\n      if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }\n      param_1 = param_1 + 1;\n    }" ({ "{") (if_statement "if (*param_1 == -0x80000000) {\n        *param_1 = iVar1 + -1;\n      }" (if "if") (parenthesized_expression "(*param_1 == -0x80000000)" (( "(") (binary_expression "*param_1 == -0x80000000" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (== "==") (number_literal "-0x80000000")) () ")")) (compound_statement "{\n        *param_1 = iVar1 + -1;\n      }" ({ "{") (expression_statement "*param_1 = iVar1 + -1;" (assignment_expression "*param_1 = iVar1 + -1" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "iVar1 + -1" (identifier "iVar1") (+ "+") (number_literal "-1"))) (; ";")) (} "}"))) (expression_statement "param_1 = param_1 + 1;" (assignment_expression "param_1 = param_1 + 1" (identifier "param_1") (= "=") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_1 != piVar4)" (( "(") (binary_expression "param_1 != piVar4" (identifier "param_1") (!= "!=") (identifier "piVar4")) () ")")) (; ";")) (return_statement "return iVar1 + -1;" (return "return") (binary_expression "iVar1 + -1" (identifier "iVar1") (+ "+") (number_literal "-1")) (; ";")) (} "}"))) (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) 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: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier)))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (do_statement body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (identifier) right: (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier)))) (return_statement (binary_expression left: (identifier) right: (number_literal))))) (return_statement (number_literal)))))

int MASKED(int *param_1,int param_2)

{
  int iVar1;
  int *piVar2;
  int iVar3;
  int *piVar4;
  
  if (0 < param_2) {
    iVar1 = 0;
    piVar4 = param_1 + param_2;
    piVar2 = param_1;
    do {
      iVar3 = *piVar2;
      piVar2 = piVar2 + 1;
      if ((iVar3 < iVar1) && (iVar3 != -0x80000000)) {
        iVar1 = iVar3;
      }
    } while (piVar2 != piVar4);
    do {
      if (*param_1 == -0x80000000) {
        *param_1 = iVar1 + -1;
      }
      param_1 = param_1 + 1;
    } while (param_1 != piVar4);
    return iVar1 + -1;
  }
  return -1;
}

