
/* WARNING: Unknown calling convention */

int acttab_action_size(acttab *p)

{
  int iVar1;
  long lVar2;
  
  iVar1 = p->nAction;
  if ((0 < iVar1) && (p->aAction[(long)iVar1 + -1].lookahead < 0)) {
    lVar2 = (long)(iVar1 + -1);
    do {
      iVar1 = (int)lVar2;
      if (iVar1 < 1) {
        return iVar1;
      }
      lVar2 = lVar2 + -1;
    } while (p->aAction[lVar2].lookahead < 0);
  }
  return iVar1;
}



ulong FUN_0010364a(uint *param_1)

{
  uint uVar1;
  ulong uVar2;
  ulong uVar3;
  
  uVar1 = *param_1;
  uVar2 = (ulong)uVar1;
  if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {
    uVar3 = (ulong)(int)(uVar1 - 1);
    do {
      uVar2 = uVar3 & 0xffffffff;
      if ((int)uVar3 < 1) {
        return uVar2;
      }
      uVar3 = uVar3 - 1;
    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);
  }
  return uVar2;
}


MOV EAX,dword ptr [RDI]
TEST EAX,EAX
JLE 0x00103674
MOV RCX,qword ptr [RDI + 0x8]
MOVSXD RDX,EAX
CMP dword ptr [RCX + RDX*0x8 + -0x8],0x0
JNS 0x00103674
SUB EAX,0x1
MOVSXD RDX,EAX
MOV EAX,EDX
TEST EDX,EDX
JLE 0x00103674
SUB RDX,0x1
CMP dword ptr [RCX + RDX*0x8],0x0
JS 0x00103664
RET
(translation_unit "ulong FUN_0010364a(uint *param_1)\n\n{\n  uint uVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  uVar1 = *param_1;\n  uVar2 = (ulong)uVar1;\n  if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }\n  return uVar2;\n}\n\n" (function_definition "ulong FUN_0010364a(uint *param_1)\n\n{\n  uint uVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  uVar1 = *param_1;\n  uVar2 = (ulong)uVar1;\n  if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_0010364a(uint *param_1)" identifier (parameter_list "(uint *param_1)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  uVar1 = *param_1;\n  uVar2 = (ulong)uVar1;\n  if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }\n  return uVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar2 = (ulong)uVar1;" (assignment_expression "uVar2 = (ulong)uVar1" identifier = (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (if_statement "if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }" if (parenthesized_expression "((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0))" ( (binary_expression "(0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)" (parenthesized_expression "(0 < (int)uVar1)" ( (binary_expression "0 < (int)uVar1" number_literal < (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)" ( (binary_expression "*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0" (pointer_expression "*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8)" * (cast_expression "(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8)" ( (binary_expression "*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8" (binary_expression "*(long *)(param_1 + 2) + -8" (pointer_expression "*(long *)(param_1 + 2)" * (cast_expression "(long *)(param_1 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) + number_literal) + (binary_expression "(long)(int)uVar1 * 8" (cast_expression "(long)(int)uVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier)) * number_literal)) )))) < number_literal) ))) )) (compound_statement "{\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }" { (expression_statement "uVar3 = (ulong)(int)(uVar1 - 1);" (assignment_expression "uVar3 = (ulong)(int)(uVar1 - 1)" identifier = (call_expression "(ulong)(int)(uVar1 - 1)" (call_expression "(ulong)(int)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(int)" ( identifier ))) (argument_list "(uVar1 - 1)" ( (binary_expression "uVar1 - 1" identifier - number_literal) )))) ;) (do_statement "do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);" do (compound_statement "{\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    }" { (expression_statement "uVar2 = uVar3 & 0xffffffff;" (assignment_expression "uVar2 = uVar3 & 0xffffffff" identifier = (binary_expression "uVar3 & 0xffffffff" identifier & number_literal)) ;) (if_statement "if ((int)uVar3 < 1) {\n        return uVar2;\n      }" if (parenthesized_expression "((int)uVar3 < 1)" ( (binary_expression "(int)uVar3 < 1" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        return uVar2;\n      }" { (return_statement "return uVar2;" return identifier ;) })) (expression_statement "uVar3 = uVar3 - 1;" (assignment_expression "uVar3 = uVar3 - 1" identifier = (binary_expression "uVar3 - 1" identifier - number_literal)) ;) }) while (parenthesized_expression "(*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0)" ( (binary_expression "*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0" (pointer_expression "*(int *)(*(long *)(param_1 + 2) + uVar3 * 8)" * (cast_expression "(int *)(*(long *)(param_1 + 2) + uVar3 * 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 2) + uVar3 * 8)" ( (binary_expression "*(long *)(param_1 + 2) + uVar3 * 8" (pointer_expression "*(long *)(param_1 + 2)" * (cast_expression "(long *)(param_1 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) + (binary_expression "uVar3 * 8" identifier * number_literal)) )))) < number_literal) )) ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint acttab_action_size(acttab *p)\n\n{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = p->nAction;\n  if ((0 < iVar1) && (p->aAction[(long)iVar1 + -1].lookahead < 0)) {\n    lVar2 = (long)(iVar1 + -1);\n    do {\n      iVar1 = (int)lVar2;\n      if (iVar1 < 1) {\n        return iVar1;\n      }\n      lVar2 = lVar2 + -1;\n    } while (p->aAction[lVar2].lookahead < 0);\n  }\n  return iVar1;\n}\n\n" comment (function_definition "int acttab_action_size(acttab *p)\n\n{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = p->nAction;\n  if ((0 < iVar1) && (p->aAction[(long)iVar1 + -1].lookahead < 0)) {\n    lVar2 = (long)(iVar1 + -1);\n    do {\n      iVar1 = (int)lVar2;\n      if (iVar1 < 1) {\n        return iVar1;\n      }\n      lVar2 = lVar2 + -1;\n    } while (p->aAction[lVar2].lookahead < 0);\n  }\n  return iVar1;\n}" primitive_type (function_declarator "acttab_action_size(acttab *p)" identifier (parameter_list "(acttab *p)" ( (parameter_declaration "acttab *p" type_identifier (pointer_declarator "*p" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  long lVar2;\n  \n  iVar1 = p->nAction;\n  if ((0 < iVar1) && (p->aAction[(long)iVar1 + -1].lookahead < 0)) {\n    lVar2 = (long)(iVar1 + -1);\n    do {\n      iVar1 = (int)lVar2;\n      if (iVar1 < 1) {\n        return iVar1;\n      }\n      lVar2 = lVar2 + -1;\n    } while (p->aAction[lVar2].lookahead < 0);\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "iVar1 = p->nAction;" (assignment_expression "iVar1 = p->nAction" identifier = (field_expression "p->nAction" identifier -> field_identifier)) ;) (if_statement "if ((0 < iVar1) && (p->aAction[(long)iVar1 + -1].lookahead < 0)) {\n    lVar2 = (long)(iVar1 + -1);\n    do {\n      iVar1 = (int)lVar2;\n      if (iVar1 < 1) {\n        return iVar1;\n      }\n      lVar2 = lVar2 + -1;\n    } while (p->aAction[lVar2].lookahead < 0);\n  }" if (parenthesized_expression "((0 < iVar1) && (p->aAction[(long)iVar1 + -1].lookahead < 0))" ( (binary_expression "(0 < iVar1) && (p->aAction[(long)iVar1 + -1].lookahead < 0)" (parenthesized_expression "(0 < iVar1)" ( (binary_expression "0 < iVar1" number_literal < identifier) )) && (parenthesized_expression "(p->aAction[(long)iVar1 + -1].lookahead < 0)" ( (binary_expression "p->aAction[(long)iVar1 + -1].lookahead < 0" (field_expression "p->aAction[(long)iVar1 + -1].lookahead" (subscript_expression "p->aAction[(long)iVar1 + -1]" (field_expression "p->aAction" identifier -> field_identifier) [ (binary_expression "(long)iVar1 + -1" (cast_expression "(long)iVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ]) . field_identifier) < number_literal) ))) )) (compound_statement "{\n    lVar2 = (long)(iVar1 + -1);\n    do {\n      iVar1 = (int)lVar2;\n      if (iVar1 < 1) {\n        return iVar1;\n      }\n      lVar2 = lVar2 + -1;\n    } while (p->aAction[lVar2].lookahead < 0);\n  }" { (expression_statement "lVar2 = (long)(iVar1 + -1);" (assignment_expression "lVar2 = (long)(iVar1 + -1)" identifier = (cast_expression "(long)(iVar1 + -1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar1 + -1)" ( (binary_expression "iVar1 + -1" identifier + number_literal) )))) ;) (do_statement "do {\n      iVar1 = (int)lVar2;\n      if (iVar1 < 1) {\n        return iVar1;\n      }\n      lVar2 = lVar2 + -1;\n    } while (p->aAction[lVar2].lookahead < 0);" do (compound_statement "{\n      iVar1 = (int)lVar2;\n      if (iVar1 < 1) {\n        return iVar1;\n      }\n      lVar2 = lVar2 + -1;\n    }" { (expression_statement "iVar1 = (int)lVar2;" (assignment_expression "iVar1 = (int)lVar2" identifier = (cast_expression "(int)lVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (if_statement "if (iVar1 < 1) {\n        return iVar1;\n      }" if (parenthesized_expression "(iVar1 < 1)" ( (binary_expression "iVar1 < 1" identifier < number_literal) )) (compound_statement "{\n        return iVar1;\n      }" { (return_statement "return iVar1;" return identifier ;) })) (expression_statement "lVar2 = lVar2 + -1;" (assignment_expression "lVar2 = lVar2 + -1" identifier = (binary_expression "lVar2 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(p->aAction[lVar2].lookahead < 0)" ( (binary_expression "p->aAction[lVar2].lookahead < 0" (field_expression "p->aAction[lVar2].lookahead" (subscript_expression "p->aAction[lVar2]" (field_expression "p->aAction" identifier -> field_identifier) [ identifier ]) . field_identifier) < number_literal) )) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "ulong FUN_0010364a(uint *param_1)\n\n{\n  uint uVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  uVar1 = *param_1;\n  uVar2 = (ulong)uVar1;\n  if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }\n  return uVar2;\n}\n\n" (function_definition "ulong FUN_0010364a(uint *param_1)\n\n{\n  uint uVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  uVar1 = *param_1;\n  uVar2 = (ulong)uVar1;\n  if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_0010364a(uint *param_1)" identifier (parameter_list "(uint *param_1)" ( (parameter_declaration "uint *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  uVar1 = *param_1;\n  uVar2 = (ulong)uVar1;\n  if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }\n  return uVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "ulong uVar3;" type_identifier identifier ;) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "uVar2 = (ulong)uVar1;" (assignment_expression "uVar2 = (ulong)uVar1" identifier = (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) (if_statement "if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }" if (parenthesized_expression "((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0))" ( (binary_expression "(0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)" (parenthesized_expression "(0 < (int)uVar1)" ( (binary_expression "0 < (int)uVar1" number_literal < (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier)) )) && (parenthesized_expression "(*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)" ( (binary_expression "*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0" (pointer_expression "*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8)" * (cast_expression "(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8)" ( (binary_expression "*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8" (binary_expression "*(long *)(param_1 + 2) + -8" (pointer_expression "*(long *)(param_1 + 2)" * (cast_expression "(long *)(param_1 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) + number_literal) + (binary_expression "(long)(int)uVar1 * 8" (cast_expression "(long)(int)uVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier)) * number_literal)) )))) < number_literal) ))) )) (compound_statement "{\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }" { (expression_statement "uVar3 = (ulong)(int)(uVar1 - 1);" (assignment_expression "uVar3 = (ulong)(int)(uVar1 - 1)" identifier = (call_expression "(ulong)(int)(uVar1 - 1)" (call_expression "(ulong)(int)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(int)" ( identifier ))) (argument_list "(uVar1 - 1)" ( (binary_expression "uVar1 - 1" identifier - number_literal) )))) ;) (do_statement "do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);" do (compound_statement "{\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    }" { (expression_statement "uVar2 = uVar3 & 0xffffffff;" (assignment_expression "uVar2 = uVar3 & 0xffffffff" identifier = (binary_expression "uVar3 & 0xffffffff" identifier & number_literal)) ;) (if_statement "if ((int)uVar3 < 1) {\n        return uVar2;\n      }" if (parenthesized_expression "((int)uVar3 < 1)" ( (binary_expression "(int)uVar3 < 1" (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) )) (compound_statement "{\n        return uVar2;\n      }" { (return_statement "return uVar2;" return identifier ;) })) (expression_statement "uVar3 = uVar3 - 1;" (assignment_expression "uVar3 = uVar3 - 1" identifier = (binary_expression "uVar3 - 1" identifier - number_literal)) ;) }) while (parenthesized_expression "(*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0)" ( (binary_expression "*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0" (pointer_expression "*(int *)(*(long *)(param_1 + 2) + uVar3 * 8)" * (cast_expression "(int *)(*(long *)(param_1 + 2) + uVar3 * 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(long *)(param_1 + 2) + uVar3 * 8)" ( (binary_expression "*(long *)(param_1 + 2) + uVar3 * 8" (pointer_expression "*(long *)(param_1 + 2)" * (cast_expression "(long *)(param_1 + 2)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) )))) + (binary_expression "uVar3 * 8" identifier * number_literal)) )))) < number_literal) )) ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (cast_expression ( (type_descriptor TYPE) ) IDENT)) * LIT)) )))) < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( IDENT ))) (argument_list ( (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 (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) }) while (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (binary_expression IDENT * LIT)) )))) < LIT) )) ;) })) (return_statement return IDENT ;) })))
(function_definition "ulong FUN_0010364a(uint *param_1)\n\n{\n  uint uVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  uVar1 = *param_1;\n  uVar2 = (ulong)uVar1;\n  if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }\n  return uVar2;\n}" (type_identifier "ulong") (function_declarator "FUN_0010364a(uint *param_1)" (identifier "FUN_0010364a") (parameter_list "(uint *param_1)" (( "(") (parameter_declaration "uint *param_1" (type_identifier "uint") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  ulong uVar2;\n  ulong uVar3;\n  \n  uVar1 = *param_1;\n  uVar2 = (ulong)uVar1;\n  if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }\n  return uVar2;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (declaration "ulong uVar3;" (type_identifier "ulong") (identifier "uVar3") (; ";")) (expression_statement "uVar1 = *param_1;" (assignment_expression "uVar1 = *param_1" (identifier "uVar1") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "uVar2 = (ulong)uVar1;" (assignment_expression "uVar2 = (ulong)uVar1" (identifier "uVar2") (= "=") (cast_expression "(ulong)uVar1" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar1"))) (; ";")) (if_statement "if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }" (if "if") (parenthesized_expression "((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0))" (( "(") (binary_expression "(0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)" (parenthesized_expression "(0 < (int)uVar1)" (( "(") (binary_expression "0 < (int)uVar1" (number_literal "0") (< "<") (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1"))) () ")")) (&& "&&") (parenthesized_expression "(*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)" (( "(") (binary_expression "*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0" (pointer_expression "*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8)" (* "*") (cast_expression "(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8)" (( "(") (binary_expression "*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8" (binary_expression "*(long *)(param_1 + 2) + -8" (pointer_expression "*(long *)(param_1 + 2)" (* "*") (cast_expression "(long *)(param_1 + 2)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")")))) (+ "+") (number_literal "-8")) (+ "+") (binary_expression "(long)(int)uVar1 * 8" (cast_expression "(long)(int)uVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1"))) (* "*") (number_literal "8"))) () ")")))) (< "<") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    uVar3 = (ulong)(int)(uVar1 - 1);\n    do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);\n  }" ({ "{") (expression_statement "uVar3 = (ulong)(int)(uVar1 - 1);" (assignment_expression "uVar3 = (ulong)(int)(uVar1 - 1)" (identifier "uVar3") (= "=") (call_expression "(ulong)(int)(uVar1 - 1)" (call_expression "(ulong)(int)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(int)" (( "(") (identifier "int") () ")"))) (argument_list "(uVar1 - 1)" (( "(") (binary_expression "uVar1 - 1" (identifier "uVar1") (- "-") (number_literal "1")) () ")")))) (; ";")) (do_statement "do {\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);" (do "do") (compound_statement "{\n      uVar2 = uVar3 & 0xffffffff;\n      if ((int)uVar3 < 1) {\n        return uVar2;\n      }\n      uVar3 = uVar3 - 1;\n    }" ({ "{") (expression_statement "uVar2 = uVar3 & 0xffffffff;" (assignment_expression "uVar2 = uVar3 & 0xffffffff" (identifier "uVar2") (= "=") (binary_expression "uVar3 & 0xffffffff" (identifier "uVar3") (& "&") (number_literal "0xffffffff"))) (; ";")) (if_statement "if ((int)uVar3 < 1) {\n        return uVar2;\n      }" (if "if") (parenthesized_expression "((int)uVar3 < 1)" (( "(") (binary_expression "(int)uVar3 < 1" (cast_expression "(int)uVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar3")) (< "<") (number_literal "1")) () ")")) (compound_statement "{\n        return uVar2;\n      }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (expression_statement "uVar3 = uVar3 - 1;" (assignment_expression "uVar3 = uVar3 - 1" (identifier "uVar3") (= "=") (binary_expression "uVar3 - 1" (identifier "uVar3") (- "-") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0)" (( "(") (binary_expression "*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0" (pointer_expression "*(int *)(*(long *)(param_1 + 2) + uVar3 * 8)" (* "*") (cast_expression "(int *)(*(long *)(param_1 + 2) + uVar3 * 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(long *)(param_1 + 2) + uVar3 * 8)" (( "(") (binary_expression "*(long *)(param_1 + 2) + uVar3 * 8" (pointer_expression "*(long *)(param_1 + 2)" (* "*") (cast_expression "(long *)(param_1 + 2)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")")))) (+ "+") (binary_expression "uVar3 * 8" (identifier "uVar3") (* "*") (number_literal "8"))) () ")")))) (< "<") (number_literal "0")) () ")")) (; ";")) (} "}"))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(type_1 *p)

{
  int var_1;
  long var_2;
  
  var_1 = p->nAction;
  if ((0 < var_1) && (p->aAction[(long)var_1 + -1].lookahead < 0)) {
    var_2 = (long)(var_1 + -1);
    do {
      var_1 = (int)var_2;
      if (var_1 < 1) {
        return var_1;
      }
      var_2 = var_2 + -1;
    } while (p->aAction[var_2].lookahead < 0);
  }
  return var_1;
}


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

ulong MASKED(uint *param_1)

{
  uint uVar1;
  ulong uVar2;
  ulong uVar3;
  
  uVar1 = *param_1;
  uVar2 = (ulong)uVar1;
  if ((0 < (int)uVar1) && (*(int *)(*(long *)(param_1 + 2) + -8 + (long)(int)uVar1 * 8) < 0)) {
    uVar3 = (ulong)(int)(uVar1 - 1);
    do {
      uVar2 = uVar3 & 0xffffffff;
      if ((int)uVar3 < 1) {
        return uVar2;
      }
      uVar3 = uVar3 - 1;
    } while (*(int *)(*(long *)(param_1 + 2) + uVar3 * 8) < 0);
  }
  return uVar2;
}

