
/* WARNING: Unknown calling convention */

void * hash_lookup(Hash_table *table,void *entry)

{
  _Bool _Var1;
  hash_entry *phVar2;
  void *pvVar3;
  
  phVar2 = safe_hasher(table,entry);
  pvVar3 = phVar2->data;
  if (pvVar3 == (void *)0x0) {
    return (void *)0x0;
  }
  while( true ) {
    if (pvVar3 == entry) {
      return entry;
    }
    _Var1 = (*table->comparator)(entry,pvVar3);
    if (_Var1) break;
    phVar2 = phVar2->next;
    if (phVar2 == (hash_entry *)0x0) {
      return (void *)0x0;
    }
    pvVar3 = phVar2->data;
  }
  return phVar2->data;
}



int FUN_00013130(int param_1,int param_2)

{
  char cVar1;
  int *piVar2;
  int iVar3;
  
  piVar2 = (int *)FUN_00012c20();
  iVar3 = *piVar2;
  if (iVar3 == 0) {
    return 0;
  }
  while( true ) {
    if (iVar3 == param_2) {
      return param_2;
    }
    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);
    if (cVar1 != '\0') break;
    piVar2 = (int *)piVar2[1];
    if (piVar2 == (int *)0x0) {
      return 0;
    }
    iVar3 = *piVar2;
  }
  return *piVar2;
}


