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

void term_clrsb(Terminal *term)

{
  void *ptr;
  termline *line;
  int y;
  
  term->disptop = 0;
  ptr = delpos234(term->scrollback,0);
  if (ptr == (void *)0x0) {
    y = 0;
    if (0 < term->rows) {
      do {
        line = lineptr(term,y,0x63b,1);
        check_line_size(term,line);
        y = y + 1;
      } while (y < term->rows);
    }
    term->tempsblines = 0;
    term->alt_sblines = 0;
    update_sbar(term);
    return;
  }
                    /* WARNING: Subroutine does not return */
  safefree(ptr);
}



void term_clrsb(int param_1)

{
  int iVar1;
  undefined4 uVar2;
  
  *(undefined4 *)(param_1 + 0x10) = 0;
  while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {
    safefree(iVar1);
  }
  iVar1 = 0;
  if (0 < *(int *)(param_1 + 0x128)) {
    do {
      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);
      FUN_00049614(param_1,uVar2);
      iVar1 = iVar1 + 1;
    } while (iVar1 < *(int *)(param_1 + 0x128));
  }
  *(undefined4 *)(param_1 + 0x14) = 0;
  *(undefined4 *)(param_1 + 0x1a8) = 0;
  FUN_00048000(param_1);
  return;
}


