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

void state_reductions_set(state *s,int num,rule **reds)

{
  reductions *prVar1;
  int iVar2;
  int *piVar3;
  int *piVar4;
  undefined *puVar5;
  undefined *puVar6;
  
  if (s->reductions == (reductions *)0x0) {
    prVar1 = reductions_new(num,reds);
    s->reductions = prVar1;
    return;
  }
  puVar6 = PTR_DAT_0008d800 + -0x4de0;
  puVar5 = PTR_DAT_0008d800 + -0x4d94;
  (*(code *)PTR___assert_fail_0008de30)(puVar5,puVar6,0xda,PTR_DAT_0008d800 + -0x4d30);
  piVar3 = *(int **)(puVar5 + 0xc);
  if (0 < *piVar3) {
    if (puVar6 != (undefined *)piVar3[2]) {
      iVar2 = 0;
      piVar4 = piVar3 + 3;
      do {
        iVar2 = iVar2 + 1;
        if (iVar2 == *piVar3) {
          return;
        }
        puVar5 = (undefined *)*piVar4;
        piVar4 = piVar4 + 1;
      } while (puVar5 != puVar6);
    }
    return;
  }
  return;
}



int state_reductions_set(int param_1,undefined4 param_2,undefined4 param_3)

{
  int iVar1;
  int *piVar2;
  int *piVar3;
  undefined *puVar4;
  undefined *puVar5;
  
  if (*(int *)(param_1 + 0xc) == 0) {
    iVar1 = FUN_0004f804(param_2,param_3);
    *(int *)(param_1 + 0xc) = iVar1;
    return iVar1;
  }
  puVar5 = PTR_DAT_0008d800 + -0x4de0;
  puVar4 = PTR_DAT_0008d800 + -0x4d94;
  (*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);
  piVar2 = *(int **)(puVar4 + 0xc);
  if (*piVar2 < 1) {
    return -1;
  }
  if (puVar5 == (undefined *)piVar2[2]) {
    iVar1 = 0;
  }
  else {
    iVar1 = 0;
    piVar3 = piVar2 + 3;
    do {
      iVar1 = iVar1 + 1;
      if (iVar1 == *piVar2) {
        return -1;
      }
      puVar4 = (undefined *)*piVar3;
      piVar3 = piVar3 + 1;
    } while (puVar4 != puVar5);
  }
  return iVar1;
}


