
int __gmpq_set_str(mpq_ptr q,char *str,int base)

{
  int iVar1;
  char *pcVar2;
  char *str_00;
  size_t __n;
  
  pcVar2 = strchr(str,0x2f);
  if (pcVar2 == (char *)0x0) {
    (q->_mp_den)._mp_size = 1;
    *(q->_mp_den)._mp_d = 1;
    iVar1 = __gmpz_set_str(&q->_mp_num,str,base);
  }
  else {
    __n = (long)pcVar2 - (long)str;
    str_00 = (char *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);
    memcpy(str_00,str,__n);
    str_00[__n] = '\0';
    iVar1 = __gmpz_set_str(&q->_mp_num,str_00,base);
    (**(code **)PTR___gmp_free_func_00172fa8)(str_00,__n + 1);
    if (iVar1 == 0) {
      iVar1 = __gmpz_set_str(&q->_mp_den,pcVar2 + 1,base);
    }
  }
  return iVar1;
}



int __gmpq_set_str(long param_1,char *param_2,undefined4 param_3)

{
  int iVar1;
  char *pcVar2;
  void *__dest;
  size_t __n;
  
  pcVar2 = strchr(param_2,0x2f);
  if (pcVar2 == (char *)0x0) {
    *(undefined4 *)(param_1 + 0x14) = 1;
    **(undefined8 **)(param_1 + 0x18) = 1;
    iVar1 = __gmpz_set_str(param_1,param_2,param_3);
  }
  else {
    __n = (long)pcVar2 - (long)param_2;
    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);
    memcpy(__dest,param_2,__n);
    *(undefined1 *)((long)__dest + __n) = 0;
    iVar1 = __gmpz_set_str(param_1,__dest,param_3);
    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);
    if (iVar1 == 0) {
      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);
    }
  }
  return iVar1;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV R14,RDI
