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

void __gmpz_neg(mpz_ptr w,mpz_srcptr u)

{
  uint uVar1;
  mp_limb_t *pmVar2;
  int new_alloc;
  
  uVar1 = u->_mp_size;
  if (u != w) {
    new_alloc = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);
    if (w->_mp_alloc < new_alloc) {
      pmVar2 = (mp_limb_t *)__gmpz_realloc(w,new_alloc);
    }
    else {
      pmVar2 = w->_mp_d;
    }
    (**(code **)(PTR___gmpn_cpuvec_0009dd94 + 0x28))(pmVar2,u->_mp_d,new_alloc);
  }
  w->_mp_size = -uVar1;
  return;
}



void __regparm2 __gmpz_neg(undefined4 param_1,undefined4 param_2,int *param_3)

{
  uint uVar1;
  int iVar2;
  int iVar3;
  int unaff_EBX;
  int *unaff_retaddr;
  
  entry(param_2,0x2e659);
  uVar1 = param_3[1];
  if (param_3 != unaff_retaddr) {
    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);
    if (*unaff_retaddr < iVar3) {
      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);
    }
    else {
      iVar2 = unaff_retaddr[2];
    }
    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);
  }
  unaff_retaddr[1] = -uVar1;
  return;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001c340
ADD EBX,0x6f9a7
SUB ESP,0x1c
MOV EBP,dword ptr [ESP + 0x34]
MOV EDI,dword ptr [ESP + 0x30]
MOV ESI,dword ptr [EBP + 0x4]
CMP EBP,EDI
JZ 0x0002e697
MOV EAX,ESI
SAR EAX,0x1f
MOV EDX,EAX
XOR EDX,ESI
SUB EDX,EAX
CMP dword ptr [EDI],EDX
JL 0x0002e6a8
MOV EAX,dword ptr [EDI + 0x8]
SUB ESP,0x4
PUSH EDX
PUSH dword ptr [EBP + 0x8]
PUSH EAX
MOV EAX,dword ptr [EBX + 0xfffffd94]
CALL dword ptr [EAX + 0x28]
ADD ESP,0x10
NEG ESI
MOV dword ptr [EDI + 0x4],ESI
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH EDX
MOV dword ptr [ESP + 0x18],EDX
PUSH EDI
CALL 0x0001b190
ADD ESP,0x10
MOV EDX,dword ptr [ESP + 0xc]
JMP 0x0002e683
(translation_unit "void __regparm2 __gmpz_neg(undefined4 param_1,undefined4 param_2,int *param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2e659);\n  uVar1 = param_3[1];\n  if (param_3 != unaff_retaddr) {\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }\n  unaff_retaddr[1] = -uVar1;\n  return;\n}\n\n" (function_definition "void __regparm2 __gmpz_neg(undefined4 param_1,undefined4 param_2,int *param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2e659);\n  uVar1 = param_3[1];\n  if (param_3 != unaff_retaddr) {\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }\n  unaff_retaddr[1] = -uVar1;\n  return;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "__gmpz_neg(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 (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2e659);\n  uVar1 = param_3[1];\n  if (param_3 != unaff_retaddr) {\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }\n  unaff_retaddr[1] = -uVar1;\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (expression_statement "entry(param_2,0x2e659);" (call_expression "entry(param_2,0x2e659)" identifier (argument_list "(param_2,0x2e659)" ( identifier , number_literal ))) ;) (expression_statement "uVar1 = param_3[1];" (assignment_expression "uVar1 = param_3[1]" identifier = (subscript_expression "param_3[1]" identifier [ number_literal ])) ;) (if_statement "if (param_3 != unaff_retaddr) {\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }" if (parenthesized_expression "(param_3 != unaff_retaddr)" ( (binary_expression "param_3 != unaff_retaddr" identifier != identifier) )) (compound_statement "{\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }" { (expression_statement "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);" (assignment_expression "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" identifier = (binary_expression "((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" (parenthesized_expression "((int)uVar1 >> 0x1f ^ uVar1)" ( (binary_expression "(int)uVar1 >> 0x1f ^ uVar1" (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ^ identifier) )) - (parenthesized_expression "((int)uVar1 >> 0x1f)" ( (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (if_statement "if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }" if (parenthesized_expression "(*unaff_retaddr < iVar3)" ( (binary_expression "*unaff_retaddr < iVar3" (pointer_expression "*unaff_retaddr" * identifier) < identifier) )) (compound_statement "{\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }" { (expression_statement "iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);" (assignment_expression "iVar2 = __gmpz_realloc(unaff_retaddr,iVar3)" identifier = (call_expression "__gmpz_realloc(unaff_retaddr,iVar3)" identifier (argument_list "(unaff_retaddr,iVar3)" ( identifier , identifier )))) ;) }) (else_clause "else {\n      iVar2 = unaff_retaddr[2];\n    }" else (compound_statement "{\n      iVar2 = unaff_retaddr[2];\n    }" { (expression_statement "iVar2 = unaff_retaddr[2];" (assignment_expression "iVar2 = unaff_retaddr[2]" identifier = (subscript_expression "unaff_retaddr[2]" identifier [ number_literal ])) ;) }))) (expression_statement "(**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);" (call_expression "(**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3)" (parenthesized_expression "(**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))" ( (pointer_expression "**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28)" * (pointer_expression "*(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28)" * (cast_expression "(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(unaff_EBX + 0x6f73b) + 0x28)" ( (binary_expression "*(int *)(unaff_EBX + 0x6f73b) + 0x28" (pointer_expression "*(int *)(unaff_EBX + 0x6f73b)" * (cast_expression "(int *)(unaff_EBX + 0x6f73b)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EBX + 0x6f73b)" ( (binary_expression "unaff_EBX + 0x6f73b" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(iVar2,param_3[2],iVar3)" ( identifier , (subscript_expression "param_3[2]" identifier [ number_literal ]) , identifier ))) ;) })) (expression_statement "unaff_retaddr[1] = -uVar1;" (assignment_expression "unaff_retaddr[1] = -uVar1" (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ]) = (unary_expression "-uVar1" - identifier)) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nvoid __gmpz_neg(mpz_ptr w,mpz_srcptr u)\n\n{\n  uint uVar1;\n  mp_limb_t *pmVar2;\n  int new_alloc;\n  \n  uVar1 = u->_mp_size;\n  if (u != w) {\n    new_alloc = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (w->_mp_alloc < new_alloc) {\n      pmVar2 = (mp_limb_t *)__gmpz_realloc(w,new_alloc);\n    }\n    else {\n      pmVar2 = w->_mp_d;\n    }\n    (**(code **)(PTR___gmpn_cpuvec_0009dd94 + 0x28))(pmVar2,u->_mp_d,new_alloc);\n  }\n  w->_mp_size = -uVar1;\n  return;\n}\n\n" comment comment (function_definition "void __gmpz_neg(mpz_ptr w,mpz_srcptr u)\n\n{\n  uint uVar1;\n  mp_limb_t *pmVar2;\n  int new_alloc;\n  \n  uVar1 = u->_mp_size;\n  if (u != w) {\n    new_alloc = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (w->_mp_alloc < new_alloc) {\n      pmVar2 = (mp_limb_t *)__gmpz_realloc(w,new_alloc);\n    }\n    else {\n      pmVar2 = w->_mp_d;\n    }\n    (**(code **)(PTR___gmpn_cpuvec_0009dd94 + 0x28))(pmVar2,u->_mp_d,new_alloc);\n  }\n  w->_mp_size = -uVar1;\n  return;\n}" primitive_type (function_declarator "__gmpz_neg(mpz_ptr w,mpz_srcptr u)" identifier (parameter_list "(mpz_ptr w,mpz_srcptr u)" ( (parameter_declaration "mpz_ptr w" type_identifier identifier) , (parameter_declaration "mpz_srcptr u" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  mp_limb_t *pmVar2;\n  int new_alloc;\n  \n  uVar1 = u->_mp_size;\n  if (u != w) {\n    new_alloc = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (w->_mp_alloc < new_alloc) {\n      pmVar2 = (mp_limb_t *)__gmpz_realloc(w,new_alloc);\n    }\n    else {\n      pmVar2 = w->_mp_d;\n    }\n    (**(code **)(PTR___gmpn_cpuvec_0009dd94 + 0x28))(pmVar2,u->_mp_d,new_alloc);\n  }\n  w->_mp_size = -uVar1;\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "mp_limb_t *pmVar2;" type_identifier (pointer_declarator "*pmVar2" * identifier) ;) (declaration "int new_alloc;" primitive_type identifier ;) (expression_statement "uVar1 = u->_mp_size;" (assignment_expression "uVar1 = u->_mp_size" identifier = (field_expression "u->_mp_size" identifier -> field_identifier)) ;) (if_statement "if (u != w) {\n    new_alloc = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (w->_mp_alloc < new_alloc) {\n      pmVar2 = (mp_limb_t *)__gmpz_realloc(w,new_alloc);\n    }\n    else {\n      pmVar2 = w->_mp_d;\n    }\n    (**(code **)(PTR___gmpn_cpuvec_0009dd94 + 0x28))(pmVar2,u->_mp_d,new_alloc);\n  }" if (parenthesized_expression "(u != w)" ( (binary_expression "u != w" identifier != identifier) )) (compound_statement "{\n    new_alloc = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (w->_mp_alloc < new_alloc) {\n      pmVar2 = (mp_limb_t *)__gmpz_realloc(w,new_alloc);\n    }\n    else {\n      pmVar2 = w->_mp_d;\n    }\n    (**(code **)(PTR___gmpn_cpuvec_0009dd94 + 0x28))(pmVar2,u->_mp_d,new_alloc);\n  }" { (expression_statement "new_alloc = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);" (assignment_expression "new_alloc = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" identifier = (binary_expression "((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" (parenthesized_expression "((int)uVar1 >> 0x1f ^ uVar1)" ( (binary_expression "(int)uVar1 >> 0x1f ^ uVar1" (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ^ identifier) )) - (parenthesized_expression "((int)uVar1 >> 0x1f)" ( (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (if_statement "if (w->_mp_alloc < new_alloc) {\n      pmVar2 = (mp_limb_t *)__gmpz_realloc(w,new_alloc);\n    }\n    else {\n      pmVar2 = w->_mp_d;\n    }" if (parenthesized_expression "(w->_mp_alloc < new_alloc)" ( (binary_expression "w->_mp_alloc < new_alloc" (field_expression "w->_mp_alloc" identifier -> field_identifier) < identifier) )) (compound_statement "{\n      pmVar2 = (mp_limb_t *)__gmpz_realloc(w,new_alloc);\n    }" { (expression_statement "pmVar2 = (mp_limb_t *)__gmpz_realloc(w,new_alloc);" (assignment_expression "pmVar2 = (mp_limb_t *)__gmpz_realloc(w,new_alloc)" identifier = (cast_expression "(mp_limb_t *)__gmpz_realloc(w,new_alloc)" ( (type_descriptor "mp_limb_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "__gmpz_realloc(w,new_alloc)" identifier (argument_list "(w,new_alloc)" ( identifier , identifier ))))) ;) }) (else_clause "else {\n      pmVar2 = w->_mp_d;\n    }" else (compound_statement "{\n      pmVar2 = w->_mp_d;\n    }" { (expression_statement "pmVar2 = w->_mp_d;" (assignment_expression "pmVar2 = w->_mp_d" identifier = (field_expression "w->_mp_d" identifier -> field_identifier)) ;) }))) (expression_statement "(**(code **)(PTR___gmpn_cpuvec_0009dd94 + 0x28))(pmVar2,u->_mp_d,new_alloc);" (call_expression "(**(code **)(PTR___gmpn_cpuvec_0009dd94 + 0x28))(pmVar2,u->_mp_d,new_alloc)" (parenthesized_expression "(**(code **)(PTR___gmpn_cpuvec_0009dd94 + 0x28))" ( (pointer_expression "**(code **)(PTR___gmpn_cpuvec_0009dd94 + 0x28)" * (pointer_expression "*(code **)(PTR___gmpn_cpuvec_0009dd94 + 0x28)" * (cast_expression "(code **)(PTR___gmpn_cpuvec_0009dd94 + 0x28)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR___gmpn_cpuvec_0009dd94 + 0x28)" ( (binary_expression "PTR___gmpn_cpuvec_0009dd94 + 0x28" identifier + number_literal) ))))) )) (argument_list "(pmVar2,u->_mp_d,new_alloc)" ( identifier , (field_expression "u->_mp_d" identifier -> field_identifier) , identifier ))) ;) })) (expression_statement "w->_mp_size = -uVar1;" (assignment_expression "w->_mp_size = -uVar1" (field_expression "w->_mp_size" identifier -> field_identifier) = (unary_expression "-uVar1" - identifier)) ;) (return_statement "return;" return ;) })))
(translation_unit "void __regparm2 __gmpz_neg(undefined4 param_1,undefined4 param_2,int *param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2e659);\n  uVar1 = param_3[1];\n  if (param_3 != unaff_retaddr) {\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }\n  unaff_retaddr[1] = -uVar1;\n  return;\n}\n\n" (function_definition "void __regparm2 __gmpz_neg(undefined4 param_1,undefined4 param_2,int *param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2e659);\n  uVar1 = param_3[1];\n  if (param_3 != unaff_retaddr) {\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }\n  unaff_retaddr[1] = -uVar1;\n  return;\n}" primitive_type (ERROR "__regparm2" identifier) (function_declarator "__gmpz_neg(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 (pointer_declarator "*param_3" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2e659);\n  uVar1 = param_3[1];\n  if (param_3 != unaff_retaddr) {\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }\n  unaff_retaddr[1] = -uVar1;\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int unaff_EBX;" primitive_type identifier ;) (declaration "int *unaff_retaddr;" primitive_type (pointer_declarator "*unaff_retaddr" * identifier) ;) (expression_statement "entry(param_2,0x2e659);" (call_expression "entry(param_2,0x2e659)" identifier (argument_list "(param_2,0x2e659)" ( identifier , number_literal ))) ;) (expression_statement "uVar1 = param_3[1];" (assignment_expression "uVar1 = param_3[1]" identifier = (subscript_expression "param_3[1]" identifier [ number_literal ])) ;) (if_statement "if (param_3 != unaff_retaddr) {\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }" if (parenthesized_expression "(param_3 != unaff_retaddr)" ( (binary_expression "param_3 != unaff_retaddr" identifier != identifier) )) (compound_statement "{\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }" { (expression_statement "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);" (assignment_expression "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" identifier = (binary_expression "((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" (parenthesized_expression "((int)uVar1 >> 0x1f ^ uVar1)" ( (binary_expression "(int)uVar1 >> 0x1f ^ uVar1" (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) ^ identifier) )) - (parenthesized_expression "((int)uVar1 >> 0x1f)" ( (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) >> number_literal) )))) ;) (if_statement "if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }" if (parenthesized_expression "(*unaff_retaddr < iVar3)" ( (binary_expression "*unaff_retaddr < iVar3" (pointer_expression "*unaff_retaddr" * identifier) < identifier) )) (compound_statement "{\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }" { (expression_statement "iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);" (assignment_expression "iVar2 = __gmpz_realloc(unaff_retaddr,iVar3)" identifier = (call_expression "__gmpz_realloc(unaff_retaddr,iVar3)" identifier (argument_list "(unaff_retaddr,iVar3)" ( identifier , identifier )))) ;) }) (else_clause "else {\n      iVar2 = unaff_retaddr[2];\n    }" else (compound_statement "{\n      iVar2 = unaff_retaddr[2];\n    }" { (expression_statement "iVar2 = unaff_retaddr[2];" (assignment_expression "iVar2 = unaff_retaddr[2]" identifier = (subscript_expression "unaff_retaddr[2]" identifier [ number_literal ])) ;) }))) (expression_statement "(**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);" (call_expression "(**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3)" (parenthesized_expression "(**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))" ( (pointer_expression "**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28)" * (pointer_expression "*(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28)" * (cast_expression "(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(unaff_EBX + 0x6f73b) + 0x28)" ( (binary_expression "*(int *)(unaff_EBX + 0x6f73b) + 0x28" (pointer_expression "*(int *)(unaff_EBX + 0x6f73b)" * (cast_expression "(int *)(unaff_EBX + 0x6f73b)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_EBX + 0x6f73b)" ( (binary_expression "unaff_EBX + 0x6f73b" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(iVar2,param_3[2],iVar3)" ( identifier , (subscript_expression "param_3[2]" identifier [ number_literal ]) , identifier ))) ;) })) (expression_statement "unaff_retaddr[1] = -uVar1;" (assignment_expression "unaff_retaddr[1] = -uVar1" (subscript_expression "unaff_retaddr[1]" identifier [ number_literal ]) = (unary_expression "-uVar1" - identifier)) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) ^ IDENT) )) - (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) 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 ])) ;) }))) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) ))))) )) (argument_list ( IDENT , (subscript_expression IDENT [ LIT ]) , IDENT ))) ;) })) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (unary_expression - IDENT)) ;) (return_statement return ;) })))
(function_definition "void __regparm2 __gmpz_neg(undefined4 param_1,undefined4 param_2,int *param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2e659);\n  uVar1 = param_3[1];\n  if (param_3 != unaff_retaddr) {\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }\n  unaff_retaddr[1] = -uVar1;\n  return;\n}" (primitive_type "void") (ERROR "__regparm2" (identifier "__regparm2")) (function_declarator "__gmpz_neg(undefined4 param_1,undefined4 param_2,int *param_3)" (identifier "__gmpz_neg") (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") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  int iVar3;\n  int unaff_EBX;\n  int *unaff_retaddr;\n  \n  entry(param_2,0x2e659);\n  uVar1 = param_3[1];\n  if (param_3 != unaff_retaddr) {\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }\n  unaff_retaddr[1] = -uVar1;\n  return;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "int unaff_EBX;" (primitive_type "int") (identifier "unaff_EBX") (; ";")) (declaration "int *unaff_retaddr;" (primitive_type "int") (pointer_declarator "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (; ";")) (expression_statement "entry(param_2,0x2e659);" (call_expression "entry(param_2,0x2e659)" (identifier "entry") (argument_list "(param_2,0x2e659)" (( "(") (identifier "param_2") (, ",") (number_literal "0x2e659") () ")"))) (; ";")) (expression_statement "uVar1 = param_3[1];" (assignment_expression "uVar1 = param_3[1]" (identifier "uVar1") (= "=") (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if (param_3 != unaff_retaddr) {\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }" (if "if") (parenthesized_expression "(param_3 != unaff_retaddr)" (( "(") (binary_expression "param_3 != unaff_retaddr" (identifier "param_3") (!= "!=") (identifier "unaff_retaddr")) () ")")) (compound_statement "{\n    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);\n    if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }\n    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);\n  }" ({ "{") (expression_statement "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);" (assignment_expression "iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" (identifier "iVar3") (= "=") (binary_expression "((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f)" (parenthesized_expression "((int)uVar1 >> 0x1f ^ uVar1)" (( "(") (binary_expression "(int)uVar1 >> 0x1f ^ uVar1" (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (>> ">>") (number_literal "0x1f")) (^ "^") (identifier "uVar1")) () ")")) (- "-") (parenthesized_expression "((int)uVar1 >> 0x1f)" (( "(") (binary_expression "(int)uVar1 >> 0x1f" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (>> ">>") (number_literal "0x1f")) () ")")))) (; ";")) (if_statement "if (*unaff_retaddr < iVar3) {\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }\n    else {\n      iVar2 = unaff_retaddr[2];\n    }" (if "if") (parenthesized_expression "(*unaff_retaddr < iVar3)" (( "(") (binary_expression "*unaff_retaddr < iVar3" (pointer_expression "*unaff_retaddr" (* "*") (identifier "unaff_retaddr")) (< "<") (identifier "iVar3")) () ")")) (compound_statement "{\n      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);\n    }" ({ "{") (expression_statement "iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);" (assignment_expression "iVar2 = __gmpz_realloc(unaff_retaddr,iVar3)" (identifier "iVar2") (= "=") (call_expression "__gmpz_realloc(unaff_retaddr,iVar3)" (identifier "__gmpz_realloc") (argument_list "(unaff_retaddr,iVar3)" (( "(") (identifier "unaff_retaddr") (, ",") (identifier "iVar3") () ")")))) (; ";")) (} "}")) (else_clause "else {\n      iVar2 = unaff_retaddr[2];\n    }" (else "else") (compound_statement "{\n      iVar2 = unaff_retaddr[2];\n    }" ({ "{") (expression_statement "iVar2 = unaff_retaddr[2];" (assignment_expression "iVar2 = unaff_retaddr[2]" (identifier "iVar2") (= "=") (subscript_expression "unaff_retaddr[2]" (identifier "unaff_retaddr") ([ "[") (number_literal "2") (] "]"))) (; ";")) (} "}")))) (expression_statement "(**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);" (call_expression "(**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3)" (parenthesized_expression "(**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))" (( "(") (pointer_expression "**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28)" (* "*") (pointer_expression "*(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28)" (* "*") (cast_expression "(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(unaff_EBX + 0x6f73b) + 0x28)" (( "(") (binary_expression "*(int *)(unaff_EBX + 0x6f73b) + 0x28" (pointer_expression "*(int *)(unaff_EBX + 0x6f73b)" (* "*") (cast_expression "(int *)(unaff_EBX + 0x6f73b)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_EBX + 0x6f73b)" (( "(") (binary_expression "unaff_EBX + 0x6f73b" (identifier "unaff_EBX") (+ "+") (number_literal "0x6f73b")) () ")")))) (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (argument_list "(iVar2,param_3[2],iVar3)" (( "(") (identifier "iVar2") (, ",") (subscript_expression "param_3[2]" (identifier "param_3") ([ "[") (number_literal "2") (] "]")) (, ",") (identifier "iVar3") () ")"))) (; ";")) (} "}"))) (expression_statement "unaff_retaddr[1] = -uVar1;" (assignment_expression "unaff_retaddr[1] = -uVar1" (subscript_expression "unaff_retaddr[1]" (identifier "unaff_retaddr") ([ "[") (number_literal "1") (] "]")) (= "=") (unary_expression "-uVar1" (- "-") (identifier "uVar1"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 var_2,type_2 var_1)

{
  type_3 var_3;
  type_4 *pmVar2;
  int var_4;
  
  var_3 = var_1->_mp_size;
  if (var_1 != var_2) {
    var_4 = ((int)var_3 >> 0x1f ^ var_3) - ((int)var_3 >> 0x1f);
    if (var_2->_mp_alloc < var_4) {
      pmVar2 = (type_4 *)var_5(var_2,var_4);
    }
    else {
      pmVar2 = var_2->_mp_d;
    }
    (**(type_5 **)(var_6 + 0x28))(pmVar2,var_1->_mp_d,var_4);
  }
  var_2->_mp_size = -var_3;
  return;
}


(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: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (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)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal)) right: (identifier))) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (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))))))) (expression_statement (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: (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: (number_literal))))))) arguments: (argument_list (identifier) (subscript_expression argument: (identifier) index: (number_literal)) (identifier)))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (unary_expression argument: (identifier)))) (return_statement))))

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

{
  uint uVar1;
  int iVar2;
  int iVar3;
  int unaff_EBX;
  int *unaff_retaddr;
  
  entry(param_2,0x2e659);
  uVar1 = param_3[1];
  if (param_3 != unaff_retaddr) {
    iVar3 = ((int)uVar1 >> 0x1f ^ uVar1) - ((int)uVar1 >> 0x1f);
    if (*unaff_retaddr < iVar3) {
      iVar2 = __gmpz_realloc(unaff_retaddr,iVar3);
    }
    else {
      iVar2 = unaff_retaddr[2];
    }
    (**(code **)(*(int *)(unaff_EBX + 0x6f73b) + 0x28))(iVar2,param_3[2],iVar3);
  }
  unaff_retaddr[1] = -uVar1;
  return;
}

