
/* WARNING: Enum "gmp_randalg_t": Some values do not have unique names */

void __gmpz_urandomb(mpz_ptr rop,__gmp_randstate_struct *rstate,mp_bitcnt_t nbits)

{
  mp_limb_t *pmVar1;
  mp_limb_t *pmVar2;
  uint uVar3;
  
  uVar3 = nbits + 0x1f >> 5;
  if (rop->_mp_alloc < (int)uVar3) {
    pmVar2 = (mp_limb_t *)(*(code *)PTR___gmpz_realloc_000975bc)(rop,uVar3);
  }
  else {
    pmVar2 = rop->_mp_d;
  }
  (**(code **)((int)(rstate->_mp_algdata)._mp_lc + 4))(rstate,pmVar2,nbits);
  if (uVar3 == 0) {
    uVar3 = 0;
  }
  else if (pmVar2[uVar3 - 1] == 0) {
    pmVar2 = pmVar2 + uVar3;
    do {
      uVar3 = uVar3 - 1;
      if (uVar3 == 0) break;
      pmVar1 = pmVar2 + -2;
      pmVar2 = pmVar2 + -1;
    } while (*pmVar1 == 0);
  }
  rop->_mp_size = uVar3;
  return;
}



void __gmpz_urandomb(int *param_1,int param_2,int param_3)

{
  int *piVar1;
  int iVar2;
  uint uVar3;
  
  uVar3 = param_3 + 0x1fU >> 5;
  if (*param_1 < (int)uVar3) {
    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);
  }
  else {
    iVar2 = param_1[2];
  }
  (**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);
  if (uVar3 == 0) {
    uVar3 = 0;
  }
  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {
    iVar2 = iVar2 + uVar3 * 4;
    do {
      uVar3 = uVar3 - 1;
      if (uVar3 == 0) break;
      piVar1 = (int *)(iVar2 + -8);
      iVar2 = iVar2 + -4;
    } while (*piVar1 == 0);
  }
  param_1[1] = uVar3;
  return;
}


