
void discard_until(undo *thisitem,openfilestruct *thefile,_Bool keep)

{
  undo_group *puVar1;
  undefined *puVar2;
  char *pcVar3;
  undefined3 in_register_00000018;
  undo_group *puVar4;
  undo *puVar5;
  
  puVar5 = thefile->undotop;
  while ((puVar2 = PTR_free_0007810c, puVar5 != (undo *)0x0 && (puVar5 != thisitem))) {
    pcVar3 = puVar5->strdata;
    thefile->undotop = puVar5->next;
    (*(code *)puVar2)(pcVar3);
    free_filestruct(puVar5->cutbuffer);
    puVar1 = puVar5->grouping;
    while (puVar1 != (undo_group *)0x0) {
      puVar4 = puVar1->next;
      free_chararray(puVar1->indentations,puVar1->bottom_line - puVar1->top_line);
      (*(code *)PTR_free_0007810c)(puVar1);
      puVar1 = puVar4;
    }
    (*(code *)PTR_free_0007810c)(puVar5);
    puVar5 = thefile->undotop;
  }
  thefile->current_undo = thisitem;
  thefile->last_action = OTHER;
  if (CONCAT31(in_register_00000018,keep) == 0) {
    thefile->last_saved = (undo *)0xbeeb;
  }
  return;
}



void discard_until(int param_1,int param_2,int param_3)

{
  int *piVar1;
  undefined *puVar2;
  undefined4 uVar3;
  int *piVar4;
  int iVar5;
  
  iVar5 = *(int *)(param_2 + 0x40);
  while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {
    uVar3 = *(undefined4 *)(iVar5 + 0xc);
    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);
    (*(code *)puVar2)(uVar3);
    free_filestruct(*(undefined4 *)(iVar5 + 0x20));
    piVar1 = *(int **)(iVar5 + 0x1c);
    while (piVar1 != (int *)0x0) {
      piVar4 = (int *)piVar1[3];
      free_chararray(piVar1[2],piVar1[1] - *piVar1);
      (*(code *)PTR_free_0007810c)(piVar1);
      piVar1 = piVar4;
    }
    (*(code *)PTR_free_0007810c)(iVar5);
    iVar5 = *(int *)(param_2 + 0x40);
  }
  *(int *)(param_2 + 0x44) = param_1;
  *(undefined4 *)(param_2 + 0x4c) = 0x14;
  if (param_3 == 0) {
    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;
  }
  return;
}