PUSH EDI
PUSH ESI
PUSH EBX
MOV EDI,dword ptr [ESP + 0x10]
MOV ESI,dword ptr [ESP + 0x14]
MOV EAX,EDI
MOV EDX,ESI
CALL 0x00012c20
MOV EDX,dword ptr [EAX]
TEST EDX,EDX
JZ 0x0001316c
MOV EBX,EAX
JMP 0x00013152
MOV EDX,dword ptr [EBX]
CMP EDX,ESI
JZ 0x0001317a
SUB ESP,0x8
PUSH EDX
PUSH ESI
CALL dword ptr [EDI + 0x1c]
ADD ESP,0x10
TEST AL,AL
JNZ 0x00013178
MOV EBX,dword ptr [EBX + 0x4]
TEST EBX,EBX
JNZ 0x00013150
POP EBX
XOR EAX,EAX
POP ESI
POP EDI
RET
MOV ESI,dword ptr [EBX]
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
RET
(translation_unit "int FUN_00013130(int param_1,int param_2)\n\n{\n  char cVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = (int *)FUN_00012c20();\n  iVar3 = *piVar2;\n  if (iVar3 == 0) {\n    return 0;\n  }\n  while( true ) {\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }\n  return *piVar2;\n}\n\n" (function_definition "int FUN_00013130(int param_1,int param_2)\n\n{\n  char cVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = (int *)FUN_00012c20();\n  iVar3 = *piVar2;\n  if (iVar3 == 0) {\n    return 0;\n  }\n  while( true ) {\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }\n  return *piVar2;\n}" primitive_type (function_declarator "FUN_00013130(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = (int *)FUN_00012c20();\n  iVar3 = *piVar2;\n  if (iVar3 == 0) {\n    return 0;\n  }\n  while( true ) {\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }\n  return *piVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "piVar2 = (int *)FUN_00012c20();" (assignment_expression "piVar2 = (int *)FUN_00012c20()" identifier = (cast_expression "(int *)FUN_00012c20()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00012c20()" identifier (argument_list "()" ( ))))) ;) (expression_statement "iVar3 = *piVar2;" (assignment_expression "iVar3 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (if_statement "if (iVar3 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (while_statement "while( true ) {\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }" { (if_statement "if (iVar3 == param_2) {\n      return param_2;\n    }" if (parenthesized_expression "(iVar3 == param_2)" ( (binary_expression "iVar3 == param_2" identifier == identifier) )) (compound_statement "{\n      return param_2;\n    }" { (return_statement "return param_2;" return identifier ;) })) (expression_statement "cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);" (assignment_expression "cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3)" identifier = (call_expression "(**(code **)(param_1 + 0x1c))(param_2,iVar3)" (parenthesized_expression "(**(code **)(param_1 + 0x1c))" ( (pointer_expression "**(code **)(param_1 + 0x1c)" * (pointer_expression "*(code **)(param_1 + 0x1c)" * (cast_expression "(code **)(param_1 + 0x1c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) )) (argument_list "(param_2,iVar3)" ( identifier , identifier )))) ;) (if_statement "if (cVar1 != '\0') break;" if (parenthesized_expression "(cVar1 != '\0')" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "piVar2 = (int *)piVar2[1];" (assignment_expression "piVar2 = (int *)piVar2[1]" identifier = (cast_expression "(int *)piVar2[1]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar2[1]" identifier [ number_literal ]))) ;) (if_statement "if (piVar2 == (int *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar3 = *piVar2;" (assignment_expression "iVar3 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) })) (return_statement "return *piVar2;" return (pointer_expression "*piVar2" * identifier) ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nvoid * hash_lookup(Hash_table *table,void *entry)\n\n{\n  _Bool _Var1;\n  hash_entry *phVar2;\n  void *pvVar3;\n  \n  phVar2 = safe_hasher(table,entry);\n  pvVar3 = phVar2->data;\n  if (pvVar3 == (void *)0x0) {\n    return (void *)0x0;\n  }\n  while( true ) {\n    if (pvVar3 == entry) {\n      return entry;\n    }\n    _Var1 = (*table->comparator)(entry,pvVar3);\n    if (_Var1) break;\n    phVar2 = phVar2->next;\n    if (phVar2 == (hash_entry *)0x0) {\n      return (void *)0x0;\n    }\n    pvVar3 = phVar2->data;\n  }\n  return phVar2->data;\n}\n\n" comment (function_definition "void * hash_lookup(Hash_table *table,void *entry)\n\n{\n  _Bool _Var1;\n  hash_entry *phVar2;\n  void *pvVar3;\n  \n  phVar2 = safe_hasher(table,entry);\n  pvVar3 = phVar2->data;\n  if (pvVar3 == (void *)0x0) {\n    return (void *)0x0;\n  }\n  while( true ) {\n    if (pvVar3 == entry) {\n      return entry;\n    }\n    _Var1 = (*table->comparator)(entry,pvVar3);\n    if (_Var1) break;\n    phVar2 = phVar2->next;\n    if (phVar2 == (hash_entry *)0x0) {\n      return (void *)0x0;\n    }\n    pvVar3 = phVar2->data;\n  }\n  return phVar2->data;\n}" primitive_type (pointer_declarator "* hash_lookup(Hash_table *table,void *entry)" * (function_declarator "hash_lookup(Hash_table *table,void *entry)" identifier (parameter_list "(Hash_table *table,void *entry)" ( (parameter_declaration "Hash_table *table" type_identifier (pointer_declarator "*table" * identifier)) , (parameter_declaration "void *entry" primitive_type (pointer_declarator "*entry" * identifier)) )))) (compound_statement "{\n  _Bool _Var1;\n  hash_entry *phVar2;\n  void *pvVar3;\n  \n  phVar2 = safe_hasher(table,entry);\n  pvVar3 = phVar2->data;\n  if (pvVar3 == (void *)0x0) {\n    return (void *)0x0;\n  }\n  while( true ) {\n    if (pvVar3 == entry) {\n      return entry;\n    }\n    _Var1 = (*table->comparator)(entry,pvVar3);\n    if (_Var1) break;\n    phVar2 = phVar2->next;\n    if (phVar2 == (hash_entry *)0x0) {\n      return (void *)0x0;\n    }\n    pvVar3 = phVar2->data;\n  }\n  return phVar2->data;\n}" { (declaration "_Bool _Var1;" type_identifier identifier ;) (declaration "hash_entry *phVar2;" type_identifier (pointer_declarator "*phVar2" * identifier) ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (expression_statement "phVar2 = safe_hasher(table,entry);" (assignment_expression "phVar2 = safe_hasher(table,entry)" identifier = (call_expression "safe_hasher(table,entry)" identifier (argument_list "(table,entry)" ( identifier , identifier )))) ;) (expression_statement "pvVar3 = phVar2->data;" (assignment_expression "pvVar3 = phVar2->data" identifier = (field_expression "phVar2->data" identifier -> field_identifier)) ;) (if_statement "if (pvVar3 == (void *)0x0) {\n    return (void *)0x0;\n  }" if (parenthesized_expression "(pvVar3 == (void *)0x0)" ( (binary_expression "pvVar3 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return (void *)0x0;\n  }" { (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (while_statement "while( true ) {\n    if (pvVar3 == entry) {\n      return entry;\n    }\n    _Var1 = (*table->comparator)(entry,pvVar3);\n    if (_Var1) break;\n    phVar2 = phVar2->next;\n    if (phVar2 == (hash_entry *)0x0) {\n      return (void *)0x0;\n    }\n    pvVar3 = phVar2->data;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (pvVar3 == entry) {\n      return entry;\n    }\n    _Var1 = (*table->comparator)(entry,pvVar3);\n    if (_Var1) break;\n    phVar2 = phVar2->next;\n    if (phVar2 == (hash_entry *)0x0) {\n      return (void *)0x0;\n    }\n    pvVar3 = phVar2->data;\n  }" { (if_statement "if (pvVar3 == entry) {\n      return entry;\n    }" if (parenthesized_expression "(pvVar3 == entry)" ( (binary_expression "pvVar3 == entry" identifier == identifier) )) (compound_statement "{\n      return entry;\n    }" { (return_statement "return entry;" return identifier ;) })) (expression_statement "_Var1 = (*table->comparator)(entry,pvVar3);" (assignment_expression "_Var1 = (*table->comparator)(entry,pvVar3)" identifier = (call_expression "(*table->comparator)(entry,pvVar3)" (parenthesized_expression "(*table->comparator)" ( (pointer_expression "*table->comparator" * (field_expression "table->comparator" identifier -> field_identifier)) )) (argument_list "(entry,pvVar3)" ( identifier , identifier )))) ;) (if_statement "if (_Var1) break;" if (parenthesized_expression "(_Var1)" ( identifier )) (break_statement "break;" break ;)) (expression_statement "phVar2 = phVar2->next;" (assignment_expression "phVar2 = phVar2->next" identifier = (field_expression "phVar2->next" identifier -> field_identifier)) ;) (if_statement "if (phVar2 == (hash_entry *)0x0) {\n      return (void *)0x0;\n    }" if (parenthesized_expression "(phVar2 == (hash_entry *)0x0)" ( (binary_expression "phVar2 == (hash_entry *)0x0" identifier == (cast_expression "(hash_entry *)0x0" ( (type_descriptor "hash_entry *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return (void *)0x0;\n    }" { (return_statement "return (void *)0x0;" return (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) ;) })) (expression_statement "pvVar3 = phVar2->data;" (assignment_expression "pvVar3 = phVar2->data" identifier = (field_expression "phVar2->data" identifier -> field_identifier)) ;) })) (return_statement "return phVar2->data;" return (field_expression "phVar2->data" identifier -> field_identifier) ;) })))
(translation_unit "int FUN_00013130(int param_1,int param_2)\n\n{\n  char cVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = (int *)FUN_00012c20();\n  iVar3 = *piVar2;\n  if (iVar3 == 0) {\n    return 0;\n  }\n  while( true ) {\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }\n  return *piVar2;\n}\n\n" (function_definition "int FUN_00013130(int param_1,int param_2)\n\n{\n  char cVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = (int *)FUN_00012c20();\n  iVar3 = *piVar2;\n  if (iVar3 == 0) {\n    return 0;\n  }\n  while( true ) {\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }\n  return *piVar2;\n}" primitive_type (function_declarator "FUN_00013130(int param_1,int param_2)" identifier (parameter_list "(int param_1,int param_2)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = (int *)FUN_00012c20();\n  iVar3 = *piVar2;\n  if (iVar3 == 0) {\n    return 0;\n  }\n  while( true ) {\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }\n  return *piVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "piVar2 = (int *)FUN_00012c20();" (assignment_expression "piVar2 = (int *)FUN_00012c20()" identifier = (cast_expression "(int *)FUN_00012c20()" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00012c20()" identifier (argument_list "()" ( ))))) ;) (expression_statement "iVar3 = *piVar2;" (assignment_expression "iVar3 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (if_statement "if (iVar3 == 0) {\n    return 0;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (while_statement "while( true ) {\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }" { (if_statement "if (iVar3 == param_2) {\n      return param_2;\n    }" if (parenthesized_expression "(iVar3 == param_2)" ( (binary_expression "iVar3 == param_2" identifier == identifier) )) (compound_statement "{\n      return param_2;\n    }" { (return_statement "return param_2;" return identifier ;) })) (expression_statement "cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);" (assignment_expression "cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3)" identifier = (call_expression "(**(code **)(param_1 + 0x1c))(param_2,iVar3)" (parenthesized_expression "(**(code **)(param_1 + 0x1c))" ( (pointer_expression "**(code **)(param_1 + 0x1c)" * (pointer_expression "*(code **)(param_1 + 0x1c)" * (cast_expression "(code **)(param_1 + 0x1c)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x1c)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) ))))) )) (argument_list "(param_2,iVar3)" ( identifier , identifier )))) ;) (if_statement "if (cVar1 != '\0') break;" if (parenthesized_expression "(cVar1 != '\0')" ( (binary_expression "cVar1 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "piVar2 = (int *)piVar2[1];" (assignment_expression "piVar2 = (int *)piVar2[1]" identifier = (cast_expression "(int *)piVar2[1]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar2[1]" identifier [ number_literal ]))) ;) (if_statement "if (piVar2 == (int *)0x0) {\n      return 0;\n    }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "iVar3 = *piVar2;" (assignment_expression "iVar3 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) })) (return_statement "return *piVar2;" return (pointer_expression "*piVar2" * identifier) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) })) (return_statement return (pointer_expression * IDENT) ;) })))
(function_definition "int FUN_00013130(int param_1,int param_2)\n\n{\n  char cVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = (int *)FUN_00012c20();\n  iVar3 = *piVar2;\n  if (iVar3 == 0) {\n    return 0;\n  }\n  while( true ) {\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }\n  return *piVar2;\n}" (primitive_type "int") (function_declarator "FUN_00013130(int param_1,int param_2)" (identifier "FUN_00013130") (parameter_list "(int param_1,int param_2)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")"))) (compound_statement "{\n  char cVar1;\n  int *piVar2;\n  int iVar3;\n  \n  piVar2 = (int *)FUN_00012c20();\n  iVar3 = *piVar2;\n  if (iVar3 == 0) {\n    return 0;\n  }\n  while( true ) {\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }\n  return *piVar2;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "piVar2 = (int *)FUN_00012c20();" (assignment_expression "piVar2 = (int *)FUN_00012c20()" (identifier "piVar2") (= "=") (cast_expression "(int *)FUN_00012c20()" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00012c20()" (identifier "FUN_00012c20") (argument_list "()" (( "(") () ")"))))) (; ";")) (expression_statement "iVar3 = *piVar2;" (assignment_expression "iVar3 = *piVar2" (identifier "iVar3") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (if_statement "if (iVar3 == 0) {\n    return 0;\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    return 0;\n  }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (while_statement "while( true ) {\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if (iVar3 == param_2) {\n      return param_2;\n    }\n    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);\n    if (cVar1 != '\0') break;\n    piVar2 = (int *)piVar2[1];\n    if (piVar2 == (int *)0x0) {\n      return 0;\n    }\n    iVar3 = *piVar2;\n  }" ({ "{") (if_statement "if (iVar3 == param_2) {\n      return param_2;\n    }" (if "if") (parenthesized_expression "(iVar3 == param_2)" (( "(") (binary_expression "iVar3 == param_2" (identifier "iVar3") (== "==") (identifier "param_2")) () ")")) (compound_statement "{\n      return param_2;\n    }" ({ "{") (return_statement "return param_2;" (return "return") (identifier "param_2") (; ";")) (} "}"))) (expression_statement "cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);" (assignment_expression "cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3)" (identifier "cVar1") (= "=") (call_expression "(**(code **)(param_1 + 0x1c))(param_2,iVar3)" (parenthesized_expression "(**(code **)(param_1 + 0x1c))" (( "(") (pointer_expression "**(code **)(param_1 + 0x1c)" (* "*") (pointer_expression "*(code **)(param_1 + 0x1c)" (* "*") (cast_expression "(code **)(param_1 + 0x1c)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x1c)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) () ")"))))) () ")")) (argument_list "(param_2,iVar3)" (( "(") (identifier "param_2") (, ",") (identifier "iVar3") () ")")))) (; ";")) (if_statement "if (cVar1 != '\0') break;" (if "if") (parenthesized_expression "(cVar1 != '\0')" (( "(") (binary_expression "cVar1 != '\0'" (identifier "cVar1") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "piVar2 = (int *)piVar2[1];" (assignment_expression "piVar2 = (int *)piVar2[1]" (identifier "piVar2") (= "=") (cast_expression "(int *)piVar2[1]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")))) (; ";")) (if_statement "if (piVar2 == (int *)0x0) {\n      return 0;\n    }" (if "if") (parenthesized_expression "(piVar2 == (int *)0x0)" (( "(") (binary_expression "piVar2 == (int *)0x0" (identifier "piVar2") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "iVar3 = *piVar2;" (assignment_expression "iVar3 = *piVar2" (identifier "iVar3") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (} "}"))) (return_statement "return *piVar2;" (return "return") (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

void * function_1(type_1 *table,void *var_3)

{
  type_2 _Var1;
  type_3 *var_4;
  void *var_2;
  
  var_4 = var_1(table,var_3);
  var_2 = var_4->data;
  if (var_2 == (void *)0x0) {
    return (void *)0x0;
  }
  while( true ) {
    if (var_2 == var_3) {
      return var_3;
    }
    _Var1 = (*table->comparator)(var_3,var_2);
    if (_Var1) break;
    var_4 = var_4->next;
    if (var_4 == (type_3 *)0x0) {
      return (void *)0x0;
    }
    var_2 = var_4->data;
  }
  return var_4->data;
}


(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: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (number_literal)))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))))) (return_statement (pointer_expression argument: (identifier))))))

int MASKED(int param_1,int param_2)

{
  char cVar1;
  int *piVar2;
  int iVar3;
  
  piVar2 = (int *)FUN_00012c20();
  iVar3 = *piVar2;
  if (iVar3 == 0) {
    return 0;
  }
  while( true ) {
    if (iVar3 == param_2) {
      return param_2;
    }
    cVar1 = (**(code **)(param_1 + 0x1c))(param_2,iVar3);
    if (cVar1 != '\0') break;
    piVar2 = (int *)piVar2[1];
    if (piVar2 == (int *)0x0) {
      return 0;
    }
    iVar3 = *piVar2;
  }
  return *piVar2;
}

