
int __regparm3 cmp_import_elem(def_file_import *e,char *ex_name,char *in_name,char *module,int ord)

{
  int iVar1;
  def_file_module *s2;
  
  s2 = e->module;
  if (s2 != (def_file_module *)0x0) {
    s2 = (def_file_module *)s2->name;
  }
  iVar1 = are_names_equal(module,(char *)s2);
  if (iVar1 == 0) {
    iVar1 = are_names_equal(ex_name,e->name);
    if (iVar1 == 0) {
      iVar1 = are_names_equal(in_name,e->internal_name);
      if (iVar1 == 0) {
        if (ord != e->ordinal) {
          iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;
        }
      }
    }
  }
  return iVar1;
}



int __regparm1 FUN_00058740(int param_1,undefined4 param_2,int param_3)

{
  int iVar1;
  
  iVar1 = FUN_00058230();
  if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&
      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {
    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;
  }
  return iVar1;
}


PUSH EDI
MOV EDI,ECX
PUSH ESI
MOV ESI,EDX
PUSH EBX
MOV EDX,dword ptr [EAX + 0x4]
MOV EBX,EAX
TEST EDX,EDX
LEA EAX,[EDX + 0x8]
CMOVNZ EDX,EAX
MOV EAX,dword ptr [ESP + 0x10]
CALL 0x00058230
TEST EAX,EAX
JNZ 0x0005878f
MOV EDX,dword ptr [EBX + 0x8]
MOV EAX,ESI
CALL 0x00058230
TEST EAX,EAX
JNZ 0x0005878f
MOV EDX,dword ptr [EBX]
MOV EAX,EDI
CALL 0x00058230
TEST EAX,EAX
JNZ 0x0005878f
MOV ECX,dword ptr [EBX + 0x10]
CMP dword ptr [ESP + 0x14],ECX
JZ 0x0005878f
SETGE AL
MOVZX EAX,AL
LEA EAX,[EAX + EAX*0x1 + -0x1]
POP EBX
POP ESI
POP EDI
RET
(translation_unit "int __regparm1 FUN_00058740(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00058230();\n  if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }\n  return iVar1;\n}\n\n" (function_definition "int __regparm1 FUN_00058740(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00058230();\n  if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }\n  return iVar1;\n}" primitive_type (ERROR "__regparm1" identifier) (function_declarator "FUN_00058740(int param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_00058230();\n  if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_00058230();" (assignment_expression "iVar1 = FUN_00058230()" identifier = (call_expression "FUN_00058230()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }" if (parenthesized_expression "((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10)))" ( (binary_expression "(((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))" (parenthesized_expression "(((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0))" ( (binary_expression "((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)" (parenthesized_expression "((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0))" ( (binary_expression "(iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) && (parenthesized_expression "(iVar1 = FUN_00058230(), iVar1 == 0)" ( (comma_expression "iVar1 = FUN_00058230(), iVar1 == 0" (assignment_expression "iVar1 = FUN_00058230()" identifier = (call_expression "FUN_00058230()" identifier (argument_list "()" ( )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) && (parenthesized_expression "(iVar1 = FUN_00058230(), iVar1 == 0)" ( (comma_expression "iVar1 = FUN_00058230(), iVar1 == 0" (assignment_expression "iVar1 = FUN_00058230()" identifier = (call_expression "FUN_00058230()" identifier (argument_list "()" ( )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) && (parenthesized_expression "(param_3 != *(int *)(param_1 + 0x10))" ( (binary_expression "param_3 != *(int *)(param_1 + 0x10)" identifier != (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ))) )) (compound_statement "{\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }" { (expression_statement "iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;" (assignment_expression "iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1" identifier = (binary_expression "(uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1" (binary_expression "(uint)(*(int *)(param_1 + 0x10) <= param_3) * 2" (call_expression "(uint)(*(int *)(param_1 + 0x10) <= param_3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(int *)(param_1 + 0x10) <= param_3)" ( (binary_expression "*(int *)(param_1 + 0x10) <= param_3" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) <= identifier) ))) * number_literal) + number_literal)) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int __regparm3 cmp_import_elem(def_file_import *e,char *ex_name,char *in_name,char *module,int ord)\n\n{\n  int iVar1;\n  def_file_module *s2;\n  \n  s2 = e->module;\n  if (s2 != (def_file_module *)0x0) {\n    s2 = (def_file_module *)s2->name;\n  }\n  iVar1 = are_names_equal(module,(char *)s2);\n  if (iVar1 == 0) {\n    iVar1 = are_names_equal(ex_name,e->name);\n    if (iVar1 == 0) {\n      iVar1 = are_names_equal(in_name,e->internal_name);\n      if (iVar1 == 0) {\n        if (ord != e->ordinal) {\n          iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;\n        }\n      }\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int __regparm3 cmp_import_elem(def_file_import *e,char *ex_name,char *in_name,char *module,int ord)\n\n{\n  int iVar1;\n  def_file_module *s2;\n  \n  s2 = e->module;\n  if (s2 != (def_file_module *)0x0) {\n    s2 = (def_file_module *)s2->name;\n  }\n  iVar1 = are_names_equal(module,(char *)s2);\n  if (iVar1 == 0) {\n    iVar1 = are_names_equal(ex_name,e->name);\n    if (iVar1 == 0) {\n      iVar1 = are_names_equal(in_name,e->internal_name);\n      if (iVar1 == 0) {\n        if (ord != e->ordinal) {\n          iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;\n        }\n      }\n    }\n  }\n  return iVar1;\n}" primitive_type (ERROR "__regparm3" identifier) (function_declarator "cmp_import_elem(def_file_import *e,char *ex_name,char *in_name,char *module,int ord)" identifier (parameter_list "(def_file_import *e,char *ex_name,char *in_name,char *module,int ord)" ( (parameter_declaration "def_file_import *e" type_identifier (pointer_declarator "*e" * identifier)) , (parameter_declaration "char *ex_name" primitive_type (pointer_declarator "*ex_name" * identifier)) , (parameter_declaration "char *in_name" primitive_type (pointer_declarator "*in_name" * identifier)) , (parameter_declaration "char *module" primitive_type (pointer_declarator "*module" * identifier)) , (parameter_declaration "int ord" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  def_file_module *s2;\n  \n  s2 = e->module;\n  if (s2 != (def_file_module *)0x0) {\n    s2 = (def_file_module *)s2->name;\n  }\n  iVar1 = are_names_equal(module,(char *)s2);\n  if (iVar1 == 0) {\n    iVar1 = are_names_equal(ex_name,e->name);\n    if (iVar1 == 0) {\n      iVar1 = are_names_equal(in_name,e->internal_name);\n      if (iVar1 == 0) {\n        if (ord != e->ordinal) {\n          iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;\n        }\n      }\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "def_file_module *s2;" type_identifier (pointer_declarator "*s2" * identifier) ;) (expression_statement "s2 = e->module;" (assignment_expression "s2 = e->module" identifier = (field_expression "e->module" identifier -> field_identifier)) ;) (if_statement "if (s2 != (def_file_module *)0x0) {\n    s2 = (def_file_module *)s2->name;\n  }" if (parenthesized_expression "(s2 != (def_file_module *)0x0)" ( (binary_expression "s2 != (def_file_module *)0x0" identifier != (cast_expression "(def_file_module *)0x0" ( (type_descriptor "def_file_module *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    s2 = (def_file_module *)s2->name;\n  }" { (expression_statement "s2 = (def_file_module *)s2->name;" (assignment_expression "s2 = (def_file_module *)s2->name" identifier = (cast_expression "(def_file_module *)s2->name" ( (type_descriptor "def_file_module *" type_identifier (abstract_pointer_declarator "*" *)) ) (field_expression "s2->name" identifier -> field_identifier))) ;) })) (expression_statement "iVar1 = are_names_equal(module,(char *)s2);" (assignment_expression "iVar1 = are_names_equal(module,(char *)s2)" identifier = (call_expression "are_names_equal(module,(char *)s2)" identifier (argument_list "(module,(char *)s2)" ( identifier , (cast_expression "(char *)s2" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n    iVar1 = are_names_equal(ex_name,e->name);\n    if (iVar1 == 0) {\n      iVar1 = are_names_equal(in_name,e->internal_name);\n      if (iVar1 == 0) {\n        if (ord != e->ordinal) {\n          iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;\n        }\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar1 = are_names_equal(ex_name,e->name);\n    if (iVar1 == 0) {\n      iVar1 = are_names_equal(in_name,e->internal_name);\n      if (iVar1 == 0) {\n        if (ord != e->ordinal) {\n          iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;\n        }\n      }\n    }\n  }" { (expression_statement "iVar1 = are_names_equal(ex_name,e->name);" (assignment_expression "iVar1 = are_names_equal(ex_name,e->name)" identifier = (call_expression "are_names_equal(ex_name,e->name)" identifier (argument_list "(ex_name,e->name)" ( identifier , (field_expression "e->name" identifier -> field_identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n      iVar1 = are_names_equal(in_name,e->internal_name);\n      if (iVar1 == 0) {\n        if (ord != e->ordinal) {\n          iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;\n        }\n      }\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = are_names_equal(in_name,e->internal_name);\n      if (iVar1 == 0) {\n        if (ord != e->ordinal) {\n          iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;\n        }\n      }\n    }" { (expression_statement "iVar1 = are_names_equal(in_name,e->internal_name);" (assignment_expression "iVar1 = are_names_equal(in_name,e->internal_name)" identifier = (call_expression "are_names_equal(in_name,e->internal_name)" identifier (argument_list "(in_name,e->internal_name)" ( identifier , (field_expression "e->internal_name" identifier -> field_identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n        if (ord != e->ordinal) {\n          iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;\n        }\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        if (ord != e->ordinal) {\n          iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;\n        }\n      }" { (if_statement "if (ord != e->ordinal) {\n          iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;\n        }" if (parenthesized_expression "(ord != e->ordinal)" ( (binary_expression "ord != e->ordinal" identifier != (field_expression "e->ordinal" identifier -> field_identifier)) )) (compound_statement "{\n          iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;\n        }" { (expression_statement "iVar1 = (uint)(e->ordinal <= ord) * 2 + -1;" (assignment_expression "iVar1 = (uint)(e->ordinal <= ord) * 2 + -1" identifier = (binary_expression "(uint)(e->ordinal <= ord) * 2 + -1" (binary_expression "(uint)(e->ordinal <= ord) * 2" (call_expression "(uint)(e->ordinal <= ord)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(e->ordinal <= ord)" ( (binary_expression "e->ordinal <= ord" (field_expression "e->ordinal" identifier -> field_identifier) <= identifier) ))) * number_literal) + number_literal)) ;) })) })) })) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int __regparm1 FUN_00058740(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00058230();\n  if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }\n  return iVar1;\n}\n\n" (function_definition "int __regparm1 FUN_00058740(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00058230();\n  if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }\n  return iVar1;\n}" primitive_type (ERROR "__regparm1" identifier) (function_declarator "FUN_00058740(int param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_00058230();\n  if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = FUN_00058230();" (assignment_expression "iVar1 = FUN_00058230()" identifier = (call_expression "FUN_00058230()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }" if (parenthesized_expression "((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10)))" ( (binary_expression "(((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))" (parenthesized_expression "(((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0))" ( (binary_expression "((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)" (parenthesized_expression "((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0))" ( (binary_expression "(iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) && (parenthesized_expression "(iVar1 = FUN_00058230(), iVar1 == 0)" ( (comma_expression "iVar1 = FUN_00058230(), iVar1 == 0" (assignment_expression "iVar1 = FUN_00058230()" identifier = (call_expression "FUN_00058230()" identifier (argument_list "()" ( )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) && (parenthesized_expression "(iVar1 = FUN_00058230(), iVar1 == 0)" ( (comma_expression "iVar1 = FUN_00058230(), iVar1 == 0" (assignment_expression "iVar1 = FUN_00058230()" identifier = (call_expression "FUN_00058230()" identifier (argument_list "()" ( )))) , (binary_expression "iVar1 == 0" identifier == number_literal)) ))) )) && (parenthesized_expression "(param_3 != *(int *)(param_1 + 0x10))" ( (binary_expression "param_3 != *(int *)(param_1 + 0x10)" identifier != (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ))) )) (compound_statement "{\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }" { (expression_statement "iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;" (assignment_expression "iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1" identifier = (binary_expression "(uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1" (binary_expression "(uint)(*(int *)(param_1 + 0x10) <= param_3) * 2" (call_expression "(uint)(*(int *)(param_1 + 0x10) <= param_3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*(int *)(param_1 + 0x10) <= param_3)" ( (binary_expression "*(int *)(param_1 + 0x10) <= param_3" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) <= identifier) ))) * number_literal) + number_literal)) ;) })) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) , (binary_expression IDENT == LIT)) ))) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) , (binary_expression IDENT == LIT)) ))) )) && (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) <= IDENT) ))) * LIT) + LIT)) ;) })) (return_statement return IDENT ;) })))
(function_definition "int __regparm1 FUN_00058740(int param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  \n  iVar1 = FUN_00058230();\n  if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }\n  return iVar1;\n}" (primitive_type "int") (ERROR "__regparm1" (identifier "__regparm1")) (function_declarator "FUN_00058740(int param_1,undefined4 param_2,int param_3)" (identifier "FUN_00058740") (parameter_list "(int param_1,undefined4 param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = FUN_00058230();\n  if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (expression_statement "iVar1 = FUN_00058230();" (assignment_expression "iVar1 = FUN_00058230()" (identifier "iVar1") (= "=") (call_expression "FUN_00058230()" (identifier "FUN_00058230") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }" (if "if") (parenthesized_expression "((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10)))" (( "(") (binary_expression "(((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))" (parenthesized_expression "(((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0))" (( "(") (binary_expression "((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&\n      (iVar1 = FUN_00058230(), iVar1 == 0)" (parenthesized_expression "((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0))" (( "(") (binary_expression "(iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)" (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(iVar1 = FUN_00058230(), iVar1 == 0)" (( "(") (comma_expression "iVar1 = FUN_00058230(), iVar1 == 0" (assignment_expression "iVar1 = FUN_00058230()" (identifier "iVar1") (= "=") (call_expression "FUN_00058230()" (identifier "FUN_00058230") (argument_list "()" (( "(") () ")")))) (, ",") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0"))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(iVar1 = FUN_00058230(), iVar1 == 0)" (( "(") (comma_expression "iVar1 = FUN_00058230(), iVar1 == 0" (assignment_expression "iVar1 = FUN_00058230()" (identifier "iVar1") (= "=") (call_expression "FUN_00058230()" (identifier "FUN_00058230") (argument_list "()" (( "(") () ")")))) (, ",") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0"))) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(param_3 != *(int *)(param_1 + 0x10))" (( "(") (binary_expression "param_3 != *(int *)(param_1 + 0x10)" (identifier "param_3") (!= "!=") (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;\n  }" ({ "{") (expression_statement "iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;" (assignment_expression "iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1" (identifier "iVar1") (= "=") (binary_expression "(uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1" (binary_expression "(uint)(*(int *)(param_1 + 0x10) <= param_3) * 2" (call_expression "(uint)(*(int *)(param_1 + 0x10) <= param_3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*(int *)(param_1 + 0x10) <= param_3)" (( "(") (binary_expression "*(int *)(param_1 + 0x10) <= param_3" (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (<= "<=") (identifier "param_3")) () ")"))) (* "*") (number_literal "2")) (+ "+") (number_literal "-1"))) (; ";")) (} "}"))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

int __regparm3 function_1(type_1 *e,char *ex_name,char *in_name,char *module,int var_4)

{
  int var_3;
  type_2 *var_1;
  
  var_1 = e->module;
  if (var_1 != (type_2 *)0x0) {
    var_1 = (type_2 *)var_1->name;
  }
  var_3 = var_2(module,(char *)var_1);
  if (var_3 == 0) {
    var_3 = var_2(ex_name,e->name);
    if (var_3 == 0) {
      var_3 = var_2(in_name,e->internal_name);
      if (var_3 == 0) {
        if (var_4 != e->ordinal) {
          var_3 = (uint)(e->ordinal <= var_4) * 2 + -1;
        }
      }
    }
  }
  return var_3;
}


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

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

{
  int iVar1;
  
  iVar1 = FUN_00058230();
  if ((((iVar1 == 0) && (iVar1 = FUN_00058230(), iVar1 == 0)) &&
      (iVar1 = FUN_00058230(), iVar1 == 0)) && (param_3 != *(int *)(param_1 + 0x10))) {
    iVar1 = (uint)(*(int *)(param_1 + 0x10) <= param_3) * 2 + -1;
  }
  return iVar1;
}

