
/* WARNING: Unknown calling convention */

int compute_action(lemon *lemp,action *ap)

{
  switch(ap->type) {
  case SHIFT:
    return ((ap->x).stp)->statenum;
  case ACCEPT:
    return lemp->accAction;
  case REDUCE:
    return lemp->minReduce + ((ap->x).rp)->iRule;
  case ERROR:
    return lemp->errAction;
  default:
    return -1;
  case SHIFTREDUCE:
    break;
  }
  if (lemp->nterminal <= ap->sp->index) {
    return lemp->minReduce + ((ap->x).rp)->iRule;
  }
  return lemp->minShiftReduce + ((ap->x).rp)->iRule;
}



int FUN_00105267(long param_1,long *param_2)

{
  switch((int)param_2[1]) {
  case 0:
    return *(int *)(param_2[2] + 0x10);
  case 1:
    return *(int *)(param_1 + 0x34);
  case 2:
    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);
  case 3:
    return *(int *)(param_1 + 0x30);
  default:
    return -1;
  case 10:
    break;
  }
  if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {
    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);
  }
  return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);
}


CMP dword ptr [RSI + 0x8],0xa
JA 0x001052bc
MOV EAX,dword ptr [RSI + 0x8]
LEA RDX,[0x10eff4]
MOVSXD RAX,dword ptr [RDX + RAX*0x4]
ADD RAX,RDX
JMP RAX
MOV RAX,qword ptr [RSI + 0x10]
MOV EAX,dword ptr [RAX + 0x10]
RET
MOV RAX,qword ptr [RSI]
MOV ECX,dword ptr [RDI + 0x28]
CMP dword ptr [RAX + 0x8],ECX
JL 0x0010529e
MOV RDX,qword ptr [RSI + 0x10]
MOV EAX,dword ptr [RDI + 0x3c]
ADD EAX,dword ptr [RDX + 0x64]
RET
MOV RDX,qword ptr [RSI + 0x10]
MOV EAX,dword ptr [RDI + 0x2c]
ADD EAX,dword ptr [RDX + 0x64]
RET
MOV RDX,qword ptr [RSI + 0x10]
MOV EAX,dword ptr [RDI + 0x3c]
ADD EAX,dword ptr [RDX + 0x64]
RET
MOV EAX,dword ptr [RDI + 0x30]
RET
MOV EAX,dword ptr [RDI + 0x34]
RET
MOV EAX,0xffffffff
RET
(translation_unit "int FUN_00105267(long param_1,long *param_2)\n\n{\n  switch((int)param_2[1]) {\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }\n  if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }\n  return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);\n}\n\n" (function_definition "int FUN_00105267(long param_1,long *param_2)\n\n{\n  switch((int)param_2[1]) {\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }\n  if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }\n  return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);\n}" primitive_type (function_declarator "FUN_00105267(long param_1,long *param_2)" identifier (parameter_list "(long param_1,long *param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  switch((int)param_2[1]) {\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }\n  if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }\n  return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);\n}" { (switch_statement "switch((int)param_2[1]) {\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }" switch (parenthesized_expression "((int)param_2[1])" ( (cast_expression "(int)param_2[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_2[1]" identifier [ number_literal ])) )) (compound_statement "{\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }" { (case_statement "case 0:\n    return *(int *)(param_2[2] + 0x10);" case number_literal : (return_statement "return *(int *)(param_2[2] + 0x10);" return (pointer_expression "*(int *)(param_2[2] + 0x10)" * (cast_expression "(int *)(param_2[2] + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[2] + 0x10)" ( (binary_expression "param_2[2] + 0x10" (subscript_expression "param_2[2]" identifier [ number_literal ]) + number_literal) )))) ;)) (case_statement "case 1:\n    return *(int *)(param_1 + 0x34);" case number_literal : (return_statement "return *(int *)(param_1 + 0x34);" return (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) ;)) (case_statement "case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);" case number_literal : (return_statement "return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);" return (binary_expression "*(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100)" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) + (pointer_expression "*(int *)(param_2[2] + 100)" * (cast_expression "(int *)(param_2[2] + 100)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[2] + 100)" ( (binary_expression "param_2[2] + 100" (subscript_expression "param_2[2]" identifier [ number_literal ]) + number_literal) ))))) ;)) (case_statement "case 3:\n    return *(int *)(param_1 + 0x30);" case number_literal : (return_statement "return *(int *)(param_1 + 0x30);" return (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) ;)) (case_statement "default:\n    return -1;" default : (return_statement "return -1;" return number_literal ;)) (case_statement "case 10:\n    break;" case number_literal : (break_statement "break;" break ;)) })) (if_statement "if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8))" ( (binary_expression "*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)" (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) <= (pointer_expression "*(int *)(*param_2 + 8)" * (cast_expression "(int *)(*param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_2 + 8)" ( (binary_expression "*param_2 + 8" (pointer_expression "*param_2" * identifier) + number_literal) ))))) )) (compound_statement "{\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }" { (return_statement "return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);" return (binary_expression "*(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100)" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) + (pointer_expression "*(int *)(param_2[2] + 100)" * (cast_expression "(int *)(param_2[2] + 100)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[2] + 100)" ( (binary_expression "param_2[2] + 100" (subscript_expression "param_2[2]" identifier [ number_literal ]) + number_literal) ))))) ;) })) (return_statement "return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);" return (binary_expression "*(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100)" (pointer_expression "*(int *)(param_1 + 0x2c)" * (cast_expression "(int *)(param_1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) + (pointer_expression "*(int *)(param_2[2] + 100)" * (cast_expression "(int *)(param_2[2] + 100)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[2] + 100)" ( (binary_expression "param_2[2] + 100" (subscript_expression "param_2[2]" identifier [ number_literal ]) + number_literal) ))))) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nint compute_action(lemon *lemp,action *ap)\n\n{\n  switch(ap->type) {\n  case SHIFT:\n    return ((ap->x).stp)->statenum;\n  case ACCEPT:\n    return lemp->accAction;\n  case REDUCE:\n    return lemp->minReduce + ((ap->x).rp)->iRule;\n  case ERROR:\n    return lemp->errAction;\n  default:\n    return -1;\n  case SHIFTREDUCE:\n    break;\n  }\n  if (lemp->nterminal <= ap->sp->index) {\n    return lemp->minReduce + ((ap->x).rp)->iRule;\n  }\n  return lemp->minShiftReduce + ((ap->x).rp)->iRule;\n}\n\n" comment (function_definition "int compute_action(lemon *lemp,action *ap)\n\n{\n  switch(ap->type) {\n  case SHIFT:\n    return ((ap->x).stp)->statenum;\n  case ACCEPT:\n    return lemp->accAction;\n  case REDUCE:\n    return lemp->minReduce + ((ap->x).rp)->iRule;\n  case ERROR:\n    return lemp->errAction;\n  default:\n    return -1;\n  case SHIFTREDUCE:\n    break;\n  }\n  if (lemp->nterminal <= ap->sp->index) {\n    return lemp->minReduce + ((ap->x).rp)->iRule;\n  }\n  return lemp->minShiftReduce + ((ap->x).rp)->iRule;\n}" primitive_type (function_declarator "compute_action(lemon *lemp,action *ap)" identifier (parameter_list "(lemon *lemp,action *ap)" ( (parameter_declaration "lemon *lemp" type_identifier (pointer_declarator "*lemp" * identifier)) , (parameter_declaration "action *ap" type_identifier (pointer_declarator "*ap" * identifier)) ))) (compound_statement "{\n  switch(ap->type) {\n  case SHIFT:\n    return ((ap->x).stp)->statenum;\n  case ACCEPT:\n    return lemp->accAction;\n  case REDUCE:\n    return lemp->minReduce + ((ap->x).rp)->iRule;\n  case ERROR:\n    return lemp->errAction;\n  default:\n    return -1;\n  case SHIFTREDUCE:\n    break;\n  }\n  if (lemp->nterminal <= ap->sp->index) {\n    return lemp->minReduce + ((ap->x).rp)->iRule;\n  }\n  return lemp->minShiftReduce + ((ap->x).rp)->iRule;\n}" { (switch_statement "switch(ap->type) {\n  case SHIFT:\n    return ((ap->x).stp)->statenum;\n  case ACCEPT:\n    return lemp->accAction;\n  case REDUCE:\n    return lemp->minReduce + ((ap->x).rp)->iRule;\n  case ERROR:\n    return lemp->errAction;\n  default:\n    return -1;\n  case SHIFTREDUCE:\n    break;\n  }" switch (parenthesized_expression "(ap->type)" ( (field_expression "ap->type" identifier -> field_identifier) )) (compound_statement "{\n  case SHIFT:\n    return ((ap->x).stp)->statenum;\n  case ACCEPT:\n    return lemp->accAction;\n  case REDUCE:\n    return lemp->minReduce + ((ap->x).rp)->iRule;\n  case ERROR:\n    return lemp->errAction;\n  default:\n    return -1;\n  case SHIFTREDUCE:\n    break;\n  }" { (case_statement "case SHIFT:\n    return ((ap->x).stp)->statenum;" case identifier : (return_statement "return ((ap->x).stp)->statenum;" return (field_expression "((ap->x).stp)->statenum" (parenthesized_expression "((ap->x).stp)" ( (field_expression "(ap->x).stp" (parenthesized_expression "(ap->x)" ( (field_expression "ap->x" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier) ;)) (case_statement "case ACCEPT:\n    return lemp->accAction;" case identifier : (return_statement "return lemp->accAction;" return (field_expression "lemp->accAction" identifier -> field_identifier) ;)) (case_statement "case REDUCE:\n    return lemp->minReduce + ((ap->x).rp)->iRule;" case identifier : (return_statement "return lemp->minReduce + ((ap->x).rp)->iRule;" return (binary_expression "lemp->minReduce + ((ap->x).rp)->iRule" (field_expression "lemp->minReduce" identifier -> field_identifier) + (field_expression "((ap->x).rp)->iRule" (parenthesized_expression "((ap->x).rp)" ( (field_expression "(ap->x).rp" (parenthesized_expression "(ap->x)" ( (field_expression "ap->x" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier)) ;)) (case_statement "case ERROR:\n    return lemp->errAction;" case identifier : (return_statement "return lemp->errAction;" return (field_expression "lemp->errAction" identifier -> field_identifier) ;)) (case_statement "default:\n    return -1;" default : (return_statement "return -1;" return number_literal ;)) (case_statement "case SHIFTREDUCE:\n    break;" case identifier : (break_statement "break;" break ;)) })) (if_statement "if (lemp->nterminal <= ap->sp->index) {\n    return lemp->minReduce + ((ap->x).rp)->iRule;\n  }" if (parenthesized_expression "(lemp->nterminal <= ap->sp->index)" ( (binary_expression "lemp->nterminal <= ap->sp->index" (field_expression "lemp->nterminal" identifier -> field_identifier) <= (field_expression "ap->sp->index" (field_expression "ap->sp" identifier -> field_identifier) -> field_identifier)) )) (compound_statement "{\n    return lemp->minReduce + ((ap->x).rp)->iRule;\n  }" { (return_statement "return lemp->minReduce + ((ap->x).rp)->iRule;" return (binary_expression "lemp->minReduce + ((ap->x).rp)->iRule" (field_expression "lemp->minReduce" identifier -> field_identifier) + (field_expression "((ap->x).rp)->iRule" (parenthesized_expression "((ap->x).rp)" ( (field_expression "(ap->x).rp" (parenthesized_expression "(ap->x)" ( (field_expression "ap->x" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier)) ;) })) (return_statement "return lemp->minShiftReduce + ((ap->x).rp)->iRule;" return (binary_expression "lemp->minShiftReduce + ((ap->x).rp)->iRule" (field_expression "lemp->minShiftReduce" identifier -> field_identifier) + (field_expression "((ap->x).rp)->iRule" (parenthesized_expression "((ap->x).rp)" ( (field_expression "(ap->x).rp" (parenthesized_expression "(ap->x)" ( (field_expression "ap->x" identifier -> field_identifier) )) . field_identifier) )) -> field_identifier)) ;) })))
(translation_unit "int FUN_00105267(long param_1,long *param_2)\n\n{\n  switch((int)param_2[1]) {\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }\n  if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }\n  return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);\n}\n\n" (function_definition "int FUN_00105267(long param_1,long *param_2)\n\n{\n  switch((int)param_2[1]) {\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }\n  if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }\n  return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);\n}" primitive_type (function_declarator "FUN_00105267(long param_1,long *param_2)" identifier (parameter_list "(long param_1,long *param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  switch((int)param_2[1]) {\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }\n  if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }\n  return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);\n}" { (switch_statement "switch((int)param_2[1]) {\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }" switch (parenthesized_expression "((int)param_2[1])" ( (cast_expression "(int)param_2[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_2[1]" identifier [ number_literal ])) )) (compound_statement "{\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }" { (case_statement "case 0:\n    return *(int *)(param_2[2] + 0x10);" case number_literal : (return_statement "return *(int *)(param_2[2] + 0x10);" return (pointer_expression "*(int *)(param_2[2] + 0x10)" * (cast_expression "(int *)(param_2[2] + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[2] + 0x10)" ( (binary_expression "param_2[2] + 0x10" (subscript_expression "param_2[2]" identifier [ number_literal ]) + number_literal) )))) ;)) (case_statement "case 1:\n    return *(int *)(param_1 + 0x34);" case number_literal : (return_statement "return *(int *)(param_1 + 0x34);" return (pointer_expression "*(int *)(param_1 + 0x34)" * (cast_expression "(int *)(param_1 + 0x34)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x34)" ( (binary_expression "param_1 + 0x34" identifier + number_literal) )))) ;)) (case_statement "case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);" case number_literal : (return_statement "return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);" return (binary_expression "*(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100)" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) + (pointer_expression "*(int *)(param_2[2] + 100)" * (cast_expression "(int *)(param_2[2] + 100)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[2] + 100)" ( (binary_expression "param_2[2] + 100" (subscript_expression "param_2[2]" identifier [ number_literal ]) + number_literal) ))))) ;)) (case_statement "case 3:\n    return *(int *)(param_1 + 0x30);" case number_literal : (return_statement "return *(int *)(param_1 + 0x30);" return (pointer_expression "*(int *)(param_1 + 0x30)" * (cast_expression "(int *)(param_1 + 0x30)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) ;)) (case_statement "default:\n    return -1;" default : (return_statement "return -1;" return number_literal ;)) (case_statement "case 10:\n    break;" case number_literal : (break_statement "break;" break ;)) })) (if_statement "if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }" if (parenthesized_expression "(*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8))" ( (binary_expression "*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)" (pointer_expression "*(int *)(param_1 + 0x28)" * (cast_expression "(int *)(param_1 + 0x28)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) <= (pointer_expression "*(int *)(*param_2 + 8)" * (cast_expression "(int *)(*param_2 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_2 + 8)" ( (binary_expression "*param_2 + 8" (pointer_expression "*param_2" * identifier) + number_literal) ))))) )) (compound_statement "{\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }" { (return_statement "return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);" return (binary_expression "*(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100)" (pointer_expression "*(int *)(param_1 + 0x3c)" * (cast_expression "(int *)(param_1 + 0x3c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x3c)" ( (binary_expression "param_1 + 0x3c" identifier + number_literal) )))) + (pointer_expression "*(int *)(param_2[2] + 100)" * (cast_expression "(int *)(param_2[2] + 100)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[2] + 100)" ( (binary_expression "param_2[2] + 100" (subscript_expression "param_2[2]" identifier [ number_literal ]) + number_literal) ))))) ;) })) (return_statement "return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);" return (binary_expression "*(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100)" (pointer_expression "*(int *)(param_1 + 0x2c)" * (cast_expression "(int *)(param_1 + 0x2c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x2c)" ( (binary_expression "param_1 + 0x2c" identifier + number_literal) )))) + (pointer_expression "*(int *)(param_2[2] + 100)" * (cast_expression "(int *)(param_2[2] + 100)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2[2] + 100)" ( (binary_expression "param_2[2] + 100" (subscript_expression "param_2[2]" identifier [ number_literal ]) + number_literal) ))))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (switch_statement switch (parenthesized_expression ( (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) )) (compound_statement { (case_statement case LIT : (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) )))) ;)) (case_statement case LIT : (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;)) (case_statement case LIT : (return_statement return (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) ;)) (case_statement case LIT : (return_statement return (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;)) (case_statement default : (return_statement return LIT ;)) (case_statement case LIT : (break_statement break ;)) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (compound_statement { (return_statement return (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) ;) })) (return_statement return (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) ))))) ;) })))
(function_definition "int FUN_00105267(long param_1,long *param_2)\n\n{\n  switch((int)param_2[1]) {\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }\n  if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }\n  return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);\n}" (primitive_type "int") (function_declarator "FUN_00105267(long param_1,long *param_2)" (identifier "FUN_00105267") (parameter_list "(long param_1,long *param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "long *param_2" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  switch((int)param_2[1]) {\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }\n  if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }\n  return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);\n}" ({ "{") (switch_statement "switch((int)param_2[1]) {\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }" (switch "switch") (parenthesized_expression "((int)param_2[1])" (( "(") (cast_expression "(int)param_2[1]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) () ")")) (compound_statement "{\n  case 0:\n    return *(int *)(param_2[2] + 0x10);\n  case 1:\n    return *(int *)(param_1 + 0x34);\n  case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  case 3:\n    return *(int *)(param_1 + 0x30);\n  default:\n    return -1;\n  case 10:\n    break;\n  }" ({ "{") (case_statement "case 0:\n    return *(int *)(param_2[2] + 0x10);" (case "case") (number_literal "0") (: ":") (return_statement "return *(int *)(param_2[2] + 0x10);" (return "return") (pointer_expression "*(int *)(param_2[2] + 0x10)" (* "*") (cast_expression "(int *)(param_2[2] + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2[2] + 0x10)" (( "(") (binary_expression "param_2[2] + 0x10" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "0x10")) () ")")))) (; ";"))) (case_statement "case 1:\n    return *(int *)(param_1 + 0x34);" (case "case") (number_literal "1") (: ":") (return_statement "return *(int *)(param_1 + 0x34);" (return "return") (pointer_expression "*(int *)(param_1 + 0x34)" (* "*") (cast_expression "(int *)(param_1 + 0x34)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x34)" (( "(") (binary_expression "param_1 + 0x34" (identifier "param_1") (+ "+") (number_literal "0x34")) () ")")))) (; ";"))) (case_statement "case 2:\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);" (case "case") (number_literal "2") (: ":") (return_statement "return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);" (return "return") (binary_expression "*(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100)" (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (+ "+") (pointer_expression "*(int *)(param_2[2] + 100)" (* "*") (cast_expression "(int *)(param_2[2] + 100)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2[2] + 100)" (( "(") (binary_expression "param_2[2] + 100" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "100")) () ")"))))) (; ";"))) (case_statement "case 3:\n    return *(int *)(param_1 + 0x30);" (case "case") (number_literal "3") (: ":") (return_statement "return *(int *)(param_1 + 0x30);" (return "return") (pointer_expression "*(int *)(param_1 + 0x30)" (* "*") (cast_expression "(int *)(param_1 + 0x30)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (; ";"))) (case_statement "default:\n    return -1;" (default "default") (: ":") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";"))) (case_statement "case 10:\n    break;" (case "case") (number_literal "10") (: ":") (break_statement "break;" (break "break") (; ";"))) (} "}"))) (if_statement "if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8))" (( "(") (binary_expression "*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)" (pointer_expression "*(int *)(param_1 + 0x28)" (* "*") (cast_expression "(int *)(param_1 + 0x28)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (<= "<=") (pointer_expression "*(int *)(*param_2 + 8)" (* "*") (cast_expression "(int *)(*param_2 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_2 + 8)" (( "(") (binary_expression "*param_2 + 8" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (number_literal "8")) () ")"))))) () ")")) (compound_statement "{\n    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);\n  }" ({ "{") (return_statement "return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);" (return "return") (binary_expression "*(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100)" (pointer_expression "*(int *)(param_1 + 0x3c)" (* "*") (cast_expression "(int *)(param_1 + 0x3c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x3c)" (( "(") (binary_expression "param_1 + 0x3c" (identifier "param_1") (+ "+") (number_literal "0x3c")) () ")")))) (+ "+") (pointer_expression "*(int *)(param_2[2] + 100)" (* "*") (cast_expression "(int *)(param_2[2] + 100)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2[2] + 100)" (( "(") (binary_expression "param_2[2] + 100" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "100")) () ")"))))) (; ";")) (} "}"))) (return_statement "return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);" (return "return") (binary_expression "*(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100)" (pointer_expression "*(int *)(param_1 + 0x2c)" (* "*") (cast_expression "(int *)(param_1 + 0x2c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x2c)" (( "(") (binary_expression "param_1 + 0x2c" (identifier "param_1") (+ "+") (number_literal "0x2c")) () ")")))) (+ "+") (pointer_expression "*(int *)(param_2[2] + 100)" (* "*") (cast_expression "(int *)(param_2[2] + 100)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2[2] + 100)" (( "(") (binary_expression "param_2[2] + 100" (subscript_expression "param_2[2]" (identifier "param_2") ([ "[") (number_literal "2") (] "]")) (+ "+") (number_literal "100")) () ")"))))) (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

int function_1(type_1 *lemp,type_2 *ap)

{
  switch(ap->type) {
  case SHIFT:
    return ((ap->x).stp)->statenum;
  case ACCEPT:
    return lemp->accAction;
  case REDUCE:
    return lemp->minReduce + ((ap->x).rp)->iRule;
  case ERROR:
    return lemp->errAction;
  default:
    return -1;
  case SHIFTREDUCE:
    break;
  }
  if (lemp->nterminal <= ap->sp->index) {
    return lemp->minReduce + ((ap->x).rp)->iRule;
  }
  return lemp->minShiftReduce + ((ap->x).rp)->iRule;
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (switch_statement condition: (parenthesized_expression (cast_expression type: (type_descriptor type: (primitive_type)) value: (subscript_expression argument: (identifier) index: (number_literal)))) body: (compound_statement (case_statement value: (number_literal) (return_statement (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))))) (case_statement value: (number_literal) (return_statement (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))))))) (case_statement value: (number_literal) (return_statement (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal)))))))) (case_statement value: (number_literal) (return_statement (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))))))) (case_statement (return_statement (number_literal))) (case_statement value: (number_literal) (break_statement)))) (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal))))))) consequence: (compound_statement (return_statement (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))))))) (return_statement (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: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))))))))))

int MASKED(long param_1,long *param_2)

{
  switch((int)param_2[1]) {
  case 0:
    return *(int *)(param_2[2] + 0x10);
  case 1:
    return *(int *)(param_1 + 0x34);
  case 2:
    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);
  case 3:
    return *(int *)(param_1 + 0x30);
  default:
    return -1;
  case 10:
    break;
  }
  if (*(int *)(param_1 + 0x28) <= *(int *)(*param_2 + 8)) {
    return *(int *)(param_1 + 0x3c) + *(int *)(param_2[2] + 100);
  }
  return *(int *)(param_1 + 0x2c) + *(int *)(param_2[2] + 100);
}