lui gp,0x7
addiu gp,gp,0x73f8
addu gp,gp,t9
addiu sp,sp,-0x30
sw ra,0x2c(sp)
sw s3,0x28(sp)
sw s2,0x24(sp)
sw s1,0x20(sp)
sw s0,0x1c(sp)
sw gp,0x10(sp)
or s0,a0,zero
sw zero,0x10(a0)
or a1,zero,zero
lw a0,0x4(s0)
lw t9,-0x7f0c(gp)
bal 0x00058530
_nop
lw gp,0x10(sp)
beq v0,zero,0x0004de40
_or a0,v0,zero
lw t9,-0x7fac(gp)
bal 0x00037d68
_nop
lw gp,0x10(sp)
b 0x0004de0c
_or a1,zero,zero
lw v0,0x128(s0)
blez v0,0x0004dea8
_or s1,zero,zero
lw s3,-0x7bb0(gp)
addiu s3,s3,-0x69a0
lw s2,-0x7bb0(gp)
addiu s2,s2,-0x69ec
li a3,0x1
li a2,0x63b
or a1,s1,zero
or a0,s0,zero
or t9,s3,zero
bal 0x00049660
_nop
lw gp,0x10(sp)
or a1,v0,zero
or a0,s0,zero
or t9,s2,zero
bal 0x00049614
_nop
lw gp,0x10(sp)
addiu s1,s1,0x1
lw v0,0x128(s0)
slt v0,s1,v0
bne v0,zero,0x0004de60
_li a3,0x1
sw zero,0x14(s0)
sw zero,0x1a8(s0)
or a0,s0,zero
lw t9,-0x7bb0(gp)
addiu t9,t9,-0x8000
bal 0x00048000
_nop
lw gp,0x10(sp)
lw ra,0x2c(sp)
lw s3,0x28(sp)
lw s2,0x24(sp)
lw s1,0x20(sp)
lw s0,0x1c(sp)
jr ra
_addiu sp,sp,0x30
(translation_unit "void term_clrsb(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  *(undefined4 *)(param_1 + 0x10) = 0;\n  while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {\n    safefree(iVar1);\n  }\n  iVar1 = 0;\n  if (0 < *(int *)(param_1 + 0x128)) {\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0x1a8) = 0;\n  FUN_00048000(param_1);\n  return;\n}\n\n" (function_definition "void term_clrsb(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  *(undefined4 *)(param_1 + 0x10) = 0;\n  while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {\n    safefree(iVar1);\n  }\n  iVar1 = 0;\n  if (0 < *(int *)(param_1 + 0x128)) {\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0x1a8) = 0;\n  FUN_00048000(param_1);\n  return;\n}" primitive_type (function_declarator "term_clrsb(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  *(undefined4 *)(param_1 + 0x10) = 0;\n  while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {\n    safefree(iVar1);\n  }\n  iVar1 = 0;\n  if (0 < *(int *)(param_1 + 0x128)) {\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0x1a8) = 0;\n  FUN_00048000(param_1);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "*(undefined4 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (while_statement "while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {\n    safefree(iVar1);\n  }" while (parenthesized_expression "(iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0)" ( (comma_expression "iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0" (assignment_expression "iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0)" identifier = (call_expression "delpos234(*(undefined4 *)(param_1 + 4),0)" identifier (argument_list "(*(undefined4 *)(param_1 + 4),0)" ( (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) , number_literal )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) )) (compound_statement "{\n    safefree(iVar1);\n  }" { (expression_statement "safefree(iVar1);" (call_expression "safefree(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) })) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (if_statement "if (0 < *(int *)(param_1 + 0x128)) {\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }" if (parenthesized_expression "(0 < *(int *)(param_1 + 0x128))" ( (binary_expression "0 < *(int *)(param_1 + 0x128)" number_literal < (pointer_expression "*(int *)(param_1 + 0x128)" * (cast_expression "(int *)(param_1 + 0x128)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x128)" ( (binary_expression "param_1 + 0x128" identifier + number_literal) ))))) )) (compound_statement "{\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }" { (do_statement "do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));" do (compound_statement "{\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    }" { (expression_statement "uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);" (assignment_expression "uVar2 = FUN_00049660(param_1,iVar1,0x63b,1)" identifier = (call_expression "FUN_00049660(param_1,iVar1,0x63b,1)" identifier (argument_list "(param_1,iVar1,0x63b,1)" ( identifier , identifier , number_literal , number_literal )))) ;) (expression_statement "FUN_00049614(param_1,uVar2);" (call_expression "FUN_00049614(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar1 < *(int *)(param_1 + 0x128))" ( (binary_expression "iVar1 < *(int *)(param_1 + 0x128)" identifier < (pointer_expression "*(int *)(param_1 + 0x128)" * (cast_expression "(int *)(param_1 + 0x128)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x128)" ( (binary_expression "param_1 + 0x128" identifier + number_literal) ))))) )) ;) })) (expression_statement "*(undefined4 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x1a8) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1a8) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1a8)" * (cast_expression "(undefined4 *)(param_1 + 0x1a8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1a8)" ( (binary_expression "param_1 + 0x1a8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_00048000(param_1);" (call_expression "FUN_00048000(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid term_clrsb(Terminal *term)\n\n{\n  void *ptr;\n  termline *line;\n  int y;\n  \n  term->disptop = 0;\n  ptr = delpos234(term->scrollback,0);\n  if (ptr == (void *)0x0) {\n    y = 0;\n    if (0 < term->rows) {\n      do {\n        line = lineptr(term,y,0x63b,1);\n        check_line_size(term,line);\n        y = y + 1;\n      } while (y < term->rows);\n    }\n    term->tempsblines = 0;\n    term->alt_sblines = 0;\n    update_sbar(term);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  safefree(ptr);\n}\n\n" comment (function_definition "void term_clrsb(Terminal *term)\n\n{\n  void *ptr;\n  termline *line;\n  int y;\n  \n  term->disptop = 0;\n  ptr = delpos234(term->scrollback,0);\n  if (ptr == (void *)0x0) {\n    y = 0;\n    if (0 < term->rows) {\n      do {\n        line = lineptr(term,y,0x63b,1);\n        check_line_size(term,line);\n        y = y + 1;\n      } while (y < term->rows);\n    }\n    term->tempsblines = 0;\n    term->alt_sblines = 0;\n    update_sbar(term);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  safefree(ptr);\n}" primitive_type (function_declarator "term_clrsb(Terminal *term)" identifier (parameter_list "(Terminal *term)" ( (parameter_declaration "Terminal *term" type_identifier (pointer_declarator "*term" * identifier)) ))) (compound_statement "{\n  void *ptr;\n  termline *line;\n  int y;\n  \n  term->disptop = 0;\n  ptr = delpos234(term->scrollback,0);\n  if (ptr == (void *)0x0) {\n    y = 0;\n    if (0 < term->rows) {\n      do {\n        line = lineptr(term,y,0x63b,1);\n        check_line_size(term,line);\n        y = y + 1;\n      } while (y < term->rows);\n    }\n    term->tempsblines = 0;\n    term->alt_sblines = 0;\n    update_sbar(term);\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  safefree(ptr);\n}" { (declaration "void *ptr;" primitive_type (pointer_declarator "*ptr" * identifier) ;) (declaration "termline *line;" type_identifier (pointer_declarator "*line" * identifier) ;) (declaration "int y;" primitive_type identifier ;) (expression_statement "term->disptop = 0;" (assignment_expression "term->disptop = 0" (field_expression "term->disptop" identifier -> field_identifier) = number_literal) ;) (expression_statement "ptr = delpos234(term->scrollback,0);" (assignment_expression "ptr = delpos234(term->scrollback,0)" identifier = (call_expression "delpos234(term->scrollback,0)" identifier (argument_list "(term->scrollback,0)" ( (field_expression "term->scrollback" identifier -> field_identifier) , number_literal )))) ;) (if_statement "if (ptr == (void *)0x0) {\n    y = 0;\n    if (0 < term->rows) {\n      do {\n        line = lineptr(term,y,0x63b,1);\n        check_line_size(term,line);\n        y = y + 1;\n      } while (y < term->rows);\n    }\n    term->tempsblines = 0;\n    term->alt_sblines = 0;\n    update_sbar(term);\n    return;\n  }" if (parenthesized_expression "(ptr == (void *)0x0)" ( (binary_expression "ptr == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    y = 0;\n    if (0 < term->rows) {\n      do {\n        line = lineptr(term,y,0x63b,1);\n        check_line_size(term,line);\n        y = y + 1;\n      } while (y < term->rows);\n    }\n    term->tempsblines = 0;\n    term->alt_sblines = 0;\n    update_sbar(term);\n    return;\n  }" { (expression_statement "y = 0;" (assignment_expression "y = 0" identifier = number_literal) ;) (if_statement "if (0 < term->rows) {\n      do {\n        line = lineptr(term,y,0x63b,1);\n        check_line_size(term,line);\n        y = y + 1;\n      } while (y < term->rows);\n    }" if (parenthesized_expression "(0 < term->rows)" ( (binary_expression "0 < term->rows" number_literal < (field_expression "term->rows" identifier -> field_identifier)) )) (compound_statement "{\n      do {\n        line = lineptr(term,y,0x63b,1);\n        check_line_size(term,line);\n        y = y + 1;\n      } while (y < term->rows);\n    }" { (do_statement "do {\n        line = lineptr(term,y,0x63b,1);\n        check_line_size(term,line);\n        y = y + 1;\n      } while (y < term->rows);" do (compound_statement "{\n        line = lineptr(term,y,0x63b,1);\n        check_line_size(term,line);\n        y = y + 1;\n      }" { (expression_statement "line = lineptr(term,y,0x63b,1);" (assignment_expression "line = lineptr(term,y,0x63b,1)" identifier = (call_expression "lineptr(term,y,0x63b,1)" identifier (argument_list "(term,y,0x63b,1)" ( identifier , identifier , number_literal , number_literal )))) ;) (expression_statement "check_line_size(term,line);" (call_expression "check_line_size(term,line)" identifier (argument_list "(term,line)" ( identifier , identifier ))) ;) (expression_statement "y = y + 1;" (assignment_expression "y = y + 1" identifier = (binary_expression "y + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(y < term->rows)" ( (binary_expression "y < term->rows" identifier < (field_expression "term->rows" identifier -> field_identifier)) )) ;) })) (expression_statement "term->tempsblines = 0;" (assignment_expression "term->tempsblines = 0" (field_expression "term->tempsblines" identifier -> field_identifier) = number_literal) ;) (expression_statement "term->alt_sblines = 0;" (assignment_expression "term->alt_sblines = 0" (field_expression "term->alt_sblines" identifier -> field_identifier) = number_literal) ;) (expression_statement "update_sbar(term);" (call_expression "update_sbar(term)" identifier (argument_list "(term)" ( identifier ))) ;) (return_statement "return;" return ;) })) comment (expression_statement "safefree(ptr);" (call_expression "safefree(ptr)" identifier (argument_list "(ptr)" ( identifier ))) ;) })))
(translation_unit "void term_clrsb(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  *(undefined4 *)(param_1 + 0x10) = 0;\n  while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {\n    safefree(iVar1);\n  }\n  iVar1 = 0;\n  if (0 < *(int *)(param_1 + 0x128)) {\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0x1a8) = 0;\n  FUN_00048000(param_1);\n  return;\n}\n\n" (function_definition "void term_clrsb(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  *(undefined4 *)(param_1 + 0x10) = 0;\n  while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {\n    safefree(iVar1);\n  }\n  iVar1 = 0;\n  if (0 < *(int *)(param_1 + 0x128)) {\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0x1a8) = 0;\n  FUN_00048000(param_1);\n  return;\n}" primitive_type (function_declarator "term_clrsb(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  *(undefined4 *)(param_1 + 0x10) = 0;\n  while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {\n    safefree(iVar1);\n  }\n  iVar1 = 0;\n  if (0 < *(int *)(param_1 + 0x128)) {\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0x1a8) = 0;\n  FUN_00048000(param_1);\n  return;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (expression_statement "*(undefined4 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (while_statement "while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {\n    safefree(iVar1);\n  }" while (parenthesized_expression "(iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0)" ( (comma_expression "iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0" (assignment_expression "iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0)" identifier = (call_expression "delpos234(*(undefined4 *)(param_1 + 4),0)" identifier (argument_list "(*(undefined4 *)(param_1 + 4),0)" ( (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) , number_literal )))) , (binary_expression "iVar1 != 0" identifier != number_literal)) )) (compound_statement "{\n    safefree(iVar1);\n  }" { (expression_statement "safefree(iVar1);" (call_expression "safefree(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) })) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" identifier = number_literal) ;) (if_statement "if (0 < *(int *)(param_1 + 0x128)) {\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }" if (parenthesized_expression "(0 < *(int *)(param_1 + 0x128))" ( (binary_expression "0 < *(int *)(param_1 + 0x128)" number_literal < (pointer_expression "*(int *)(param_1 + 0x128)" * (cast_expression "(int *)(param_1 + 0x128)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x128)" ( (binary_expression "param_1 + 0x128" identifier + number_literal) ))))) )) (compound_statement "{\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }" { (do_statement "do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));" do (compound_statement "{\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    }" { (expression_statement "uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);" (assignment_expression "uVar2 = FUN_00049660(param_1,iVar1,0x63b,1)" identifier = (call_expression "FUN_00049660(param_1,iVar1,0x63b,1)" identifier (argument_list "(param_1,iVar1,0x63b,1)" ( identifier , identifier , number_literal , number_literal )))) ;) (expression_statement "FUN_00049614(param_1,uVar2);" (call_expression "FUN_00049614(param_1,uVar2)" identifier (argument_list "(param_1,uVar2)" ( identifier , identifier ))) ;) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" identifier = (binary_expression "iVar1 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(iVar1 < *(int *)(param_1 + 0x128))" ( (binary_expression "iVar1 < *(int *)(param_1 + 0x128)" identifier < (pointer_expression "*(int *)(param_1 + 0x128)" * (cast_expression "(int *)(param_1 + 0x128)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x128)" ( (binary_expression "param_1 + 0x128" identifier + number_literal) ))))) )) ;) })) (expression_statement "*(undefined4 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x1a8) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1a8) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1a8)" * (cast_expression "(undefined4 *)(param_1 + 0x1a8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1a8)" ( (binary_expression "param_1 + 0x1a8" identifier + number_literal) )))) = number_literal) ;) (expression_statement "FUN_00048000(param_1);" (call_expression "FUN_00048000(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (while_statement while (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT )))) , (binary_expression IDENT != LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_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) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void term_clrsb(int param_1)\n\n{\n  int iVar1;\n  undefined4 uVar2;\n  \n  *(undefined4 *)(param_1 + 0x10) = 0;\n  while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {\n    safefree(iVar1);\n  }\n  iVar1 = 0;\n  if (0 < *(int *)(param_1 + 0x128)) {\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0x1a8) = 0;\n  FUN_00048000(param_1);\n  return;\n}" (primitive_type "void") (function_declarator "term_clrsb(int param_1)" (identifier "term_clrsb") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  undefined4 uVar2;\n  \n  *(undefined4 *)(param_1 + 0x10) = 0;\n  while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {\n    safefree(iVar1);\n  }\n  iVar1 = 0;\n  if (0 < *(int *)(param_1 + 0x128)) {\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }\n  *(undefined4 *)(param_1 + 0x14) = 0;\n  *(undefined4 *)(param_1 + 0x1a8) = 0;\n  FUN_00048000(param_1);\n  return;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (while_statement "while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {\n    safefree(iVar1);\n  }" (while "while") (parenthesized_expression "(iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0)" (( "(") (comma_expression "iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0" (assignment_expression "iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0)" (identifier "iVar1") (= "=") (call_expression "delpos234(*(undefined4 *)(param_1 + 4),0)" (identifier "delpos234") (argument_list "(*(undefined4 *)(param_1 + 4),0)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (, ",") (number_literal "0") () ")")))) (, ",") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0"))) () ")")) (compound_statement "{\n    safefree(iVar1);\n  }" ({ "{") (expression_statement "safefree(iVar1);" (call_expression "safefree(iVar1)" (identifier "safefree") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar1 = 0;" (assignment_expression "iVar1 = 0" (identifier "iVar1") (= "=") (number_literal "0")) (; ";")) (if_statement "if (0 < *(int *)(param_1 + 0x128)) {\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }" (if "if") (parenthesized_expression "(0 < *(int *)(param_1 + 0x128))" (( "(") (binary_expression "0 < *(int *)(param_1 + 0x128)" (number_literal "0") (< "<") (pointer_expression "*(int *)(param_1 + 0x128)" (* "*") (cast_expression "(int *)(param_1 + 0x128)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x128)" (( "(") (binary_expression "param_1 + 0x128" (identifier "param_1") (+ "+") (number_literal "0x128")) () ")"))))) () ")")) (compound_statement "{\n    do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));\n  }" ({ "{") (do_statement "do {\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    } while (iVar1 < *(int *)(param_1 + 0x128));" (do "do") (compound_statement "{\n      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);\n      FUN_00049614(param_1,uVar2);\n      iVar1 = iVar1 + 1;\n    }" ({ "{") (expression_statement "uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);" (assignment_expression "uVar2 = FUN_00049660(param_1,iVar1,0x63b,1)" (identifier "uVar2") (= "=") (call_expression "FUN_00049660(param_1,iVar1,0x63b,1)" (identifier "FUN_00049660") (argument_list "(param_1,iVar1,0x63b,1)" (( "(") (identifier "param_1") (, ",") (identifier "iVar1") (, ",") (number_literal "0x63b") (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "FUN_00049614(param_1,uVar2);" (call_expression "FUN_00049614(param_1,uVar2)" (identifier "FUN_00049614") (argument_list "(param_1,uVar2)" (( "(") (identifier "param_1") (, ",") (identifier "uVar2") () ")"))) (; ";")) (expression_statement "iVar1 = iVar1 + 1;" (assignment_expression "iVar1 = iVar1 + 1" (identifier "iVar1") (= "=") (binary_expression "iVar1 + 1" (identifier "iVar1") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(iVar1 < *(int *)(param_1 + 0x128))" (( "(") (binary_expression "iVar1 < *(int *)(param_1 + 0x128)" (identifier "iVar1") (< "<") (pointer_expression "*(int *)(param_1 + 0x128)" (* "*") (cast_expression "(int *)(param_1 + 0x128)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x128)" (( "(") (binary_expression "param_1 + 0x128" (identifier "param_1") (+ "+") (number_literal "0x128")) () ")"))))) () ")")) (; ";")) (} "}"))) (expression_statement "*(undefined4 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x1a8) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x1a8) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x1a8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x1a8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1a8)" (( "(") (binary_expression "param_1 + 0x1a8" (identifier "param_1") (+ "+") (number_literal "0x1a8")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "FUN_00048000(param_1);" (call_expression "FUN_00048000(param_1)" (identifier "FUN_00048000") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 *term)

{
  void *var_2;
  type_2 *line;
  int var_5;
  
  term->disptop = 0;
  var_2 = var_1(term->scrollback,0);
  if (var_2 == (void *)0x0) {
    var_5 = 0;
    if (0 < term->rows) {
      do {
        line = var_3(term,var_5,0x63b,1);
        var_4(term,line);
        var_5 = var_5 + 1;
      } while (var_5 < term->rows);
    }
    term->tempsblines = 0;
    term->alt_sblines = 0;
    var_6(term);
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_7(var_2);
}


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

void MASKED(int param_1)

{
  int iVar1;
  undefined4 uVar2;
  
  *(undefined4 *)(param_1 + 0x10) = 0;
  while (iVar1 = delpos234(*(undefined4 *)(param_1 + 4),0), iVar1 != 0) {
    safefree(iVar1);
  }
  iVar1 = 0;
  if (0 < *(int *)(param_1 + 0x128)) {
    do {
      uVar2 = FUN_00049660(param_1,iVar1,0x63b,1);
      FUN_00049614(param_1,uVar2);
      iVar1 = iVar1 + 1;
    } while (iVar1 < *(int *)(param_1 + 0x128));
  }
  *(undefined4 *)(param_1 + 0x14) = 0;
  *(undefined4 *)(param_1 + 0x1a8) = 0;
  FUN_00048000(param_1);
  return;
}