MOV R12,RSI
MOV dword ptr [RSP + 0xc],EDX
MOV ESI,0x2f
MOV RDI,R12
CALL 0x0010b580
TEST RAX,RAX
JZ 0x00123f9c
MOV RBP,RAX
MOV R13,RAX
SUB R13,R12
LEA R15,[R13 + 0x1]
MOV RDI,R15
MOV RAX,qword ptr [0x00172f08]
CALL qword ptr [RAX]
MOV RBX,RAX
MOV RDX,R13
MOV RSI,R12
MOV RDI,RAX
CALL 0x0010ba40
MOV byte ptr [RBX + R13*0x1],0x0
MOV R13D,dword ptr [RSP + 0xc]
MOV EDX,R13D
MOV RSI,RBX
MOV RDI,R14
CALL 0x0010b240
MOV R12D,EAX
MOV RSI,R15
MOV RDI,RBX
MOV RAX,qword ptr [0x00172fa8]
CALL qword ptr [RAX]
TEST R12D,R12D
JZ 0x00123fc3
MOV EAX,R12D
ADD RSP,0x18
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV dword ptr [R14 + 0x14],0x1
MOV RAX,qword ptr [R14 + 0x18]
MOV qword ptr [RAX],0x1
MOV EDX,dword ptr [RSP + 0xc]
MOV RSI,R12
MOV RDI,R14
CALL 0x0010b240
MOV R12D,EAX
JMP 0x00123f8a
LEA RSI,[RBP + 0x1]
LEA RDI,[R14 + 0x10]
MOV EDX,R13D
CALL 0x0010b240
MOV R12D,EAX
JMP 0x00123f8a
(translation_unit "int __gmpq_set_str(long param_1,char *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  char *pcVar2;\n  void *__dest;\n  size_t __n;\n  \n  pcVar2 = strchr(param_2,0x2f);\n  if (pcVar2 == (char *)0x0) {\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }\n  else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int __gmpq_set_str(long param_1,char *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  char *pcVar2;\n  void *__dest;\n  size_t __n;\n  \n  pcVar2 = strchr(param_2,0x2f);\n  if (pcVar2 == (char *)0x0) {\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }\n  else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "__gmpq_set_str(long param_1,char *param_2,undefined4 param_3)" identifier (parameter_list "(long param_1,char *param_2,undefined4 param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  void *__dest;\n  size_t __n;\n  \n  pcVar2 = strchr(param_2,0x2f);\n  if (pcVar2 == (char *)0x0) {\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }\n  else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (expression_statement "pcVar2 = strchr(param_2,0x2f);" (assignment_expression "pcVar2 = strchr(param_2,0x2f)" identifier = (call_expression "strchr(param_2,0x2f)" identifier (argument_list "(param_2,0x2f)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar2 == (char *)0x0) {\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }\n  else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }" if (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0x14) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "**(undefined8 **)(param_1 + 0x18) = 1;" (assignment_expression "**(undefined8 **)(param_1 + 0x18) = 1" (pointer_expression "**(undefined8 **)(param_1 + 0x18)" * (pointer_expression "*(undefined8 **)(param_1 + 0x18)" * (cast_expression "(undefined8 **)(param_1 + 0x18)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) = number_literal) ;) (expression_statement "iVar1 = __gmpz_set_str(param_1,param_2,param_3);" (assignment_expression "iVar1 = __gmpz_set_str(param_1,param_2,param_3)" identifier = (call_expression "__gmpz_set_str(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) }) (else_clause "else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }" else (compound_statement "{\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }" { (expression_statement "__n = (long)pcVar2 - (long)param_2;" (assignment_expression "__n = (long)pcVar2 - (long)param_2" identifier = (binary_expression "(long)pcVar2 - (long)param_2" (cast_expression "(long)pcVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "__dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);" (assignment_expression "__dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1)" identifier = (cast_expression "(void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1)" (parenthesized_expression "(**(code **)PTR___gmp_allocate_func_00172f08)" ( (pointer_expression "**(code **)PTR___gmp_allocate_func_00172f08" * (pointer_expression "*(code **)PTR___gmp_allocate_func_00172f08" * (cast_expression "(code **)PTR___gmp_allocate_func_00172f08" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (argument_list "(__n + 1)" ( (binary_expression "__n + 1" identifier + number_literal) ))))) ;) (expression_statement "memcpy(__dest,param_2,__n);" (call_expression "memcpy(__dest,param_2,__n)" identifier (argument_list "(__dest,param_2,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)((long)__dest + __n) = 0;" (assignment_expression "*(undefined1 *)((long)__dest + __n) = 0" (pointer_expression "*(undefined1 *)((long)__dest + __n)" * (cast_expression "(undefined1 *)((long)__dest + __n)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)__dest + __n)" ( (binary_expression "(long)__dest + __n" (cast_expression "(long)__dest" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "iVar1 = __gmpz_set_str(param_1,__dest,param_3);" (assignment_expression "iVar1 = __gmpz_set_str(param_1,__dest,param_3)" identifier = (call_expression "__gmpz_set_str(param_1,__dest,param_3)" identifier (argument_list "(param_1,__dest,param_3)" ( identifier , identifier , identifier )))) ;) (expression_statement "(**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);" (call_expression "(**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1)" (parenthesized_expression "(**(code **)PTR___gmp_free_func_00172fa8)" ( (pointer_expression "**(code **)PTR___gmp_free_func_00172fa8" * (pointer_expression "*(code **)PTR___gmp_free_func_00172fa8" * (cast_expression "(code **)PTR___gmp_free_func_00172fa8" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (argument_list "(__dest,__n + 1)" ( identifier , (binary_expression "__n + 1" identifier + number_literal) ))) ;) (if_statement "if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }" { (expression_statement "iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);" (assignment_expression "iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3)" identifier = (call_expression "__gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3)" identifier (argument_list "(param_1 + 0x10,pcVar2 + 1,param_3)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) , (binary_expression "pcVar2 + 1" identifier + number_literal) , identifier )))) ;) })) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int __gmpq_set_str(mpq_ptr q,char *str,int base)\n\n{\n  int iVar1;\n  char *pcVar2;\n  char *str_00;\n  size_t __n;\n  \n  pcVar2 = strchr(str,0x2f);\n  if (pcVar2 == (char *)0x0) {\n    (q->_mp_den)._mp_size = 1;\n    *(q->_mp_den)._mp_d = 1;\n    iVar1 = __gmpz_set_str(&q->_mp_num,str,base);\n  }\n  else {\n    __n = (long)pcVar2 - (long)str;\n    str_00 = (char *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(str_00,str,__n);\n    str_00[__n] = '\0';\n    iVar1 = __gmpz_set_str(&q->_mp_num,str_00,base);\n    (**(code **)PTR___gmp_free_func_00172fa8)(str_00,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(&q->_mp_den,pcVar2 + 1,base);\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int __gmpq_set_str(mpq_ptr q,char *str,int base)\n\n{\n  int iVar1;\n  char *pcVar2;\n  char *str_00;\n  size_t __n;\n  \n  pcVar2 = strchr(str,0x2f);\n  if (pcVar2 == (char *)0x0) {\n    (q->_mp_den)._mp_size = 1;\n    *(q->_mp_den)._mp_d = 1;\n    iVar1 = __gmpz_set_str(&q->_mp_num,str,base);\n  }\n  else {\n    __n = (long)pcVar2 - (long)str;\n    str_00 = (char *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(str_00,str,__n);\n    str_00[__n] = '\0';\n    iVar1 = __gmpz_set_str(&q->_mp_num,str_00,base);\n    (**(code **)PTR___gmp_free_func_00172fa8)(str_00,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(&q->_mp_den,pcVar2 + 1,base);\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "__gmpq_set_str(mpq_ptr q,char *str,int base)" identifier (parameter_list "(mpq_ptr q,char *str,int base)" ( (parameter_declaration "mpq_ptr q" type_identifier identifier) , (parameter_declaration "char *str" primitive_type (pointer_declarator "*str" * identifier)) , (parameter_declaration "int base" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  char *str_00;\n  size_t __n;\n  \n  pcVar2 = strchr(str,0x2f);\n  if (pcVar2 == (char *)0x0) {\n    (q->_mp_den)._mp_size = 1;\n    *(q->_mp_den)._mp_d = 1;\n    iVar1 = __gmpz_set_str(&q->_mp_num,str,base);\n  }\n  else {\n    __n = (long)pcVar2 - (long)str;\n    str_00 = (char *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(str_00,str,__n);\n    str_00[__n] = '\0';\n    iVar1 = __gmpz_set_str(&q->_mp_num,str_00,base);\n    (**(code **)PTR___gmp_free_func_00172fa8)(str_00,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(&q->_mp_den,pcVar2 + 1,base);\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "char *str_00;" primitive_type (pointer_declarator "*str_00" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (expression_statement "pcVar2 = strchr(str,0x2f);" (assignment_expression "pcVar2 = strchr(str,0x2f)" identifier = (call_expression "strchr(str,0x2f)" identifier (argument_list "(str,0x2f)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar2 == (char *)0x0) {\n    (q->_mp_den)._mp_size = 1;\n    *(q->_mp_den)._mp_d = 1;\n    iVar1 = __gmpz_set_str(&q->_mp_num,str,base);\n  }\n  else {\n    __n = (long)pcVar2 - (long)str;\n    str_00 = (char *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(str_00,str,__n);\n    str_00[__n] = '\0';\n    iVar1 = __gmpz_set_str(&q->_mp_num,str_00,base);\n    (**(code **)PTR___gmp_free_func_00172fa8)(str_00,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(&q->_mp_den,pcVar2 + 1,base);\n    }\n  }" if (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    (q->_mp_den)._mp_size = 1;\n    *(q->_mp_den)._mp_d = 1;\n    iVar1 = __gmpz_set_str(&q->_mp_num,str,base);\n  }" { (expression_statement "(q->_mp_den)._mp_size = 1;" (assignment_expression "(q->_mp_den)._mp_size = 1" (field_expression "(q->_mp_den)._mp_size" (parenthesized_expression "(q->_mp_den)" ( (field_expression "q->_mp_den" identifier -> field_identifier) )) . field_identifier) = number_literal) ;) (expression_statement "*(q->_mp_den)._mp_d = 1;" (assignment_expression "*(q->_mp_den)._mp_d = 1" (pointer_expression "*(q->_mp_den)._mp_d" * (field_expression "(q->_mp_den)._mp_d" (parenthesized_expression "(q->_mp_den)" ( (field_expression "q->_mp_den" identifier -> field_identifier) )) . field_identifier)) = number_literal) ;) (expression_statement "iVar1 = __gmpz_set_str(&q->_mp_num,str,base);" (assignment_expression "iVar1 = __gmpz_set_str(&q->_mp_num,str,base)" identifier = (call_expression "__gmpz_set_str(&q->_mp_num,str,base)" identifier (argument_list "(&q->_mp_num,str,base)" ( (pointer_expression "&q->_mp_num" & (field_expression "q->_mp_num" identifier -> field_identifier)) , identifier , identifier )))) ;) }) (else_clause "else {\n    __n = (long)pcVar2 - (long)str;\n    str_00 = (char *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(str_00,str,__n);\n    str_00[__n] = '\0';\n    iVar1 = __gmpz_set_str(&q->_mp_num,str_00,base);\n    (**(code **)PTR___gmp_free_func_00172fa8)(str_00,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(&q->_mp_den,pcVar2 + 1,base);\n    }\n  }" else (compound_statement "{\n    __n = (long)pcVar2 - (long)str;\n    str_00 = (char *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(str_00,str,__n);\n    str_00[__n] = '\0';\n    iVar1 = __gmpz_set_str(&q->_mp_num,str_00,base);\n    (**(code **)PTR___gmp_free_func_00172fa8)(str_00,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(&q->_mp_den,pcVar2 + 1,base);\n    }\n  }" { (expression_statement "__n = (long)pcVar2 - (long)str;" (assignment_expression "__n = (long)pcVar2 - (long)str" identifier = (binary_expression "(long)pcVar2 - (long)str" (cast_expression "(long)pcVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)str" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "str_00 = (char *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);" (assignment_expression "str_00 = (char *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1)" identifier = (cast_expression "(char *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1)" (parenthesized_expression "(**(code **)PTR___gmp_allocate_func_00172f08)" ( (pointer_expression "**(code **)PTR___gmp_allocate_func_00172f08" * (pointer_expression "*(code **)PTR___gmp_allocate_func_00172f08" * (cast_expression "(code **)PTR___gmp_allocate_func_00172f08" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (argument_list "(__n + 1)" ( (binary_expression "__n + 1" identifier + number_literal) ))))) ;) (expression_statement "memcpy(str_00,str,__n);" (call_expression "memcpy(str_00,str,__n)" identifier (argument_list "(str_00,str,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "str_00[__n] = '\0';" (assignment_expression "str_00[__n] = '\0'" (subscript_expression "str_00[__n]" identifier [ identifier ]) = (char_literal "'\0'" ' escape_sequence ')) ;) (expression_statement "iVar1 = __gmpz_set_str(&q->_mp_num,str_00,base);" (assignment_expression "iVar1 = __gmpz_set_str(&q->_mp_num,str_00,base)" identifier = (call_expression "__gmpz_set_str(&q->_mp_num,str_00,base)" identifier (argument_list "(&q->_mp_num,str_00,base)" ( (pointer_expression "&q->_mp_num" & (field_expression "q->_mp_num" identifier -> field_identifier)) , identifier , identifier )))) ;) (expression_statement "(**(code **)PTR___gmp_free_func_00172fa8)(str_00,__n + 1);" (call_expression "(**(code **)PTR___gmp_free_func_00172fa8)(str_00,__n + 1)" (parenthesized_expression "(**(code **)PTR___gmp_free_func_00172fa8)" ( (pointer_expression "**(code **)PTR___gmp_free_func_00172fa8" * (pointer_expression "*(code **)PTR___gmp_free_func_00172fa8" * (cast_expression "(code **)PTR___gmp_free_func_00172fa8" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (argument_list "(str_00,__n + 1)" ( identifier , (binary_expression "__n + 1" identifier + number_literal) ))) ;) (if_statement "if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(&q->_mp_den,pcVar2 + 1,base);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = __gmpz_set_str(&q->_mp_den,pcVar2 + 1,base);\n    }" { (expression_statement "iVar1 = __gmpz_set_str(&q->_mp_den,pcVar2 + 1,base);" (assignment_expression "iVar1 = __gmpz_set_str(&q->_mp_den,pcVar2 + 1,base)" identifier = (call_expression "__gmpz_set_str(&q->_mp_den,pcVar2 + 1,base)" identifier (argument_list "(&q->_mp_den,pcVar2 + 1,base)" ( (pointer_expression "&q->_mp_den" & (field_expression "q->_mp_den" identifier -> field_identifier)) , (binary_expression "pcVar2 + 1" identifier + number_literal) , identifier )))) ;) })) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit "int __gmpq_set_str(long param_1,char *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  char *pcVar2;\n  void *__dest;\n  size_t __n;\n  \n  pcVar2 = strchr(param_2,0x2f);\n  if (pcVar2 == (char *)0x0) {\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }\n  else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }\n  return iVar1;\n}\n\n" (function_definition "int __gmpq_set_str(long param_1,char *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  char *pcVar2;\n  void *__dest;\n  size_t __n;\n  \n  pcVar2 = strchr(param_2,0x2f);\n  if (pcVar2 == (char *)0x0) {\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }\n  else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }\n  return iVar1;\n}" primitive_type (function_declarator "__gmpq_set_str(long param_1,char *param_2,undefined4 param_3)" identifier (parameter_list "(long param_1,char *param_2,undefined4 param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  void *__dest;\n  size_t __n;\n  \n  pcVar2 = strchr(param_2,0x2f);\n  if (pcVar2 == (char *)0x0) {\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }\n  else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }\n  return iVar1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "size_t __n;" primitive_type identifier ;) (expression_statement "pcVar2 = strchr(param_2,0x2f);" (assignment_expression "pcVar2 = strchr(param_2,0x2f)" identifier = (call_expression "strchr(param_2,0x2f)" identifier (argument_list "(param_2,0x2f)" ( identifier , number_literal )))) ;) (if_statement "if (pcVar2 == (char *)0x0) {\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }\n  else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }" if (parenthesized_expression "(pcVar2 == (char *)0x0)" ( (binary_expression "pcVar2 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }" { (expression_statement "*(undefined4 *)(param_1 + 0x14) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "**(undefined8 **)(param_1 + 0x18) = 1;" (assignment_expression "**(undefined8 **)(param_1 + 0x18) = 1" (pointer_expression "**(undefined8 **)(param_1 + 0x18)" * (pointer_expression "*(undefined8 **)(param_1 + 0x18)" * (cast_expression "(undefined8 **)(param_1 + 0x18)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) = number_literal) ;) (expression_statement "iVar1 = __gmpz_set_str(param_1,param_2,param_3);" (assignment_expression "iVar1 = __gmpz_set_str(param_1,param_2,param_3)" identifier = (call_expression "__gmpz_set_str(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) }) (else_clause "else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }" else (compound_statement "{\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }" { (expression_statement "__n = (long)pcVar2 - (long)param_2;" (assignment_expression "__n = (long)pcVar2 - (long)param_2" identifier = (binary_expression "(long)pcVar2 - (long)param_2" (cast_expression "(long)pcVar2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) - (cast_expression "(long)param_2" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier))) ;) (expression_statement "__dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);" (assignment_expression "__dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1)" identifier = (cast_expression "(void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1)" (parenthesized_expression "(**(code **)PTR___gmp_allocate_func_00172f08)" ( (pointer_expression "**(code **)PTR___gmp_allocate_func_00172f08" * (pointer_expression "*(code **)PTR___gmp_allocate_func_00172f08" * (cast_expression "(code **)PTR___gmp_allocate_func_00172f08" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (argument_list "(__n + 1)" ( (binary_expression "__n + 1" identifier + number_literal) ))))) ;) (expression_statement "memcpy(__dest,param_2,__n);" (call_expression "memcpy(__dest,param_2,__n)" identifier (argument_list "(__dest,param_2,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(undefined1 *)((long)__dest + __n) = 0;" (assignment_expression "*(undefined1 *)((long)__dest + __n) = 0" (pointer_expression "*(undefined1 *)((long)__dest + __n)" * (cast_expression "(undefined1 *)((long)__dest + __n)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)__dest + __n)" ( (binary_expression "(long)__dest + __n" (cast_expression "(long)__dest" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + identifier) )))) = number_literal) ;) (expression_statement "iVar1 = __gmpz_set_str(param_1,__dest,param_3);" (assignment_expression "iVar1 = __gmpz_set_str(param_1,__dest,param_3)" identifier = (call_expression "__gmpz_set_str(param_1,__dest,param_3)" identifier (argument_list "(param_1,__dest,param_3)" ( identifier , identifier , identifier )))) ;) (expression_statement "(**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);" (call_expression "(**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1)" (parenthesized_expression "(**(code **)PTR___gmp_free_func_00172fa8)" ( (pointer_expression "**(code **)PTR___gmp_free_func_00172fa8" * (pointer_expression "*(code **)PTR___gmp_free_func_00172fa8" * (cast_expression "(code **)PTR___gmp_free_func_00172fa8" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) )) (argument_list "(__dest,__n + 1)" ( identifier , (binary_expression "__n + 1" identifier + number_literal) ))) ;) (if_statement "if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }" { (expression_statement "iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);" (assignment_expression "iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3)" identifier = (call_expression "__gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3)" identifier (argument_list "(param_1 + 0x10,pcVar2 + 1,param_3)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) , (binary_expression "pcVar2 + 1" identifier + number_literal) , identifier )))) ;) })) }))) (return_statement "return iVar1;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) )) (argument_list ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + IDENT) )))) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) IDENT))) )) (argument_list ( IDENT , (binary_expression IDENT + LIT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , IDENT )))) ;) })) }))) (return_statement return IDENT ;) })))
(function_definition "int __gmpq_set_str(long param_1,char *param_2,undefined4 param_3)\n\n{\n  int iVar1;\n  char *pcVar2;\n  void *__dest;\n  size_t __n;\n  \n  pcVar2 = strchr(param_2,0x2f);\n  if (pcVar2 == (char *)0x0) {\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }\n  else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }\n  return iVar1;\n}" (primitive_type "int") (function_declarator "__gmpq_set_str(long param_1,char *param_2,undefined4 param_3)" (identifier "__gmpq_set_str") (parameter_list "(long param_1,char *param_2,undefined4 param_3)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "char *param_2" (primitive_type "char") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  char *pcVar2;\n  void *__dest;\n  size_t __n;\n  \n  pcVar2 = strchr(param_2,0x2f);\n  if (pcVar2 == (char *)0x0) {\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }\n  else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }\n  return iVar1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "char *pcVar2;" (primitive_type "char") (pointer_declarator "*pcVar2" (* "*") (identifier "pcVar2")) (; ";")) (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (expression_statement "pcVar2 = strchr(param_2,0x2f);" (assignment_expression "pcVar2 = strchr(param_2,0x2f)" (identifier "pcVar2") (= "=") (call_expression "strchr(param_2,0x2f)" (identifier "strchr") (argument_list "(param_2,0x2f)" (( "(") (identifier "param_2") (, ",") (number_literal "0x2f") () ")")))) (; ";")) (if_statement "if (pcVar2 == (char *)0x0) {\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }\n  else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }" (if "if") (parenthesized_expression "(pcVar2 == (char *)0x0)" (( "(") (binary_expression "pcVar2 == (char *)0x0" (identifier "pcVar2") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x14) = 1;\n    **(undefined8 **)(param_1 + 0x18) = 1;\n    iVar1 = __gmpz_set_str(param_1,param_2,param_3);\n  }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0x14) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 1" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "1")) (; ";")) (expression_statement "**(undefined8 **)(param_1 + 0x18) = 1;" (assignment_expression "**(undefined8 **)(param_1 + 0x18) = 1" (pointer_expression "**(undefined8 **)(param_1 + 0x18)" (* "*") (pointer_expression "*(undefined8 **)(param_1 + 0x18)" (* "*") (cast_expression "(undefined8 **)(param_1 + 0x18)" (( "(") (type_descriptor "undefined8 **" (type_identifier "undefined8") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (= "=") (number_literal "1")) (; ";")) (expression_statement "iVar1 = __gmpz_set_str(param_1,param_2,param_3);" (assignment_expression "iVar1 = __gmpz_set_str(param_1,param_2,param_3)" (identifier "iVar1") (= "=") (call_expression "__gmpz_set_str(param_1,param_2,param_3)" (identifier "__gmpz_set_str") (argument_list "(param_1,param_2,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }" (else "else") (compound_statement "{\n    __n = (long)pcVar2 - (long)param_2;\n    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);\n    memcpy(__dest,param_2,__n);\n    *(undefined1 *)((long)__dest + __n) = 0;\n    iVar1 = __gmpz_set_str(param_1,__dest,param_3);\n    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);\n    if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }\n  }" ({ "{") (expression_statement "__n = (long)pcVar2 - (long)param_2;" (assignment_expression "__n = (long)pcVar2 - (long)param_2" (identifier "__n") (= "=") (binary_expression "(long)pcVar2 - (long)param_2" (cast_expression "(long)pcVar2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "pcVar2")) (- "-") (cast_expression "(long)param_2" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_2")))) (; ";")) (expression_statement "__dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);" (assignment_expression "__dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1)" (identifier "__dest") (= "=") (cast_expression "(void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1)" (parenthesized_expression "(**(code **)PTR___gmp_allocate_func_00172f08)" (( "(") (pointer_expression "**(code **)PTR___gmp_allocate_func_00172f08" (* "*") (pointer_expression "*(code **)PTR___gmp_allocate_func_00172f08" (* "*") (cast_expression "(code **)PTR___gmp_allocate_func_00172f08" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR___gmp_allocate_func_00172f08")))) () ")")) (argument_list "(__n + 1)" (( "(") (binary_expression "__n + 1" (identifier "__n") (+ "+") (number_literal "1")) () ")"))))) (; ";")) (expression_statement "memcpy(__dest,param_2,__n);" (call_expression "memcpy(__dest,param_2,__n)" (identifier "memcpy") (argument_list "(__dest,param_2,__n)" (( "(") (identifier "__dest") (, ",") (identifier "param_2") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "*(undefined1 *)((long)__dest + __n) = 0;" (assignment_expression "*(undefined1 *)((long)__dest + __n) = 0" (pointer_expression "*(undefined1 *)((long)__dest + __n)" (* "*") (cast_expression "(undefined1 *)((long)__dest + __n)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)__dest + __n)" (( "(") (binary_expression "(long)__dest + __n" (cast_expression "(long)__dest" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "__dest")) (+ "+") (identifier "__n")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = __gmpz_set_str(param_1,__dest,param_3);" (assignment_expression "iVar1 = __gmpz_set_str(param_1,__dest,param_3)" (identifier "iVar1") (= "=") (call_expression "__gmpz_set_str(param_1,__dest,param_3)" (identifier "__gmpz_set_str") (argument_list "(param_1,__dest,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "__dest") (, ",") (identifier "param_3") () ")")))) (; ";")) (expression_statement "(**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);" (call_expression "(**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1)" (parenthesized_expression "(**(code **)PTR___gmp_free_func_00172fa8)" (( "(") (pointer_expression "**(code **)PTR___gmp_free_func_00172fa8" (* "*") (pointer_expression "*(code **)PTR___gmp_free_func_00172fa8" (* "*") (cast_expression "(code **)PTR___gmp_free_func_00172fa8" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (identifier "PTR___gmp_free_func_00172fa8")))) () ")")) (argument_list "(__dest,__n + 1)" (( "(") (identifier "__dest") (, ",") (binary_expression "__n + 1" (identifier "__n") (+ "+") (number_literal "1")) () ")"))) (; ";")) (if_statement "if (iVar1 == 0) {\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);\n    }" ({ "{") (expression_statement "iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);" (assignment_expression "iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3)" (identifier "iVar1") (= "=") (call_expression "__gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3)" (identifier "__gmpz_set_str") (argument_list "(param_1 + 0x10,pcVar2 + 1,param_3)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) (, ",") (binary_expression "pcVar2 + 1" (identifier "pcVar2") (+ "+") (number_literal "1")) (, ",") (identifier "param_3") () ")")))) (; ";")) (} "}"))) (} "}")))) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}")))

int function_1(type_1 q,char *str,int base)

{
  int var_6;
  char *var_2;
  char *str_00;
  size_t var_4;
  
  var_2 = var_1(str,0x2f);
  if (var_2 == (char *)0x0) {
    (q->_mp_den)._mp_size = 1;
    *(q->_mp_den)._mp_d = 1;
    var_6 = var_3(&q->_mp_num,str,base);
  }
  else {
    var_4 = (long)var_2 - (long)str;
    str_00 = (char *)(**(type_2 **)PTR___gmp_allocate_func_00172f08)(var_4 + 1);
    var_5(str_00,str,var_4);
    str_00[var_4] = '\0';
    var_6 = var_3(&q->_mp_num,str_00,base);
    (**(type_2 **)PTR___gmp_free_func_00172fa8)(str_00,var_4 + 1);
    if (var_6 == 0) {
      var_6 = var_3(&q->_mp_den,var_2 + 1,base);
    }
  }
  return var_6;
}


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

int MASKED(long param_1,char *param_2,undefined4 param_3)

{
  int iVar1;
  char *pcVar2;
  void *__dest;
  size_t __n;
  
  pcVar2 = strchr(param_2,0x2f);
  if (pcVar2 == (char *)0x0) {
    *(undefined4 *)(param_1 + 0x14) = 1;
    **(undefined8 **)(param_1 + 0x18) = 1;
    iVar1 = __gmpz_set_str(param_1,param_2,param_3);
  }
  else {
    __n = (long)pcVar2 - (long)param_2;
    __dest = (void *)(**(code **)PTR___gmp_allocate_func_00172f08)(__n + 1);
    memcpy(__dest,param_2,__n);
    *(undefined1 *)((long)__dest + __n) = 0;
    iVar1 = __gmpz_set_str(param_1,__dest,param_3);
    (**(code **)PTR___gmp_free_func_00172fa8)(__dest,__n + 1);
    if (iVar1 == 0) {
      iVar1 = __gmpz_set_str(param_1 + 0x10,pcVar2 + 1,param_3);
    }
  }
  return iVar1;
}

