
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

mp_ptr __gmpz_limbs_modify(mpz_ptr x,mp_size_t n)

{
  mp_ptr pmVar1;
  
  if (x->_mp_alloc < n) {
    pmVar1 = (mp_ptr)__gmpz_realloc(x,n);
  }
  else {
    pmVar1 = x->_mp_d;
  }
  return pmVar1;
}



int __regparm2 __gmpz_limbs_modify(undefined4 param_1,undefined4 param_2,int param_3)

{
  int iVar1;
  int *unaff_retaddr;
  
  entry(param_2,0x2c7f6);
  if (*unaff_retaddr < param_3) {
    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);
  }
  else {
    iVar1 = unaff_retaddr[2];
  }
  return iVar1;
}


PUSH EBX
CALL 0x0001c340
ADD EBX,0x6c80a
SUB ESP,0x8
MOV EAX,dword ptr [ESP + 0x10]
MOV EDX,dword ptr [ESP + 0x14]
CMP dword ptr [EAX],EDX
JL 0x0002c818
MOV EAX,dword ptr [EAX + 0x8]
ADD ESP,0x8
POP EBX
RET
SUB ESP,0x8
PUSH EDX
PUSH EAX
CALL 0x0001b190
ADD ESP,0x10
JMP 0x0002c80e
(translation_unit "int __regparm2 __gmpz_limbs_modify(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2c7f6);\n  if (*unaff_retaddr < param_3) {\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }\n  else {\n    iVar1 = unaff_retaddr[2];\n  }\n  return iVar1;\n}\n\n" (function_definition "int __regparm2 __gmpz_limbs_modify(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2c7f6);\n  if (*unaff_retaddr < param_3) {\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }\n  else {\n    iVar1 = unaff_retaddr[2];\n  }\n  return iVar1;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "__gmpz_limbs_modify(undefined4 param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2c7f6);\n  if (*unaff_retaddr < param_3) {\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }\n  else {\n    iVar1 = unaff_retaddr[2];\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (expression_statement "entry(param_2,0x2c7f6);" (call_expression "entry(param_2,0x2c7f6)" identifier (argument_list "(param_2,0x2c7f6)" ( identifier , number_literal ))) ;) (if_statement "if (*unaff_retaddr < param_3) {\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }\n  else {\n    iVar1 = unaff_retaddr[2];\n  }" if (parenthesized_expression "(*unaff_retaddr < param_3)" ( (binary_expression "*unaff_retaddr < param_3" (pointer_expression "*unaff_retaddr" * identifier) < identifier) )) (compound_statement "{\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }" { (expression_statement "iVar1 = __gmpz_realloc(unaff_retaddr,param_3);" (assignment_expression "iVar1 = __gmpz_realloc(unaff_retaddr,param_3)" identifier = (call_expression "__gmpz_realloc(unaff_retaddr,param_3)" identifier (argument_list "(unaff_retaddr,param_3)" ( identifier , identifier )))) ;) }) (else_clause "else {\n    iVar1 = unaff_retaddr[2];\n  }" else (compound_statement "{\n    iVar1 = unaff_retaddr[2];\n  }" { (expression_statement "iVar1 = unaff_retaddr[2];" (assignment_expression "iVar1 = unaff_retaddr[2]" identifier = (subscript_expression "unaff_retaddr[2]" identifier [ number_literal ])) ;) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nmp_ptr __gmpz_limbs_modify(mpz_ptr x,mp_size_t n)\n\n{\n  mp_ptr pmVar1;\n  \n  if (x->_mp_alloc < n) {\n    pmVar1 = (mp_ptr)__gmpz_realloc(x,n);\n  }\n  else {\n    pmVar1 = x->_mp_d;\n  }\n  return pmVar1;\n}\n\n" comment comment (function_definition "mp_ptr __gmpz_limbs_modify(mpz_ptr x,mp_size_t n)\n\n{\n  mp_ptr pmVar1;\n  \n  if (x->_mp_alloc < n) {\n    pmVar1 = (mp_ptr)__gmpz_realloc(x,n);\n  }\n  else {\n    pmVar1 = x->_mp_d;\n  }\n  return pmVar1;\n}" type_identifier (function_declarator "__gmpz_limbs_modify(mpz_ptr x,mp_size_t n)" identifier (parameter_list "(mpz_ptr x,mp_size_t n)" ( (parameter_declaration "mpz_ptr x" type_identifier identifier) , (parameter_declaration "mp_size_t n" type_identifier identifier) ))) (compound_statement "{\n  mp_ptr pmVar1;\n  \n  if (x->_mp_alloc < n) {\n    pmVar1 = (mp_ptr)__gmpz_realloc(x,n);\n  }\n  else {\n    pmVar1 = x->_mp_d;\n  }\n  return pmVar1;\n}" { (declaration "mp_ptr pmVar1;" type_identifier identifier ;) (if_statement "if (x->_mp_alloc < n) {\n    pmVar1 = (mp_ptr)__gmpz_realloc(x,n);\n  }\n  else {\n    pmVar1 = x->_mp_d;\n  }" if (parenthesized_expression "(x->_mp_alloc < n)" ( (binary_expression "x->_mp_alloc < n" (field_expression "x->_mp_alloc" identifier -> field_identifier) < identifier) )) (compound_statement "{\n    pmVar1 = (mp_ptr)__gmpz_realloc(x,n);\n  }" { (expression_statement "pmVar1 = (mp_ptr)__gmpz_realloc(x,n);" (assignment_expression "pmVar1 = (mp_ptr)__gmpz_realloc(x,n)" identifier = (cast_expression "(mp_ptr)__gmpz_realloc(x,n)" ( (type_descriptor "mp_ptr" type_identifier) ) (call_expression "__gmpz_realloc(x,n)" identifier (argument_list "(x,n)" ( identifier , identifier ))))) ;) }) (else_clause "else {\n    pmVar1 = x->_mp_d;\n  }" else (compound_statement "{\n    pmVar1 = x->_mp_d;\n  }" { (expression_statement "pmVar1 = x->_mp_d;" (assignment_expression "pmVar1 = x->_mp_d" identifier = (field_expression "x->_mp_d" identifier -> field_identifier)) ;) }))) (return_statement "return pmVar1;" return identifier ;) })))
(translation_unit "int __regparm2 __gmpz_limbs_modify(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2c7f6);\n  if (*unaff_retaddr < param_3) {\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }\n  else {\n    iVar1 = unaff_retaddr[2];\n  }\n  return iVar1;\n}\n\n" (function_definition "int __regparm2 __gmpz_limbs_modify(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2c7f6);\n  if (*unaff_retaddr < param_3) {\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }\n  else {\n    iVar1 = unaff_retaddr[2];\n  }\n  return iVar1;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "__gmpz_limbs_modify(undefined4 param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2c7f6);\n  if (*unaff_retaddr < param_3) {\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }\n  else {\n    iVar1 = unaff_retaddr[2];\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (expression_statement "entry(param_2,0x2c7f6);" (call_expression "entry(param_2,0x2c7f6)" identifier (argument_list "(param_2,0x2c7f6)" ( identifier , number_literal ))) ;) (if_statement "if (*unaff_retaddr < param_3) {\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }\n  else {\n    iVar1 = unaff_retaddr[2];\n  }" if (parenthesized_expression "(*unaff_retaddr < param_3)" ( (binary_expression "*unaff_retaddr < param_3" (pointer_expression "*unaff_retaddr" * identifier) < identifier) )) (compound_statement "{\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }" { (expression_statement "iVar1 = __gmpz_realloc(unaff_retaddr,param_3);" (assignment_expression "iVar1 = __gmpz_realloc(unaff_retaddr,param_3)" identifier = (call_expression "__gmpz_realloc(unaff_retaddr,param_3)" identifier (argument_list "(unaff_retaddr,param_3)" ( identifier , identifier )))) ;) }) (else_clause "else {\n    iVar1 = unaff_retaddr[2];\n  }" else (compound_statement "{\n    iVar1 = unaff_retaddr[2];\n  }" { (expression_statement "iVar1 = unaff_retaddr[2];" (assignment_expression "iVar1 = unaff_retaddr[2]" identifier = (subscript_expression "unaff_retaddr[2]" identifier [ 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 ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) }))) (return_statement return IDENT ;) })))
(function_definition "int __regparm2 __gmpz_limbs_modify(undefined4 param_1,undefined4 param_2,int param_3)\n\n{\n  int iVar1;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2c7f6);\n  if (*unaff_retaddr < param_3) {\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }\n  else {\n    iVar1 = unaff_retaddr[2];\n  }\n  return iVar1;\n}" (primitive_type "int") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "__gmpz_limbs_modify(undefined4 param_1,undefined4 param_2,int param_3)" (identifier "__gmpz_limbs_modify") (parameter_list "(undefined4 param_1,undefined4 param_2,int param_3)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (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  int *unaff_retaddr;\n  \n  entry(param_2,0x2c7f6);\n  if (*unaff_retaddr < param_3) {\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }\n  else {\n    iVar1 = unaff_retaddr[2];\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *unaff_retaddr;" (primitive_type "int") (pointer_declarator "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (; ";")) (expression_statement "entry(param_2,0x2c7f6);" (call_expression "entry(param_2,0x2c7f6)" (identifier "entry") (argument_list "(param_2,0x2c7f6)" (( "(") (identifier "param_2") (, ",") (number_literal "0x2c7f6") () ")"))) (; ";")) (if_statement "if (*unaff_retaddr < param_3) {\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }\n  else {\n    iVar1 = unaff_retaddr[2];\n  }" (if "if") (parenthesized_expression "(*unaff_retaddr < param_3)" (( "(") (binary_expression "*unaff_retaddr < param_3" (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (< "<") (identifier "param_3")) () ")")) (compound_statement "{\n    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);\n  }" ({ "{") (expression_statement "iVar1 = __gmpz_realloc(unaff_retaddr,param_3);" (assignment_expression "iVar1 = __gmpz_realloc(unaff_retaddr,param_3)" (identifier "iVar1") (= "=") (call_expression "__gmpz_realloc(unaff_retaddr,param_3)" (identifier "__gmpz_realloc") (argument_list "(unaff_retaddr,param_3)" (( "(") (identifier "unaff_retaddr") (, ",") (identifier "param_3") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = unaff_retaddr[2];\n  }" (else "else") (compound_statement "{\n    iVar1 = unaff_retaddr[2];\n  }" ({ "{") (expression_statement "iVar1 = unaff_retaddr[2];" (assignment_expression "iVar1 = unaff_retaddr[2]" (identifier "iVar1") (= "=") (subscript_expression "unaff_retaddr[2]" (identifier "unaff_retaddr") ([ "[") (number_literal "2") (] "]"))) (; ";")) (} "}")))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

type_1 function_1(type_2 x,type_3 var_1)

{
  type_1 pmVar1;
  
  if (x->_mp_alloc < var_1) {
    pmVar1 = (type_1)var_2(x,var_1);
  }
  else {
    pmVar1 = x->_mp_d;
  }
  return pmVar1;
}


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

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

{
  int iVar1;
  int *unaff_retaddr;
  
  entry(param_2,0x2c7f6);
  if (*unaff_retaddr < param_3) {
    iVar1 = __gmpz_realloc(unaff_retaddr,param_3);
  }
  else {
    iVar1 = unaff_retaddr[2];
  }
  return iVar1;
}