lui gp,0x7
addiu gp,gp,-0x6d80
addu gp,gp,t9
addiu sp,sp,-0x30
lw v0,0x0(a0)
sw s2,0x20(sp)
addiu s2,a2,0x1f
sw gp,0x10(sp)
srl s2,s2,0x5
sw s4,0x28(sp)
sw s3,0x24(sp)
or s4,a1,zero
slt v0,v0,s2
sw s1,0x1c(sp)
sw ra,0x2c(sp)
or s3,a0,zero
sw s0,0x18(sp)
bne v0,zero,0x00035e8c
_or s1,s2,zero
lw s0,0x8(a0)
lw v0,0x10(s4)
or a1,s0,zero
lw t9,0x4(v0)
jalr t9
_or a0,s4,zero
beq s2,zero,0x00035ea8
_nop
sll v0,s2,0x2
addiu v0,v0,-0x4
addu v1,s0,v0
lw v1,0x0(v1)
bne v1,zero,0x00035e6c
_lw ra,0x2c(sp)
addiu v0,v0,0x4
b 0x00035e5c
_addu v0,s0,v0
lw v1,-0x4(v0)
bne v1,zero,0x00035e6c
_lw ra,0x2c(sp)
addiu s1,s1,-0x1
bne s1,zero,0x00035e50
_addiu v0,v0,-0x4
lw ra,0x2c(sp)
lw s4,0x28(sp)
lw s2,0x20(sp)
lw s0,0x18(sp)
sw s1,0x4(s3)
lw s3,0x24(sp)
lw s1,0x1c(sp)
jr ra
_addiu sp,sp,0x30
lw t9,-0x7a84(gp)
or a1,s2,zero
jalr t9
_sw a2,0x38(sp)
or s0,v0,zero
b 0x00035e10
_lw a2,0x38(sp)
b 0x00035e68
_or s1,zero,zero
(translation_unit "void __gmpz_urandomb(int *param_1,int param_2,int param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar3 = param_3 + 0x1fU >> 5;\n  if (*param_1 < (int)uVar3) {\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }\n  else {\n    iVar2 = param_1[2];\n  }\n  (**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);\n  if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }\n  param_1[1] = uVar3;\n  return;\n}\n\n" (function_definition "void __gmpz_urandomb(int *param_1,int param_2,int param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar3 = param_3 + 0x1fU >> 5;\n  if (*param_1 < (int)uVar3) {\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }\n  else {\n    iVar2 = param_1[2];\n  }\n  (**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);\n  if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }\n  param_1[1] = uVar3;\n  return;\n}" primitive_type (function_declarator "__gmpz_urandomb(int *param_1,int param_2,int param_3)" identifier (parameter_list "(int *param_1,int param_2,int param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar3 = param_3 + 0x1fU >> 5;\n  if (*param_1 < (int)uVar3) {\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }\n  else {\n    iVar2 = param_1[2];\n  }\n  (**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);\n  if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }\n  param_1[1] = uVar3;\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "uVar3 = param_3 + 0x1fU >> 5;" (assignment_expression "uVar3 = param_3 + 0x1fU >> 5" identifier = (binary_expression "param_3 + 0x1fU >> 5" (binary_expression "param_3 + 0x1fU" identifier + number_literal) >> number_literal)) ;) (if_statement "if (*param_1 < (int)uVar3) {\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }\n  else {\n    iVar2 = param_1[2];\n  }" if (parenthesized_expression "(*param_1 < (int)uVar3)" ( (binary_expression "*param_1 < (int)uVar3" (pointer_expression "*param_1" * identifier) < (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }" { (expression_statement "iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);" (assignment_expression "iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3)" identifier = (call_expression "(*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3)" (parenthesized_expression "(*(code *)PTR___gmpz_realloc_000975bc)" ( (pointer_expression "*(code *)PTR___gmpz_realloc_000975bc" * (cast_expression "(code *)PTR___gmpz_realloc_000975bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,uVar3)" ( identifier , identifier )))) ;) }) (else_clause "else {\n    iVar2 = param_1[2];\n  }" else (compound_statement "{\n    iVar2 = param_1[2];\n  }" { (expression_statement "iVar2 = param_1[2];" (assignment_expression "iVar2 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (expression_statement "(**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);" (call_expression "(**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3)" (parenthesized_expression "(**(code **)(*(int *)(param_2 + 0x10) + 4))" ( (pointer_expression "**(code **)(*(int *)(param_2 + 0x10) + 4)" * (pointer_expression "*(code **)(*(int *)(param_2 + 0x10) + 4)" * (cast_expression "(code **)(*(int *)(param_2 + 0x10) + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_2 + 0x10) + 4)" ( (binary_expression "*(int *)(param_2 + 0x10) + 4" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(param_2,iVar2,param_3)" ( identifier , identifier , identifier ))) ;) (if_statement "if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar3 = 0;\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) }) (else_clause "else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }" else (if_statement "if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }" if (parenthesized_expression "(*(int *)(iVar2 + uVar3 * 4 + -4) == 0)" ( (binary_expression "*(int *)(iVar2 + uVar3 * 4 + -4) == 0" (pointer_expression "*(int *)(iVar2 + uVar3 * 4 + -4)" * (cast_expression "(int *)(iVar2 + uVar3 * 4 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + uVar3 * 4 + -4)" ( (binary_expression "iVar2 + uVar3 * 4 + -4" (binary_expression "iVar2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal)) + number_literal) )))) == number_literal) )) (compound_statement "{\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }" { (expression_statement "iVar2 = iVar2 + uVar3 * 4;" (assignment_expression "iVar2 = iVar2 + uVar3 * 4" identifier = (binary_expression "iVar2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal))) ;) (do_statement "do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);" do (compound_statement "{\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    }" { (expression_statement "uVar3 = uVar3 - 1;" (assignment_expression "uVar3 = uVar3 - 1" identifier = (binary_expression "uVar3 - 1" identifier - number_literal)) ;) (if_statement "if (uVar3 == 0) break;" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "piVar1 = (int *)(iVar2 + -8);" (assignment_expression "piVar1 = (int *)(iVar2 + -8)" identifier = (cast_expression "(int *)(iVar2 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -8)" ( (binary_expression "iVar2 + -8" identifier + number_literal) )))) ;) (expression_statement "iVar2 = iVar2 + -4;" (assignment_expression "iVar2 = iVar2 + -4" identifier = (binary_expression "iVar2 + -4" identifier + number_literal)) ;) }) while (parenthesized_expression "(*piVar1 == 0)" ( (binary_expression "*piVar1 == 0" (pointer_expression "*piVar1" * identifier) == number_literal) )) ;) })))) (expression_statement "param_1[1] = uVar3;" (assignment_expression "param_1[1] = uVar3" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Enum "gmp_randalg_t": Some values do not have unique names */\n\nvoid __gmpz_urandomb(mpz_ptr rop,__gmp_randstate_struct *rstate,mp_bitcnt_t nbits)\n\n{\n  mp_limb_t *pmVar1;\n  mp_limb_t *pmVar2;\n  uint uVar3;\n  \n  uVar3 = nbits + 0x1f >> 5;\n  if (rop->_mp_alloc < (int)uVar3) {\n    pmVar2 = (mp_limb_t *)(*(code *)PTR___gmpz_realloc_000975bc)(rop,uVar3);\n  }\n  else {\n    pmVar2 = rop->_mp_d;\n  }\n  (**(code **)((int)(rstate->_mp_algdata)._mp_lc + 4))(rstate,pmVar2,nbits);\n  if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (pmVar2[uVar3 - 1] == 0) {\n    pmVar2 = pmVar2 + uVar3;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      pmVar1 = pmVar2 + -2;\n      pmVar2 = pmVar2 + -1;\n    } while (*pmVar1 == 0);\n  }\n  rop->_mp_size = uVar3;\n  return;\n}\n\n" comment (function_definition "void __gmpz_urandomb(mpz_ptr rop,__gmp_randstate_struct *rstate,mp_bitcnt_t nbits)\n\n{\n  mp_limb_t *pmVar1;\n  mp_limb_t *pmVar2;\n  uint uVar3;\n  \n  uVar3 = nbits + 0x1f >> 5;\n  if (rop->_mp_alloc < (int)uVar3) {\n    pmVar2 = (mp_limb_t *)(*(code *)PTR___gmpz_realloc_000975bc)(rop,uVar3);\n  }\n  else {\n    pmVar2 = rop->_mp_d;\n  }\n  (**(code **)((int)(rstate->_mp_algdata)._mp_lc + 4))(rstate,pmVar2,nbits);\n  if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (pmVar2[uVar3 - 1] == 0) {\n    pmVar2 = pmVar2 + uVar3;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      pmVar1 = pmVar2 + -2;\n      pmVar2 = pmVar2 + -1;\n    } while (*pmVar1 == 0);\n  }\n  rop->_mp_size = uVar3;\n  return;\n}" primitive_type (function_declarator "__gmpz_urandomb(mpz_ptr rop,__gmp_randstate_struct *rstate,mp_bitcnt_t nbits)" identifier (parameter_list "(mpz_ptr rop,__gmp_randstate_struct *rstate,mp_bitcnt_t nbits)" ( (parameter_declaration "mpz_ptr rop" type_identifier identifier) , (parameter_declaration "__gmp_randstate_struct *rstate" type_identifier (pointer_declarator "*rstate" * identifier)) , (parameter_declaration "mp_bitcnt_t nbits" type_identifier identifier) ))) (compound_statement "{\n  mp_limb_t *pmVar1;\n  mp_limb_t *pmVar2;\n  uint uVar3;\n  \n  uVar3 = nbits + 0x1f >> 5;\n  if (rop->_mp_alloc < (int)uVar3) {\n    pmVar2 = (mp_limb_t *)(*(code *)PTR___gmpz_realloc_000975bc)(rop,uVar3);\n  }\n  else {\n    pmVar2 = rop->_mp_d;\n  }\n  (**(code **)((int)(rstate->_mp_algdata)._mp_lc + 4))(rstate,pmVar2,nbits);\n  if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (pmVar2[uVar3 - 1] == 0) {\n    pmVar2 = pmVar2 + uVar3;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      pmVar1 = pmVar2 + -2;\n      pmVar2 = pmVar2 + -1;\n    } while (*pmVar1 == 0);\n  }\n  rop->_mp_size = uVar3;\n  return;\n}" { (declaration "mp_limb_t *pmVar1;" type_identifier (pointer_declarator "*pmVar1" * identifier) ;) (declaration "mp_limb_t *pmVar2;" type_identifier (pointer_declarator "*pmVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "uVar3 = nbits + 0x1f >> 5;" (assignment_expression "uVar3 = nbits + 0x1f >> 5" identifier = (binary_expression "nbits + 0x1f >> 5" (binary_expression "nbits + 0x1f" identifier + number_literal) >> number_literal)) ;) (if_statement "if (rop->_mp_alloc < (int)uVar3) {\n    pmVar2 = (mp_limb_t *)(*(code *)PTR___gmpz_realloc_000975bc)(rop,uVar3);\n  }\n  else {\n    pmVar2 = rop->_mp_d;\n  }" if (parenthesized_expression "(rop->_mp_alloc < (int)uVar3)" ( (binary_expression "rop->_mp_alloc < (int)uVar3" (field_expression "rop->_mp_alloc" identifier -> field_identifier) < (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    pmVar2 = (mp_limb_t *)(*(code *)PTR___gmpz_realloc_000975bc)(rop,uVar3);\n  }" { (expression_statement "pmVar2 = (mp_limb_t *)(*(code *)PTR___gmpz_realloc_000975bc)(rop,uVar3);" (assignment_expression "pmVar2 = (mp_limb_t *)(*(code *)PTR___gmpz_realloc_000975bc)(rop,uVar3)" identifier = (cast_expression "(mp_limb_t *)(*(code *)PTR___gmpz_realloc_000975bc)(rop,uVar3)" ( (type_descriptor "mp_limb_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR___gmpz_realloc_000975bc)(rop,uVar3)" (parenthesized_expression "(*(code *)PTR___gmpz_realloc_000975bc)" ( (pointer_expression "*(code *)PTR___gmpz_realloc_000975bc" * (cast_expression "(code *)PTR___gmpz_realloc_000975bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(rop,uVar3)" ( identifier , identifier ))))) ;) }) (else_clause "else {\n    pmVar2 = rop->_mp_d;\n  }" else (compound_statement "{\n    pmVar2 = rop->_mp_d;\n  }" { (expression_statement "pmVar2 = rop->_mp_d;" (assignment_expression "pmVar2 = rop->_mp_d" identifier = (field_expression "rop->_mp_d" identifier -> field_identifier)) ;) }))) (expression_statement "(**(code **)((int)(rstate->_mp_algdata)._mp_lc + 4))(rstate,pmVar2,nbits);" (call_expression "(**(code **)((int)(rstate->_mp_algdata)._mp_lc + 4))(rstate,pmVar2,nbits)" (parenthesized_expression "(**(code **)((int)(rstate->_mp_algdata)._mp_lc + 4))" ( (pointer_expression "**(code **)((int)(rstate->_mp_algdata)._mp_lc + 4)" * (pointer_expression "*(code **)((int)(rstate->_mp_algdata)._mp_lc + 4)" * (cast_expression "(code **)((int)(rstate->_mp_algdata)._mp_lc + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)(rstate->_mp_algdata)._mp_lc + 4)" ( (binary_expression "(int)(rstate->_mp_algdata)._mp_lc + 4" (cast_expression "(int)(rstate->_mp_algdata)._mp_lc" ( (type_descriptor "int" primitive_type) ) (field_expression "(rstate->_mp_algdata)._mp_lc" (parenthesized_expression "(rstate->_mp_algdata)" ( (field_expression "rstate->_mp_algdata" identifier -> field_identifier) )) . field_identifier)) + number_literal) ))))) )) (argument_list "(rstate,pmVar2,nbits)" ( identifier , identifier , identifier ))) ;) (if_statement "if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (pmVar2[uVar3 - 1] == 0) {\n    pmVar2 = pmVar2 + uVar3;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      pmVar1 = pmVar2 + -2;\n      pmVar2 = pmVar2 + -1;\n    } while (*pmVar1 == 0);\n  }" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar3 = 0;\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) }) (else_clause "else if (pmVar2[uVar3 - 1] == 0) {\n    pmVar2 = pmVar2 + uVar3;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      pmVar1 = pmVar2 + -2;\n      pmVar2 = pmVar2 + -1;\n    } while (*pmVar1 == 0);\n  }" else (if_statement "if (pmVar2[uVar3 - 1] == 0) {\n    pmVar2 = pmVar2 + uVar3;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      pmVar1 = pmVar2 + -2;\n      pmVar2 = pmVar2 + -1;\n    } while (*pmVar1 == 0);\n  }" if (parenthesized_expression "(pmVar2[uVar3 - 1] == 0)" ( (binary_expression "pmVar2[uVar3 - 1] == 0" (subscript_expression "pmVar2[uVar3 - 1]" identifier [ (binary_expression "uVar3 - 1" identifier - number_literal) ]) == number_literal) )) (compound_statement "{\n    pmVar2 = pmVar2 + uVar3;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      pmVar1 = pmVar2 + -2;\n      pmVar2 = pmVar2 + -1;\n    } while (*pmVar1 == 0);\n  }" { (expression_statement "pmVar2 = pmVar2 + uVar3;" (assignment_expression "pmVar2 = pmVar2 + uVar3" identifier = (binary_expression "pmVar2 + uVar3" identifier + identifier)) ;) (do_statement "do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      pmVar1 = pmVar2 + -2;\n      pmVar2 = pmVar2 + -1;\n    } while (*pmVar1 == 0);" do (compound_statement "{\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      pmVar1 = pmVar2 + -2;\n      pmVar2 = pmVar2 + -1;\n    }" { (expression_statement "uVar3 = uVar3 - 1;" (assignment_expression "uVar3 = uVar3 - 1" identifier = (binary_expression "uVar3 - 1" identifier - number_literal)) ;) (if_statement "if (uVar3 == 0) break;" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "pmVar1 = pmVar2 + -2;" (assignment_expression "pmVar1 = pmVar2 + -2" identifier = (binary_expression "pmVar2 + -2" identifier + number_literal)) ;) (expression_statement "pmVar2 = pmVar2 + -1;" (assignment_expression "pmVar2 = pmVar2 + -1" identifier = (binary_expression "pmVar2 + -1" identifier + number_literal)) ;) }) while (parenthesized_expression "(*pmVar1 == 0)" ( (binary_expression "*pmVar1 == 0" (pointer_expression "*pmVar1" * identifier) == number_literal) )) ;) })))) (expression_statement "rop->_mp_size = uVar3;" (assignment_expression "rop->_mp_size = uVar3" (field_expression "rop->_mp_size" identifier -> field_identifier) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void __gmpz_urandomb(int *param_1,int param_2,int param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar3 = param_3 + 0x1fU >> 5;\n  if (*param_1 < (int)uVar3) {\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }\n  else {\n    iVar2 = param_1[2];\n  }\n  (**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);\n  if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }\n  param_1[1] = uVar3;\n  return;\n}\n\n" (function_definition "void __gmpz_urandomb(int *param_1,int param_2,int param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar3 = param_3 + 0x1fU >> 5;\n  if (*param_1 < (int)uVar3) {\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }\n  else {\n    iVar2 = param_1[2];\n  }\n  (**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);\n  if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }\n  param_1[1] = uVar3;\n  return;\n}" primitive_type (function_declarator "__gmpz_urandomb(int *param_1,int param_2,int param_3)" identifier (parameter_list "(int *param_1,int param_2,int param_3)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar3 = param_3 + 0x1fU >> 5;\n  if (*param_1 < (int)uVar3) {\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }\n  else {\n    iVar2 = param_1[2];\n  }\n  (**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);\n  if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }\n  param_1[1] = uVar3;\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (expression_statement "uVar3 = param_3 + 0x1fU >> 5;" (assignment_expression "uVar3 = param_3 + 0x1fU >> 5" identifier = (binary_expression "param_3 + 0x1fU >> 5" (binary_expression "param_3 + 0x1fU" identifier + number_literal) >> number_literal)) ;) (if_statement "if (*param_1 < (int)uVar3) {\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }\n  else {\n    iVar2 = param_1[2];\n  }" if (parenthesized_expression "(*param_1 < (int)uVar3)" ( (binary_expression "*param_1 < (int)uVar3" (pointer_expression "*param_1" * identifier) < (cast_expression "(int)uVar3" ( (type_descriptor "int" primitive_type) ) identifier)) )) (compound_statement "{\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }" { (expression_statement "iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);" (assignment_expression "iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3)" identifier = (call_expression "(*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3)" (parenthesized_expression "(*(code *)PTR___gmpz_realloc_000975bc)" ( (pointer_expression "*(code *)PTR___gmpz_realloc_000975bc" * (cast_expression "(code *)PTR___gmpz_realloc_000975bc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,uVar3)" ( identifier , identifier )))) ;) }) (else_clause "else {\n    iVar2 = param_1[2];\n  }" else (compound_statement "{\n    iVar2 = param_1[2];\n  }" { (expression_statement "iVar2 = param_1[2];" (assignment_expression "iVar2 = param_1[2]" identifier = (subscript_expression "param_1[2]" identifier [ number_literal ])) ;) }))) (expression_statement "(**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);" (call_expression "(**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3)" (parenthesized_expression "(**(code **)(*(int *)(param_2 + 0x10) + 4))" ( (pointer_expression "**(code **)(*(int *)(param_2 + 0x10) + 4)" * (pointer_expression "*(code **)(*(int *)(param_2 + 0x10) + 4)" * (cast_expression "(code **)(*(int *)(param_2 + 0x10) + 4)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*(int *)(param_2 + 0x10) + 4)" ( (binary_expression "*(int *)(param_2 + 0x10) + 4" (pointer_expression "*(int *)(param_2 + 0x10)" * (cast_expression "(int *)(param_2 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x10)" ( (binary_expression "param_2 + 0x10" identifier + number_literal) )))) + number_literal) ))))) )) (argument_list "(param_2,iVar2,param_3)" ( identifier , identifier , identifier ))) ;) (if_statement "if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar3 = 0;\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) }) (else_clause "else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }" else (if_statement "if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }" if (parenthesized_expression "(*(int *)(iVar2 + uVar3 * 4 + -4) == 0)" ( (binary_expression "*(int *)(iVar2 + uVar3 * 4 + -4) == 0" (pointer_expression "*(int *)(iVar2 + uVar3 * 4 + -4)" * (cast_expression "(int *)(iVar2 + uVar3 * 4 + -4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + uVar3 * 4 + -4)" ( (binary_expression "iVar2 + uVar3 * 4 + -4" (binary_expression "iVar2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal)) + number_literal) )))) == number_literal) )) (compound_statement "{\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }" { (expression_statement "iVar2 = iVar2 + uVar3 * 4;" (assignment_expression "iVar2 = iVar2 + uVar3 * 4" identifier = (binary_expression "iVar2 + uVar3 * 4" identifier + (binary_expression "uVar3 * 4" identifier * number_literal))) ;) (do_statement "do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);" do (compound_statement "{\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    }" { (expression_statement "uVar3 = uVar3 - 1;" (assignment_expression "uVar3 = uVar3 - 1" identifier = (binary_expression "uVar3 - 1" identifier - number_literal)) ;) (if_statement "if (uVar3 == 0) break;" if (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "piVar1 = (int *)(iVar2 + -8);" (assignment_expression "piVar1 = (int *)(iVar2 + -8)" identifier = (cast_expression "(int *)(iVar2 + -8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + -8)" ( (binary_expression "iVar2 + -8" identifier + number_literal) )))) ;) (expression_statement "iVar2 = iVar2 + -4;" (assignment_expression "iVar2 = iVar2 + -4" identifier = (binary_expression "iVar2 + -4" identifier + number_literal)) ;) }) while (parenthesized_expression "(*piVar1 == 0)" ( (binary_expression "*piVar1 == 0" (pointer_expression "*piVar1" * identifier) == number_literal) )) ;) })))) (expression_statement "param_1[1] = uVar3;" (assignment_expression "param_1[1] = uVar3" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) >> LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) 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 , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression IDENT * LIT)) + LIT) )))) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + (binary_expression IDENT * LIT))) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) ;) })))) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return ;) })))
(function_definition "void __gmpz_urandomb(int *param_1,int param_2,int param_3)\n\n{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar3 = param_3 + 0x1fU >> 5;\n  if (*param_1 < (int)uVar3) {\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }\n  else {\n    iVar2 = param_1[2];\n  }\n  (**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);\n  if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }\n  param_1[1] = uVar3;\n  return;\n}" (primitive_type "void") (function_declarator "__gmpz_urandomb(int *param_1,int param_2,int param_3)" (identifier "__gmpz_urandomb") (parameter_list "(int *param_1,int param_2,int param_3)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  uint uVar3;\n  \n  uVar3 = param_3 + 0x1fU >> 5;\n  if (*param_1 < (int)uVar3) {\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }\n  else {\n    iVar2 = param_1[2];\n  }\n  (**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);\n  if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }\n  param_1[1] = uVar3;\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (expression_statement "uVar3 = param_3 + 0x1fU >> 5;" (assignment_expression "uVar3 = param_3 + 0x1fU >> 5" (identifier "uVar3") (= "=") (binary_expression "param_3 + 0x1fU >> 5" (binary_expression "param_3 + 0x1fU" (identifier "param_3") (+ "+") (number_literal "0x1fU")) (>> ">>") (number_literal "5"))) (; ";")) (if_statement "if (*param_1 < (int)uVar3) {\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }\n  else {\n    iVar2 = param_1[2];\n  }" (if "if") (parenthesized_expression "(*param_1 < (int)uVar3)" (( "(") (binary_expression "*param_1 < (int)uVar3" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (< "<") (cast_expression "(int)uVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar3"))) () ")")) (compound_statement "{\n    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);\n  }" ({ "{") (expression_statement "iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);" (assignment_expression "iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3)" (parenthesized_expression "(*(code *)PTR___gmpz_realloc_000975bc)" (( "(") (pointer_expression "*(code *)PTR___gmpz_realloc_000975bc" (* "*") (cast_expression "(code *)PTR___gmpz_realloc_000975bc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___gmpz_realloc_000975bc"))) () ")")) (argument_list "(param_1,uVar3)" (( "(") (identifier "param_1") (, ",") (identifier "uVar3") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    iVar2 = param_1[2];\n  }" (else "else") (compound_statement "{\n    iVar2 = param_1[2];\n  }" ({ "{") (expression_statement "iVar2 = param_1[2];" (assignment_expression "iVar2 = param_1[2]" (identifier "iVar2") (= "=") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]"))) (; ";")) (} "}")))) (expression_statement "(**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);" (call_expression "(**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3)" (parenthesized_expression "(**(code **)(*(int *)(param_2 + 0x10) + 4))" (( "(") (pointer_expression "**(code **)(*(int *)(param_2 + 0x10) + 4)" (* "*") (pointer_expression "*(code **)(*(int *)(param_2 + 0x10) + 4)" (* "*") (cast_expression "(code **)(*(int *)(param_2 + 0x10) + 4)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*(int *)(param_2 + 0x10) + 4)" (( "(") (binary_expression "*(int *)(param_2 + 0x10) + 4" (pointer_expression "*(int *)(param_2 + 0x10)" (* "*") (cast_expression "(int *)(param_2 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x10)" (( "(") (binary_expression "param_2 + 0x10" (identifier "param_2") (+ "+") (number_literal "0x10")) () ")")))) (+ "+") (number_literal "4")) () ")"))))) () ")")) (argument_list "(param_2,iVar2,param_3)" (( "(") (identifier "param_2") (, ",") (identifier "iVar2") (, ",") (identifier "param_3") () ")"))) (; ";")) (if_statement "if (uVar3 == 0) {\n    uVar3 = 0;\n  }\n  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }" (if "if") (parenthesized_expression "(uVar3 == 0)" (( "(") (binary_expression "uVar3 == 0" (identifier "uVar3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar3 = 0;\n  }" ({ "{") (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }" (else "else") (if_statement "if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }" (if "if") (parenthesized_expression "(*(int *)(iVar2 + uVar3 * 4 + -4) == 0)" (( "(") (binary_expression "*(int *)(iVar2 + uVar3 * 4 + -4) == 0" (pointer_expression "*(int *)(iVar2 + uVar3 * 4 + -4)" (* "*") (cast_expression "(int *)(iVar2 + uVar3 * 4 + -4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + uVar3 * 4 + -4)" (( "(") (binary_expression "iVar2 + uVar3 * 4 + -4" (binary_expression "iVar2 + uVar3 * 4" (identifier "iVar2") (+ "+") (binary_expression "uVar3 * 4" (identifier "uVar3") (* "*") (number_literal "4"))) (+ "+") (number_literal "-4")) () ")")))) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar2 = iVar2 + uVar3 * 4;\n    do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);\n  }" ({ "{") (expression_statement "iVar2 = iVar2 + uVar3 * 4;" (assignment_expression "iVar2 = iVar2 + uVar3 * 4" (identifier "iVar2") (= "=") (binary_expression "iVar2 + uVar3 * 4" (identifier "iVar2") (+ "+") (binary_expression "uVar3 * 4" (identifier "uVar3") (* "*") (number_literal "4")))) (; ";")) (do_statement "do {\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    } while (*piVar1 == 0);" (do "do") (compound_statement "{\n      uVar3 = uVar3 - 1;\n      if (uVar3 == 0) break;\n      piVar1 = (int *)(iVar2 + -8);\n      iVar2 = iVar2 + -4;\n    }" ({ "{") (expression_statement "uVar3 = uVar3 - 1;" (assignment_expression "uVar3 = uVar3 - 1" (identifier "uVar3") (= "=") (binary_expression "uVar3 - 1" (identifier "uVar3") (- "-") (number_literal "1"))) (; ";")) (if_statement "if (uVar3 == 0) break;" (if "if") (parenthesized_expression "(uVar3 == 0)" (( "(") (binary_expression "uVar3 == 0" (identifier "uVar3") (== "==") (number_literal "0")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "piVar1 = (int *)(iVar2 + -8);" (assignment_expression "piVar1 = (int *)(iVar2 + -8)" (identifier "piVar1") (= "=") (cast_expression "(int *)(iVar2 + -8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + -8)" (( "(") (binary_expression "iVar2 + -8" (identifier "iVar2") (+ "+") (number_literal "-8")) () ")")))) (; ";")) (expression_statement "iVar2 = iVar2 + -4;" (assignment_expression "iVar2 = iVar2 + -4" (identifier "iVar2") (= "=") (binary_expression "iVar2 + -4" (identifier "iVar2") (+ "+") (number_literal "-4"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(*piVar1 == 0)" (( "(") (binary_expression "*piVar1 == 0" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (== "==") (number_literal "0")) () ")")) (; ";")) (} "}"))))) (expression_statement "param_1[1] = uVar3;" (assignment_expression "param_1[1] = uVar3" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

/* WARNING: Enum "gmp_randalg_t": Some values do not have unique names */

void function_1(type_1 rop,type_2 *rstate,type_3 var_1)

{
  type_4 *pmVar1;
  type_4 *var_3;
  type_5 var_2;
  
  var_2 = var_1 + 0x1f >> 5;
  if (rop->_mp_alloc < (int)var_2) {
    var_3 = (type_4 *)(*(type_6 *)PTR___gmpz_realloc_000975bc)(rop,var_2);
  }
  else {
    var_3 = rop->_mp_d;
  }
  (**(type_6 **)((int)(rstate->_mp_algdata)._mp_lc + 4))(rstate,var_3,var_1);
  if (var_2 == 0) {
    var_2 = 0;
  }
  else if (var_3[var_2 - 1] == 0) {
    var_3 = var_3 + var_2;
    do {
      var_2 = var_2 - 1;
      if (var_2 == 0) break;
      pmVar1 = var_3 + -2;
      var_3 = var_3 + -1;
    } while (*pmVar1 == 0);
  }
  rop->_mp_size = var_2;
  return;
}


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

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

{
  int *piVar1;
  int iVar2;
  uint uVar3;
  
  uVar3 = param_3 + 0x1fU >> 5;
  if (*param_1 < (int)uVar3) {
    iVar2 = (*(code *)PTR___gmpz_realloc_000975bc)(param_1,uVar3);
  }
  else {
    iVar2 = param_1[2];
  }
  (**(code **)(*(int *)(param_2 + 0x10) + 4))(param_2,iVar2,param_3);
  if (uVar3 == 0) {
    uVar3 = 0;
  }
  else if (*(int *)(iVar2 + uVar3 * 4 + -4) == 0) {
    iVar2 = iVar2 + uVar3 * 4;
    do {
      uVar3 = uVar3 - 1;
      if (uVar3 == 0) break;
      piVar1 = (int *)(iVar2 + -8);
      iVar2 = iVar2 + -4;
    } while (*piVar1 == 0);
  }
  param_1[1] = uVar3;
  return;
}

