
int fts3CompareElemByTerm(void *lhs,void *rhs)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
                    /* WARNING: Load size is inaccurate */
                    /* WARNING: Load size is inaccurate */
  iVar1 = *(int *)(*lhs + 0x20);
  iVar2 = *(int *)(*rhs + 0x20);
  iVar3 = iVar2;
  if (iVar1 <= iVar2) {
    iVar3 = iVar1;
  }
  iVar3 = memcmp(*(void **)(*lhs + 0x18),*(void **)(*rhs + 0x18),(long)iVar3);
  if (iVar3 == 0) {
    iVar3 = iVar1 - iVar2;
  }
  return iVar3;
}



int FUN_00118370(long *param_1,long *param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar1 = *(int *)(*param_1 + 0x20);
  iVar2 = *(int *)(*param_2 + 0x20);
  iVar3 = iVar2;
  if (iVar1 <= iVar2) {
    iVar3 = iVar1;
  }
  iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);
  if (iVar3 == 0) {
    iVar3 = iVar1 - iVar2;
  }
  return iVar3;
}


PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RAX,qword ptr [RDI]
MOV RCX,qword ptr [RSI]
MOVSXD RBX,dword ptr [RAX + 0x20]
MOV EBP,dword ptr [RCX + 0x20]
MOV RSI,qword ptr [RCX + 0x18]
MOV RDI,qword ptr [RAX + 0x18]
CMP EBX,EBP
MOVSXD RDX,EBP
CMOVLE RDX,RBX
SUB EBX,EBP
CALL 0x0010a1e0
TEST EAX,EAX
CMOVZ EAX,EBX
ADD RSP,0x8
POP RBX
POP RBP
RET
(translation_unit "int FUN_00118370(long *param_1,long *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0x20);\n  iVar2 = *(int *)(*param_2 + 0x20);\n  iVar3 = iVar2;\n  if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }\n  iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);\n  if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }\n  return iVar3;\n}\n\n" (function_definition "int FUN_00118370(long *param_1,long *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0x20);\n  iVar2 = *(int *)(*param_2 + 0x20);\n  iVar3 = iVar2;\n  if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }\n  iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);\n  if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }\n  return iVar3;\n}" primitive_type (function_declarator "FUN_00118370(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) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0x20);\n  iVar2 = *(int *)(*param_2 + 0x20);\n  iVar3 = iVar2;\n  if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }\n  iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);\n  if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }\n  return iVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(*param_1 + 0x20);" (assignment_expression "iVar1 = *(int *)(*param_1 + 0x20)" identifier = (pointer_expression "*(int *)(*param_1 + 0x20)" * (cast_expression "(int *)(*param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x20)" ( (binary_expression "*param_1 + 0x20" (pointer_expression "*param_1" * identifier) + number_literal) ))))) ;) (expression_statement "iVar2 = *(int *)(*param_2 + 0x20);" (assignment_expression "iVar2 = *(int *)(*param_2 + 0x20)" identifier = (pointer_expression "*(int *)(*param_2 + 0x20)" * (cast_expression "(int *)(*param_2 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_2 + 0x20)" ( (binary_expression "*param_2 + 0x20" (pointer_expression "*param_2" * identifier) + number_literal) ))))) ;) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) (if_statement "if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }" if (parenthesized_expression "(iVar1 <= iVar2)" ( (binary_expression "iVar1 <= iVar2" identifier <= identifier) )) (compound_statement "{\n    iVar3 = iVar1;\n  }" { (expression_statement "iVar3 = iVar1;" (assignment_expression "iVar3 = iVar1" identifier = identifier) ;) })) (expression_statement "iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);" (assignment_expression "iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3)" identifier = (call_expression "memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3)" identifier (argument_list "(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3)" ( (pointer_expression "*(void **)(*param_1 + 0x18)" * (cast_expression "(void **)(*param_1 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) , (pointer_expression "*(void **)(*param_2 + 0x18)" * (cast_expression "(void **)(*param_2 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_2 + 0x18)" ( (binary_expression "*param_2 + 0x18" (pointer_expression "*param_2" * identifier) + number_literal) )))) , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) (if_statement "if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = iVar1 - iVar2;\n  }" { (expression_statement "iVar3 = iVar1 - iVar2;" (assignment_expression "iVar3 = iVar1 - iVar2" identifier = (binary_expression "iVar1 - iVar2" identifier - identifier)) ;) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "int fts3CompareElemByTerm(void *lhs,void *rhs)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n                    /* WARNING: Load size is inaccurate */\n                    /* WARNING: Load size is inaccurate */\n  iVar1 = *(int *)(*lhs + 0x20);\n  iVar2 = *(int *)(*rhs + 0x20);\n  iVar3 = iVar2;\n  if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }\n  iVar3 = memcmp(*(void **)(*lhs + 0x18),*(void **)(*rhs + 0x18),(long)iVar3);\n  if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }\n  return iVar3;\n}\n\n" (function_definition "int fts3CompareElemByTerm(void *lhs,void *rhs)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n                    /* WARNING: Load size is inaccurate */\n                    /* WARNING: Load size is inaccurate */\n  iVar1 = *(int *)(*lhs + 0x20);\n  iVar2 = *(int *)(*rhs + 0x20);\n  iVar3 = iVar2;\n  if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }\n  iVar3 = memcmp(*(void **)(*lhs + 0x18),*(void **)(*rhs + 0x18),(long)iVar3);\n  if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }\n  return iVar3;\n}" primitive_type (function_declarator "fts3CompareElemByTerm(void *lhs,void *rhs)" identifier (parameter_list "(void *lhs,void *rhs)" ( (parameter_declaration "void *lhs" primitive_type (pointer_declarator "*lhs" * identifier)) , (parameter_declaration "void *rhs" primitive_type (pointer_declarator "*rhs" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n                    /* WARNING: Load size is inaccurate */\n                    /* WARNING: Load size is inaccurate */\n  iVar1 = *(int *)(*lhs + 0x20);\n  iVar2 = *(int *)(*rhs + 0x20);\n  iVar3 = iVar2;\n  if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }\n  iVar3 = memcmp(*(void **)(*lhs + 0x18),*(void **)(*rhs + 0x18),(long)iVar3);\n  if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }\n  return iVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) comment comment (expression_statement "iVar1 = *(int *)(*lhs + 0x20);" (assignment_expression "iVar1 = *(int *)(*lhs + 0x20)" identifier = (pointer_expression "*(int *)(*lhs + 0x20)" * (cast_expression "(int *)(*lhs + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*lhs + 0x20)" ( (binary_expression "*lhs + 0x20" (pointer_expression "*lhs" * identifier) + number_literal) ))))) ;) (expression_statement "iVar2 = *(int *)(*rhs + 0x20);" (assignment_expression "iVar2 = *(int *)(*rhs + 0x20)" identifier = (pointer_expression "*(int *)(*rhs + 0x20)" * (cast_expression "(int *)(*rhs + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*rhs + 0x20)" ( (binary_expression "*rhs + 0x20" (pointer_expression "*rhs" * identifier) + number_literal) ))))) ;) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) (if_statement "if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }" if (parenthesized_expression "(iVar1 <= iVar2)" ( (binary_expression "iVar1 <= iVar2" identifier <= identifier) )) (compound_statement "{\n    iVar3 = iVar1;\n  }" { (expression_statement "iVar3 = iVar1;" (assignment_expression "iVar3 = iVar1" identifier = identifier) ;) })) (expression_statement "iVar3 = memcmp(*(void **)(*lhs + 0x18),*(void **)(*rhs + 0x18),(long)iVar3);" (assignment_expression "iVar3 = memcmp(*(void **)(*lhs + 0x18),*(void **)(*rhs + 0x18),(long)iVar3)" identifier = (call_expression "memcmp(*(void **)(*lhs + 0x18),*(void **)(*rhs + 0x18),(long)iVar3)" identifier (argument_list "(*(void **)(*lhs + 0x18),*(void **)(*rhs + 0x18),(long)iVar3)" ( (pointer_expression "*(void **)(*lhs + 0x18)" * (cast_expression "(void **)(*lhs + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*lhs + 0x18)" ( (binary_expression "*lhs + 0x18" (pointer_expression "*lhs" * identifier) + number_literal) )))) , (pointer_expression "*(void **)(*rhs + 0x18)" * (cast_expression "(void **)(*rhs + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*rhs + 0x18)" ( (binary_expression "*rhs + 0x18" (pointer_expression "*rhs" * identifier) + number_literal) )))) , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) (if_statement "if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = iVar1 - iVar2;\n  }" { (expression_statement "iVar3 = iVar1 - iVar2;" (assignment_expression "iVar3 = iVar1 - iVar2" identifier = (binary_expression "iVar1 - iVar2" identifier - identifier)) ;) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit "int FUN_00118370(long *param_1,long *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0x20);\n  iVar2 = *(int *)(*param_2 + 0x20);\n  iVar3 = iVar2;\n  if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }\n  iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);\n  if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }\n  return iVar3;\n}\n\n" (function_definition "int FUN_00118370(long *param_1,long *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0x20);\n  iVar2 = *(int *)(*param_2 + 0x20);\n  iVar3 = iVar2;\n  if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }\n  iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);\n  if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }\n  return iVar3;\n}" primitive_type (function_declarator "FUN_00118370(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) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long *param_2" (sized_type_specifier "long" long) (pointer_declarator "*param_2" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0x20);\n  iVar2 = *(int *)(*param_2 + 0x20);\n  iVar3 = iVar2;\n  if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }\n  iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);\n  if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }\n  return iVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (expression_statement "iVar1 = *(int *)(*param_1 + 0x20);" (assignment_expression "iVar1 = *(int *)(*param_1 + 0x20)" identifier = (pointer_expression "*(int *)(*param_1 + 0x20)" * (cast_expression "(int *)(*param_1 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + 0x20)" ( (binary_expression "*param_1 + 0x20" (pointer_expression "*param_1" * identifier) + number_literal) ))))) ;) (expression_statement "iVar2 = *(int *)(*param_2 + 0x20);" (assignment_expression "iVar2 = *(int *)(*param_2 + 0x20)" identifier = (pointer_expression "*(int *)(*param_2 + 0x20)" * (cast_expression "(int *)(*param_2 + 0x20)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_2 + 0x20)" ( (binary_expression "*param_2 + 0x20" (pointer_expression "*param_2" * identifier) + number_literal) ))))) ;) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" identifier = identifier) ;) (if_statement "if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }" if (parenthesized_expression "(iVar1 <= iVar2)" ( (binary_expression "iVar1 <= iVar2" identifier <= identifier) )) (compound_statement "{\n    iVar3 = iVar1;\n  }" { (expression_statement "iVar3 = iVar1;" (assignment_expression "iVar3 = iVar1" identifier = identifier) ;) })) (expression_statement "iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);" (assignment_expression "iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3)" identifier = (call_expression "memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3)" identifier (argument_list "(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3)" ( (pointer_expression "*(void **)(*param_1 + 0x18)" * (cast_expression "(void **)(*param_1 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_1 + 0x18)" ( (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" * identifier) + number_literal) )))) , (pointer_expression "*(void **)(*param_2 + 0x18)" * (cast_expression "(void **)(*param_2 + 0x18)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*param_2 + 0x18)" ( (binary_expression "*param_2 + 0x18" (pointer_expression "*param_2" * identifier) + number_literal) )))) , (cast_expression "(long)iVar3" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) )))) ;) (if_statement "if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar3 = iVar1 - iVar2;\n  }" { (expression_statement "iVar3 = iVar1 - iVar2;" (assignment_expression "iVar3 = iVar1 - iVar2" identifier = (binary_expression "iVar1 - iVar2" identifier - identifier)) ;) })) (return_statement "return iVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) , (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) })) (return_statement return IDENT ;) })))
(function_definition "int FUN_00118370(long *param_1,long *param_2)\n\n{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0x20);\n  iVar2 = *(int *)(*param_2 + 0x20);\n  iVar3 = iVar2;\n  if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }\n  iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);\n  if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }\n  return iVar3;\n}" (primitive_type "int") (function_declarator "FUN_00118370(long *param_1,long *param_2)" (identifier "FUN_00118370") (parameter_list "(long *param_1,long *param_2)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "long *param_2" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  int iVar3;\n  \n  iVar1 = *(int *)(*param_1 + 0x20);\n  iVar2 = *(int *)(*param_2 + 0x20);\n  iVar3 = iVar2;\n  if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }\n  iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);\n  if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }\n  return iVar3;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (expression_statement "iVar1 = *(int *)(*param_1 + 0x20);" (assignment_expression "iVar1 = *(int *)(*param_1 + 0x20)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(*param_1 + 0x20)" (* "*") (cast_expression "(int *)(*param_1 + 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + 0x20)" (( "(") (binary_expression "*param_1 + 0x20" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x20")) () ")"))))) (; ";")) (expression_statement "iVar2 = *(int *)(*param_2 + 0x20);" (assignment_expression "iVar2 = *(int *)(*param_2 + 0x20)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(*param_2 + 0x20)" (* "*") (cast_expression "(int *)(*param_2 + 0x20)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_2 + 0x20)" (( "(") (binary_expression "*param_2 + 0x20" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (number_literal "0x20")) () ")"))))) (; ";")) (expression_statement "iVar3 = iVar2;" (assignment_expression "iVar3 = iVar2" (identifier "iVar3") (= "=") (identifier "iVar2")) (; ";")) (if_statement "if (iVar1 <= iVar2) {\n    iVar3 = iVar1;\n  }" (if "if") (parenthesized_expression "(iVar1 <= iVar2)" (( "(") (binary_expression "iVar1 <= iVar2" (identifier "iVar1") (<= "<=") (identifier "iVar2")) () ")")) (compound_statement "{\n    iVar3 = iVar1;\n  }" ({ "{") (expression_statement "iVar3 = iVar1;" (assignment_expression "iVar3 = iVar1" (identifier "iVar3") (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (expression_statement "iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);" (assignment_expression "iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3)" (identifier "iVar3") (= "=") (call_expression "memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3)" (identifier "memcmp") (argument_list "(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3)" (( "(") (pointer_expression "*(void **)(*param_1 + 0x18)" (* "*") (cast_expression "(void **)(*param_1 + 0x18)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_1 + 0x18)" (( "(") (binary_expression "*param_1 + 0x18" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "0x18")) () ")")))) (, ",") (pointer_expression "*(void **)(*param_2 + 0x18)" (* "*") (cast_expression "(void **)(*param_2 + 0x18)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*param_2 + 0x18)" (( "(") (binary_expression "*param_2 + 0x18" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (+ "+") (number_literal "0x18")) () ")")))) (, ",") (cast_expression "(long)iVar3" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "iVar3")) () ")")))) (; ";")) (if_statement "if (iVar3 == 0) {\n    iVar3 = iVar1 - iVar2;\n  }" (if "if") (parenthesized_expression "(iVar3 == 0)" (( "(") (binary_expression "iVar3 == 0" (identifier "iVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar3 = iVar1 - iVar2;\n  }" ({ "{") (expression_statement "iVar3 = iVar1 - iVar2;" (assignment_expression "iVar3 = iVar1 - iVar2" (identifier "iVar3") (= "=") (binary_expression "iVar1 - iVar2" (identifier "iVar1") (- "-") (identifier "iVar2"))) (; ";")) (} "}"))) (return_statement "return iVar3;" (return "return") (identifier "iVar3") (; ";")) (} "}")))

int function_1(void *lhs,void *rhs)

{
  int var_1;
  int var_2;
  int var_4;
  
                    /* WARNING: Load size is inaccurate */
                    /* WARNING: Load size is inaccurate */
  var_1 = *(int *)(*lhs + 0x20);
  var_2 = *(int *)(*rhs + 0x20);
  var_4 = var_2;
  if (var_1 <= var_2) {
    var_4 = var_1;
  }
  var_4 = var_3(*(void **)(*lhs + 0x18),*(void **)(*rhs + 0x18),(long)var_4);
  if (var_4 == 0) {
    var_4 = var_1 - var_2;
  }
  return var_4;
}


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

int MASKED(long *param_1,long *param_2)

{
  int iVar1;
  int iVar2;
  int iVar3;
  
  iVar1 = *(int *)(*param_1 + 0x20);
  iVar2 = *(int *)(*param_2 + 0x20);
  iVar3 = iVar2;
  if (iVar1 <= iVar2) {
    iVar3 = iVar1;
  }
  iVar3 = memcmp(*(void **)(*param_1 + 0x18),*(void **)(*param_2 + 0x18),(long)iVar3);
  if (iVar3 == 0) {
    iVar3 = iVar1 - iVar2;
  }
  return iVar3;
}