lui gp,0x4
addiu gp,gp,0x58b0
addu gp,gp,t9
addiu sp,sp,-0x20
lw v0,0xc(a0)
sw gp,0x10(sp)
sw s0,0x18(sp)
or s0,a0,zero
bne v0,zero,0x0004fd90
_sw ra,0x1c(sp)
lw t9,-0x796c(gp)
or a0,a1,zero
addiu t9,t9,-0x7fc
bal 0x0004f804
_or a1,a2,zero
lw ra,0x1c(sp)
sw v0,0xc(s0)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x20
lw a3,-0x7df0(gp)
li a2,0xda
lw a1,-0x7df0(gp)
lw a0,-0x7df0(gp)
lw t9,-0x77c0(gp)
addiu a3,a3,-0x4d30
addiu a1,a1,-0x4de0
jalr t9
_addiu a0,a0,-0x4d94
(translation_unit "int state_reductions_set(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined *puVar4;\n  undefined *puVar5;\n  \n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }\n  puVar5 = PTR_DAT_0008d800 + -0x4de0;\n  puVar4 = PTR_DAT_0008d800 + -0x4d94;\n  (*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);\n  piVar2 = *(int **)(puVar4 + 0xc);\n  if (*piVar2 < 1) {\n    return -1;\n  }\n  if (puVar5 == (undefined *)piVar2[2]) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }\n  return iVar1;\n}\n\n" (function_definition "int state_reductions_set(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined *puVar4;\n  undefined *puVar5;\n  \n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }\n  puVar5 = PTR_DAT_0008d800 + -0x4de0;\n  puVar4 = PTR_DAT_0008d800 + -0x4d94;\n  (*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);\n  piVar2 = *(int **)(puVar4 + 0xc);\n  if (*piVar2 < 1) {\n    return -1;\n  }\n  if (puVar5 == (undefined *)piVar2[2]) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }\n  return iVar1;\n}" primitive_type (function_declarator "state_reductions_set(int param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined *puVar4;\n  undefined *puVar5;\n  \n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }\n  puVar5 = PTR_DAT_0008d800 + -0x4de0;\n  puVar4 = PTR_DAT_0008d800 + -0x4d94;\n  (*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);\n  piVar2 = *(int **)(puVar4 + 0xc);\n  if (*piVar2 < 1) {\n    return -1;\n  }\n  if (puVar5 == (undefined *)piVar2[2]) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (if_statement "if (*(int *)(param_1 + 0xc) == 0) {\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) == 0)" ( (binary_expression "*(int *)(param_1 + 0xc) == 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }" { (expression_statement "iVar1 = FUN_0004f804(param_2,param_3);" (assignment_expression "iVar1 = FUN_0004f804(param_2,param_3)" identifier = (call_expression "FUN_0004f804(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (expression_statement "*(int *)(param_1 + 0xc) = iVar1;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar1" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = identifier) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "puVar5 = PTR_DAT_0008d800 + -0x4de0;" (assignment_expression "puVar5 = PTR_DAT_0008d800 + -0x4de0" identifier = (binary_expression "PTR_DAT_0008d800 + -0x4de0" identifier + number_literal)) ;) (expression_statement "puVar4 = PTR_DAT_0008d800 + -0x4d94;" (assignment_expression "puVar4 = PTR_DAT_0008d800 + -0x4d94" identifier = (binary_expression "PTR_DAT_0008d800 + -0x4d94" identifier + number_literal)) ;) (expression_statement "(*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);" (call_expression "(*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30)" (parenthesized_expression "(*(code *)PTR___assert_fail_0008de30)" ( (pointer_expression "*(code *)PTR___assert_fail_0008de30" * (cast_expression "(code *)PTR___assert_fail_0008de30" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30)" ( identifier , identifier , number_literal , (binary_expression "PTR_DAT_0008d800 + -0x4d30" identifier + number_literal) ))) ;) (expression_statement "piVar2 = *(int **)(puVar4 + 0xc);" (assignment_expression "piVar2 = *(int **)(puVar4 + 0xc)" identifier = (pointer_expression "*(int **)(puVar4 + 0xc)" * (cast_expression "(int **)(puVar4 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar4 + 0xc)" ( (binary_expression "puVar4 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (*piVar2 < 1) {\n    return -1;\n  }" if (parenthesized_expression "(*piVar2 < 1)" ( (binary_expression "*piVar2 < 1" (pointer_expression "*piVar2" * identifier) < number_literal) )) (compound_statement "{\n    return -1;\n  }" { (return_statement "return -1;" return number_literal ;) })) (if_statement "if (puVar5 == (undefined *)piVar2[2]) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }" if (parenthesized_expression "(puVar5 == (undefined *)piVar2[2])" ( (binary_expression "puVar5 == (undefined *)piVar2[2]" identifier == (cast_expression "(undefined *)piVar2[2]" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar2[2]" identifier [ number_literal ]))) )) (compound_statement "{\n    iVar1 = 0;\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }" else (compound_statement "{\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (expression_statement "piVar3 = piVar2 + 3;" (assignment_expression "piVar3 = piVar2 + 3" identifier = (binary_expression "piVar2 + 3" identifier + number_literal)) ;) (do_statement "do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);" do (compound_statement "{\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    }" { (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (if_statement "if (iVar1 == *piVar2) {\n        return -1;\n      }" if (parenthesized_expression "(iVar1 == *piVar2)" ( (binary_expression "iVar1 == *piVar2" identifier == (pointer_expression "*piVar2" * identifier)) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "puVar4 = (undefined *)*piVar3;" (assignment_expression "puVar4 = (undefined *)*piVar3" identifier = (cast_expression "(undefined *)*piVar3" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier))) ;) (expression_statement "piVar3 = piVar3 + 1;" (assignment_expression "piVar3 = piVar3 + 1" identifier = (binary_expression "piVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar4 != puVar5)" ( (binary_expression "puVar4 != puVar5" identifier != identifier) )) ;) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid state_reductions_set(state *s,int num,rule **reds)\n\n{\n  reductions *prVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  undefined *puVar5;\n  undefined *puVar6;\n  \n  if (s->reductions == (reductions *)0x0) {\n    prVar1 = reductions_new(num,reds);\n    s->reductions = prVar1;\n    return;\n  }\n  puVar6 = PTR_DAT_0008d800 + -0x4de0;\n  puVar5 = PTR_DAT_0008d800 + -0x4d94;\n  (*(code *)PTR___assert_fail_0008de30)(puVar5,puVar6,0xda,PTR_DAT_0008d800 + -0x4d30);\n  piVar3 = *(int **)(puVar5 + 0xc);\n  if (0 < *piVar3) {\n    if (puVar6 != (undefined *)piVar3[2]) {\n      iVar2 = 0;\n      piVar4 = piVar3 + 3;\n      do {\n        iVar2 = iVar2 + 1;\n        if (iVar2 == *piVar3) {\n          return;\n        }\n        puVar5 = (undefined *)*piVar4;\n        piVar4 = piVar4 + 1;\n      } while (puVar5 != puVar6);\n    }\n    return;\n  }\n  return;\n}\n\n" comment (function_definition "void state_reductions_set(state *s,int num,rule **reds)\n\n{\n  reductions *prVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  undefined *puVar5;\n  undefined *puVar6;\n  \n  if (s->reductions == (reductions *)0x0) {\n    prVar1 = reductions_new(num,reds);\n    s->reductions = prVar1;\n    return;\n  }\n  puVar6 = PTR_DAT_0008d800 + -0x4de0;\n  puVar5 = PTR_DAT_0008d800 + -0x4d94;\n  (*(code *)PTR___assert_fail_0008de30)(puVar5,puVar6,0xda,PTR_DAT_0008d800 + -0x4d30);\n  piVar3 = *(int **)(puVar5 + 0xc);\n  if (0 < *piVar3) {\n    if (puVar6 != (undefined *)piVar3[2]) {\n      iVar2 = 0;\n      piVar4 = piVar3 + 3;\n      do {\n        iVar2 = iVar2 + 1;\n        if (iVar2 == *piVar3) {\n          return;\n        }\n        puVar5 = (undefined *)*piVar4;\n        piVar4 = piVar4 + 1;\n      } while (puVar5 != puVar6);\n    }\n    return;\n  }\n  return;\n}" primitive_type (function_declarator "state_reductions_set(state *s,int num,rule **reds)" identifier (parameter_list "(state *s,int num,rule **reds)" ( (parameter_declaration "state *s" type_identifier (pointer_declarator "*s" * identifier)) , (parameter_declaration "int num" primitive_type identifier) , (parameter_declaration "rule **reds" type_identifier (pointer_declarator "**reds" * (pointer_declarator "*reds" * identifier))) ))) (compound_statement "{\n  reductions *prVar1;\n  int iVar2;\n  int *piVar3;\n  int *piVar4;\n  undefined *puVar5;\n  undefined *puVar6;\n  \n  if (s->reductions == (reductions *)0x0) {\n    prVar1 = reductions_new(num,reds);\n    s->reductions = prVar1;\n    return;\n  }\n  puVar6 = PTR_DAT_0008d800 + -0x4de0;\n  puVar5 = PTR_DAT_0008d800 + -0x4d94;\n  (*(code *)PTR___assert_fail_0008de30)(puVar5,puVar6,0xda,PTR_DAT_0008d800 + -0x4d30);\n  piVar3 = *(int **)(puVar5 + 0xc);\n  if (0 < *piVar3) {\n    if (puVar6 != (undefined *)piVar3[2]) {\n      iVar2 = 0;\n      piVar4 = piVar3 + 3;\n      do {\n        iVar2 = iVar2 + 1;\n        if (iVar2 == *piVar3) {\n          return;\n        }\n        puVar5 = (undefined *)*piVar4;\n        piVar4 = piVar4 + 1;\n      } while (puVar5 != puVar6);\n    }\n    return;\n  }\n  return;\n}" { (declaration "reductions *prVar1;" type_identifier (pointer_declarator "*prVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (declaration "undefined *puVar6;" type_identifier (pointer_declarator "*puVar6" * identifier) ;) (if_statement "if (s->reductions == (reductions *)0x0) {\n    prVar1 = reductions_new(num,reds);\n    s->reductions = prVar1;\n    return;\n  }" if (parenthesized_expression "(s->reductions == (reductions *)0x0)" ( (binary_expression "s->reductions == (reductions *)0x0" (field_expression "s->reductions" identifier -> field_identifier) == (cast_expression "(reductions *)0x0" ( (type_descriptor "reductions *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    prVar1 = reductions_new(num,reds);\n    s->reductions = prVar1;\n    return;\n  }" { (expression_statement "prVar1 = reductions_new(num,reds);" (assignment_expression "prVar1 = reductions_new(num,reds)" identifier = (call_expression "reductions_new(num,reds)" identifier (argument_list "(num,reds)" ( identifier , identifier )))) ;) (expression_statement "s->reductions = prVar1;" (assignment_expression "s->reductions = prVar1" (field_expression "s->reductions" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })) (expression_statement "puVar6 = PTR_DAT_0008d800 + -0x4de0;" (assignment_expression "puVar6 = PTR_DAT_0008d800 + -0x4de0" identifier = (binary_expression "PTR_DAT_0008d800 + -0x4de0" identifier + number_literal)) ;) (expression_statement "puVar5 = PTR_DAT_0008d800 + -0x4d94;" (assignment_expression "puVar5 = PTR_DAT_0008d800 + -0x4d94" identifier = (binary_expression "PTR_DAT_0008d800 + -0x4d94" identifier + number_literal)) ;) (expression_statement "(*(code *)PTR___assert_fail_0008de30)(puVar5,puVar6,0xda,PTR_DAT_0008d800 + -0x4d30);" (call_expression "(*(code *)PTR___assert_fail_0008de30)(puVar5,puVar6,0xda,PTR_DAT_0008d800 + -0x4d30)" (parenthesized_expression "(*(code *)PTR___assert_fail_0008de30)" ( (pointer_expression "*(code *)PTR___assert_fail_0008de30" * (cast_expression "(code *)PTR___assert_fail_0008de30" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar5,puVar6,0xda,PTR_DAT_0008d800 + -0x4d30)" ( identifier , identifier , number_literal , (binary_expression "PTR_DAT_0008d800 + -0x4d30" identifier + number_literal) ))) ;) (expression_statement "piVar3 = *(int **)(puVar5 + 0xc);" (assignment_expression "piVar3 = *(int **)(puVar5 + 0xc)" identifier = (pointer_expression "*(int **)(puVar5 + 0xc)" * (cast_expression "(int **)(puVar5 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar5 + 0xc)" ( (binary_expression "puVar5 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (0 < *piVar3) {\n    if (puVar6 != (undefined *)piVar3[2]) {\n      iVar2 = 0;\n      piVar4 = piVar3 + 3;\n      do {\n        iVar2 = iVar2 + 1;\n        if (iVar2 == *piVar3) {\n          return;\n        }\n        puVar5 = (undefined *)*piVar4;\n        piVar4 = piVar4 + 1;\n      } while (puVar5 != puVar6);\n    }\n    return;\n  }" if (parenthesized_expression "(0 < *piVar3)" ( (binary_expression "0 < *piVar3" number_literal < (pointer_expression "*piVar3" * identifier)) )) (compound_statement "{\n    if (puVar6 != (undefined *)piVar3[2]) {\n      iVar2 = 0;\n      piVar4 = piVar3 + 3;\n      do {\n        iVar2 = iVar2 + 1;\n        if (iVar2 == *piVar3) {\n          return;\n        }\n        puVar5 = (undefined *)*piVar4;\n        piVar4 = piVar4 + 1;\n      } while (puVar5 != puVar6);\n    }\n    return;\n  }" { (if_statement "if (puVar6 != (undefined *)piVar3[2]) {\n      iVar2 = 0;\n      piVar4 = piVar3 + 3;\n      do {\n        iVar2 = iVar2 + 1;\n        if (iVar2 == *piVar3) {\n          return;\n        }\n        puVar5 = (undefined *)*piVar4;\n        piVar4 = piVar4 + 1;\n      } while (puVar5 != puVar6);\n    }" if (parenthesized_expression "(puVar6 != (undefined *)piVar3[2])" ( (binary_expression "puVar6 != (undefined *)piVar3[2]" identifier != (cast_expression "(undefined *)piVar3[2]" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar3[2]" identifier [ number_literal ]))) )) (compound_statement "{\n      iVar2 = 0;\n      piVar4 = piVar3 + 3;\n      do {\n        iVar2 = iVar2 + 1;\n        if (iVar2 == *piVar3) {\n          return;\n        }\n        puVar5 = (undefined *)*piVar4;\n        piVar4 = piVar4 + 1;\n      } while (puVar5 != puVar6);\n    }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (expression_statement "piVar4 = piVar3 + 3;" (assignment_expression "piVar4 = piVar3 + 3" identifier = (binary_expression "piVar3 + 3" identifier + number_literal)) ;) (do_statement "do {\n        iVar2 = iVar2 + 1;\n        if (iVar2 == *piVar3) {\n          return;\n        }\n        puVar5 = (undefined *)*piVar4;\n        piVar4 = piVar4 + 1;\n      } while (puVar5 != puVar6);" do (compound_statement "{\n        iVar2 = iVar2 + 1;\n        if (iVar2 == *piVar3) {\n          return;\n        }\n        puVar5 = (undefined *)*piVar4;\n        piVar4 = piVar4 + 1;\n      }" { (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (if_statement "if (iVar2 == *piVar3) {\n          return;\n        }" if (parenthesized_expression "(iVar2 == *piVar3)" ( (binary_expression "iVar2 == *piVar3" identifier == (pointer_expression "*piVar3" * identifier)) )) (compound_statement "{\n          return;\n        }" { (return_statement "return;" return ;) })) (expression_statement "puVar5 = (undefined *)*piVar4;" (assignment_expression "puVar5 = (undefined *)*piVar4" identifier = (cast_expression "(undefined *)*piVar4" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar4" * identifier))) ;) (expression_statement "piVar4 = piVar4 + 1;" (assignment_expression "piVar4 = piVar4 + 1" identifier = (binary_expression "piVar4 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar5 != puVar6)" ( (binary_expression "puVar5 != puVar6" identifier != identifier) )) ;) })) (return_statement "return;" return ;) })) (return_statement "return;" return ;) })))
(translation_unit "int state_reductions_set(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined *puVar4;\n  undefined *puVar5;\n  \n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }\n  puVar5 = PTR_DAT_0008d800 + -0x4de0;\n  puVar4 = PTR_DAT_0008d800 + -0x4d94;\n  (*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);\n  piVar2 = *(int **)(puVar4 + 0xc);\n  if (*piVar2 < 1) {\n    return -1;\n  }\n  if (puVar5 == (undefined *)piVar2[2]) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }\n  return iVar1;\n}\n\n" (function_definition "int state_reductions_set(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined *puVar4;\n  undefined *puVar5;\n  \n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }\n  puVar5 = PTR_DAT_0008d800 + -0x4de0;\n  puVar4 = PTR_DAT_0008d800 + -0x4d94;\n  (*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);\n  piVar2 = *(int **)(puVar4 + 0xc);\n  if (*piVar2 < 1) {\n    return -1;\n  }\n  if (puVar5 == (undefined *)piVar2[2]) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }\n  return iVar1;\n}" primitive_type (function_declarator "state_reductions_set(int param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined *puVar4;\n  undefined *puVar5;\n  \n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }\n  puVar5 = PTR_DAT_0008d800 + -0x4de0;\n  puVar4 = PTR_DAT_0008d800 + -0x4d94;\n  (*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);\n  piVar2 = *(int **)(puVar4 + 0xc);\n  if (*piVar2 < 1) {\n    return -1;\n  }\n  if (puVar5 == (undefined *)piVar2[2]) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "undefined *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undefined *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (if_statement "if (*(int *)(param_1 + 0xc) == 0) {\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0xc) == 0)" ( (binary_expression "*(int *)(param_1 + 0xc) == 0" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) == number_literal) )) (compound_statement "{\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }" { (expression_statement "iVar1 = FUN_0004f804(param_2,param_3);" (assignment_expression "iVar1 = FUN_0004f804(param_2,param_3)" identifier = (call_expression "FUN_0004f804(param_2,param_3)" identifier (argument_list "(param_2,param_3)" ( identifier , identifier )))) ;) (expression_statement "*(int *)(param_1 + 0xc) = iVar1;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar1" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = identifier) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "puVar5 = PTR_DAT_0008d800 + -0x4de0;" (assignment_expression "puVar5 = PTR_DAT_0008d800 + -0x4de0" identifier = (binary_expression "PTR_DAT_0008d800 + -0x4de0" identifier + number_literal)) ;) (expression_statement "puVar4 = PTR_DAT_0008d800 + -0x4d94;" (assignment_expression "puVar4 = PTR_DAT_0008d800 + -0x4d94" identifier = (binary_expression "PTR_DAT_0008d800 + -0x4d94" identifier + number_literal)) ;) (expression_statement "(*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);" (call_expression "(*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30)" (parenthesized_expression "(*(code *)PTR___assert_fail_0008de30)" ( (pointer_expression "*(code *)PTR___assert_fail_0008de30" * (cast_expression "(code *)PTR___assert_fail_0008de30" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30)" ( identifier , identifier , number_literal , (binary_expression "PTR_DAT_0008d800 + -0x4d30" identifier + number_literal) ))) ;) (expression_statement "piVar2 = *(int **)(puVar4 + 0xc);" (assignment_expression "piVar2 = *(int **)(puVar4 + 0xc)" identifier = (pointer_expression "*(int **)(puVar4 + 0xc)" * (cast_expression "(int **)(puVar4 + 0xc)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar4 + 0xc)" ( (binary_expression "puVar4 + 0xc" identifier + number_literal) ))))) ;) (if_statement "if (*piVar2 < 1) {\n    return -1;\n  }" if (parenthesized_expression "(*piVar2 < 1)" ( (binary_expression "*piVar2 < 1" (pointer_expression "*piVar2" * identifier) < number_literal) )) (compound_statement "{\n    return -1;\n  }" { (return_statement "return -1;" return number_literal ;) })) (if_statement "if (puVar5 == (undefined *)piVar2[2]) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }" if (parenthesized_expression "(puVar5 == (undefined *)piVar2[2])" ( (binary_expression "puVar5 == (undefined *)piVar2[2]" identifier == (cast_expression "(undefined *)piVar2[2]" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar2[2]" identifier [ number_literal ]))) )) (compound_statement "{\n    iVar1 = 0;\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }" else (compound_statement "{\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }" { (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (expression_statement "piVar3 = piVar2 + 3;" (assignment_expression "piVar3 = piVar2 + 3" identifier = (binary_expression "piVar2 + 3" identifier + number_literal)) ;) (do_statement "do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);" do (compound_statement "{\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    }" { (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) (if_statement "if (iVar1 == *piVar2) {\n        return -1;\n      }" if (parenthesized_expression "(iVar1 == *piVar2)" ( (binary_expression "iVar1 == *piVar2" identifier == (pointer_expression "*piVar2" * identifier)) )) (compound_statement "{\n        return -1;\n      }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "puVar4 = (undefined *)*piVar3;" (assignment_expression "puVar4 = (undefined *)*piVar3" identifier = (cast_expression "(undefined *)*piVar3" ( (type_descriptor "undefined *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar3" * identifier))) ;) (expression_statement "piVar3 = piVar3 + 1;" (assignment_expression "piVar3 = piVar3 + 1" identifier = (binary_expression "piVar3 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(puVar4 != puVar5)" ( (binary_expression "puVar4 != puVar5" identifier != identifier) )) ;) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , IDENT , LIT , (binary_expression IDENT + LIT) ))) ;) (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 (pointer_expression * IDENT) < LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * IDENT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) }))) (return_statement return IDENT ;) })))
(function_definition "int state_reductions_set(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined *puVar4;\n  undefined *puVar5;\n  \n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }\n  puVar5 = PTR_DAT_0008d800 + -0x4de0;\n  puVar4 = PTR_DAT_0008d800 + -0x4d94;\n  (*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);\n  piVar2 = *(int **)(puVar4 + 0xc);\n  if (*piVar2 < 1) {\n    return -1;\n  }\n  if (puVar5 == (undefined *)piVar2[2]) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "state_reductions_set(int param_1,undefined4 param_2,undefined4 param_3)" (identifier "state_reductions_set") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  undefined *puVar4;\n  undefined *puVar5;\n  \n  if (*(int *)(param_1 + 0xc) == 0) {\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }\n  puVar5 = PTR_DAT_0008d800 + -0x4de0;\n  puVar4 = PTR_DAT_0008d800 + -0x4d94;\n  (*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);\n  piVar2 = *(int **)(puVar4 + 0xc);\n  if (*piVar2 < 1) {\n    return -1;\n  }\n  if (puVar5 == (undefined *)piVar2[2]) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "undefined *puVar4;" (type_identifier "undefined") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "undefined *puVar5;" (type_identifier "undefined") (pointer_declarator "*puVar5" (* "*") (identifier "puVar5")) (; ";")) (if_statement "if (*(int *)(param_1 + 0xc) == 0) {\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0xc) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0xc) == 0" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = FUN_0004f804(param_2,param_3);\n    *(int *)(param_1 + 0xc) = iVar1;\n    return iVar1;\n  }" ({ "{") (expression_statement "iVar1 = FUN_0004f804(param_2,param_3);" (assignment_expression "iVar1 = FUN_0004f804(param_2,param_3)" (identifier "iVar1") (= "=") (call_expression "FUN_0004f804(param_2,param_3)" (identifier "FUN_0004f804") (argument_list "(param_2,param_3)" (( "(") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (expression_statement "*(int *)(param_1 + 0xc) = iVar1;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar1" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "puVar5 = PTR_DAT_0008d800 + -0x4de0;" (assignment_expression "puVar5 = PTR_DAT_0008d800 + -0x4de0" (identifier "puVar5") (= "=") (binary_expression "PTR_DAT_0008d800 + -0x4de0" (identifier "PTR_DAT_0008d800") (+ "+") (number_literal "-0x4de0"))) (; ";")) (expression_statement "puVar4 = PTR_DAT_0008d800 + -0x4d94;" (assignment_expression "puVar4 = PTR_DAT_0008d800 + -0x4d94" (identifier "puVar4") (= "=") (binary_expression "PTR_DAT_0008d800 + -0x4d94" (identifier "PTR_DAT_0008d800") (+ "+") (number_literal "-0x4d94"))) (; ";")) (expression_statement "(*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);" (call_expression "(*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30)" (parenthesized_expression "(*(code *)PTR___assert_fail_0008de30)" (( "(") (pointer_expression "*(code *)PTR___assert_fail_0008de30" (* "*") (cast_expression "(code *)PTR___assert_fail_0008de30" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___assert_fail_0008de30"))) () ")")) (argument_list "(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30)" (( "(") (identifier "puVar4") (, ",") (identifier "puVar5") (, ",") (number_literal "0xda") (, ",") (binary_expression "PTR_DAT_0008d800 + -0x4d30" (identifier "PTR_DAT_0008d800") (+ "+") (number_literal "-0x4d30")) () ")"))) (; ";")) (expression_statement "piVar2 = *(int **)(puVar4 + 0xc);" (assignment_expression "piVar2 = *(int **)(puVar4 + 0xc)" (identifier "piVar2") (= "=") (pointer_expression "*(int **)(puVar4 + 0xc)" (* "*") (cast_expression "(int **)(puVar4 + 0xc)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar4 + 0xc)" (( "(") (binary_expression "puVar4 + 0xc" (identifier "puVar4") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (if_statement "if (*piVar2 < 1) {\n    return -1;\n  }" (if "if") (parenthesized_expression "(*piVar2 < 1)" (( "(") (binary_expression "*piVar2 < 1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (< "<") (number_literal "1")) () ")")) (compound_statement "{\n    return -1;\n  }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (if_statement "if (puVar5 == (undefined *)piVar2[2]) {\n    iVar1 = 0;\n  }\n  else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }" (if "if") (parenthesized_expression "(puVar5 == (undefined *)piVar2[2])" (( "(") (binary_expression "puVar5 == (undefined *)piVar2[2]" (identifier "puVar5") (== "==") (cast_expression "(undefined *)piVar2[2]" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")))) () ")")) (compound_statement "{\n    iVar1 = 0;\n  }" ({ "{") (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }" (else "else") (compound_statement "{\n    iVar1 = 0;\n    piVar3 = piVar2 + 3;\n    do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);\n  }" ({ "{") (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (expression_statement "piVar3 = piVar2 + 3;" (assignment_expression "piVar3 = piVar2 + 3" (identifier "piVar3") (= "=") (binary_expression "piVar2 + 3" (identifier "piVar2") (+ "+") (number_literal "3"))) (; ";")) (do_statement "do {\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    } while (puVar4 != puVar5);" (do "do") (compound_statement "{\n      iVar1 = iVar1 + 1;\n      if (iVar1 == *piVar2) {\n        return -1;\n      }\n      puVar4 = (undefined *)*piVar3;\n      piVar3 = piVar3 + 1;\n    }" ({ "{") (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar1 == *piVar2) {\n        return -1;\n      }" (if "if") (parenthesized_expression "(iVar1 == *piVar2)" (( "(") (binary_expression "iVar1 == *piVar2" (identifier "iVar1") (== "==") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) () ")")) (compound_statement "{\n        return -1;\n      }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "puVar4 = (undefined *)*piVar3;" (assignment_expression "puVar4 = (undefined *)*piVar3" (identifier "puVar4") (= "=") (cast_expression "(undefined *)*piVar3" (( "(") (type_descriptor "undefined *" (type_identifier "undefined") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*piVar3" (* "*") (identifier "piVar3")))) (; ";")) (expression_statement "piVar3 = piVar3 + 1;" (assignment_expression "piVar3 = piVar3 + 1" (identifier "piVar3") (= "=") (binary_expression "piVar3 + 1" (identifier "piVar3") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(puVar4 != puVar5)" (( "(") (binary_expression "puVar4 != puVar5" (identifier "puVar4") (!= "!=") (identifier "puVar5")) () ")")) (; ";")) (} "}")))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))
(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)) (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: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (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 (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (identifier) (number_literal) (binary_expression left: (identifier) right: (number_literal))))) (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: (pointer_expression argument: (identifier)) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (identifier)))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (pointer_expression argument: (identifier))))) (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 (identifier)))))

int MASKED(int param_1,undefined4 param_2,undefined4 param_3)

{
  int iVar1;
  int *piVar2;
  int *piVar3;
  undefined *puVar4;
  undefined *puVar5;
  
  if (*(int *)(param_1 + 0xc) == 0) {
    iVar1 = FUN_0004f804(param_2,param_3);
    *(int *)(param_1 + 0xc) = iVar1;
    return iVar1;
  }
  puVar5 = PTR_DAT_0008d800 + -0x4de0;
  puVar4 = PTR_DAT_0008d800 + -0x4d94;
  (*(code *)PTR___assert_fail_0008de30)(puVar4,puVar5,0xda,PTR_DAT_0008d800 + -0x4d30);
  piVar2 = *(int **)(puVar4 + 0xc);
  if (*piVar2 < 1) {
    return -1;
  }
  if (puVar5 == (undefined *)piVar2[2]) {
    iVar1 = 0;
  }
  else {
    iVar1 = 0;
    piVar3 = piVar2 + 3;
    do {
      iVar1 = iVar1 + 1;
      if (iVar1 == *piVar2) {
        return -1;
      }
      puVar4 = (undefined *)*piVar3;
      piVar3 = piVar3 + 1;
    } while (puVar4 != puVar5);
  }
  return iVar1;
}

