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

{
  prompt_t *ppVar1;
  size_t sVar2;
  prompt_t **pppVar3;
  
  ppVar1 = (prompt_t *)safemalloc(1,0x10);
  sVar2 = p->n_prompts;
  pppVar3 = p->prompts;
  ppVar1->prompt = promptstr;
  sVar2 = sVar2 + 1;
  ppVar1->echo = echo;
  ppVar1->result = (char *)0x0;
  ppVar1->resultsize = 0;
  p->n_prompts = sVar2;
  pppVar3 = (prompt_t **)saferealloc(pppVar3,sVar2,4);
  p->prompts = pppVar3;
  pppVar3[p->n_prompts - 1] = ppVar1;
  return;
}



void add_prompt(int param_1,undefined4 param_2,undefined4 param_3)

{
  undefined4 *puVar1;
  int iVar2;
  undefined4 uVar3;
  
  puVar1 = (undefined4 *)safemalloc(1,0x10);
  iVar2 = *(int *)(param_1 + 0x14);
  uVar3 = *(undefined4 *)(param_1 + 0x18);
  *puVar1 = param_2;
  iVar2 = iVar2 + 1;
  puVar1[1] = param_3;
  puVar1[2] = 0;
  puVar1[3] = 0;
  *(int *)(param_1 + 0x14) = iVar2;
  iVar2 = saferealloc(uVar3,iVar2,4);
  *(int *)(param_1 + 0x18) = iVar2;
  *(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;
  return;
}


lui gp,0xa
addiu gp,gp,-0x6cd0
addu gp,gp,t9
addiu sp,sp,-0x30
lw t9,-0x7f68(gp)
sw s3,0x28(sp)
or s3,a1,zero
sw s1,0x20(sp)
li a1,0x10
or s1,a0,zero
sw ra,0x2c(sp)
li a0,0x1
sw s2,0x24(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
bal 0x00020904
_or s2,a2,zero
li a2,0x4
lw gp,0x10(sp)
or s0,v0,zero
lw v1,0x14(s1)
lw a0,0x18(s1)
sw s3,0x0(v0)
addiu v1,v1,0x1
sw s2,0x4(v0)
sw zero,0x8(v0)
sw zero,0xc(v0)
or a1,v1,zero
lw t9,-0x7fb4(gp)
bal 0x00020f4c
_sw v1,0x14(s1)
lw v1,0x14(s1)
lw ra,0x2c(sp)
lw s3,0x28(sp)
sll v1,v1,0x2
lw s2,0x24(sp)
sw v0,0x18(s1)
addu v0,v0,v1
lw s1,0x20(sp)
sw s0,-0x4(v0)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
(translation_unit "void add_prompt(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x10);\n  iVar2 = *(int *)(param_1 + 0x14);\n  uVar3 = *(undefined4 *)(param_1 + 0x18);\n  *puVar1 = param_2;\n  iVar2 = iVar2 + 1;\n  puVar1[1] = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  *(int *)(param_1 + 0x14) = iVar2;\n  iVar2 = saferealloc(uVar3,iVar2,4);\n  *(int *)(param_1 + 0x18) = iVar2;\n  *(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;\n  return;\n}\n\n" (function_definition "void add_prompt(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x10);\n  iVar2 = *(int *)(param_1 + 0x14);\n  uVar3 = *(undefined4 *)(param_1 + 0x18);\n  *puVar1 = param_2;\n  iVar2 = iVar2 + 1;\n  puVar1[1] = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  *(int *)(param_1 + 0x14) = iVar2;\n  iVar2 = saferealloc(uVar3,iVar2,4);\n  *(int *)(param_1 + 0x18) = iVar2;\n  *(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;\n  return;\n}" primitive_type (function_declarator "add_prompt(int param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x10);\n  iVar2 = *(int *)(param_1 + 0x14);\n  uVar3 = *(undefined4 *)(param_1 + 0x18);\n  *puVar1 = param_2;\n  iVar2 = iVar2 + 1;\n  puVar1[1] = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  *(int *)(param_1 + 0x14) = iVar2;\n  iVar2 = saferealloc(uVar3,iVar2,4);\n  *(int *)(param_1 + 0x18) = iVar2;\n  *(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "puVar1 = (undefined4 *)safemalloc(1,0x10);" (assignment_expression "puVar1 = (undefined4 *)safemalloc(1,0x10)" identifier = (cast_expression "(undefined4 *)safemalloc(1,0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x10)" identifier (argument_list "(1,0x10)" ( number_literal , number_literal ))))) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x14);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x14)" identifier = (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = *(undefined4 *)(param_1 + 0x18);" (assignment_expression "uVar3 = *(undefined4 *)(param_1 + 0x18)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "*puVar1 = param_2;" (assignment_expression "*puVar1 = param_2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "puVar1[1] = param_3;" (assignment_expression "puVar1[1] = param_3" (subscript_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 "*(int *)(param_1 + 0x14) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x14) = iVar2" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar2 = saferealloc(uVar3,iVar2,4);" (assignment_expression "iVar2 = saferealloc(uVar3,iVar2,4)" identifier = (call_expression "saferealloc(uVar3,iVar2,4)" identifier (argument_list "(uVar3,iVar2,4)" ( identifier , identifier , number_literal )))) ;) (expression_statement "*(int *)(param_1 + 0x18) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x18) = iVar2" (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;" (assignment_expression "*(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1" (pointer_expression "*(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4)" * (cast_expression "(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4)" ( (binary_expression "iVar2 + *(int *)(param_1 + 0x14) * 4 + -4" (binary_expression "iVar2 + *(int *)(param_1 + 0x14) * 4" identifier + (binary_expression "*(int *)(param_1 + 0x14) * 4" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) * number_literal)) + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit "void add_prompt(prompts_t *p,char *promptstr,int echo)\n\n{\n  prompt_t *ppVar1;\n  size_t sVar2;\n  prompt_t **pppVar3;\n  \n  ppVar1 = (prompt_t *)safemalloc(1,0x10);\n  sVar2 = p->n_prompts;\n  pppVar3 = p->prompts;\n  ppVar1->prompt = promptstr;\n  sVar2 = sVar2 + 1;\n  ppVar1->echo = echo;\n  ppVar1->result = (char *)0x0;\n  ppVar1->resultsize = 0;\n  p->n_prompts = sVar2;\n  pppVar3 = (prompt_t **)saferealloc(pppVar3,sVar2,4);\n  p->prompts = pppVar3;\n  pppVar3[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  prompt_t *ppVar1;\n  size_t sVar2;\n  prompt_t **pppVar3;\n  \n  ppVar1 = (prompt_t *)safemalloc(1,0x10);\n  sVar2 = p->n_prompts;\n  pppVar3 = p->prompts;\n  ppVar1->prompt = promptstr;\n  sVar2 = sVar2 + 1;\n  ppVar1->echo = echo;\n  ppVar1->result = (char *)0x0;\n  ppVar1->resultsize = 0;\n  p->n_prompts = sVar2;\n  pppVar3 = (prompt_t **)saferealloc(pppVar3,sVar2,4);\n  p->prompts = pppVar3;\n  pppVar3[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  prompt_t *ppVar1;\n  size_t sVar2;\n  prompt_t **pppVar3;\n  \n  ppVar1 = (prompt_t *)safemalloc(1,0x10);\n  sVar2 = p->n_prompts;\n  pppVar3 = p->prompts;\n  ppVar1->prompt = promptstr;\n  sVar2 = sVar2 + 1;\n  ppVar1->echo = echo;\n  ppVar1->result = (char *)0x0;\n  ppVar1->resultsize = 0;\n  p->n_prompts = sVar2;\n  pppVar3 = (prompt_t **)saferealloc(pppVar3,sVar2,4);\n  p->prompts = pppVar3;\n  pppVar3[p->n_prompts - 1] = ppVar1;\n  return;\n}" { (declaration "prompt_t *ppVar1;" type_identifier (pointer_declarator "*ppVar1" * identifier) ;) (declaration "size_t sVar2;" primitive_type identifier ;) (declaration "prompt_t **pppVar3;" type_identifier (pointer_declarator "**pppVar3" * (pointer_declarator "*pppVar3" * identifier)) ;) (expression_statement "ppVar1 = (prompt_t *)safemalloc(1,0x10);" (assignment_expression "ppVar1 = (prompt_t *)safemalloc(1,0x10)" identifier = (cast_expression "(prompt_t *)safemalloc(1,0x10)" ( (type_descriptor "prompt_t *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x10)" identifier (argument_list "(1,0x10)" ( number_literal , number_literal ))))) ;) (expression_statement "sVar2 = p->n_prompts;" (assignment_expression "sVar2 = p->n_prompts" identifier = (field_expression "p->n_prompts" identifier -> field_identifier)) ;) (expression_statement "pppVar3 = p->prompts;" (assignment_expression "pppVar3 = p->prompts" identifier = (field_expression "p->prompts" identifier -> field_identifier)) ;) (expression_statement "ppVar1->prompt = promptstr;" (assignment_expression "ppVar1->prompt = promptstr" (field_expression "ppVar1->prompt" identifier -> field_identifier) = identifier) ;) (expression_statement "sVar2 = sVar2 + 1;" (assignment_expression "sVar2 = sVar2 + 1" identifier = (binary_expression "sVar2 + 1" identifier + number_literal)) ;) (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 "p->n_prompts = sVar2;" (assignment_expression "p->n_prompts = sVar2" (field_expression "p->n_prompts" identifier -> field_identifier) = identifier) ;) (expression_statement "pppVar3 = (prompt_t **)saferealloc(pppVar3,sVar2,4);" (assignment_expression "pppVar3 = (prompt_t **)saferealloc(pppVar3,sVar2,4)" identifier = (cast_expression "(prompt_t **)saferealloc(pppVar3,sVar2,4)" ( (type_descriptor "prompt_t **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (call_expression "saferealloc(pppVar3,sVar2,4)" identifier (argument_list "(pppVar3,sVar2,4)" ( identifier , identifier , number_literal ))))) ;) (expression_statement "p->prompts = pppVar3;" (assignment_expression "p->prompts = pppVar3" (field_expression "p->prompts" identifier -> field_identifier) = identifier) ;) (expression_statement "pppVar3[p->n_prompts - 1] = ppVar1;" (assignment_expression "pppVar3[p->n_prompts - 1] = ppVar1" (subscript_expression "pppVar3[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 add_prompt(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x10);\n  iVar2 = *(int *)(param_1 + 0x14);\n  uVar3 = *(undefined4 *)(param_1 + 0x18);\n  *puVar1 = param_2;\n  iVar2 = iVar2 + 1;\n  puVar1[1] = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  *(int *)(param_1 + 0x14) = iVar2;\n  iVar2 = saferealloc(uVar3,iVar2,4);\n  *(int *)(param_1 + 0x18) = iVar2;\n  *(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;\n  return;\n}\n\n" (function_definition "void add_prompt(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x10);\n  iVar2 = *(int *)(param_1 + 0x14);\n  uVar3 = *(undefined4 *)(param_1 + 0x18);\n  *puVar1 = param_2;\n  iVar2 = iVar2 + 1;\n  puVar1[1] = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  *(int *)(param_1 + 0x14) = iVar2;\n  iVar2 = saferealloc(uVar3,iVar2,4);\n  *(int *)(param_1 + 0x18) = iVar2;\n  *(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;\n  return;\n}" primitive_type (function_declarator "add_prompt(int param_1,undefined4 param_2,undefined4 param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "undefined4 param_3" type_identifier identifier) ))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x10);\n  iVar2 = *(int *)(param_1 + 0x14);\n  uVar3 = *(undefined4 *)(param_1 + 0x18);\n  *puVar1 = param_2;\n  iVar2 = iVar2 + 1;\n  puVar1[1] = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  *(int *)(param_1 + 0x14) = iVar2;\n  iVar2 = saferealloc(uVar3,iVar2,4);\n  *(int *)(param_1 + 0x18) = iVar2;\n  *(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;\n  return;\n}" { (declaration "undefined4 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (expression_statement "puVar1 = (undefined4 *)safemalloc(1,0x10);" (assignment_expression "puVar1 = (undefined4 *)safemalloc(1,0x10)" identifier = (cast_expression "(undefined4 *)safemalloc(1,0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x10)" identifier (argument_list "(1,0x10)" ( number_literal , number_literal ))))) ;) (expression_statement "iVar2 = *(int *)(param_1 + 0x14);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x14)" identifier = (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) ))))) ;) (expression_statement "uVar3 = *(undefined4 *)(param_1 + 0x18);" (assignment_expression "uVar3 = *(undefined4 *)(param_1 + 0x18)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "*puVar1 = param_2;" (assignment_expression "*puVar1 = param_2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" identifier = (binary_expression "iVar2 + 1" identifier + number_literal)) ;) (expression_statement "puVar1[1] = param_3;" (assignment_expression "puVar1[1] = param_3" (subscript_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 "*(int *)(param_1 + 0x14) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x14) = iVar2" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = identifier) ;) (expression_statement "iVar2 = saferealloc(uVar3,iVar2,4);" (assignment_expression "iVar2 = saferealloc(uVar3,iVar2,4)" identifier = (call_expression "saferealloc(uVar3,iVar2,4)" identifier (argument_list "(uVar3,iVar2,4)" ( identifier , identifier , number_literal )))) ;) (expression_statement "*(int *)(param_1 + 0x18) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x18) = iVar2" (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;" (assignment_expression "*(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1" (pointer_expression "*(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4)" * (cast_expression "(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4)" ( (binary_expression "iVar2 + *(int *)(param_1 + 0x14) * 4 + -4" (binary_expression "iVar2 + *(int *)(param_1 + 0x14) * 4" identifier + (binary_expression "*(int *)(param_1 + 0x14) * 4" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) * number_literal)) + number_literal) )))) = identifier) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE 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 = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression (subscript_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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT )))) ;) (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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) * LIT)) + LIT) )))) = IDENT) ;) (return_statement return ;) })))
(function_definition "void add_prompt(int param_1,undefined4 param_2,undefined4 param_3)\n\n{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x10);\n  iVar2 = *(int *)(param_1 + 0x14);\n  uVar3 = *(undefined4 *)(param_1 + 0x18);\n  *puVar1 = param_2;\n  iVar2 = iVar2 + 1;\n  puVar1[1] = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  *(int *)(param_1 + 0x14) = iVar2;\n  iVar2 = saferealloc(uVar3,iVar2,4);\n  *(int *)(param_1 + 0x18) = iVar2;\n  *(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;\n  return;\n}" (primitive_type "void") (function_declarator "add_prompt(int param_1,undefined4 param_2,undefined4 param_3)" (identifier "add_prompt") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) () ")"))) (compound_statement "{\n  undefined4 *puVar1;\n  int iVar2;\n  undefined4 uVar3;\n  \n  puVar1 = (undefined4 *)safemalloc(1,0x10);\n  iVar2 = *(int *)(param_1 + 0x14);\n  uVar3 = *(undefined4 *)(param_1 + 0x18);\n  *puVar1 = param_2;\n  iVar2 = iVar2 + 1;\n  puVar1[1] = param_3;\n  puVar1[2] = 0;\n  puVar1[3] = 0;\n  *(int *)(param_1 + 0x14) = iVar2;\n  iVar2 = saferealloc(uVar3,iVar2,4);\n  *(int *)(param_1 + 0x18) = iVar2;\n  *(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;\n  return;\n}" ({ "{") (declaration "undefined4 *puVar1;" (type_identifier "undefined4") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (expression_statement "puVar1 = (undefined4 *)safemalloc(1,0x10);" (assignment_expression "puVar1 = (undefined4 *)safemalloc(1,0x10)" (identifier "puVar1") (= "=") (cast_expression "(undefined4 *)safemalloc(1,0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "safemalloc(1,0x10)" (identifier "safemalloc") (argument_list "(1,0x10)" (( "(") (number_literal "1") (, ",") (number_literal "0x10") () ")"))))) (; ";")) (expression_statement "iVar2 = *(int *)(param_1 + 0x14);" (assignment_expression "iVar2 = *(int *)(param_1 + 0x14)" (identifier "iVar2") (= "=") (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "uVar3 = *(undefined4 *)(param_1 + 0x18);" (assignment_expression "uVar3 = *(undefined4 *)(param_1 + 0x18)" (identifier "uVar3") (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (expression_statement "*puVar1 = param_2;" (assignment_expression "*puVar1 = param_2" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "iVar2 = iVar2 + 1;" (assignment_expression "iVar2 = iVar2 + 1" (identifier "iVar2") (= "=") (binary_expression "iVar2 + 1" (identifier "iVar2") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar1[1] = param_3;" (assignment_expression "puVar1[1] = param_3" (subscript_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 "*(int *)(param_1 + 0x14) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x14) = iVar2" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "iVar2 = saferealloc(uVar3,iVar2,4);" (assignment_expression "iVar2 = saferealloc(uVar3,iVar2,4)" (identifier "iVar2") (= "=") (call_expression "saferealloc(uVar3,iVar2,4)" (identifier "saferealloc") (argument_list "(uVar3,iVar2,4)" (( "(") (identifier "uVar3") (, ",") (identifier "iVar2") (, ",") (number_literal "4") () ")")))) (; ";")) (expression_statement "*(int *)(param_1 + 0x18) = iVar2;" (assignment_expression "*(int *)(param_1 + 0x18) = iVar2" (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "iVar2")) (; ";")) (expression_statement "*(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;" (assignment_expression "*(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1" (pointer_expression "*(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4)" (* "*") (cast_expression "(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4)" (( "(") (binary_expression "iVar2 + *(int *)(param_1 + 0x14) * 4 + -4" (binary_expression "iVar2 + *(int *)(param_1 + 0x14) * 4" (identifier "iVar2") (+ "+") (binary_expression "*(int *)(param_1 + 0x14) * 4" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (* "*") (number_literal "4"))) (+ "+") (number_literal "-4")) () ")")))) (= "=") (identifier "puVar1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

{
  type_2 *ppVar1;
  size_t var_2;
  type_2 **pppVar3;
  
  ppVar1 = (type_2 *)var_1(1,0x10);
  var_2 = p->n_prompts;
  pppVar3 = p->prompts;
  ppVar1->prompt = promptstr;
  var_2 = var_2 + 1;
  ppVar1->echo = echo;
  ppVar1->result = (char *)0x0;
  ppVar1->resultsize = 0;
  p->n_prompts = var_2;
  pppVar3 = (type_2 **)var_3(pppVar3,var_2,4);
  p->prompts = pppVar3;
  pppVar3[p->n_prompts - 1] = ppVar1;
  return;
}


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

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

{
  undefined4 *puVar1;
  int iVar2;
  undefined4 uVar3;
  
  puVar1 = (undefined4 *)safemalloc(1,0x10);
  iVar2 = *(int *)(param_1 + 0x14);
  uVar3 = *(undefined4 *)(param_1 + 0x18);
  *puVar1 = param_2;
  iVar2 = iVar2 + 1;
  puVar1[1] = param_3;
  puVar1[2] = 0;
  puVar1[3] = 0;
  *(int *)(param_1 + 0x14) = iVar2;
  iVar2 = saferealloc(uVar3,iVar2,4);
  *(int *)(param_1 + 0x18) = iVar2;
  *(undefined4 **)(iVar2 + *(int *)(param_1 + 0x14) * 4 + -4) = puVar1;
  return;
}

