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

int __gmpz_perfect_square_p(mpz_srcptr __gmp_a)

{
  int iVar1;
  
  iVar1 = __gmp_a->_mp_size;
  if (0 < iVar1) {
    iVar1 = __gmpn_perfect_square_p(__gmp_a->_mp_d,iVar1);
    return iVar1;
  }
  return (uint)(iVar1 == 0);
}



uint __regparm3 __gmpz_perfect_square_p(undefined4 param_1,undefined4 param_2)

{
  int iVar1;
  uint uVar2;
  int unaff_retaddr;
  
  entry(param_2,0x2ecd6);
  iVar1 = *(int *)(unaff_retaddr + 4);
  if (0 < iVar1) {
    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);
    return uVar2;
  }
  return (uint)(iVar1 == 0);
}


PUSH EBX
CALL 0x0001c340
ADD EBX,0x6f32a
SUB ESP,0x8
MOV EAX,dword ptr [ESP + 0x10]
MOV EDX,dword ptr [EAX + 0x4]
TEST EDX,EDX
JLE 0x0002ed00
SUB ESP,0x8
PUSH EDX
PUSH dword ptr [EAX + 0x8]
CALL 0x0001bf70
ADD ESP,0x10
ADD ESP,0x8
POP EBX
RET
SETZ AL
ADD ESP,0x8
MOVZX EAX,AL
POP EBX
RET
(translation_unit "uint __regparm3 __gmpz_perfect_square_p(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  int unaff_retaddr;\n  \n  entry(param_2,0x2ecd6);\n  iVar1 = *(int *)(unaff_retaddr + 4);\n  if (0 < iVar1) {\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }\n  return (uint)(iVar1 == 0);\n}\n\n" (function_definition "uint __regparm3 __gmpz_perfect_square_p(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  int unaff_retaddr;\n  \n  entry(param_2,0x2ecd6);\n  iVar1 = *(int *)(unaff_retaddr + 4);\n  if (0 < iVar1) {\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }\n  return (uint)(iVar1 == 0);\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "__gmpz_perfect_square_p(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int unaff_retaddr;\n  \n  entry(param_2,0x2ecd6);\n  iVar1 = *(int *)(unaff_retaddr + 4);\n  if (0 < iVar1) {\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }\n  return (uint)(iVar1 == 0);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int unaff_retaddr;" primitive_type identifier ;) (expression_statement "entry(param_2,0x2ecd6);" (call_expression "entry(param_2,0x2ecd6)" identifier (argument_list "(param_2,0x2ecd6)" ( identifier , number_literal ))) ;) (expression_statement "iVar1 = *(int *)(unaff_retaddr + 4);" (assignment_expression "iVar1 = *(int *)(unaff_retaddr + 4)" identifier = (pointer_expression "*(int *)(unaff_retaddr + 4)" * (cast_expression "(int *)(unaff_retaddr + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 4)" ( (binary_expression "unaff_retaddr + 4" identifier + number_literal) ))))) ;) (if_statement "if (0 < iVar1) {\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }" if (parenthesized_expression "(0 < iVar1)" ( (binary_expression "0 < iVar1" number_literal < identifier) )) (compound_statement "{\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }" { (expression_statement "uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);" (assignment_expression "uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1)" identifier = (call_expression "__gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1)" identifier (argument_list "(*(undefined4 *)(unaff_retaddr + 8),iVar1)" ( (pointer_expression "*(undefined4 *)(unaff_retaddr + 8)" * (cast_expression "(undefined4 *)(unaff_retaddr + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 8)" ( (binary_expression "unaff_retaddr + 8" identifier + number_literal) )))) , identifier )))) ;) (return_statement "return uVar2;" return identifier ;) })) (return_statement "return (uint)(iVar1 == 0);" return (call_expression "(uint)(iVar1 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint __gmpz_perfect_square_p(mpz_srcptr __gmp_a)\n\n{\n  int iVar1;\n  \n  iVar1 = __gmp_a->_mp_size;\n  if (0 < iVar1) {\n    iVar1 = __gmpn_perfect_square_p(__gmp_a->_mp_d,iVar1);\n    return iVar1;\n  }\n  return (uint)(iVar1 == 0);\n}\n\n" comment comment (function_definition "int __gmpz_perfect_square_p(mpz_srcptr __gmp_a)\n\n{\n  int iVar1;\n  \n  iVar1 = __gmp_a->_mp_size;\n  if (0 < iVar1) {\n    iVar1 = __gmpn_perfect_square_p(__gmp_a->_mp_d,iVar1);\n    return iVar1;\n  }\n  return (uint)(iVar1 == 0);\n}" primitive_type (function_declarator "__gmpz_perfect_square_p(mpz_srcptr __gmp_a)" identifier (parameter_list "(mpz_srcptr __gmp_a)" ( (parameter_declaration "mpz_srcptr __gmp_a" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  \n  iVar1 = __gmp_a->_mp_size;\n  if (0 < iVar1) {\n    iVar1 = __gmpn_perfect_square_p(__gmp_a->_mp_d,iVar1);\n    return iVar1;\n  }\n  return (uint)(iVar1 == 0);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (expression_statement "iVar1 = __gmp_a->_mp_size;" (assignment_expression "iVar1 = __gmp_a->_mp_size" identifier = (field_expression "__gmp_a->_mp_size" identifier -> field_identifier)) ;) (if_statement "if (0 < iVar1) {\n    iVar1 = __gmpn_perfect_square_p(__gmp_a->_mp_d,iVar1);\n    return iVar1;\n  }" if (parenthesized_expression "(0 < iVar1)" ( (binary_expression "0 < iVar1" number_literal < identifier) )) (compound_statement "{\n    iVar1 = __gmpn_perfect_square_p(__gmp_a->_mp_d,iVar1);\n    return iVar1;\n  }" { (expression_statement "iVar1 = __gmpn_perfect_square_p(__gmp_a->_mp_d,iVar1);" (assignment_expression "iVar1 = __gmpn_perfect_square_p(__gmp_a->_mp_d,iVar1)" identifier = (call_expression "__gmpn_perfect_square_p(__gmp_a->_mp_d,iVar1)" identifier (argument_list "(__gmp_a->_mp_d,iVar1)" ( (field_expression "__gmp_a->_mp_d" identifier -> field_identifier) , identifier )))) ;) (return_statement "return iVar1;" return identifier ;) })) (return_statement "return (uint)(iVar1 == 0);" return (call_expression "(uint)(iVar1 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) ))) ;) })))
(translation_unit "uint __regparm3 __gmpz_perfect_square_p(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  int unaff_retaddr;\n  \n  entry(param_2,0x2ecd6);\n  iVar1 = *(int *)(unaff_retaddr + 4);\n  if (0 < iVar1) {\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }\n  return (uint)(iVar1 == 0);\n}\n\n" (function_definition "uint __regparm3 __gmpz_perfect_square_p(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  int unaff_retaddr;\n  \n  entry(param_2,0x2ecd6);\n  iVar1 = *(int *)(unaff_retaddr + 4);\n  if (0 < iVar1) {\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }\n  return (uint)(iVar1 == 0);\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "__gmpz_perfect_square_p(undefined4 param_1,undefined4 param_2)" identifier (parameter_list "(undefined4 param_1,undefined4 param_2)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int unaff_retaddr;\n  \n  entry(param_2,0x2ecd6);\n  iVar1 = *(int *)(unaff_retaddr + 4);\n  if (0 < iVar1) {\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }\n  return (uint)(iVar1 == 0);\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "int unaff_retaddr;" primitive_type identifier ;) (expression_statement "entry(param_2,0x2ecd6);" (call_expression "entry(param_2,0x2ecd6)" identifier (argument_list "(param_2,0x2ecd6)" ( identifier , number_literal ))) ;) (expression_statement "iVar1 = *(int *)(unaff_retaddr + 4);" (assignment_expression "iVar1 = *(int *)(unaff_retaddr + 4)" identifier = (pointer_expression "*(int *)(unaff_retaddr + 4)" * (cast_expression "(int *)(unaff_retaddr + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 4)" ( (binary_expression "unaff_retaddr + 4" identifier + number_literal) ))))) ;) (if_statement "if (0 < iVar1) {\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }" if (parenthesized_expression "(0 < iVar1)" ( (binary_expression "0 < iVar1" number_literal < identifier) )) (compound_statement "{\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }" { (expression_statement "uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);" (assignment_expression "uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1)" identifier = (call_expression "__gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1)" identifier (argument_list "(*(undefined4 *)(unaff_retaddr + 8),iVar1)" ( (pointer_expression "*(undefined4 *)(unaff_retaddr + 8)" * (cast_expression "(undefined4 *)(unaff_retaddr + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(unaff_retaddr + 8)" ( (binary_expression "unaff_retaddr + 8" identifier + number_literal) )))) , identifier )))) ;) (return_statement "return uVar2;" return identifier ;) })) (return_statement "return (uint)(iVar1 == 0);" return (call_expression "(uint)(iVar1 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) ))) ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT )))) ;) (return_statement return IDENT ;) })) (return_statement return (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT == LIT) ))) ;) })))
(function_definition "uint __regparm3 __gmpz_perfect_square_p(undefined4 param_1,undefined4 param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  int unaff_retaddr;\n  \n  entry(param_2,0x2ecd6);\n  iVar1 = *(int *)(unaff_retaddr + 4);\n  if (0 < iVar1) {\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }\n  return (uint)(iVar1 == 0);\n}" (type_identifier "uint") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "__gmpz_perfect_square_p(undefined4 param_1,undefined4 param_2)" (identifier "__gmpz_perfect_square_p") (parameter_list "(undefined4 param_1,undefined4 param_2)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  int unaff_retaddr;\n  \n  entry(param_2,0x2ecd6);\n  iVar1 = *(int *)(unaff_retaddr + 4);\n  if (0 < iVar1) {\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }\n  return (uint)(iVar1 == 0);\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "int unaff_retaddr;" (primitive_type "int") (identifier "unaff_retaddr") (; ";")) (expression_statement "entry(param_2,0x2ecd6);" (call_expression "entry(param_2,0x2ecd6)" (identifier "entry") (argument_list "(param_2,0x2ecd6)" (( "(") (identifier "param_2") (, ",") (number_literal "0x2ecd6") () ")"))) (; ";")) (expression_statement "iVar1 = *(int *)(unaff_retaddr + 4);" (assignment_expression "iVar1 = *(int *)(unaff_retaddr + 4)" (identifier "iVar1") (= "=") (pointer_expression "*(int *)(unaff_retaddr + 4)" (* "*") (cast_expression "(int *)(unaff_retaddr + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 4)" (( "(") (binary_expression "unaff_retaddr + 4" (identifier "unaff_retaddr") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (if_statement "if (0 < iVar1) {\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(0 < iVar1)" (( "(") (binary_expression "0 < iVar1" (number_literal "0") (< "<") (identifier "iVar1")) () ")")) (compound_statement "{\n    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);\n    return uVar2;\n  }" ({ "{") (expression_statement "uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);" (assignment_expression "uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1)" (identifier "uVar2") (= "=") (call_expression "__gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1)" (identifier "__gmpn_perfect_square_p") (argument_list "(*(undefined4 *)(unaff_retaddr + 8),iVar1)" (( "(") (pointer_expression "*(undefined4 *)(unaff_retaddr + 8)" (* "*") (cast_expression "(undefined4 *)(unaff_retaddr + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(unaff_retaddr + 8)" (( "(") (binary_expression "unaff_retaddr + 8" (identifier "unaff_retaddr") (+ "+") (number_literal "8")) () ")")))) (, ",") (identifier "iVar1") () ")")))) (; ";")) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (return_statement "return (uint)(iVar1 == 0);" (return "return") (call_expression "(uint)(iVar1 == 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")"))) (; ";")) (} "}")))

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

int function_1(type_1 __gmp_a)

{
  int var_1;
  
  var_1 = __gmp_a->_mp_size;
  if (0 < var_1) {
    var_1 = var_2(__gmp_a->_mp_d,var_1);
    return var_1;
  }
  return (uint)(var_1 == 0);
}


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

uint __regparm3 MASKED(undefined4 param_1,undefined4 param_2)

{
  int iVar1;
  uint uVar2;
  int unaff_retaddr;
  
  entry(param_2,0x2ecd6);
  iVar1 = *(int *)(unaff_retaddr + 4);
  if (0 < iVar1) {
    uVar2 = __gmpn_perfect_square_p(*(undefined4 *)(unaff_retaddr + 8),iVar1);
    return uVar2;
  }
  return (uint)(iVar1 == 0);
}

