
void add_prompt(prompts_t *p,char *promptstr,int echo)

{
  size_t n;
  prompt_t *ppVar1;
  prompt_t **pppVar2;
  
  ppVar1 = (prompt_t *)safemalloc(1,0x20);
  ppVar1->prompt = promptstr;
  ppVar1->echo = echo;
  ppVar1->result = (char *)0x0;
  ppVar1->resultsize = 0;
  n = p->n_prompts + 1;
  p->n_prompts = n;
  pppVar2 = (prompt_t **)saferealloc(p->prompts,n,8);
  p->prompts = pppVar2;
  pppVar2[p->n_prompts - 1] = ppVar1;
  return;
}



void FUN_00126d08(long param_1,undefined8 param_2,undefined4 param_3)

{
  undefined8 *puVar1;
  long lVar2;
  
  puVar1 = (undefined8 *)FUN_00126895(1,0x20);
  *puVar1 = param_2;
  *(undefined4 *)(puVar1 + 1) = param_3;
  puVar1[2] = 0;
  puVar1[3] = 0;
  lVar2 = *(long *)(param_1 + 0x28) + 1;
  *(long *)(param_1 + 0x28) = lVar2;
  lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);
  *(long *)(param_1 + 0x30) = lVar2;
  *(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;
  return;
}


PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBP,RDI
MOV R13,RSI
MOV R12D,EDX
MOV ESI,0x20
MOV EDI,0x1
CALL 0x00126895
MOV RBX,RAX
MOV qword ptr [RAX],R13
MOV dword ptr [RAX + 0x8],R12D
MOV qword ptr [RAX + 0x10],0x0
MOV qword ptr [RAX + 0x18],0x0
MOV RAX,qword ptr [RBP + 0x28]
LEA RSI,[RAX + 0x1]
MOV qword ptr [RBP + 0x28],RSI
MOV RDI,qword ptr [RBP + 0x30]
MOV EDX,0x8
CALL 0x00126c61
MOV qword ptr [RBP + 0x30],RAX
MOV RDX,qword ptr [RBP + 0x28]
MOV qword ptr [RAX + RDX*0x8 + -0x8],RBX
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET
(translation_unit "void FUN_00126d08(long param_1,undefined8 param_2,undefined4 param_3)\n\n{\n  undefined8 *puVar1;\n  long lVar2;\n  \n  puVar1 = (undefined8 *)FUN_00126895(1,0x20);\n  *puVar1 = param_2;\n  *(undefined4 *)(puVar1 + 1) = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  lVar2 = *(long *)(param_1 + 0x28) + 1;\n  *(long *)(param_1 + 0x28) = lVar2;\n  lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);\n  *(long *)(param_1 + 0x30) = lVar2;\n  *(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;\n  return;\n}\n\n" (function_definition "void FUN_00126d08(long param_1,undefined8 param_2,undefined4 param_3)\n\n{\n  undefined8 *puVar1;\n  long lVar2;\n  \n  puVar1 = (undefined8 *)FUN_00126895(1,0x20);\n  *puVar1 = param_2;\n  *(undefined4 *)(puVar1 + 1) = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  lVar2 = *(long *)(param_1 + 0x28) + 1;\n  *(long *)(param_1 + 0x28) = lVar2;\n  lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);\n  *(long *)(param_1 + 0x30) = lVar2;\n  *(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;\n  return;\n}" primitive_type (function_declarator "FUN_00126d08(long param_1,undefined8 param_2,undefined4 param_3)" identifier (parameter_list "(long param_1,undefined8 param_2,undefined4 param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined8 *puVar1;\n  long lVar2;\n  \n  puVar1 = (undefined8 *)FUN_00126895(1,0x20);\n  *puVar1 = param_2;\n  *(undefined4 *)(puVar1 + 1) = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  lVar2 = *(long *)(param_1 + 0x28) + 1;\n  *(long *)(param_1 + 0x28) = lVar2;\n  lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);\n  *(long *)(param_1 + 0x30) = lVar2;\n  *(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;\n  return;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "puVar1 = (undefined8 *)FUN_00126895(1,0x20);" (assignment_expression "puVar1 = (undefined8 *)FUN_00126895(1,0x20)" identifier = (cast_expression "(undefined8 *)FUN_00126895(1,0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00126895(1,0x20)" identifier (argument_list "(1,0x20)" ( number_literal , number_literal ))))) ;) (expression_statement "*puVar1 = param_2;" (assignment_expression "*puVar1 = param_2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*(undefined4 *)(puVar1 + 1) = param_3;" (assignment_expression "*(undefined4 *)(puVar1 + 1) = param_3" (pointer_expression "*(undefined4 *)(puVar1 + 1)" * (cast_expression "(undefined4 *)(puVar1 + 1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[3] = 0;" (assignment_expression "puVar1[3] = 0" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "lVar2 = *(long *)(param_1 + 0x28) + 1;" (assignment_expression "lVar2 = *(long *)(param_1 + 0x28) + 1" identifier = (binary_expression "*(long *)(param_1 + 0x28) + 1" (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "*(long *)(param_1 + 0x28) = lVar2;" (assignment_expression "*(long *)(param_1 + 0x28) = lVar2" (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = identifier) ;) (expression_statement "lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);" (assignment_expression "lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8)" identifier = (call_expression "FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8)" identifier (argument_list "(*(undefined8 *)(param_1 + 0x30),lVar2,8)" ( (pointer_expression "*(undefined8 *)(param_1 + 0x30)" * (cast_expression "(undefined8 *)(param_1 + 0x30)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) , identifier , number_literal )))) ;) (expression_statement "*(long *)(param_1 + 0x30) = lVar2;" (assignment_expression "*(long *)(param_1 + 0x30) = lVar2" (pointer_expression "*(long *)(param_1 + 0x30)" * (cast_expression "(long *)(param_1 + 0x30)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;" (assignment_expression "*(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1" (pointer_expression "*(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8)" * (cast_expression "(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8)" ( (binary_expression "lVar2 + -8 + *(long *)(param_1 + 0x28) * 8" (binary_expression "lVar2 + -8" identifier + number_literal) + (binary_expression "*(long *)(param_1 + 0x28) * 8" (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) * number_literal)) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void add_prompt(prompts_t *p,char *promptstr,int echo)\n\n{\n  size_t n;\n  prompt_t *ppVar1;\n  prompt_t **pppVar2;\n  \n  ppVar1 = (prompt_t *)safemalloc(1,0x20);\n  ppVar1->prompt = promptstr;\n  ppVar1->echo = echo;\n  ppVar1->result = (char *)0x0;\n  ppVar1->resultsize = 0;\n  n = p->n_prompts + 1;\n  p->n_prompts = n;\n  pppVar2 = (prompt_t **)saferealloc(p->prompts,n,8);\n  p->prompts = pppVar2;\n  pppVar2[p->n_prompts - 1] = ppVar1;\n  return;\n}\n\n" (function_definition "void add_prompt(prompts_t *p,char *promptstr,int echo)\n\n{\n  size_t n;\n  prompt_t *ppVar1;\n  prompt_t **pppVar2;\n  \n  ppVar1 = (prompt_t *)safemalloc(1,0x20);\n  ppVar1->prompt = promptstr;\n  ppVar1->echo = echo;\n  ppVar1->result = (char *)0x0;\n  ppVar1->resultsize = 0;\n  n = p->n_prompts + 1;\n  p->n_prompts = n;\n  pppVar2 = (prompt_t **)saferealloc(p->prompts,n,8);\n  p->prompts = pppVar2;\n  pppVar2[p->n_prompts - 1] = ppVar1;\n  return;\n}" primitive_type (function_declarator "add_prompt(prompts_t *p,char *promptstr,int echo)" identifier (parameter_list "(prompts_t *p,char *promptstr,int echo)" ( (parameter_declaration "prompts_t *p" type_identifier (pointer_declarator "*p" * identifier)) , (parameter_declaration "char *promptstr" primitive_type (pointer_declarator "*promptstr" * identifier)) , (parameter_declaration "int echo" primitive_type identifier) ))) (compound_statement "{\n  size_t n;\n  prompt_t *ppVar1;\n  prompt_t **pppVar2;\n  \n  ppVar1 = (prompt_t *)safemalloc(1,0x20);\n  ppVar1->prompt = promptstr;\n  ppVar1->echo = echo;\n  ppVar1->result = (char *)0x0;\n  ppVar1->resultsize = 0;\n  n = p->n_prompts + 1;\n  p->n_prompts = n;\n  pppVar2 = (prompt_t **)saferealloc(p->prompts,n,8);\n  p->prompts = pppVar2;\n  pppVar2[p->n_prompts - 1] = ppVar1;\n  return;\n}" { (declaration "size_t n;" primitive_type identifier ;) (declaration "prompt_t *ppVar1;" type_identifier (pointer_declarator "*ppVar1" * identifier) ;) (declaration "prompt_t **pppVar2;" type_identifier (pointer_declarator "**pppVar2" * (pointer_declarator "*pppVar2" * identifier)) ;) (expression_statement "ppVar1 = (prompt_t *)safemalloc(1,0x20);" (assignment_expression "ppVar1 = (prompt_t *)safemalloc(1,0x20)" identifier = (cast_expression "(prompt_t *)safemalloc(1,0x20)" ( (type_descriptor "prompt_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x20)" identifier (argument_list "(1,0x20)" ( number_literal , number_literal ))))) ;) (expression_statement "ppVar1->prompt = promptstr;" (assignment_expression "ppVar1->prompt = promptstr" (field_expression "ppVar1->prompt" identifier -> field_identifier) = identifier) ;) (expression_statement "ppVar1->echo = echo;" (assignment_expression "ppVar1->echo = echo" (field_expression "ppVar1->echo" identifier -> field_identifier) = identifier) ;) (expression_statement "ppVar1->result = (char *)0x0;" (assignment_expression "ppVar1->result = (char *)0x0" (field_expression "ppVar1->result" identifier -> field_identifier) = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "ppVar1->resultsize = 0;" (assignment_expression "ppVar1->resultsize = 0" (field_expression "ppVar1->resultsize" identifier -> field_identifier) = number_literal) ;) (expression_statement "n = p->n_prompts + 1;" (assignment_expression "n = p->n_prompts + 1" identifier = (binary_expression "p->n_prompts + 1" (field_expression "p->n_prompts" identifier -> field_identifier) + number_literal)) ;) (expression_statement "p->n_prompts = n;" (assignment_expression "p->n_prompts = n" (field_expression "p->n_prompts" identifier -> field_identifier) = identifier) ;) (expression_statement "pppVar2 = (prompt_t **)saferealloc(p->prompts,n,8);" (assignment_expression "pppVar2 = (prompt_t **)saferealloc(p->prompts,n,8)" identifier = (cast_expression "(prompt_t **)saferealloc(p->prompts,n,8)" ( (type_descriptor "prompt_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "saferealloc(p->prompts,n,8)" identifier (argument_list "(p->prompts,n,8)" ( (field_expression "p->prompts" identifier -> field_identifier) , identifier , number_literal ))))) ;) (expression_statement "p->prompts = pppVar2;" (assignment_expression "p->prompts = pppVar2" (field_expression "p->prompts" identifier -> field_identifier) = identifier) ;) (expression_statement "pppVar2[p->n_prompts - 1] = ppVar1;" (assignment_expression "pppVar2[p->n_prompts - 1] = ppVar1" (subscript_expression "pppVar2[p->n_prompts - 1]" identifier [ (binary_expression "p->n_prompts - 1" (field_expression "p->n_prompts" identifier -> field_identifier) - number_literal) ]) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00126d08(long param_1,undefined8 param_2,undefined4 param_3)\n\n{\n  undefined8 *puVar1;\n  long lVar2;\n  \n  puVar1 = (undefined8 *)FUN_00126895(1,0x20);\n  *puVar1 = param_2;\n  *(undefined4 *)(puVar1 + 1) = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  lVar2 = *(long *)(param_1 + 0x28) + 1;\n  *(long *)(param_1 + 0x28) = lVar2;\n  lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);\n  *(long *)(param_1 + 0x30) = lVar2;\n  *(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;\n  return;\n}\n\n" (function_definition "void FUN_00126d08(long param_1,undefined8 param_2,undefined4 param_3)\n\n{\n  undefined8 *puVar1;\n  long lVar2;\n  \n  puVar1 = (undefined8 *)FUN_00126895(1,0x20);\n  *puVar1 = param_2;\n  *(undefined4 *)(puVar1 + 1) = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  lVar2 = *(long *)(param_1 + 0x28) + 1;\n  *(long *)(param_1 + 0x28) = lVar2;\n  lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);\n  *(long *)(param_1 + 0x30) = lVar2;\n  *(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;\n  return;\n}" primitive_type (function_declarator "FUN_00126d08(long param_1,undefined8 param_2,undefined4 param_3)" identifier (parameter_list "(long param_1,undefined8 param_2,undefined4 param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined8 *puVar1;\n  long lVar2;\n  \n  puVar1 = (undefined8 *)FUN_00126895(1,0x20);\n  *puVar1 = param_2;\n  *(undefined4 *)(puVar1 + 1) = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  lVar2 = *(long *)(param_1 + 0x28) + 1;\n  *(long *)(param_1 + 0x28) = lVar2;\n  lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);\n  *(long *)(param_1 + 0x30) = lVar2;\n  *(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;\n  return;\n}" { (declaration "undefined8 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "long lVar2;" (sized_type_specifier "long" long) identifier ;) (expression_statement "puVar1 = (undefined8 *)FUN_00126895(1,0x20);" (assignment_expression "puVar1 = (undefined8 *)FUN_00126895(1,0x20)" identifier = (cast_expression "(undefined8 *)FUN_00126895(1,0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00126895(1,0x20)" identifier (argument_list "(1,0x20)" ( number_literal , number_literal ))))) ;) (expression_statement "*puVar1 = param_2;" (assignment_expression "*puVar1 = param_2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*(undefined4 *)(puVar1 + 1) = param_3;" (assignment_expression "*(undefined4 *)(puVar1 + 1) = param_3" (pointer_expression "*(undefined4 *)(puVar1 + 1)" * (cast_expression "(undefined4 *)(puVar1 + 1)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "puVar1[3] = 0;" (assignment_expression "puVar1[3] = 0" (subscript_expression "puVar1[3]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "lVar2 = *(long *)(param_1 + 0x28) + 1;" (assignment_expression "lVar2 = *(long *)(param_1 + 0x28) + 1" identifier = (binary_expression "*(long *)(param_1 + 0x28) + 1" (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) + number_literal)) ;) (expression_statement "*(long *)(param_1 + 0x28) = lVar2;" (assignment_expression "*(long *)(param_1 + 0x28) = lVar2" (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = identifier) ;) (expression_statement "lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);" (assignment_expression "lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8)" identifier = (call_expression "FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8)" identifier (argument_list "(*(undefined8 *)(param_1 + 0x30),lVar2,8)" ( (pointer_expression "*(undefined8 *)(param_1 + 0x30)" * (cast_expression "(undefined8 *)(param_1 + 0x30)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) , identifier , number_literal )))) ;) (expression_statement "*(long *)(param_1 + 0x30) = lVar2;" (assignment_expression "*(long *)(param_1 + 0x30) = lVar2" (pointer_expression "*(long *)(param_1 + 0x30)" * (cast_expression "(long *)(param_1 + 0x30)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;" (assignment_expression "*(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1" (pointer_expression "*(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8)" * (cast_expression "(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8)" ( (type_descriptor "undefined8 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8)" ( (binary_expression "lVar2 + -8 + *(long *)(param_1 + 0x28) * 8" (binary_expression "lVar2 + -8" identifier + number_literal) + (binary_expression "*(long *)(param_1 + 0x28) * 8" (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) * number_literal)) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) * LIT)) )))) = IDENT) ;) (return_statement return ;) })))
(function_definition "void FUN_00126d08(long param_1,undefined8 param_2,undefined4 param_3)\n\n{\n  undefined8 *puVar1;\n  long lVar2;\n  \n  puVar1 = (undefined8 *)FUN_00126895(1,0x20);\n  *puVar1 = param_2;\n  *(undefined4 *)(puVar1 + 1) = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  lVar2 = *(long *)(param_1 + 0x28) + 1;\n  *(long *)(param_1 + 0x28) = lVar2;\n  lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);\n  *(long *)(param_1 + 0x30) = lVar2;\n  *(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00126d08(long param_1,undefined8 param_2,undefined4 param_3)" (identifier "FUN_00126d08") (parameter_list "(long param_1,undefined8 param_2,undefined4 param_3)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined8 *puVar1;\n  long lVar2;\n  \n  puVar1 = (undefined8 *)FUN_00126895(1,0x20);\n  *puVar1 = param_2;\n  *(undefined4 *)(puVar1 + 1) = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  lVar2 = *(long *)(param_1 + 0x28) + 1;\n  *(long *)(param_1 + 0x28) = lVar2;\n  lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);\n  *(long *)(param_1 + 0x30) = lVar2;\n  *(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;\n  return;\n}" ({ "{") (declaration "undefined8 *puVar1;" (type_identifier "undefined8") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "long lVar2;" (sized_type_specifier "long" (long "long")) (identifier "lVar2") (; ";")) (expression_statement "puVar1 = (undefined8 *)FUN_00126895(1,0x20);" (assignment_expression "puVar1 = (undefined8 *)FUN_00126895(1,0x20)" (identifier "puVar1") (= "=") (cast_expression "(undefined8 *)FUN_00126895(1,0x20)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00126895(1,0x20)" (identifier "FUN_00126895") (argument_list "(1,0x20)" (( "(") (number_literal "1") (, ",") (number_literal "0x20") () ")"))))) (; ";")) (expression_statement "*puVar1 = param_2;" (assignment_expression "*puVar1 = param_2" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "*(undefined4 *)(puVar1 + 1) = param_3;" (assignment_expression "*(undefined4 *)(puVar1 + 1) = param_3" (pointer_expression "*(undefined4 *)(puVar1 + 1)" (* "*") (cast_expression "(undefined4 *)(puVar1 + 1)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")")))) (= "=") (identifier "param_3")) (; ";")) (expression_statement "puVar1[2] = 0;" (assignment_expression "puVar1[2] = 0" (subscript_expression "puVar1[2]" (identifier "puVar1") ([ "[") (number_literal "2") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar1[3] = 0;" (assignment_expression "puVar1[3] = 0" (subscript_expression "puVar1[3]" (identifier "puVar1") ([ "[") (number_literal "3") (] "]")) (= "=") (number_literal "0")) (; ";")) (expression_statement "lVar2 = *(long *)(param_1 + 0x28) + 1;" (assignment_expression "lVar2 = *(long *)(param_1 + 0x28) + 1" (identifier "lVar2") (= "=") (binary_expression "*(long *)(param_1 + 0x28) + 1" (pointer_expression "*(long *)(param_1 + 0x28)" (* "*") (cast_expression "(long *)(param_1 + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*(long *)(param_1 + 0x28) = lVar2;" (assignment_expression "*(long *)(param_1 + 0x28) = lVar2" (pointer_expression "*(long *)(param_1 + 0x28)" (* "*") (cast_expression "(long *)(param_1 + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (identifier "lVar2")) (; ";")) (expression_statement "lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);" (assignment_expression "lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8)" (identifier "lVar2") (= "=") (call_expression "FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8)" (identifier "FUN_00126c61") (argument_list "(*(undefined8 *)(param_1 + 0x30),lVar2,8)" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x30)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x30)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (, ",") (identifier "lVar2") (, ",") (number_literal "8") () ")")))) (; ";")) (expression_statement "*(long *)(param_1 + 0x30) = lVar2;" (assignment_expression "*(long *)(param_1 + 0x30) = lVar2" (pointer_expression "*(long *)(param_1 + 0x30)" (* "*") (cast_expression "(long *)(param_1 + 0x30)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (identifier "lVar2")) (; ";")) (expression_statement "*(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;" (assignment_expression "*(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1" (pointer_expression "*(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8)" (* "*") (cast_expression "(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8)" (( "(") (type_descriptor "undefined8 **" (type_identifier "undefined8") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8)" (( "(") (binary_expression "lVar2 + -8 + *(long *)(param_1 + 0x28) * 8" (binary_expression "lVar2 + -8" (identifier "lVar2") (+ "+") (number_literal "-8")) (+ "+") (binary_expression "*(long *)(param_1 + 0x28) * 8" (pointer_expression "*(long *)(param_1 + 0x28)" (* "*") (cast_expression "(long *)(param_1 + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (* "*") (number_literal "8"))) () ")")))) (= "=") (identifier "puVar1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *p,char *promptstr,int echo)

{
  size_t n;
  type_2 *ppVar1;
  type_2 **pppVar2;
  
  ppVar1 = (type_2 *)var_1(1,0x20);
  ppVar1->prompt = promptstr;
  ppVar1->echo = echo;
  ppVar1->result = (char *)0x0;
  ppVar1->resultsize = 0;
  n = p->n_prompts + 1;
  p->n_prompts = n;
  pppVar2 = (type_2 **)var_2(p->prompts,n,8);
  p->prompts = pppVar2;
  pppVar2[p->n_prompts - 1] = ppVar1;
  return;
}


(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: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (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: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) 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: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (identifier) (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (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: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal)))))) right: (identifier))) (return_statement))))

void MASKED(long param_1,undefined8 param_2,undefined4 param_3)

{
  undefined8 *puVar1;
  long lVar2;
  
  puVar1 = (undefined8 *)FUN_00126895(1,0x20);
  *puVar1 = param_2;
  *(undefined4 *)(puVar1 + 1) = param_3;
  puVar1[2] = 0;
  puVar1[3] = 0;
  lVar2 = *(long *)(param_1 + 0x28) + 1;
  *(long *)(param_1 + 0x28) = lVar2;
  lVar2 = FUN_00126c61(*(undefined8 *)(param_1 + 0x30),lVar2,8);
  *(long *)(param_1 + 0x30) = lVar2;
  *(undefined8 **)(lVar2 + -8 + *(long *)(param_1 + 0x28) * 8) = puVar1;
  return;
}