lui gp,0x4
addiu gp,gp,0x3a90
addu gp,gp,t9
addiu sp,sp,-0x38
sw s2,0x24(sp)
sw gp,0x10(sp)
sw s5,0x30(sp)
or s5,a2,zero
sw s4,0x2c(sp)
or s4,a0,zero
sw s3,0x28(sp)
sw ra,0x34(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
lw s2,0x40(a1)
beq s2,zero,0x0003bb58
_or s3,a1,zero
beq s2,s4,0x0003bb58
_lw t9,-0x7414(gp)
lw v0,0x30(s2)
lw a0,0xc(s2)
jalr t9
_sw v0,0x40(s3)
lw gp,0x10(sp)
lw t9,-0x7b48(gp)
bal 0x0002e0ec
_lw a0,0x20(s2)
lw s0,0x1c(s2)
beq s0,zero,0x0003bb40
_lw gp,0x10(sp)
lw v0,0x0(s0)
lw a1,0x4(s0)
lw t9,-0x7c34(gp)
lw a0,0x8(s0)
subu a1,a1,v0
bal 0x00042100
_lw s1,0xc(s0)
or a0,s0,zero
lw gp,0x10(sp)
lw t9,-0x7414(gp)
jalr t9
_or s0,s1,zero
bne s1,zero,0x0003bb08
_lw gp,0x10(sp)
lw t9,-0x7414(gp)
jalr t9
_or a0,s2,zero
lw s2,0x40(s3)
bne s2,zero,0x0003bad4
_lw gp,0x10(sp)
li v0,0x14
sw s4,0x44(s3)
bne s5,zero,0x0003bb70
_sw v0,0x4c(s3)
ori v0,zero,0xbeeb
sw v0,0x48(s3)
lw ra,0x34(sp)
lw s5,0x30(sp)
lw s4,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x38
(translation_unit "void discard_until(int param_1,int param_2,int param_3)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  \n  iVar5 = *(int *)(param_2 + 0x40);\n  while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }\n  *(int *)(param_2 + 0x44) = param_1;\n  *(undefined4 *)(param_2 + 0x4c) = 0x14;\n  if (param_3 == 0) {\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }\n  return;\n}\n\n" (function_definition "void discard_until(int param_1,int param_2,int param_3)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  \n  iVar5 = *(int *)(param_2 + 0x40);\n  while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }\n  *(int *)(param_2 + 0x44) = param_1;\n  *(undefined4 *)(param_2 + 0x4c) = 0x14;\n  if (param_3 == 0) {\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }\n  return;\n}" primitive_type (function_declarator "discard_until(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  \n  iVar5 = *(int *)(param_2 + 0x40);\n  while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }\n  *(int *)(param_2 + 0x44) = param_1;\n  *(undefined4 *)(param_2 + 0x4c) = 0x14;\n  if (param_3 == 0) {\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar5 = *(int *)(param_2 + 0x40);" (assignment_expression "iVar5 = *(int *)(param_2 + 0x40)" identifier = (pointer_expression "*(int *)(param_2 + 0x40)" * (cast_expression "(int *)(param_2 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x40)" ( (binary_expression "param_2 + 0x40" identifier + number_literal) ))))) ;) (while_statement "while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }" while (parenthesized_expression "((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1)))" ( (parenthesized_expression "(puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))" ( (comma_expression "puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1)" (assignment_expression "puVar2 = PTR_free_0007810c" identifier = identifier) , (binary_expression "iVar5 != 0 && (iVar5 != param_1)" (binary_expression "iVar5 != 0" identifier != number_literal) && (parenthesized_expression "(iVar5 != param_1)" ( (binary_expression "iVar5 != param_1" identifier != identifier) )))) )) )) (compound_statement "{\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }" { (expression_statement "uVar3 = *(undefined4 *)(iVar5 + 0xc);" (assignment_expression "uVar3 = *(undefined4 *)(iVar5 + 0xc)" identifier = (pointer_expression "*(undefined4 *)(iVar5 + 0xc)" * (cast_expression "(undefined4 *)(iVar5 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0xc)" ( (binary_expression "iVar5 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);" (assignment_expression "*(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30)" (pointer_expression "*(undefined4 *)(param_2 + 0x40)" * (cast_expression "(undefined4 *)(param_2 + 0x40)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x40)" ( (binary_expression "param_2 + 0x40" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(iVar5 + 0x30)" * (cast_expression "(undefined4 *)(iVar5 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x30)" ( (binary_expression "iVar5 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "(*(code *)puVar2)(uVar3);" (call_expression "(*(code *)puVar2)(uVar3)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar3)" ( identifier ))) ;) (expression_statement "free_filestruct(*(undefined4 *)(iVar5 + 0x20));" (call_expression "free_filestruct(*(undefined4 *)(iVar5 + 0x20))" identifier (argument_list "(*(undefined4 *)(iVar5 + 0x20))" ( (pointer_expression "*(undefined4 *)(iVar5 + 0x20)" * (cast_expression "(undefined4 *)(iVar5 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x20)" ( (binary_expression "iVar5 + 0x20" identifier + number_literal) )))) ))) ;) (expression_statement "piVar1 = *(int **)(iVar5 + 0x1c);" (assignment_expression "piVar1 = *(int **)(iVar5 + 0x1c)" identifier = (pointer_expression "*(int **)(iVar5 + 0x1c)" * (cast_expression "(int **)(iVar5 + 0x1c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar5 + 0x1c)" ( (binary_expression "iVar5 + 0x1c" identifier + number_literal) ))))) ;) (while_statement "while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }" while (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }" { (expression_statement "piVar4 = (int *)piVar1[3];" (assignment_expression "piVar4 = (int *)piVar1[3]" identifier = (cast_expression "(int *)piVar1[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar1[3]" identifier [ number_literal ]))) ;) (expression_statement "free_chararray(piVar1[2],piVar1[1] - *piVar1);" (call_expression "free_chararray(piVar1[2],piVar1[1] - *piVar1)" identifier (argument_list "(piVar1[2],piVar1[1] - *piVar1)" ( (subscript_expression "piVar1[2]" identifier [ number_literal ]) , (binary_expression "piVar1[1] - *piVar1" (subscript_expression "piVar1[1]" identifier [ number_literal ]) - (pointer_expression "*piVar1" * identifier)) ))) ;) (expression_statement "(*(code *)PTR_free_0007810c)(piVar1);" (call_expression "(*(code *)PTR_free_0007810c)(piVar1)" (parenthesized_expression "(*(code *)PTR_free_0007810c)" ( (pointer_expression "*(code *)PTR_free_0007810c" * (cast_expression "(code *)PTR_free_0007810c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar1)" ( identifier ))) ;) (expression_statement "piVar1 = piVar4;" (assignment_expression "piVar1 = piVar4" identifier = identifier) ;) })) (expression_statement "(*(code *)PTR_free_0007810c)(iVar5);" (call_expression "(*(code *)PTR_free_0007810c)(iVar5)" (parenthesized_expression "(*(code *)PTR_free_0007810c)" ( (pointer_expression "*(code *)PTR_free_0007810c" * (cast_expression "(code *)PTR_free_0007810c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar5)" ( identifier ))) ;) (expression_statement "iVar5 = *(int *)(param_2 + 0x40);" (assignment_expression "iVar5 = *(int *)(param_2 + 0x40)" identifier = (pointer_expression "*(int *)(param_2 + 0x40)" * (cast_expression "(int *)(param_2 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x40)" ( (binary_expression "param_2 + 0x40" identifier + number_literal) ))))) ;) })) (expression_statement "*(int *)(param_2 + 0x44) = param_1;" (assignment_expression "*(int *)(param_2 + 0x44) = param_1" (pointer_expression "*(int *)(param_2 + 0x44)" * (cast_expression "(int *)(param_2 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x44)" ( (binary_expression "param_2 + 0x44" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_2 + 0x4c) = 0x14;" (assignment_expression "*(undefined4 *)(param_2 + 0x4c) = 0x14" (pointer_expression "*(undefined4 *)(param_2 + 0x4c)" * (cast_expression "(undefined4 *)(param_2 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x4c)" ( (binary_expression "param_2 + 0x4c" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (param_3 == 0) {\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }" { (expression_statement "*(undefined4 *)(param_2 + 0x48) = 0xbeeb;" (assignment_expression "*(undefined4 *)(param_2 + 0x48) = 0xbeeb" (pointer_expression "*(undefined4 *)(param_2 + 0x48)" * (cast_expression "(undefined4 *)(param_2 + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x48)" ( (binary_expression "param_2 + 0x48" identifier + number_literal) )))) = number_literal) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void discard_until(undo *thisitem,openfilestruct *thefile,_Bool keep)\n\n{\n  undo_group *puVar1;\n  undefined *puVar2;\n  char *pcVar3;\n  undefined3 in_register_00000018;\n  undo_group *puVar4;\n  undo *puVar5;\n  \n  puVar5 = thefile->undotop;\n  while ((puVar2 = PTR_free_0007810c, puVar5 != (undo *)0x0 && (puVar5 != thisitem))) {\n    pcVar3 = puVar5->strdata;\n    thefile->undotop = puVar5->next;\n    (*(code *)puVar2)(pcVar3);\n    free_filestruct(puVar5->cutbuffer);\n    puVar1 = puVar5->grouping;\n    while (puVar1 != (undo_group *)0x0) {\n      puVar4 = puVar1->next;\n      free_chararray(puVar1->indentations,puVar1->bottom_line - puVar1->top_line);\n      (*(code *)PTR_free_0007810c)(puVar1);\n      puVar1 = puVar4;\n    }\n    (*(code *)PTR_free_0007810c)(puVar5);\n    puVar5 = thefile->undotop;\n  }\n  thefile->current_undo = thisitem;\n  thefile->last_action = OTHER;\n  if (CONCAT31(in_register_00000018,keep) == 0) {\n    thefile->last_saved = (undo *)0xbeeb;\n  }\n  return;\n}\n\n" (function_definition "void discard_until(undo *thisitem,openfilestruct *thefile,_Bool keep)\n\n{\n  undo_group *puVar1;\n  undefined *puVar2;\n  char *pcVar3;\n  undefined3 in_register_00000018;\n  undo_group *puVar4;\n  undo *puVar5;\n  \n  puVar5 = thefile->undotop;\n  while ((puVar2 = PTR_free_0007810c, puVar5 != (undo *)0x0 && (puVar5 != thisitem))) {\n    pcVar3 = puVar5->strdata;\n    thefile->undotop = puVar5->next;\n    (*(code *)puVar2)(pcVar3);\n    free_filestruct(puVar5->cutbuffer);\n    puVar1 = puVar5->grouping;\n    while (puVar1 != (undo_group *)0x0) {\n      puVar4 = puVar1->next;\n      free_chararray(puVar1->indentations,puVar1->bottom_line - puVar1->top_line);\n      (*(code *)PTR_free_0007810c)(puVar1);\n      puVar1 = puVar4;\n    }\n    (*(code *)PTR_free_0007810c)(puVar5);\n    puVar5 = thefile->undotop;\n  }\n  thefile->current_undo = thisitem;\n  thefile->last_action = OTHER;\n  if (CONCAT31(in_register_00000018,keep) == 0) {\n    thefile->last_saved = (undo *)0xbeeb;\n  }\n  return;\n}" primitive_type (function_declarator "discard_until(undo *thisitem,openfilestruct *thefile,_Bool keep)" identifier (parameter_list "(undo *thisitem,openfilestruct *thefile,_Bool keep)" ( (parameter_declaration "undo *thisitem" type_identifier (pointer_declarator "*thisitem" * identifier)) , (parameter_declaration "openfilestruct *thefile" type_identifier (pointer_declarator "*thefile" * identifier)) , (parameter_declaration "_Bool keep" type_identifier identifier) ))) (compound_statement "{\n  undo_group *puVar1;\n  undefined *puVar2;\n  char *pcVar3;\n  undefined3 in_register_00000018;\n  undo_group *puVar4;\n  undo *puVar5;\n  \n  puVar5 = thefile->undotop;\n  while ((puVar2 = PTR_free_0007810c, puVar5 != (undo *)0x0 && (puVar5 != thisitem))) {\n    pcVar3 = puVar5->strdata;\n    thefile->undotop = puVar5->next;\n    (*(code *)puVar2)(pcVar3);\n    free_filestruct(puVar5->cutbuffer);\n    puVar1 = puVar5->grouping;\n    while (puVar1 != (undo_group *)0x0) {\n      puVar4 = puVar1->next;\n      free_chararray(puVar1->indentations,puVar1->bottom_line - puVar1->top_line);\n      (*(code *)PTR_free_0007810c)(puVar1);\n      puVar1 = puVar4;\n    }\n    (*(code *)PTR_free_0007810c)(puVar5);\n    puVar5 = thefile->undotop;\n  }\n  thefile->current_undo = thisitem;\n  thefile->last_action = OTHER;\n  if (CONCAT31(in_register_00000018,keep) == 0) {\n    thefile->last_saved = (undo *)0xbeeb;\n  }\n  return;\n}" { (declaration "undo_group *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (declaration "undefined3 in_register_00000018;" type_identifier identifier ;) (declaration "undo_group *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "undo *puVar5;" type_identifier (pointer_declarator "*puVar5" * identifier) ;) (expression_statement "puVar5 = thefile->undotop;" (assignment_expression "puVar5 = thefile->undotop" identifier = (field_expression "thefile->undotop" identifier -> field_identifier)) ;) (while_statement "while ((puVar2 = PTR_free_0007810c, puVar5 != (undo *)0x0 && (puVar5 != thisitem))) {\n    pcVar3 = puVar5->strdata;\n    thefile->undotop = puVar5->next;\n    (*(code *)puVar2)(pcVar3);\n    free_filestruct(puVar5->cutbuffer);\n    puVar1 = puVar5->grouping;\n    while (puVar1 != (undo_group *)0x0) {\n      puVar4 = puVar1->next;\n      free_chararray(puVar1->indentations,puVar1->bottom_line - puVar1->top_line);\n      (*(code *)PTR_free_0007810c)(puVar1);\n      puVar1 = puVar4;\n    }\n    (*(code *)PTR_free_0007810c)(puVar5);\n    puVar5 = thefile->undotop;\n  }" while (parenthesized_expression "((puVar2 = PTR_free_0007810c, puVar5 != (undo *)0x0 && (puVar5 != thisitem)))" ( (parenthesized_expression "(puVar2 = PTR_free_0007810c, puVar5 != (undo *)0x0 && (puVar5 != thisitem))" ( (comma_expression "puVar2 = PTR_free_0007810c, puVar5 != (undo *)0x0 && (puVar5 != thisitem)" (assignment_expression "puVar2 = PTR_free_0007810c" identifier = identifier) , (binary_expression "puVar5 != (undo *)0x0 && (puVar5 != thisitem)" (binary_expression "puVar5 != (undo *)0x0" identifier != (cast_expression "(undo *)0x0" ( (type_descriptor "undo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) && (parenthesized_expression "(puVar5 != thisitem)" ( (binary_expression "puVar5 != thisitem" identifier != identifier) )))) )) )) (compound_statement "{\n    pcVar3 = puVar5->strdata;\n    thefile->undotop = puVar5->next;\n    (*(code *)puVar2)(pcVar3);\n    free_filestruct(puVar5->cutbuffer);\n    puVar1 = puVar5->grouping;\n    while (puVar1 != (undo_group *)0x0) {\n      puVar4 = puVar1->next;\n      free_chararray(puVar1->indentations,puVar1->bottom_line - puVar1->top_line);\n      (*(code *)PTR_free_0007810c)(puVar1);\n      puVar1 = puVar4;\n    }\n    (*(code *)PTR_free_0007810c)(puVar5);\n    puVar5 = thefile->undotop;\n  }" { (expression_statement "pcVar3 = puVar5->strdata;" (assignment_expression "pcVar3 = puVar5->strdata" identifier = (field_expression "puVar5->strdata" identifier -> field_identifier)) ;) (expression_statement "thefile->undotop = puVar5->next;" (assignment_expression "thefile->undotop = puVar5->next" (field_expression "thefile->undotop" identifier -> field_identifier) = (field_expression "puVar5->next" identifier -> field_identifier)) ;) (expression_statement "(*(code *)puVar2)(pcVar3);" (call_expression "(*(code *)puVar2)(pcVar3)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(pcVar3)" ( identifier ))) ;) (expression_statement "free_filestruct(puVar5->cutbuffer);" (call_expression "free_filestruct(puVar5->cutbuffer)" identifier (argument_list "(puVar5->cutbuffer)" ( (field_expression "puVar5->cutbuffer" identifier -> field_identifier) ))) ;) (expression_statement "puVar1 = puVar5->grouping;" (assignment_expression "puVar1 = puVar5->grouping" identifier = (field_expression "puVar5->grouping" identifier -> field_identifier)) ;) (while_statement "while (puVar1 != (undo_group *)0x0) {\n      puVar4 = puVar1->next;\n      free_chararray(puVar1->indentations,puVar1->bottom_line - puVar1->top_line);\n      (*(code *)PTR_free_0007810c)(puVar1);\n      puVar1 = puVar4;\n    }" while (parenthesized_expression "(puVar1 != (undo_group *)0x0)" ( (binary_expression "puVar1 != (undo_group *)0x0" identifier != (cast_expression "(undo_group *)0x0" ( (type_descriptor "undo_group *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      puVar4 = puVar1->next;\n      free_chararray(puVar1->indentations,puVar1->bottom_line - puVar1->top_line);\n      (*(code *)PTR_free_0007810c)(puVar1);\n      puVar1 = puVar4;\n    }" { (expression_statement "puVar4 = puVar1->next;" (assignment_expression "puVar4 = puVar1->next" identifier = (field_expression "puVar1->next" identifier -> field_identifier)) ;) (expression_statement "free_chararray(puVar1->indentations,puVar1->bottom_line - puVar1->top_line);" (call_expression "free_chararray(puVar1->indentations,puVar1->bottom_line - puVar1->top_line)" identifier (argument_list "(puVar1->indentations,puVar1->bottom_line - puVar1->top_line)" ( (field_expression "puVar1->indentations" identifier -> field_identifier) , (binary_expression "puVar1->bottom_line - puVar1->top_line" (field_expression "puVar1->bottom_line" identifier -> field_identifier) - (field_expression "puVar1->top_line" identifier -> field_identifier)) ))) ;) (expression_statement "(*(code *)PTR_free_0007810c)(puVar1);" (call_expression "(*(code *)PTR_free_0007810c)(puVar1)" (parenthesized_expression "(*(code *)PTR_free_0007810c)" ( (pointer_expression "*(code *)PTR_free_0007810c" * (cast_expression "(code *)PTR_free_0007810c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar1)" ( identifier ))) ;) (expression_statement "puVar1 = puVar4;" (assignment_expression "puVar1 = puVar4" identifier = identifier) ;) })) (expression_statement "(*(code *)PTR_free_0007810c)(puVar5);" (call_expression "(*(code *)PTR_free_0007810c)(puVar5)" (parenthesized_expression "(*(code *)PTR_free_0007810c)" ( (pointer_expression "*(code *)PTR_free_0007810c" * (cast_expression "(code *)PTR_free_0007810c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(puVar5)" ( identifier ))) ;) (expression_statement "puVar5 = thefile->undotop;" (assignment_expression "puVar5 = thefile->undotop" identifier = (field_expression "thefile->undotop" identifier -> field_identifier)) ;) })) (expression_statement "thefile->current_undo = thisitem;" (assignment_expression "thefile->current_undo = thisitem" (field_expression "thefile->current_undo" identifier -> field_identifier) = identifier) ;) (expression_statement "thefile->last_action = OTHER;" (assignment_expression "thefile->last_action = OTHER" (field_expression "thefile->last_action" identifier -> field_identifier) = identifier) ;) (if_statement "if (CONCAT31(in_register_00000018,keep) == 0) {\n    thefile->last_saved = (undo *)0xbeeb;\n  }" if (parenthesized_expression "(CONCAT31(in_register_00000018,keep) == 0)" ( (binary_expression "CONCAT31(in_register_00000018,keep) == 0" (call_expression "CONCAT31(in_register_00000018,keep)" identifier (argument_list "(in_register_00000018,keep)" ( identifier , identifier ))) == number_literal) )) (compound_statement "{\n    thefile->last_saved = (undo *)0xbeeb;\n  }" { (expression_statement "thefile->last_saved = (undo *)0xbeeb;" (assignment_expression "thefile->last_saved = (undo *)0xbeeb" (field_expression "thefile->last_saved" identifier -> field_identifier) = (cast_expression "(undo *)0xbeeb" ( (type_descriptor "undo *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })) (return_statement "return;" return ;) })))
(translation_unit "void discard_until(int param_1,int param_2,int param_3)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  \n  iVar5 = *(int *)(param_2 + 0x40);\n  while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }\n  *(int *)(param_2 + 0x44) = param_1;\n  *(undefined4 *)(param_2 + 0x4c) = 0x14;\n  if (param_3 == 0) {\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }\n  return;\n}\n\n" (function_definition "void discard_until(int param_1,int param_2,int param_3)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  \n  iVar5 = *(int *)(param_2 + 0x40);\n  while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }\n  *(int *)(param_2 + 0x44) = param_1;\n  *(undefined4 *)(param_2 + 0x4c) = 0x14;\n  if (param_3 == 0) {\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }\n  return;\n}" primitive_type (function_declarator "discard_until(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int *piVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  \n  iVar5 = *(int *)(param_2 + 0x40);\n  while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }\n  *(int *)(param_2 + 0x44) = param_1;\n  *(undefined4 *)(param_2 + 0x4c) = 0x14;\n  if (param_3 == 0) {\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }\n  return;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (expression_statement "iVar5 = *(int *)(param_2 + 0x40);" (assignment_expression "iVar5 = *(int *)(param_2 + 0x40)" identifier = (pointer_expression "*(int *)(param_2 + 0x40)" * (cast_expression "(int *)(param_2 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x40)" ( (binary_expression "param_2 + 0x40" identifier + number_literal) ))))) ;) (while_statement "while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }" while (parenthesized_expression "((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1)))" ( (parenthesized_expression "(puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))" ( (comma_expression "puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1)" (assignment_expression "puVar2 = PTR_free_0007810c" identifier = identifier) , (binary_expression "iVar5 != 0 && (iVar5 != param_1)" (binary_expression "iVar5 != 0" identifier != number_literal) && (parenthesized_expression "(iVar5 != param_1)" ( (binary_expression "iVar5 != param_1" identifier != identifier) )))) )) )) (compound_statement "{\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }" { (expression_statement "uVar3 = *(undefined4 *)(iVar5 + 0xc);" (assignment_expression "uVar3 = *(undefined4 *)(iVar5 + 0xc)" identifier = (pointer_expression "*(undefined4 *)(iVar5 + 0xc)" * (cast_expression "(undefined4 *)(iVar5 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0xc)" ( (binary_expression "iVar5 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "*(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);" (assignment_expression "*(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30)" (pointer_expression "*(undefined4 *)(param_2 + 0x40)" * (cast_expression "(undefined4 *)(param_2 + 0x40)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x40)" ( (binary_expression "param_2 + 0x40" identifier + number_literal) )))) = (pointer_expression "*(undefined4 *)(iVar5 + 0x30)" * (cast_expression "(undefined4 *)(iVar5 + 0x30)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x30)" ( (binary_expression "iVar5 + 0x30" identifier + number_literal) ))))) ;) (expression_statement "(*(code *)puVar2)(uVar3);" (call_expression "(*(code *)puVar2)(uVar3)" (parenthesized_expression "(*(code *)puVar2)" ( (pointer_expression "*(code *)puVar2" * (cast_expression "(code *)puVar2" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(uVar3)" ( identifier ))) ;) (expression_statement "free_filestruct(*(undefined4 *)(iVar5 + 0x20));" (call_expression "free_filestruct(*(undefined4 *)(iVar5 + 0x20))" identifier (argument_list "(*(undefined4 *)(iVar5 + 0x20))" ( (pointer_expression "*(undefined4 *)(iVar5 + 0x20)" * (cast_expression "(undefined4 *)(iVar5 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar5 + 0x20)" ( (binary_expression "iVar5 + 0x20" identifier + number_literal) )))) ))) ;) (expression_statement "piVar1 = *(int **)(iVar5 + 0x1c);" (assignment_expression "piVar1 = *(int **)(iVar5 + 0x1c)" identifier = (pointer_expression "*(int **)(iVar5 + 0x1c)" * (cast_expression "(int **)(iVar5 + 0x1c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar5 + 0x1c)" ( (binary_expression "iVar5 + 0x1c" identifier + number_literal) ))))) ;) (while_statement "while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }" while (parenthesized_expression "(piVar1 != (int *)0x0)" ( (binary_expression "piVar1 != (int *)0x0" identifier != (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }" { (expression_statement "piVar4 = (int *)piVar1[3];" (assignment_expression "piVar4 = (int *)piVar1[3]" identifier = (cast_expression "(int *)piVar1[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar1[3]" identifier [ number_literal ]))) ;) (expression_statement "free_chararray(piVar1[2],piVar1[1] - *piVar1);" (call_expression "free_chararray(piVar1[2],piVar1[1] - *piVar1)" identifier (argument_list "(piVar1[2],piVar1[1] - *piVar1)" ( (subscript_expression "piVar1[2]" identifier [ number_literal ]) , (binary_expression "piVar1[1] - *piVar1" (subscript_expression "piVar1[1]" identifier [ number_literal ]) - (pointer_expression "*piVar1" * identifier)) ))) ;) (expression_statement "(*(code *)PTR_free_0007810c)(piVar1);" (call_expression "(*(code *)PTR_free_0007810c)(piVar1)" (parenthesized_expression "(*(code *)PTR_free_0007810c)" ( (pointer_expression "*(code *)PTR_free_0007810c" * (cast_expression "(code *)PTR_free_0007810c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(piVar1)" ( identifier ))) ;) (expression_statement "piVar1 = piVar4;" (assignment_expression "piVar1 = piVar4" identifier = identifier) ;) })) (expression_statement "(*(code *)PTR_free_0007810c)(iVar5);" (call_expression "(*(code *)PTR_free_0007810c)(iVar5)" (parenthesized_expression "(*(code *)PTR_free_0007810c)" ( (pointer_expression "*(code *)PTR_free_0007810c" * (cast_expression "(code *)PTR_free_0007810c" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(iVar5)" ( identifier ))) ;) (expression_statement "iVar5 = *(int *)(param_2 + 0x40);" (assignment_expression "iVar5 = *(int *)(param_2 + 0x40)" identifier = (pointer_expression "*(int *)(param_2 + 0x40)" * (cast_expression "(int *)(param_2 + 0x40)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x40)" ( (binary_expression "param_2 + 0x40" identifier + number_literal) ))))) ;) })) (expression_statement "*(int *)(param_2 + 0x44) = param_1;" (assignment_expression "*(int *)(param_2 + 0x44) = param_1" (pointer_expression "*(int *)(param_2 + 0x44)" * (cast_expression "(int *)(param_2 + 0x44)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x44)" ( (binary_expression "param_2 + 0x44" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined4 *)(param_2 + 0x4c) = 0x14;" (assignment_expression "*(undefined4 *)(param_2 + 0x4c) = 0x14" (pointer_expression "*(undefined4 *)(param_2 + 0x4c)" * (cast_expression "(undefined4 *)(param_2 + 0x4c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x4c)" ( (binary_expression "param_2 + 0x4c" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (param_3 == 0) {\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }" { (expression_statement "*(undefined4 *)(param_2 + 0x48) = 0xbeeb;" (assignment_expression "*(undefined4 *)(param_2 + 0x48) = 0xbeeb" (pointer_expression "*(undefined4 *)(param_2 + 0x48)" * (cast_expression "(undefined4 *)(param_2 + 0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 0x48)" ( (binary_expression "param_2 + 0x48" identifier + number_literal) )))) = number_literal) ;) })) (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 (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (while_statement while (parenthesized_expression ( (parenthesized_expression ( (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression (binary_expression IDENT != LIT) && (parenthesized_expression ( (binary_expression IDENT != IDENT) )))) )) )) (compound_statement { (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 * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( (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 * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (while_statement while (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (expression_statement (call_expression IDENT (argument_list ( (subscript_expression IDENT [ LIT ]) , (binary_expression (subscript_expression IDENT [ LIT ]) - (pointer_expression * IDENT)) ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT ))) ;) (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 * (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 *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (return_statement return ;) })))
(function_definition "void discard_until(int param_1,int param_2,int param_3)\n\n{\n  int *piVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  \n  iVar5 = *(int *)(param_2 + 0x40);\n  while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }\n  *(int *)(param_2 + 0x44) = param_1;\n  *(undefined4 *)(param_2 + 0x4c) = 0x14;\n  if (param_3 == 0) {\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "discard_until(int param_1,int param_2,int param_3)" (identifier "discard_until") (parameter_list "(int param_1,int param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int *piVar1;\n  undefined *puVar2;\n  undefined4 uVar3;\n  int *piVar4;\n  int iVar5;\n  \n  iVar5 = *(int *)(param_2 + 0x40);\n  while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }\n  *(int *)(param_2 + 0x44) = param_1;\n  *(undefined4 *)(param_2 + 0x4c) = 0x14;\n  if (param_3 == 0) {\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }\n  return;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int *piVar4;" (primitive_type "int") (pointer_declarator "*piVar4" (* "*") (identifier "piVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (expression_statement "iVar5 = *(int *)(param_2 + 0x40);" (assignment_expression "iVar5 = *(int *)(param_2 + 0x40)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(param_2 + 0x40)" (* "*") (cast_expression "(int *)(param_2 + 0x40)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x40)" (( "(") (binary_expression "param_2 + 0x40" (identifier "param_2") (+ "+") (number_literal "0x40")) () ")"))))) (; ";")) (while_statement "while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }" (while "while") (parenthesized_expression "((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1)))" (( "(") (parenthesized_expression "(puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))" (( "(") (comma_expression "puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1)" (assignment_expression "puVar2 = PTR_free_0007810c" (identifier "puVar2") (= "=") (identifier "PTR_free_0007810c")) (, ",") (binary_expression "iVar5 != 0 && (iVar5 != param_1)" (binary_expression "iVar5 != 0" (identifier "iVar5") (!= "!=") (number_literal "0")) (&& "&&") (parenthesized_expression "(iVar5 != param_1)" (( "(") (binary_expression "iVar5 != param_1" (identifier "iVar5") (!= "!=") (identifier "param_1")) () ")")))) () ")")) () ")")) (compound_statement "{\n    uVar3 = *(undefined4 *)(iVar5 + 0xc);\n    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);\n    (*(code *)puVar2)(uVar3);\n    free_filestruct(*(undefined4 *)(iVar5 + 0x20));\n    piVar1 = *(int **)(iVar5 + 0x1c);\n    while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }\n    (*(code *)PTR_free_0007810c)(iVar5);\n    iVar5 = *(int *)(param_2 + 0x40);\n  }" ({ "{") (expression_statement "uVar3 = *(undefined4 *)(iVar5 + 0xc);" (assignment_expression "uVar3 = *(undefined4 *)(iVar5 + 0xc)" (identifier "uVar3") (= "=") (pointer_expression "*(undefined4 *)(iVar5 + 0xc)" (* "*") (cast_expression "(undefined4 *)(iVar5 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0xc)" (( "(") (binary_expression "iVar5 + 0xc" (identifier "iVar5") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "*(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);" (assignment_expression "*(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30)" (pointer_expression "*(undefined4 *)(param_2 + 0x40)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0x40)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x40)" (( "(") (binary_expression "param_2 + 0x40" (identifier "param_2") (+ "+") (number_literal "0x40")) () ")")))) (= "=") (pointer_expression "*(undefined4 *)(iVar5 + 0x30)" (* "*") (cast_expression "(undefined4 *)(iVar5 + 0x30)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x30)" (( "(") (binary_expression "iVar5 + 0x30" (identifier "iVar5") (+ "+") (number_literal "0x30")) () ")"))))) (; ";")) (expression_statement "(*(code *)puVar2)(uVar3);" (call_expression "(*(code *)puVar2)(uVar3)" (parenthesized_expression "(*(code *)puVar2)" (( "(") (pointer_expression "*(code *)puVar2" (* "*") (cast_expression "(code *)puVar2" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2"))) () ")")) (argument_list "(uVar3)" (( "(") (identifier "uVar3") () ")"))) (; ";")) (expression_statement "free_filestruct(*(undefined4 *)(iVar5 + 0x20));" (call_expression "free_filestruct(*(undefined4 *)(iVar5 + 0x20))" (identifier "free_filestruct") (argument_list "(*(undefined4 *)(iVar5 + 0x20))" (( "(") (pointer_expression "*(undefined4 *)(iVar5 + 0x20)" (* "*") (cast_expression "(undefined4 *)(iVar5 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar5 + 0x20)" (( "(") (binary_expression "iVar5 + 0x20" (identifier "iVar5") (+ "+") (number_literal "0x20")) () ")")))) () ")"))) (; ";")) (expression_statement "piVar1 = *(int **)(iVar5 + 0x1c);" (assignment_expression "piVar1 = *(int **)(iVar5 + 0x1c)" (identifier "piVar1") (= "=") (pointer_expression "*(int **)(iVar5 + 0x1c)" (* "*") (cast_expression "(int **)(iVar5 + 0x1c)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar5 + 0x1c)" (( "(") (binary_expression "iVar5 + 0x1c" (identifier "iVar5") (+ "+") (number_literal "0x1c")) () ")"))))) (; ";")) (while_statement "while (piVar1 != (int *)0x0) {\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }" (while "while") (parenthesized_expression "(piVar1 != (int *)0x0)" (( "(") (binary_expression "piVar1 != (int *)0x0" (identifier "piVar1") (!= "!=") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      piVar4 = (int *)piVar1[3];\n      free_chararray(piVar1[2],piVar1[1] - *piVar1);\n      (*(code *)PTR_free_0007810c)(piVar1);\n      piVar1 = piVar4;\n    }" ({ "{") (expression_statement "piVar4 = (int *)piVar1[3];" (assignment_expression "piVar4 = (int *)piVar1[3]" (identifier "piVar4") (= "=") (cast_expression "(int *)piVar1[3]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar1[3]" (identifier "piVar1") ([ "[") (number_literal "3") (] "]")))) (; ";")) (expression_statement "free_chararray(piVar1[2],piVar1[1] - *piVar1);" (call_expression "free_chararray(piVar1[2],piVar1[1] - *piVar1)" (identifier "free_chararray") (argument_list "(piVar1[2],piVar1[1] - *piVar1)" (( "(") (subscript_expression "piVar1[2]" (identifier "piVar1") ([ "[") (number_literal "2") (] "]")) (, ",") (binary_expression "piVar1[1] - *piVar1" (subscript_expression "piVar1[1]" (identifier "piVar1") ([ "[") (number_literal "1") (] "]")) (- "-") (pointer_expression "*piVar1" (* "*") (identifier "piVar1"))) () ")"))) (; ";")) (expression_statement "(*(code *)PTR_free_0007810c)(piVar1);" (call_expression "(*(code *)PTR_free_0007810c)(piVar1)" (parenthesized_expression "(*(code *)PTR_free_0007810c)" (( "(") (pointer_expression "*(code *)PTR_free_0007810c" (* "*") (cast_expression "(code *)PTR_free_0007810c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_0007810c"))) () ")")) (argument_list "(piVar1)" (( "(") (identifier "piVar1") () ")"))) (; ";")) (expression_statement "piVar1 = piVar4;" (assignment_expression "piVar1 = piVar4" (identifier "piVar1") (= "=") (identifier "piVar4")) (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_free_0007810c)(iVar5);" (call_expression "(*(code *)PTR_free_0007810c)(iVar5)" (parenthesized_expression "(*(code *)PTR_free_0007810c)" (( "(") (pointer_expression "*(code *)PTR_free_0007810c" (* "*") (cast_expression "(code *)PTR_free_0007810c" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_free_0007810c"))) () ")")) (argument_list "(iVar5)" (( "(") (identifier "iVar5") () ")"))) (; ";")) (expression_statement "iVar5 = *(int *)(param_2 + 0x40);" (assignment_expression "iVar5 = *(int *)(param_2 + 0x40)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(param_2 + 0x40)" (* "*") (cast_expression "(int *)(param_2 + 0x40)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x40)" (( "(") (binary_expression "param_2 + 0x40" (identifier "param_2") (+ "+") (number_literal "0x40")) () ")"))))) (; ";")) (} "}"))) (expression_statement "*(int *)(param_2 + 0x44) = param_1;" (assignment_expression "*(int *)(param_2 + 0x44) = param_1" (pointer_expression "*(int *)(param_2 + 0x44)" (* "*") (cast_expression "(int *)(param_2 + 0x44)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x44)" (( "(") (binary_expression "param_2 + 0x44" (identifier "param_2") (+ "+") (number_literal "0x44")) () ")")))) (= "=") (identifier "param_1")) (; ";")) (expression_statement "*(undefined4 *)(param_2 + 0x4c) = 0x14;" (assignment_expression "*(undefined4 *)(param_2 + 0x4c) = 0x14" (pointer_expression "*(undefined4 *)(param_2 + 0x4c)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0x4c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x4c)" (( "(") (binary_expression "param_2 + 0x4c" (identifier "param_2") (+ "+") (number_literal "0x4c")) () ")")))) (= "=") (number_literal "0x14")) (; ";")) (if_statement "if (param_3 == 0) {\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;\n  }" ({ "{") (expression_statement "*(undefined4 *)(param_2 + 0x48) = 0xbeeb;" (assignment_expression "*(undefined4 *)(param_2 + 0x48) = 0xbeeb" (pointer_expression "*(undefined4 *)(param_2 + 0x48)" (* "*") (cast_expression "(undefined4 *)(param_2 + 0x48)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_2 + 0x48)" (( "(") (binary_expression "param_2 + 0x48" (identifier "param_2") (+ "+") (number_literal "0x48")) () ")")))) (= "=") (number_literal "0xbeeb")) (; ";")) (} "}"))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(type_1 *var_2,type_2 *thefile,type_3 keep)

{
  type_4 *var_4;
  type_5 *puVar2;
  char *pcVar3;
  type_6 in_register_00000018;
  type_4 *puVar4;
  type_1 *var_1;
  
  var_1 = thefile->undotop;
  while ((puVar2 = PTR_free_0007810c, var_1 != (type_1 *)0x0 && (var_1 != var_2))) {
    pcVar3 = var_1->strdata;
    thefile->undotop = var_1->next;
    (*(type_7 *)puVar2)(pcVar3);
    var_3(var_1->cutbuffer);
    var_4 = var_1->grouping;
    while (var_4 != (type_4 *)0x0) {
      puVar4 = var_4->next;
      var_5(var_4->indentations,var_4->bottom_line - var_4->top_line);
      (*(type_7 *)PTR_free_0007810c)(var_4);
      var_4 = puVar4;
    }
    (*(type_7 *)PTR_free_0007810c)(var_1);
    var_1 = thefile->undotop;
  }
  thefile->current_undo = var_2;
  thefile->last_action = OTHER;
  if (var_6(in_register_00000018,keep) == 0) {
    thefile->last_saved = (type_1 *)0xbeeb;
  }
  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: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (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))))))) (while_statement condition: (parenthesized_expression (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (identifier)) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))) body: (compound_statement (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: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) 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 (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (expression_statement (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)))))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (subscript_expression argument: (identifier) index: (number_literal)) (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (pointer_expression argument: (identifier)))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier)))) (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: (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)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (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))))) (return_statement))))

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

{
  int *piVar1;
  undefined *puVar2;
  undefined4 uVar3;
  int *piVar4;
  int iVar5;
  
  iVar5 = *(int *)(param_2 + 0x40);
  while ((puVar2 = PTR_free_0007810c, iVar5 != 0 && (iVar5 != param_1))) {
    uVar3 = *(undefined4 *)(iVar5 + 0xc);
    *(undefined4 *)(param_2 + 0x40) = *(undefined4 *)(iVar5 + 0x30);
    (*(code *)puVar2)(uVar3);
    free_filestruct(*(undefined4 *)(iVar5 + 0x20));
    piVar1 = *(int **)(iVar5 + 0x1c);
    while (piVar1 != (int *)0x0) {
      piVar4 = (int *)piVar1[3];
      free_chararray(piVar1[2],piVar1[1] - *piVar1);
      (*(code *)PTR_free_0007810c)(piVar1);
      piVar1 = piVar4;
    }
    (*(code *)PTR_free_0007810c)(iVar5);
    iVar5 = *(int *)(param_2 + 0x40);
  }
  *(int *)(param_2 + 0x44) = param_1;
  *(undefined4 *)(param_2 + 0x4c) = 0x14;
  if (param_3 == 0) {
    *(undefined4 *)(param_2 + 0x48) = 0xbeeb;
  }
  return;
}

