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

void erase_lots(Terminal *term,int line_only,int from_begin,int to_end)

{
  bool bVar1;
  bool bVar2;
  bool bVar3;
  pos from;
  pos to;
  termline *ptVar4;
  int iVar5;
  int iVar6;
  int iVar7;
  int iVar8;
  int in_stack_ffffffb4;
  undefined1 *puVar9;
  int in_stack_ffffffbc;
  
  puVar9 = &_gp;
  bVar1 = line_only == 0;
  if (bVar1) {
    iVar6 = term->rows;
    iVar5 = 0;
  }
  else {
    iVar5 = (term->curs).y;
    iVar6 = iVar5 + 1;
  }
  if (from_begin == 0) {
    iVar5 = (term->curs).y;
    bVar3 = to_end == 0;
    to_end = (term->curs).x;
    if (bVar3) {
LAB_0004548c:
      iVar7 = (term->curs).x;
      iVar6 = (term->curs).y;
      if (term->cols == iVar7) {
        iVar6 = iVar6 + 1;
        from_begin = 0;
      }
      else {
        from_begin = iVar7 + 1;
      }
    }
LAB_000454a0:
    check_boundary(term,(term->curs).x,(term->curs).y);
  }
  else {
    if (to_end == 0) goto LAB_0004548c;
    if (from_begin == 0) {
      to_end = 0;
      goto LAB_000454a0;
    }
    to_end = 0;
    from_begin = 0;
  }
  from.y = from_begin;
  from.x = in_stack_ffffffb4;
  to.y = (int)puVar9;
  to.x = in_stack_ffffffbc;
  check_selection(term,from,to);
  if (iVar5 == 0 && to_end == 0) {
    if (term->rows == iVar6) {
      term_invalidate(term);
    }
    if (from_begin != 0) goto LAB_00045518;
    bVar3 = bVar1;
    if ((term->erase_to_scrollback == 0) || (!bVar1)) goto LAB_00045524;
    if (term->rows == iVar6) {
      iVar6 = find_last_nonempty_line(term,term->screen);
      iVar6 = iVar6 + 1;
    }
    if (0 < iVar6) {
      scroll(term,0,iVar6 + -1,iVar6,1);
      iVar5 = term->alt_which;
      goto LAB_000455e8;
    }
  }
  else {
LAB_00045518:
    bVar3 = false;
LAB_00045524:
    ptVar4 = lineptr(term,iVar5,0x99b,1);
    iVar7 = *(int *)(puVar9 + -0x7cd4);
    iVar8 = *(int *)(puVar9 + -0x7cd4);
    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (to_end < from_begin))))) {
      (*(code *)(iVar7 + 0x6e4))(term,ptVar4);
      if (term->cols == to_end) {
        if (bVar1) {
          ptVar4->lattr = 0;
        }
        else {
          ptVar4->lattr = ptVar4->lattr & 0xffcf;
        }
      }
      else {
        (*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);
      }
      bVar2 = term->cols == to_end;
      to_end = to_end + 1;
      if (bVar2) {
        iVar5 = iVar5 + 1;
        if (iVar5 < term->rows) {
          ptVar4 = lineptr(term,iVar5,0x9a7,1);
          to_end = 0;
        }
        else {
          to_end = 0;
        }
      }
    }
    if (!bVar3) {
      return;
    }
  }
  iVar5 = term->alt_which;
LAB_000455e8:
  if (iVar5 == 0) {
    term->tempsblines = 0;
  }
  return;
}



void FUN_00045424(int param_1,int param_2,int param_3,int param_4)

{
  bool bVar1;
  bool bVar2;
  bool bVar3;
  ushort *puVar4;
  int iVar5;
  int iVar6;
  code *pcVar7;
  code *pcVar8;
  
  bVar1 = param_2 == 0;
  if (bVar1) {
    iVar6 = *(int *)(param_1 + 0x128);
    iVar5 = 0;
  }
  else {
    iVar5 = *(int *)(param_1 + 0x6c);
    iVar6 = iVar5 + 1;
  }
  if (param_3 == 0) {
    iVar5 = *(int *)(param_1 + 0x6c);
    bVar3 = param_4 == 0;
    param_4 = *(int *)(param_1 + 0x70);
    if (bVar3) {
LAB_0004548c:
      iVar6 = *(int *)(param_1 + 0x6c);
      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {
        iVar6 = iVar6 + 1;
        param_3 = 0;
      }
      else {
        param_3 = *(int *)(param_1 + 0x70) + 1;
      }
    }
LAB_000454a0:
    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));
  }
  else {
    if (param_4 == 0) goto LAB_0004548c;
    if (param_3 == 0) {
      param_4 = 0;
      goto LAB_000454a0;
    }
    param_4 = 0;
    param_3 = 0;
  }
  FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);
  if (iVar5 == 0 && param_4 == 0) {
    if (*(int *)(param_1 + 0x128) == iVar6) {
      term_invalidate(param_1);
    }
    if (param_3 != 0) goto LAB_00045518;
    bVar3 = bVar1;
    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;
    if (*(int *)(param_1 + 0x128) == iVar6) {
      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);
      iVar6 = iVar6 + 1;
    }
    if (0 < iVar6) {
      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);
      iVar5 = *(int *)(param_1 + 0x1a4);
      goto LAB_000455e8;
    }
  }
  else {
LAB_00045518:
    bVar3 = false;
LAB_00045524:
    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);
    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);
    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);
    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {
      (*pcVar7)(param_1,puVar4);
      if (*(int *)(param_1 + 300) == param_4) {
        if (bVar1) {
          *puVar4 = 0;
        }
        else {
          *puVar4 = *puVar4 & 0xffcf;
        }
      }
      else {
        (*pcVar8)(puVar4,param_4,param_1 + 0x54);
      }
      bVar2 = *(int *)(param_1 + 300) == param_4;
      param_4 = param_4 + 1;
      if (bVar2) {
        iVar5 = iVar5 + 1;
        if (iVar5 < *(int *)(param_1 + 0x128)) {
          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);
          param_4 = 0;
        }
        else {
          param_4 = 0;
        }
      }
    }
    if (!bVar3) {
      return;
    }
  }
  iVar5 = *(int *)(param_1 + 0x1a4);
LAB_000455e8:
  if (iVar5 == 0) {
    *(undefined4 *)(param_1 + 0x14) = 0;
  }
  return;
}


lui gp,0x7
addiu gp,gp,0xc6c
addu gp,gp,t9
addiu sp,sp,-0x60
sw ra,0x5c(sp)
sw s8,0x58(sp)
sw s7,0x54(sp)
sw s6,0x50(sp)
sw s5,0x4c(sp)
sw s4,0x48(sp)
sw s3,0x44(sp)
sw s2,0x40(sp)
sw s1,0x3c(sp)
sw s0,0x38(sp)
sw gp,0x18(sp)
or s1,a0,zero
beq a1,zero,0x00045560
_or s5,a2,zero
lw s2,0x6c(a0)
addiu s4,s2,0x1
or s8,zero,zero
bne s5,zero,0x00045570
_nop
lw s2,0x6c(s1)
bne a3,zero,0x000454a0
_lw s0,0x70(s1)
lw s5,0x70(s1)
lw v0,0x12c(s1)
beq v0,s5,0x0004558c
_lw s4,0x6c(s1)
addiu s5,s5,0x1
lw a2,0x6c(s1)
lw a1,0x70(s1)
or a0,s1,zero
lw t9,-0x7cd4(gp)
addiu t9,t9,0x9b8
bal 0x000409b8
_nop
lw gp,0x18(sp)
sw s2,0x28(sp)
sw s0,0x2c(sp)
sw s4,0x30(sp)
sw s5,0x34(sp)
sw s5,0x10(sp)
or a3,s4,zero
or a1,s2,zero
or a2,s0,zero
or a0,s1,zero
lw t9,-0x7cd4(gp)
addiu t9,t9,-0x1038
bal 0x0003efc8
_nop
lw gp,0x18(sp)
or v0,s2,s0
bne v0,zero,0x00045518
_nop
lw v0,0x128(s1)
beq v0,s4,0x000455a0
_or a0,s1,zero
beq s5,zero,0x000455b8
_sltu v0,zero,s8
sw zero,0x20(sp)
li a3,0x1
li a2,0x99b
or a1,s2,zero
or a0,s1,zero
lw t9,-0x7cd4(gp)
addiu t9,t9,0x730
bal 0x00040730
_nop
lw gp,0x18(sp)
or s3,v0,zero
lw s6,-0x7cd4(gp)
addiu s6,s6,0x6e4
lw s7,-0x7cd4(gp)
addiu s7,s7,-0x620
lw v0,-0x7cd4(gp)
b 0x00045674
_sw v0,0x24(sp)
or s2,a1,zero
lw s4,0x128(a0)
b 0x00045478
_li s8,0x1
beq a3,zero,0x0004548c
_or s0,a3,zero
beq s5,zero,0x00045598
_nop
or s0,zero,zero
b 0x000454c0
_or s5,zero,zero
addiu s4,s4,0x1
b 0x000454a0
_or s5,zero,zero
b 0x000454a0
_or s0,s5,zero
lw t9,-0x7c1c(gp)
bal 0x00045370
_nop
lw gp,0x18(sp)
b 0x00045510
_nop
sw v0,0x20(sp)
lw v0,0x1118(s1)
beq v0,zero,0x00045520
_li a3,0x1
beq s8,zero,0x00045524
_li a2,0x99b
lw v0,0x128(s1)
beq v0,s4,0x000455f8
_or a0,s1,zero
bgtz s4,0x00045618
_li v0,0x1
lw v0,0x1a4(s1)
bne v0,zero,0x00045720
_lw ra,0x5c(sp)
b 0x0004571c
_sw zero,0x14(s1)
lw a1,0x8(s1)
lw t9,-0x7cd4(gp)
addiu t9,t9,0x457c
bal 0x0004457c
_nop
lw gp,0x18(sp)
b 0x000455dc
_addiu s4,v0,0x1
sw v0,0x10(sp)
or a3,s4,zero
addiu a2,s4,-0x1
or a1,zero,zero
or a0,s1,zero
lw t9,-0x7cd4(gp)
addiu t9,t9,0x2400
bal 0x00042400
_nop
lw gp,0x18(sp)
b 0x000455e8
_lw v0,0x1a4(s1)
b 0x00045668
_sh zero,0x0(s3)
or a1,s0,zero
or a0,s3,zero
or t9,s7,zero
jalr t9
_nop
lw gp,0x18(sp)
lw v0,0x12c(s1)
beq v0,s0,0x000456c8
_addiu s0,s0,0x1
slt v0,s2,s4
bne v0,zero,0x00045690
_or a1,s3,zero
bne s2,s4,0x00045710
_slt v0,s0,s5
beq v0,zero,0x00045714
_lw v0,0x20(sp)
or a0,s1,zero
or t9,s6,zero
jalr t9
_nop
lw gp,0x18(sp)
lw v0,0x12c(s1)
bne v0,s0,0x00045650
_addiu a2,s1,0x54
bne s8,zero,0x00045648
_nop
lhu v0,0x0(s3)
andi v0,v0,0xffcf
b 0x00045668
_sh v0,0x0(s3)
addiu s2,s2,0x1
lw v0,0x128(s1)
slt v0,s2,v0
bne v0,zero,0x000456e4
_li a3,0x1
b 0x00045674
_or s0,zero,zero
li a2,0x9a7
or a1,s2,zero
or a0,s1,zero
lw v0,0x24(sp)
addiu t9,v0,0x730
bal 0x00040730
_nop
lw gp,0x18(sp)
or s3,v0,zero
b 0x00045674
_or s0,zero,zero
lw v0,0x20(sp)
bne v0,zero,0x000455e4
_nop
lw ra,0x5c(sp)
lw s8,0x58(sp)
lw s7,0x54(sp)
lw s6,0x50(sp)
lw s5,0x4c(sp)
lw s4,0x48(sp)
lw s3,0x44(sp)
lw s2,0x40(sp)
lw s1,0x3c(sp)
lw s0,0x38(sp)
jr ra
_addiu sp,sp,0x60
(translation_unit "void FUN_00045424(int param_1,int param_2,int param_3,int param_4)\n\n{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  ushort *puVar4;\n  int iVar5;\n  int iVar6;\n  code *pcVar7;\n  code *pcVar8;\n  \n  bVar1 = param_2 == 0;\n  if (bVar1) {\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }\n  if (param_3 == 0) {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }\n  else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }\n  FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);\n  if (iVar5 == 0 && param_4 == 0) {\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }\n  iVar5 = *(int *)(param_1 + 0x1a4);\nLAB_000455e8:\n  if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00045424(int param_1,int param_2,int param_3,int param_4)\n\n{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  ushort *puVar4;\n  int iVar5;\n  int iVar6;\n  code *pcVar7;\n  code *pcVar8;\n  \n  bVar1 = param_2 == 0;\n  if (bVar1) {\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }\n  if (param_3 == 0) {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }\n  else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }\n  FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);\n  if (iVar5 == 0 && param_4 == 0) {\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }\n  iVar5 = *(int *)(param_1 + 0x1a4);\nLAB_000455e8:\n  if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00045424(int param_1,int param_2,int param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  ushort *puVar4;\n  int iVar5;\n  int iVar6;\n  code *pcVar7;\n  code *pcVar8;\n  \n  bVar1 = param_2 == 0;\n  if (bVar1) {\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }\n  if (param_3 == 0) {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }\n  else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }\n  FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);\n  if (iVar5 == 0 && param_4 == 0) {\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }\n  iVar5 = *(int *)(param_1 + 0x1a4);\nLAB_000455e8:\n  if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }\n  return;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "ushort *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "code *pcVar7;" type_identifier (pointer_declarator "*pcVar7" * identifier) ;) (declaration "code *pcVar8;" type_identifier (pointer_declarator "*pcVar8" * identifier) ;) (expression_statement "bVar1 = param_2 == 0;" (assignment_expression "bVar1 = param_2 == 0" identifier = (binary_expression "param_2 == 0" identifier == number_literal)) ;) (if_statement "if (bVar1) {\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }" { (expression_statement "iVar6 = *(int *)(param_1 + 0x128);" (assignment_expression "iVar6 = *(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 "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }" else (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }" { (expression_statement "iVar5 = *(int *)(param_1 + 0x6c);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x6c)" identifier = (pointer_expression "*(int *)(param_1 + 0x6c)" * (cast_expression "(int *)(param_1 + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) ))))) ;) (expression_statement "iVar6 = iVar5 + 1;" (assignment_expression "iVar6 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }))) (if_statement "if (param_3 == 0) {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }\n  else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }" { (expression_statement "iVar5 = *(int *)(param_1 + 0x6c);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x6c)" identifier = (pointer_expression "*(int *)(param_1 + 0x6c)" * (cast_expression "(int *)(param_1 + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) ))))) ;) (expression_statement "bVar3 = param_4 == 0;" (assignment_expression "bVar3 = param_4 == 0" identifier = (binary_expression "param_4 == 0" identifier == number_literal)) ;) (expression_statement "param_4 = *(int *)(param_1 + 0x70);" (assignment_expression "param_4 = *(int *)(param_1 + 0x70)" identifier = (pointer_expression "*(int *)(param_1 + 0x70)" * (cast_expression "(int *)(param_1 + 0x70)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) ))))) ;) (if_statement "if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }" if (parenthesized_expression "(bVar3)" ( identifier )) (compound_statement "{\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }" { (labeled_statement "LAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);" statement_identifier : (expression_statement "iVar6 = *(int *)(param_1 + 0x6c);" (assignment_expression "iVar6 = *(int *)(param_1 + 0x6c)" identifier = (pointer_expression "*(int *)(param_1 + 0x6c)" * (cast_expression "(int *)(param_1 + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) ))))) ;)) (if_statement "if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }" if (parenthesized_expression "(*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70))" ( (binary_expression "*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)" (pointer_expression "*(int *)(param_1 + 300)" * (cast_expression "(int *)(param_1 + 300)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) == (pointer_expression "*(int *)(param_1 + 0x70)" * (cast_expression "(int *)(param_1 + 0x70)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) ))))) )) (compound_statement "{\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }" { (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "param_3 = 0;" (assignment_expression "param_3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }" else (compound_statement "{\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }" { (expression_statement "param_3 = *(int *)(param_1 + 0x70) + 1;" (assignment_expression "param_3 = *(int *)(param_1 + 0x70) + 1" identifier = (binary_expression "*(int *)(param_1 + 0x70) + 1" (pointer_expression "*(int *)(param_1 + 0x70)" * (cast_expression "(int *)(param_1 + 0x70)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) )))) + number_literal)) ;) }))) })) (labeled_statement "LAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));" statement_identifier : (expression_statement "FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));" (call_expression "FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c))" identifier (argument_list "(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c))" ( identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x70)" * (cast_expression "(undefined4 *)(param_1 + 0x70)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x6c)" * (cast_expression "(undefined4 *)(param_1 + 0x6c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) )))) ))) ;)) }) (else_clause "else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }" else (compound_statement "{\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }" { (if_statement "if (param_4 == 0) goto LAB_0004548c;" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0004548c;" goto statement_identifier ;)) (if_statement "if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      param_4 = 0;\n      goto LAB_000454a0;\n    }" { (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000454a0;" goto statement_identifier ;) })) (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" identifier = number_literal) ;) (expression_statement "param_3 = 0;" (assignment_expression "param_3 = 0" identifier = number_literal) ;) }))) (expression_statement "FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);" (call_expression "FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3)" identifier (argument_list "(param_1,iVar5,param_4,iVar6,param_3)" ( identifier , identifier , identifier , identifier , identifier ))) ;) (if_statement "if (iVar5 == 0 && param_4 == 0) {\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }" if (parenthesized_expression "(iVar5 == 0 && param_4 == 0)" ( (binary_expression "iVar5 == 0 && param_4 == 0" (binary_expression "iVar5 == 0" identifier == number_literal) && (binary_expression "param_4 == 0" identifier == number_literal)) )) (compound_statement "{\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }" { (if_statement "if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x128) == iVar6)" ( (binary_expression "*(int *)(param_1 + 0x128) == iVar6" (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) )))) == identifier) )) (compound_statement "{\n      term_invalidate(param_1);\n    }" { (expression_statement "term_invalidate(param_1);" (call_expression "term_invalidate(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) (if_statement "if (param_3 != 0) goto LAB_00045518;" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00045518;" goto statement_identifier ;)) (expression_statement "bVar3 = bVar1;" (assignment_expression "bVar3 = bVar1" identifier = identifier) ;) (if_statement "if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;" if (parenthesized_expression "((*(int *)(param_1 + 0x1118) == 0) || (!bVar1))" ( (binary_expression "(*(int *)(param_1 + 0x1118) == 0) || (!bVar1)" (parenthesized_expression "(*(int *)(param_1 + 0x1118) == 0)" ( (binary_expression "*(int *)(param_1 + 0x1118) == 0" (pointer_expression "*(int *)(param_1 + 0x1118)" * (cast_expression "(int *)(param_1 + 0x1118)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1118)" ( (binary_expression "param_1 + 0x1118" identifier + number_literal) )))) == number_literal) )) || (parenthesized_expression "(!bVar1)" ( (unary_expression "!bVar1" ! identifier) ))) )) (goto_statement "goto LAB_00045524;" goto statement_identifier ;)) (if_statement "if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x128) == iVar6)" ( (binary_expression "*(int *)(param_1 + 0x128) == iVar6" (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) )))) == identifier) )) (compound_statement "{\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }" { (expression_statement "iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);" (assignment_expression "iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1)" identifier = (call_expression "FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1)" identifier (argument_list "(param_1,*(undefined4 *)(param_1 + 8),0x99b,1)" ( identifier , (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , number_literal , number_literal )))) ;) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) })) (if_statement "if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }" if (parenthesized_expression "(0 < iVar6)" ( (binary_expression "0 < iVar6" number_literal < identifier) )) (compound_statement "{\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }" { (expression_statement "FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);" (call_expression "FUN_00042400(param_1,0,iVar6 + -1,iVar6,1)" identifier (argument_list "(param_1,0,iVar6 + -1,iVar6,1)" ( identifier , number_literal , (binary_expression "iVar6 + -1" identifier + number_literal) , identifier , number_literal ))) ;) (expression_statement "iVar5 = *(int *)(param_1 + 0x1a4);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x1a4)" identifier = (pointer_expression "*(int *)(param_1 + 0x1a4)" * (cast_expression "(int *)(param_1 + 0x1a4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1a4)" ( (binary_expression "param_1 + 0x1a4" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_000455e8;" goto statement_identifier ;) })) }) (else_clause "else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }" else (compound_statement "{\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }" { (labeled_statement "LAB_00045518:\n    bVar3 = false;" statement_identifier : (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;)) (labeled_statement "LAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);" statement_identifier : (expression_statement "puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);" (assignment_expression "puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1)" identifier = (cast_expression "(ushort *)FUN_00040730(param_1,iVar5,0x99b,1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00040730(param_1,iVar5,0x99b,1)" identifier (argument_list "(param_1,iVar5,0x99b,1)" ( identifier , identifier , number_literal , number_literal ))))) ;)) (expression_statement "pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);" (assignment_expression "pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4)" identifier = (cast_expression "(code *)(PTR_LAB_000ae3bc + 0x6e4)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_000ae3bc + 0x6e4)" ( (binary_expression "PTR_LAB_000ae3bc + 0x6e4" identifier + number_literal) )))) ;) (expression_statement "pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);" (assignment_expression "pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620)" identifier = (cast_expression "(code *)(PTR_LAB_000ae3bc + -0x620)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_000ae3bc + -0x620)" ( (binary_expression "PTR_LAB_000ae3bc + -0x620" identifier + number_literal) )))) ;) (while_statement "while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }" while (parenthesized_expression "((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3)))))" ( (parenthesized_expression "(iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))" ( (binary_expression "iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3)))" (binary_expression "iVar5 < iVar6" identifier < identifier) || (parenthesized_expression "((iVar5 == iVar6 && (param_4 < param_3)))" ( (parenthesized_expression "(iVar5 == iVar6 && (param_4 < param_3))" ( (binary_expression "iVar5 == iVar6 && (param_4 < param_3)" (binary_expression "iVar5 == iVar6" identifier == identifier) && (parenthesized_expression "(param_4 < param_3)" ( (binary_expression "param_4 < param_3" identifier < identifier) ))) )) ))) )) )) (compound_statement "{\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }" { (expression_statement "(*pcVar7)(param_1,puVar4);" (call_expression "(*pcVar7)(param_1,puVar4)" (parenthesized_expression "(*pcVar7)" ( (pointer_expression "*pcVar7" * identifier) )) (argument_list "(param_1,puVar4)" ( identifier , identifier ))) ;) (if_statement "if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }" if (parenthesized_expression "(*(int *)(param_1 + 300) == param_4)" ( (binary_expression "*(int *)(param_1 + 300) == param_4" (pointer_expression "*(int *)(param_1 + 300)" * (cast_expression "(int *)(param_1 + 300)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) == identifier) )) (compound_statement "{\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }" { (if_statement "if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n          *puVar4 = 0;\n        }" { (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) }) (else_clause "else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }" else (compound_statement "{\n          *puVar4 = *puVar4 & 0xffcf;\n        }" { (expression_statement "*puVar4 = *puVar4 & 0xffcf;" (assignment_expression "*puVar4 = *puVar4 & 0xffcf" (pointer_expression "*puVar4" * identifier) = (binary_expression "*puVar4 & 0xffcf" (pointer_expression "*puVar4" * identifier) & number_literal)) ;) }))) }) (else_clause "else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }" else (compound_statement "{\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }" { (expression_statement "(*pcVar8)(puVar4,param_4,param_1 + 0x54);" (call_expression "(*pcVar8)(puVar4,param_4,param_1 + 0x54)" (parenthesized_expression "(*pcVar8)" ( (pointer_expression "*pcVar8" * identifier) )) (argument_list "(puVar4,param_4,param_1 + 0x54)" ( identifier , identifier , (binary_expression "param_1 + 0x54" identifier + number_literal) ))) ;) }))) (expression_statement "bVar2 = *(int *)(param_1 + 300) == param_4;" (assignment_expression "bVar2 = *(int *)(param_1 + 300) == param_4" identifier = (binary_expression "*(int *)(param_1 + 300) == param_4" (pointer_expression "*(int *)(param_1 + 300)" * (cast_expression "(int *)(param_1 + 300)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) == identifier)) ;) (expression_statement "param_4 = param_4 + 1;" (assignment_expression "param_4 = param_4 + 1" identifier = (binary_expression "param_4 + 1" identifier + number_literal)) ;) (if_statement "if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }" if (parenthesized_expression "(bVar2)" ( identifier )) (compound_statement "{\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (if_statement "if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }" if (parenthesized_expression "(iVar5 < *(int *)(param_1 + 0x128))" ( (binary_expression "iVar5 < *(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) ))))) )) (compound_statement "{\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }" { (expression_statement "puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);" (assignment_expression "puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1)" identifier = (cast_expression "(ushort *)FUN_00040730(param_1,iVar5,0x9a7,1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00040730(param_1,iVar5,0x9a7,1)" identifier (argument_list "(param_1,iVar5,0x9a7,1)" ( identifier , identifier , number_literal , number_literal ))))) ;) (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n          param_4 = 0;\n        }" else (compound_statement "{\n          param_4 = 0;\n        }" { (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" identifier = number_literal) ;) }))) })) })) (if_statement "if (!bVar3) {\n      return;\n    }" if (parenthesized_expression "(!bVar3)" ( (unary_expression "!bVar3" ! identifier) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) }))) (expression_statement "iVar5 = *(int *)(param_1 + 0x1a4);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x1a4)" identifier = (pointer_expression "*(int *)(param_1 + 0x1a4)" * (cast_expression "(int *)(param_1 + 0x1a4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1a4)" ( (binary_expression "param_1 + 0x1a4" identifier + number_literal) ))))) ;) (labeled_statement "LAB_000455e8:\n  if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }" statement_identifier : (if_statement "if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }" { (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) ;) }))) (return_statement "return;" return ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid erase_lots(Terminal *term,int line_only,int from_begin,int to_end)\n\n{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  pos from;\n  pos to;\n  termline *ptVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  int iVar8;\n  int in_stack_ffffffb4;\n  undefined1 *puVar9;\n  int in_stack_ffffffbc;\n  \n  puVar9 = &_gp;\n  bVar1 = line_only == 0;\n  if (bVar1) {\n    iVar6 = term->rows;\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = (term->curs).y;\n    iVar6 = iVar5 + 1;\n  }\n  if (from_begin == 0) {\n    iVar5 = (term->curs).y;\n    bVar3 = to_end == 0;\n    to_end = (term->curs).x;\n    if (bVar3) {\nLAB_0004548c:\n      iVar7 = (term->curs).x;\n      iVar6 = (term->curs).y;\n      if (term->cols == iVar7) {\n        iVar6 = iVar6 + 1;\n        from_begin = 0;\n      }\n      else {\n        from_begin = iVar7 + 1;\n      }\n    }\nLAB_000454a0:\n    check_boundary(term,(term->curs).x,(term->curs).y);\n  }\n  else {\n    if (to_end == 0) goto LAB_0004548c;\n    if (from_begin == 0) {\n      to_end = 0;\n      goto LAB_000454a0;\n    }\n    to_end = 0;\n    from_begin = 0;\n  }\n  from.y = from_begin;\n  from.x = in_stack_ffffffb4;\n  to.y = (int)puVar9;\n  to.x = in_stack_ffffffbc;\n  check_selection(term,from,to);\n  if (iVar5 == 0 && to_end == 0) {\n    if (term->rows == iVar6) {\n      term_invalidate(term);\n    }\n    if (from_begin != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((term->erase_to_scrollback == 0) || (!bVar1)) goto LAB_00045524;\n    if (term->rows == iVar6) {\n      iVar6 = find_last_nonempty_line(term,term->screen);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      scroll(term,0,iVar6 + -1,iVar6,1);\n      iVar5 = term->alt_which;\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    ptVar4 = lineptr(term,iVar5,0x99b,1);\n    iVar7 = *(int *)(puVar9 + -0x7cd4);\n    iVar8 = *(int *)(puVar9 + -0x7cd4);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (to_end < from_begin))))) {\n      (*(code *)(iVar7 + 0x6e4))(term,ptVar4);\n      if (term->cols == to_end) {\n        if (bVar1) {\n          ptVar4->lattr = 0;\n        }\n        else {\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }\n      }\n      else {\n        (*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);\n      }\n      bVar2 = term->cols == to_end;\n      to_end = to_end + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < term->rows) {\n          ptVar4 = lineptr(term,iVar5,0x9a7,1);\n          to_end = 0;\n        }\n        else {\n          to_end = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }\n  iVar5 = term->alt_which;\nLAB_000455e8:\n  if (iVar5 == 0) {\n    term->tempsblines = 0;\n  }\n  return;\n}\n\n" comment (function_definition "void erase_lots(Terminal *term,int line_only,int from_begin,int to_end)\n\n{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  pos from;\n  pos to;\n  termline *ptVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  int iVar8;\n  int in_stack_ffffffb4;\n  undefined1 *puVar9;\n  int in_stack_ffffffbc;\n  \n  puVar9 = &_gp;\n  bVar1 = line_only == 0;\n  if (bVar1) {\n    iVar6 = term->rows;\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = (term->curs).y;\n    iVar6 = iVar5 + 1;\n  }\n  if (from_begin == 0) {\n    iVar5 = (term->curs).y;\n    bVar3 = to_end == 0;\n    to_end = (term->curs).x;\n    if (bVar3) {\nLAB_0004548c:\n      iVar7 = (term->curs).x;\n      iVar6 = (term->curs).y;\n      if (term->cols == iVar7) {\n        iVar6 = iVar6 + 1;\n        from_begin = 0;\n      }\n      else {\n        from_begin = iVar7 + 1;\n      }\n    }\nLAB_000454a0:\n    check_boundary(term,(term->curs).x,(term->curs).y);\n  }\n  else {\n    if (to_end == 0) goto LAB_0004548c;\n    if (from_begin == 0) {\n      to_end = 0;\n      goto LAB_000454a0;\n    }\n    to_end = 0;\n    from_begin = 0;\n  }\n  from.y = from_begin;\n  from.x = in_stack_ffffffb4;\n  to.y = (int)puVar9;\n  to.x = in_stack_ffffffbc;\n  check_selection(term,from,to);\n  if (iVar5 == 0 && to_end == 0) {\n    if (term->rows == iVar6) {\n      term_invalidate(term);\n    }\n    if (from_begin != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((term->erase_to_scrollback == 0) || (!bVar1)) goto LAB_00045524;\n    if (term->rows == iVar6) {\n      iVar6 = find_last_nonempty_line(term,term->screen);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      scroll(term,0,iVar6 + -1,iVar6,1);\n      iVar5 = term->alt_which;\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    ptVar4 = lineptr(term,iVar5,0x99b,1);\n    iVar7 = *(int *)(puVar9 + -0x7cd4);\n    iVar8 = *(int *)(puVar9 + -0x7cd4);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (to_end < from_begin))))) {\n      (*(code *)(iVar7 + 0x6e4))(term,ptVar4);\n      if (term->cols == to_end) {\n        if (bVar1) {\n          ptVar4->lattr = 0;\n        }\n        else {\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }\n      }\n      else {\n        (*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);\n      }\n      bVar2 = term->cols == to_end;\n      to_end = to_end + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < term->rows) {\n          ptVar4 = lineptr(term,iVar5,0x9a7,1);\n          to_end = 0;\n        }\n        else {\n          to_end = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }\n  iVar5 = term->alt_which;\nLAB_000455e8:\n  if (iVar5 == 0) {\n    term->tempsblines = 0;\n  }\n  return;\n}" primitive_type (function_declarator "erase_lots(Terminal *term,int line_only,int from_begin,int to_end)" identifier (parameter_list "(Terminal *term,int line_only,int from_begin,int to_end)" ( (parameter_declaration "Terminal *term" type_identifier (pointer_declarator "*term" * identifier)) , (parameter_declaration "int line_only" primitive_type identifier) , (parameter_declaration "int from_begin" primitive_type identifier) , (parameter_declaration "int to_end" primitive_type identifier) ))) (compound_statement "{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  pos from;\n  pos to;\n  termline *ptVar4;\n  int iVar5;\n  int iVar6;\n  int iVar7;\n  int iVar8;\n  int in_stack_ffffffb4;\n  undefined1 *puVar9;\n  int in_stack_ffffffbc;\n  \n  puVar9 = &_gp;\n  bVar1 = line_only == 0;\n  if (bVar1) {\n    iVar6 = term->rows;\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = (term->curs).y;\n    iVar6 = iVar5 + 1;\n  }\n  if (from_begin == 0) {\n    iVar5 = (term->curs).y;\n    bVar3 = to_end == 0;\n    to_end = (term->curs).x;\n    if (bVar3) {\nLAB_0004548c:\n      iVar7 = (term->curs).x;\n      iVar6 = (term->curs).y;\n      if (term->cols == iVar7) {\n        iVar6 = iVar6 + 1;\n        from_begin = 0;\n      }\n      else {\n        from_begin = iVar7 + 1;\n      }\n    }\nLAB_000454a0:\n    check_boundary(term,(term->curs).x,(term->curs).y);\n  }\n  else {\n    if (to_end == 0) goto LAB_0004548c;\n    if (from_begin == 0) {\n      to_end = 0;\n      goto LAB_000454a0;\n    }\n    to_end = 0;\n    from_begin = 0;\n  }\n  from.y = from_begin;\n  from.x = in_stack_ffffffb4;\n  to.y = (int)puVar9;\n  to.x = in_stack_ffffffbc;\n  check_selection(term,from,to);\n  if (iVar5 == 0 && to_end == 0) {\n    if (term->rows == iVar6) {\n      term_invalidate(term);\n    }\n    if (from_begin != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((term->erase_to_scrollback == 0) || (!bVar1)) goto LAB_00045524;\n    if (term->rows == iVar6) {\n      iVar6 = find_last_nonempty_line(term,term->screen);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      scroll(term,0,iVar6 + -1,iVar6,1);\n      iVar5 = term->alt_which;\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    ptVar4 = lineptr(term,iVar5,0x99b,1);\n    iVar7 = *(int *)(puVar9 + -0x7cd4);\n    iVar8 = *(int *)(puVar9 + -0x7cd4);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (to_end < from_begin))))) {\n      (*(code *)(iVar7 + 0x6e4))(term,ptVar4);\n      if (term->cols == to_end) {\n        if (bVar1) {\n          ptVar4->lattr = 0;\n        }\n        else {\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }\n      }\n      else {\n        (*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);\n      }\n      bVar2 = term->cols == to_end;\n      to_end = to_end + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < term->rows) {\n          ptVar4 = lineptr(term,iVar5,0x9a7,1);\n          to_end = 0;\n        }\n        else {\n          to_end = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }\n  iVar5 = term->alt_which;\nLAB_000455e8:\n  if (iVar5 == 0) {\n    term->tempsblines = 0;\n  }\n  return;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "pos from;" type_identifier identifier ;) (declaration "pos to;" type_identifier identifier ;) (declaration "termline *ptVar4;" type_identifier (pointer_declarator "*ptVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "int iVar8;" primitive_type identifier ;) (declaration "int in_stack_ffffffb4;" primitive_type identifier ;) (declaration "undefined1 *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "int in_stack_ffffffbc;" primitive_type identifier ;) (expression_statement "puVar9 = &_gp;" (assignment_expression "puVar9 = &_gp" identifier = (pointer_expression "&_gp" & identifier)) ;) (expression_statement "bVar1 = line_only == 0;" (assignment_expression "bVar1 = line_only == 0" identifier = (binary_expression "line_only == 0" identifier == number_literal)) ;) (if_statement "if (bVar1) {\n    iVar6 = term->rows;\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = (term->curs).y;\n    iVar6 = iVar5 + 1;\n  }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n    iVar6 = term->rows;\n    iVar5 = 0;\n  }" { (expression_statement "iVar6 = term->rows;" (assignment_expression "iVar6 = term->rows" identifier = (field_expression "term->rows" identifier -> field_identifier)) ;) (expression_statement "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar5 = (term->curs).y;\n    iVar6 = iVar5 + 1;\n  }" else (compound_statement "{\n    iVar5 = (term->curs).y;\n    iVar6 = iVar5 + 1;\n  }" { (expression_statement "iVar5 = (term->curs).y;" (assignment_expression "iVar5 = (term->curs).y" identifier = (field_expression "(term->curs).y" (parenthesized_expression "(term->curs)" ( (field_expression "term->curs" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "iVar6 = iVar5 + 1;" (assignment_expression "iVar6 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }))) (if_statement "if (from_begin == 0) {\n    iVar5 = (term->curs).y;\n    bVar3 = to_end == 0;\n    to_end = (term->curs).x;\n    if (bVar3) {\nLAB_0004548c:\n      iVar7 = (term->curs).x;\n      iVar6 = (term->curs).y;\n      if (term->cols == iVar7) {\n        iVar6 = iVar6 + 1;\n        from_begin = 0;\n      }\n      else {\n        from_begin = iVar7 + 1;\n      }\n    }\nLAB_000454a0:\n    check_boundary(term,(term->curs).x,(term->curs).y);\n  }\n  else {\n    if (to_end == 0) goto LAB_0004548c;\n    if (from_begin == 0) {\n      to_end = 0;\n      goto LAB_000454a0;\n    }\n    to_end = 0;\n    from_begin = 0;\n  }" if (parenthesized_expression "(from_begin == 0)" ( (binary_expression "from_begin == 0" identifier == number_literal) )) (compound_statement "{\n    iVar5 = (term->curs).y;\n    bVar3 = to_end == 0;\n    to_end = (term->curs).x;\n    if (bVar3) {\nLAB_0004548c:\n      iVar7 = (term->curs).x;\n      iVar6 = (term->curs).y;\n      if (term->cols == iVar7) {\n        iVar6 = iVar6 + 1;\n        from_begin = 0;\n      }\n      else {\n        from_begin = iVar7 + 1;\n      }\n    }\nLAB_000454a0:\n    check_boundary(term,(term->curs).x,(term->curs).y);\n  }" { (expression_statement "iVar5 = (term->curs).y;" (assignment_expression "iVar5 = (term->curs).y" identifier = (field_expression "(term->curs).y" (parenthesized_expression "(term->curs)" ( (field_expression "term->curs" identifier -> field_identifier) )) . field_identifier)) ;) (expression_statement "bVar3 = to_end == 0;" (assignment_expression "bVar3 = to_end == 0" identifier = (binary_expression "to_end == 0" identifier == number_literal)) ;) (expression_statement "to_end = (term->curs).x;" (assignment_expression "to_end = (term->curs).x" identifier = (field_expression "(term->curs).x" (parenthesized_expression "(term->curs)" ( (field_expression "term->curs" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if (bVar3) {\nLAB_0004548c:\n      iVar7 = (term->curs).x;\n      iVar6 = (term->curs).y;\n      if (term->cols == iVar7) {\n        iVar6 = iVar6 + 1;\n        from_begin = 0;\n      }\n      else {\n        from_begin = iVar7 + 1;\n      }\n    }" if (parenthesized_expression "(bVar3)" ( identifier )) (compound_statement "{\nLAB_0004548c:\n      iVar7 = (term->curs).x;\n      iVar6 = (term->curs).y;\n      if (term->cols == iVar7) {\n        iVar6 = iVar6 + 1;\n        from_begin = 0;\n      }\n      else {\n        from_begin = iVar7 + 1;\n      }\n    }" { (labeled_statement "LAB_0004548c:\n      iVar7 = (term->curs).x;" statement_identifier : (expression_statement "iVar7 = (term->curs).x;" (assignment_expression "iVar7 = (term->curs).x" identifier = (field_expression "(term->curs).x" (parenthesized_expression "(term->curs)" ( (field_expression "term->curs" identifier -> field_identifier) )) . field_identifier)) ;)) (expression_statement "iVar6 = (term->curs).y;" (assignment_expression "iVar6 = (term->curs).y" identifier = (field_expression "(term->curs).y" (parenthesized_expression "(term->curs)" ( (field_expression "term->curs" identifier -> field_identifier) )) . field_identifier)) ;) (if_statement "if (term->cols == iVar7) {\n        iVar6 = iVar6 + 1;\n        from_begin = 0;\n      }\n      else {\n        from_begin = iVar7 + 1;\n      }" if (parenthesized_expression "(term->cols == iVar7)" ( (binary_expression "term->cols == iVar7" (field_expression "term->cols" identifier -> field_identifier) == identifier) )) (compound_statement "{\n        iVar6 = iVar6 + 1;\n        from_begin = 0;\n      }" { (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "from_begin = 0;" (assignment_expression "from_begin = 0" identifier = number_literal) ;) }) (else_clause "else {\n        from_begin = iVar7 + 1;\n      }" else (compound_statement "{\n        from_begin = iVar7 + 1;\n      }" { (expression_statement "from_begin = iVar7 + 1;" (assignment_expression "from_begin = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) }))) })) (labeled_statement "LAB_000454a0:\n    check_boundary(term,(term->curs).x,(term->curs).y);" statement_identifier : (expression_statement "check_boundary(term,(term->curs).x,(term->curs).y);" (call_expression "check_boundary(term,(term->curs).x,(term->curs).y)" identifier (argument_list "(term,(term->curs).x,(term->curs).y)" ( identifier , (field_expression "(term->curs).x" (parenthesized_expression "(term->curs)" ( (field_expression "term->curs" identifier -> field_identifier) )) . field_identifier) , (field_expression "(term->curs).y" (parenthesized_expression "(term->curs)" ( (field_expression "term->curs" identifier -> field_identifier) )) . field_identifier) ))) ;)) }) (else_clause "else {\n    if (to_end == 0) goto LAB_0004548c;\n    if (from_begin == 0) {\n      to_end = 0;\n      goto LAB_000454a0;\n    }\n    to_end = 0;\n    from_begin = 0;\n  }" else (compound_statement "{\n    if (to_end == 0) goto LAB_0004548c;\n    if (from_begin == 0) {\n      to_end = 0;\n      goto LAB_000454a0;\n    }\n    to_end = 0;\n    from_begin = 0;\n  }" { (if_statement "if (to_end == 0) goto LAB_0004548c;" if (parenthesized_expression "(to_end == 0)" ( (binary_expression "to_end == 0" identifier == number_literal) )) (goto_statement "goto LAB_0004548c;" goto statement_identifier ;)) (if_statement "if (from_begin == 0) {\n      to_end = 0;\n      goto LAB_000454a0;\n    }" if (parenthesized_expression "(from_begin == 0)" ( (binary_expression "from_begin == 0" identifier == number_literal) )) (compound_statement "{\n      to_end = 0;\n      goto LAB_000454a0;\n    }" { (expression_statement "to_end = 0;" (assignment_expression "to_end = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000454a0;" goto statement_identifier ;) })) (expression_statement "to_end = 0;" (assignment_expression "to_end = 0" identifier = number_literal) ;) (expression_statement "from_begin = 0;" (assignment_expression "from_begin = 0" identifier = number_literal) ;) }))) (expression_statement "from.y = from_begin;" (assignment_expression "from.y = from_begin" (field_expression "from.y" identifier . field_identifier) = identifier) ;) (expression_statement "from.x = in_stack_ffffffb4;" (assignment_expression "from.x = in_stack_ffffffb4" (field_expression "from.x" identifier . field_identifier) = identifier) ;) (expression_statement "to.y = (int)puVar9;" (assignment_expression "to.y = (int)puVar9" (field_expression "to.y" identifier . field_identifier) = (cast_expression "(int)puVar9" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "to.x = in_stack_ffffffbc;" (assignment_expression "to.x = in_stack_ffffffbc" (field_expression "to.x" identifier . field_identifier) = identifier) ;) (expression_statement "check_selection(term,from,to);" (call_expression "check_selection(term,from,to)" identifier (argument_list "(term,from,to)" ( identifier , identifier , identifier ))) ;) (if_statement "if (iVar5 == 0 && to_end == 0) {\n    if (term->rows == iVar6) {\n      term_invalidate(term);\n    }\n    if (from_begin != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((term->erase_to_scrollback == 0) || (!bVar1)) goto LAB_00045524;\n    if (term->rows == iVar6) {\n      iVar6 = find_last_nonempty_line(term,term->screen);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      scroll(term,0,iVar6 + -1,iVar6,1);\n      iVar5 = term->alt_which;\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    ptVar4 = lineptr(term,iVar5,0x99b,1);\n    iVar7 = *(int *)(puVar9 + -0x7cd4);\n    iVar8 = *(int *)(puVar9 + -0x7cd4);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (to_end < from_begin))))) {\n      (*(code *)(iVar7 + 0x6e4))(term,ptVar4);\n      if (term->cols == to_end) {\n        if (bVar1) {\n          ptVar4->lattr = 0;\n        }\n        else {\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }\n      }\n      else {\n        (*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);\n      }\n      bVar2 = term->cols == to_end;\n      to_end = to_end + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < term->rows) {\n          ptVar4 = lineptr(term,iVar5,0x9a7,1);\n          to_end = 0;\n        }\n        else {\n          to_end = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }" if (parenthesized_expression "(iVar5 == 0 && to_end == 0)" ( (binary_expression "iVar5 == 0 && to_end == 0" (binary_expression "iVar5 == 0" identifier == number_literal) && (binary_expression "to_end == 0" identifier == number_literal)) )) (compound_statement "{\n    if (term->rows == iVar6) {\n      term_invalidate(term);\n    }\n    if (from_begin != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((term->erase_to_scrollback == 0) || (!bVar1)) goto LAB_00045524;\n    if (term->rows == iVar6) {\n      iVar6 = find_last_nonempty_line(term,term->screen);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      scroll(term,0,iVar6 + -1,iVar6,1);\n      iVar5 = term->alt_which;\n      goto LAB_000455e8;\n    }\n  }" { (if_statement "if (term->rows == iVar6) {\n      term_invalidate(term);\n    }" if (parenthesized_expression "(term->rows == iVar6)" ( (binary_expression "term->rows == iVar6" (field_expression "term->rows" identifier -> field_identifier) == identifier) )) (compound_statement "{\n      term_invalidate(term);\n    }" { (expression_statement "term_invalidate(term);" (call_expression "term_invalidate(term)" identifier (argument_list "(term)" ( identifier ))) ;) })) (if_statement "if (from_begin != 0) goto LAB_00045518;" if (parenthesized_expression "(from_begin != 0)" ( (binary_expression "from_begin != 0" identifier != number_literal) )) (goto_statement "goto LAB_00045518;" goto statement_identifier ;)) (expression_statement "bVar3 = bVar1;" (assignment_expression "bVar3 = bVar1" identifier = identifier) ;) (if_statement "if ((term->erase_to_scrollback == 0) || (!bVar1)) goto LAB_00045524;" if (parenthesized_expression "((term->erase_to_scrollback == 0) || (!bVar1))" ( (binary_expression "(term->erase_to_scrollback == 0) || (!bVar1)" (parenthesized_expression "(term->erase_to_scrollback == 0)" ( (binary_expression "term->erase_to_scrollback == 0" (field_expression "term->erase_to_scrollback" identifier -> field_identifier) == number_literal) )) || (parenthesized_expression "(!bVar1)" ( (unary_expression "!bVar1" ! identifier) ))) )) (goto_statement "goto LAB_00045524;" goto statement_identifier ;)) (if_statement "if (term->rows == iVar6) {\n      iVar6 = find_last_nonempty_line(term,term->screen);\n      iVar6 = iVar6 + 1;\n    }" if (parenthesized_expression "(term->rows == iVar6)" ( (binary_expression "term->rows == iVar6" (field_expression "term->rows" identifier -> field_identifier) == identifier) )) (compound_statement "{\n      iVar6 = find_last_nonempty_line(term,term->screen);\n      iVar6 = iVar6 + 1;\n    }" { (expression_statement "iVar6 = find_last_nonempty_line(term,term->screen);" (assignment_expression "iVar6 = find_last_nonempty_line(term,term->screen)" identifier = (call_expression "find_last_nonempty_line(term,term->screen)" identifier (argument_list "(term,term->screen)" ( identifier , (field_expression "term->screen" identifier -> field_identifier) )))) ;) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) })) (if_statement "if (0 < iVar6) {\n      scroll(term,0,iVar6 + -1,iVar6,1);\n      iVar5 = term->alt_which;\n      goto LAB_000455e8;\n    }" if (parenthesized_expression "(0 < iVar6)" ( (binary_expression "0 < iVar6" number_literal < identifier) )) (compound_statement "{\n      scroll(term,0,iVar6 + -1,iVar6,1);\n      iVar5 = term->alt_which;\n      goto LAB_000455e8;\n    }" { (expression_statement "scroll(term,0,iVar6 + -1,iVar6,1);" (call_expression "scroll(term,0,iVar6 + -1,iVar6,1)" identifier (argument_list "(term,0,iVar6 + -1,iVar6,1)" ( identifier , number_literal , (binary_expression "iVar6 + -1" identifier + number_literal) , identifier , number_literal ))) ;) (expression_statement "iVar5 = term->alt_which;" (assignment_expression "iVar5 = term->alt_which" identifier = (field_expression "term->alt_which" identifier -> field_identifier)) ;) (goto_statement "goto LAB_000455e8;" goto statement_identifier ;) })) }) (else_clause "else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    ptVar4 = lineptr(term,iVar5,0x99b,1);\n    iVar7 = *(int *)(puVar9 + -0x7cd4);\n    iVar8 = *(int *)(puVar9 + -0x7cd4);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (to_end < from_begin))))) {\n      (*(code *)(iVar7 + 0x6e4))(term,ptVar4);\n      if (term->cols == to_end) {\n        if (bVar1) {\n          ptVar4->lattr = 0;\n        }\n        else {\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }\n      }\n      else {\n        (*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);\n      }\n      bVar2 = term->cols == to_end;\n      to_end = to_end + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < term->rows) {\n          ptVar4 = lineptr(term,iVar5,0x9a7,1);\n          to_end = 0;\n        }\n        else {\n          to_end = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }" else (compound_statement "{\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    ptVar4 = lineptr(term,iVar5,0x99b,1);\n    iVar7 = *(int *)(puVar9 + -0x7cd4);\n    iVar8 = *(int *)(puVar9 + -0x7cd4);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (to_end < from_begin))))) {\n      (*(code *)(iVar7 + 0x6e4))(term,ptVar4);\n      if (term->cols == to_end) {\n        if (bVar1) {\n          ptVar4->lattr = 0;\n        }\n        else {\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }\n      }\n      else {\n        (*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);\n      }\n      bVar2 = term->cols == to_end;\n      to_end = to_end + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < term->rows) {\n          ptVar4 = lineptr(term,iVar5,0x9a7,1);\n          to_end = 0;\n        }\n        else {\n          to_end = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }" { (labeled_statement "LAB_00045518:\n    bVar3 = false;" statement_identifier : (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;)) (labeled_statement "LAB_00045524:\n    ptVar4 = lineptr(term,iVar5,0x99b,1);" statement_identifier : (expression_statement "ptVar4 = lineptr(term,iVar5,0x99b,1);" (assignment_expression "ptVar4 = lineptr(term,iVar5,0x99b,1)" identifier = (call_expression "lineptr(term,iVar5,0x99b,1)" identifier (argument_list "(term,iVar5,0x99b,1)" ( identifier , identifier , number_literal , number_literal )))) ;)) (expression_statement "iVar7 = *(int *)(puVar9 + -0x7cd4);" (assignment_expression "iVar7 = *(int *)(puVar9 + -0x7cd4)" identifier = (pointer_expression "*(int *)(puVar9 + -0x7cd4)" * (cast_expression "(int *)(puVar9 + -0x7cd4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar9 + -0x7cd4)" ( (binary_expression "puVar9 + -0x7cd4" identifier + number_literal) ))))) ;) (expression_statement "iVar8 = *(int *)(puVar9 + -0x7cd4);" (assignment_expression "iVar8 = *(int *)(puVar9 + -0x7cd4)" identifier = (pointer_expression "*(int *)(puVar9 + -0x7cd4)" * (cast_expression "(int *)(puVar9 + -0x7cd4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar9 + -0x7cd4)" ( (binary_expression "puVar9 + -0x7cd4" identifier + number_literal) ))))) ;) (while_statement "while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (to_end < from_begin))))) {\n      (*(code *)(iVar7 + 0x6e4))(term,ptVar4);\n      if (term->cols == to_end) {\n        if (bVar1) {\n          ptVar4->lattr = 0;\n        }\n        else {\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }\n      }\n      else {\n        (*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);\n      }\n      bVar2 = term->cols == to_end;\n      to_end = to_end + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < term->rows) {\n          ptVar4 = lineptr(term,iVar5,0x9a7,1);\n          to_end = 0;\n        }\n        else {\n          to_end = 0;\n        }\n      }\n    }" while (parenthesized_expression "((iVar5 < iVar6 || ((iVar5 == iVar6 && (to_end < from_begin)))))" ( (parenthesized_expression "(iVar5 < iVar6 || ((iVar5 == iVar6 && (to_end < from_begin))))" ( (binary_expression "iVar5 < iVar6 || ((iVar5 == iVar6 && (to_end < from_begin)))" (binary_expression "iVar5 < iVar6" identifier < identifier) || (parenthesized_expression "((iVar5 == iVar6 && (to_end < from_begin)))" ( (parenthesized_expression "(iVar5 == iVar6 && (to_end < from_begin))" ( (binary_expression "iVar5 == iVar6 && (to_end < from_begin)" (binary_expression "iVar5 == iVar6" identifier == identifier) && (parenthesized_expression "(to_end < from_begin)" ( (binary_expression "to_end < from_begin" identifier < identifier) ))) )) ))) )) )) (compound_statement "{\n      (*(code *)(iVar7 + 0x6e4))(term,ptVar4);\n      if (term->cols == to_end) {\n        if (bVar1) {\n          ptVar4->lattr = 0;\n        }\n        else {\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }\n      }\n      else {\n        (*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);\n      }\n      bVar2 = term->cols == to_end;\n      to_end = to_end + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < term->rows) {\n          ptVar4 = lineptr(term,iVar5,0x9a7,1);\n          to_end = 0;\n        }\n        else {\n          to_end = 0;\n        }\n      }\n    }" { (expression_statement "(*(code *)(iVar7 + 0x6e4))(term,ptVar4);" (call_expression "(*(code *)(iVar7 + 0x6e4))(term,ptVar4)" (parenthesized_expression "(*(code *)(iVar7 + 0x6e4))" ( (pointer_expression "*(code *)(iVar7 + 0x6e4)" * (cast_expression "(code *)(iVar7 + 0x6e4)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + 0x6e4)" ( (binary_expression "iVar7 + 0x6e4" identifier + number_literal) )))) )) (argument_list "(term,ptVar4)" ( identifier , identifier ))) ;) (if_statement "if (term->cols == to_end) {\n        if (bVar1) {\n          ptVar4->lattr = 0;\n        }\n        else {\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }\n      }\n      else {\n        (*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);\n      }" if (parenthesized_expression "(term->cols == to_end)" ( (binary_expression "term->cols == to_end" (field_expression "term->cols" identifier -> field_identifier) == identifier) )) (compound_statement "{\n        if (bVar1) {\n          ptVar4->lattr = 0;\n        }\n        else {\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }\n      }" { (if_statement "if (bVar1) {\n          ptVar4->lattr = 0;\n        }\n        else {\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n          ptVar4->lattr = 0;\n        }" { (expression_statement "ptVar4->lattr = 0;" (assignment_expression "ptVar4->lattr = 0" (field_expression "ptVar4->lattr" identifier -> field_identifier) = number_literal) ;) }) (else_clause "else {\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }" else (compound_statement "{\n          ptVar4->lattr = ptVar4->lattr & 0xffcf;\n        }" { (expression_statement "ptVar4->lattr = ptVar4->lattr & 0xffcf;" (assignment_expression "ptVar4->lattr = ptVar4->lattr & 0xffcf" (field_expression "ptVar4->lattr" identifier -> field_identifier) = (binary_expression "ptVar4->lattr & 0xffcf" (field_expression "ptVar4->lattr" identifier -> field_identifier) & number_literal)) ;) }))) }) (else_clause "else {\n        (*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);\n      }" else (compound_statement "{\n        (*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);\n      }" { (expression_statement "(*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char);" (call_expression "(*(code *)(iVar8 + -0x620))(ptVar4,to_end,&term->erase_char)" (parenthesized_expression "(*(code *)(iVar8 + -0x620))" ( (pointer_expression "*(code *)(iVar8 + -0x620)" * (cast_expression "(code *)(iVar8 + -0x620)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar8 + -0x620)" ( (binary_expression "iVar8 + -0x620" identifier + number_literal) )))) )) (argument_list "(ptVar4,to_end,&term->erase_char)" ( identifier , identifier , (pointer_expression "&term->erase_char" & (field_expression "term->erase_char" identifier -> field_identifier)) ))) ;) }))) (expression_statement "bVar2 = term->cols == to_end;" (assignment_expression "bVar2 = term->cols == to_end" identifier = (binary_expression "term->cols == to_end" (field_expression "term->cols" identifier -> field_identifier) == identifier)) ;) (expression_statement "to_end = to_end + 1;" (assignment_expression "to_end = to_end + 1" identifier = (binary_expression "to_end + 1" identifier + number_literal)) ;) (if_statement "if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < term->rows) {\n          ptVar4 = lineptr(term,iVar5,0x9a7,1);\n          to_end = 0;\n        }\n        else {\n          to_end = 0;\n        }\n      }" if (parenthesized_expression "(bVar2)" ( identifier )) (compound_statement "{\n        iVar5 = iVar5 + 1;\n        if (iVar5 < term->rows) {\n          ptVar4 = lineptr(term,iVar5,0x9a7,1);\n          to_end = 0;\n        }\n        else {\n          to_end = 0;\n        }\n      }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (if_statement "if (iVar5 < term->rows) {\n          ptVar4 = lineptr(term,iVar5,0x9a7,1);\n          to_end = 0;\n        }\n        else {\n          to_end = 0;\n        }" if (parenthesized_expression "(iVar5 < term->rows)" ( (binary_expression "iVar5 < term->rows" identifier < (field_expression "term->rows" identifier -> field_identifier)) )) (compound_statement "{\n          ptVar4 = lineptr(term,iVar5,0x9a7,1);\n          to_end = 0;\n        }" { (expression_statement "ptVar4 = lineptr(term,iVar5,0x9a7,1);" (assignment_expression "ptVar4 = lineptr(term,iVar5,0x9a7,1)" identifier = (call_expression "lineptr(term,iVar5,0x9a7,1)" identifier (argument_list "(term,iVar5,0x9a7,1)" ( identifier , identifier , number_literal , number_literal )))) ;) (expression_statement "to_end = 0;" (assignment_expression "to_end = 0" identifier = number_literal) ;) }) (else_clause "else {\n          to_end = 0;\n        }" else (compound_statement "{\n          to_end = 0;\n        }" { (expression_statement "to_end = 0;" (assignment_expression "to_end = 0" identifier = number_literal) ;) }))) })) })) (if_statement "if (!bVar3) {\n      return;\n    }" if (parenthesized_expression "(!bVar3)" ( (unary_expression "!bVar3" ! identifier) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) }))) (expression_statement "iVar5 = term->alt_which;" (assignment_expression "iVar5 = term->alt_which" identifier = (field_expression "term->alt_which" identifier -> field_identifier)) ;) (labeled_statement "LAB_000455e8:\n  if (iVar5 == 0) {\n    term->tempsblines = 0;\n  }" statement_identifier : (if_statement "if (iVar5 == 0) {\n    term->tempsblines = 0;\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    term->tempsblines = 0;\n  }" { (expression_statement "term->tempsblines = 0;" (assignment_expression "term->tempsblines = 0" (field_expression "term->tempsblines" identifier -> field_identifier) = number_literal) ;) }))) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00045424(int param_1,int param_2,int param_3,int param_4)\n\n{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  ushort *puVar4;\n  int iVar5;\n  int iVar6;\n  code *pcVar7;\n  code *pcVar8;\n  \n  bVar1 = param_2 == 0;\n  if (bVar1) {\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }\n  if (param_3 == 0) {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }\n  else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }\n  FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);\n  if (iVar5 == 0 && param_4 == 0) {\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }\n  iVar5 = *(int *)(param_1 + 0x1a4);\nLAB_000455e8:\n  if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }\n  return;\n}\n\n" (function_definition "void FUN_00045424(int param_1,int param_2,int param_3,int param_4)\n\n{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  ushort *puVar4;\n  int iVar5;\n  int iVar6;\n  code *pcVar7;\n  code *pcVar8;\n  \n  bVar1 = param_2 == 0;\n  if (bVar1) {\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }\n  if (param_3 == 0) {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }\n  else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }\n  FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);\n  if (iVar5 == 0 && param_4 == 0) {\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }\n  iVar5 = *(int *)(param_1 + 0x1a4);\nLAB_000455e8:\n  if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00045424(int param_1,int param_2,int param_3,int param_4)" identifier (parameter_list "(int param_1,int param_2,int param_3,int param_4)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  ushort *puVar4;\n  int iVar5;\n  int iVar6;\n  code *pcVar7;\n  code *pcVar8;\n  \n  bVar1 = param_2 == 0;\n  if (bVar1) {\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }\n  if (param_3 == 0) {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }\n  else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }\n  FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);\n  if (iVar5 == 0 && param_4 == 0) {\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }\n  iVar5 = *(int *)(param_1 + 0x1a4);\nLAB_000455e8:\n  if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }\n  return;\n}" { (declaration "bool bVar1;" primitive_type identifier ;) (declaration "bool bVar2;" primitive_type identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "ushort *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "code *pcVar7;" type_identifier (pointer_declarator "*pcVar7" * identifier) ;) (declaration "code *pcVar8;" type_identifier (pointer_declarator "*pcVar8" * identifier) ;) (expression_statement "bVar1 = param_2 == 0;" (assignment_expression "bVar1 = param_2 == 0" identifier = (binary_expression "param_2 == 0" identifier == number_literal)) ;) (if_statement "if (bVar1) {\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }" { (expression_statement "iVar6 = *(int *)(param_1 + 0x128);" (assignment_expression "iVar6 = *(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 "iVar5 = 0;" (assignment_expression "iVar5 = 0" identifier = number_literal) ;) }) (else_clause "else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }" else (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }" { (expression_statement "iVar5 = *(int *)(param_1 + 0x6c);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x6c)" identifier = (pointer_expression "*(int *)(param_1 + 0x6c)" * (cast_expression "(int *)(param_1 + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) ))))) ;) (expression_statement "iVar6 = iVar5 + 1;" (assignment_expression "iVar6 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) }))) (if_statement "if (param_3 == 0) {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }\n  else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }" { (expression_statement "iVar5 = *(int *)(param_1 + 0x6c);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x6c)" identifier = (pointer_expression "*(int *)(param_1 + 0x6c)" * (cast_expression "(int *)(param_1 + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) ))))) ;) (expression_statement "bVar3 = param_4 == 0;" (assignment_expression "bVar3 = param_4 == 0" identifier = (binary_expression "param_4 == 0" identifier == number_literal)) ;) (expression_statement "param_4 = *(int *)(param_1 + 0x70);" (assignment_expression "param_4 = *(int *)(param_1 + 0x70)" identifier = (pointer_expression "*(int *)(param_1 + 0x70)" * (cast_expression "(int *)(param_1 + 0x70)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) ))))) ;) (if_statement "if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }" if (parenthesized_expression "(bVar3)" ( identifier )) (compound_statement "{\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }" { (labeled_statement "LAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);" statement_identifier : (expression_statement "iVar6 = *(int *)(param_1 + 0x6c);" (assignment_expression "iVar6 = *(int *)(param_1 + 0x6c)" identifier = (pointer_expression "*(int *)(param_1 + 0x6c)" * (cast_expression "(int *)(param_1 + 0x6c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) ))))) ;)) (if_statement "if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }" if (parenthesized_expression "(*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70))" ( (binary_expression "*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)" (pointer_expression "*(int *)(param_1 + 300)" * (cast_expression "(int *)(param_1 + 300)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) == (pointer_expression "*(int *)(param_1 + 0x70)" * (cast_expression "(int *)(param_1 + 0x70)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) ))))) )) (compound_statement "{\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }" { (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "param_3 = 0;" (assignment_expression "param_3 = 0" identifier = number_literal) ;) }) (else_clause "else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }" else (compound_statement "{\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }" { (expression_statement "param_3 = *(int *)(param_1 + 0x70) + 1;" (assignment_expression "param_3 = *(int *)(param_1 + 0x70) + 1" identifier = (binary_expression "*(int *)(param_1 + 0x70) + 1" (pointer_expression "*(int *)(param_1 + 0x70)" * (cast_expression "(int *)(param_1 + 0x70)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) )))) + number_literal)) ;) }))) })) (labeled_statement "LAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));" statement_identifier : (expression_statement "FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));" (call_expression "FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c))" identifier (argument_list "(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c))" ( identifier , (pointer_expression "*(undefined4 *)(param_1 + 0x70)" * (cast_expression "(undefined4 *)(param_1 + 0x70)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x70)" ( (binary_expression "param_1 + 0x70" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x6c)" * (cast_expression "(undefined4 *)(param_1 + 0x6c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x6c)" ( (binary_expression "param_1 + 0x6c" identifier + number_literal) )))) ))) ;)) }) (else_clause "else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }" else (compound_statement "{\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }" { (if_statement "if (param_4 == 0) goto LAB_0004548c;" if (parenthesized_expression "(param_4 == 0)" ( (binary_expression "param_4 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0004548c;" goto statement_identifier ;)) (if_statement "if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }" if (parenthesized_expression "(param_3 == 0)" ( (binary_expression "param_3 == 0" identifier == number_literal) )) (compound_statement "{\n      param_4 = 0;\n      goto LAB_000454a0;\n    }" { (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" identifier = number_literal) ;) (goto_statement "goto LAB_000454a0;" goto statement_identifier ;) })) (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" identifier = number_literal) ;) (expression_statement "param_3 = 0;" (assignment_expression "param_3 = 0" identifier = number_literal) ;) }))) (expression_statement "FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);" (call_expression "FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3)" identifier (argument_list "(param_1,iVar5,param_4,iVar6,param_3)" ( identifier , identifier , identifier , identifier , identifier ))) ;) (if_statement "if (iVar5 == 0 && param_4 == 0) {\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }" if (parenthesized_expression "(iVar5 == 0 && param_4 == 0)" ( (binary_expression "iVar5 == 0 && param_4 == 0" (binary_expression "iVar5 == 0" identifier == number_literal) && (binary_expression "param_4 == 0" identifier == number_literal)) )) (compound_statement "{\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }" { (if_statement "if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x128) == iVar6)" ( (binary_expression "*(int *)(param_1 + 0x128) == iVar6" (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) )))) == identifier) )) (compound_statement "{\n      term_invalidate(param_1);\n    }" { (expression_statement "term_invalidate(param_1);" (call_expression "term_invalidate(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) })) (if_statement "if (param_3 != 0) goto LAB_00045518;" if (parenthesized_expression "(param_3 != 0)" ( (binary_expression "param_3 != 0" identifier != number_literal) )) (goto_statement "goto LAB_00045518;" goto statement_identifier ;)) (expression_statement "bVar3 = bVar1;" (assignment_expression "bVar3 = bVar1" identifier = identifier) ;) (if_statement "if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;" if (parenthesized_expression "((*(int *)(param_1 + 0x1118) == 0) || (!bVar1))" ( (binary_expression "(*(int *)(param_1 + 0x1118) == 0) || (!bVar1)" (parenthesized_expression "(*(int *)(param_1 + 0x1118) == 0)" ( (binary_expression "*(int *)(param_1 + 0x1118) == 0" (pointer_expression "*(int *)(param_1 + 0x1118)" * (cast_expression "(int *)(param_1 + 0x1118)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1118)" ( (binary_expression "param_1 + 0x1118" identifier + number_literal) )))) == number_literal) )) || (parenthesized_expression "(!bVar1)" ( (unary_expression "!bVar1" ! identifier) ))) )) (goto_statement "goto LAB_00045524;" goto statement_identifier ;)) (if_statement "if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 0x128) == iVar6)" ( (binary_expression "*(int *)(param_1 + 0x128) == iVar6" (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) )))) == identifier) )) (compound_statement "{\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }" { (expression_statement "iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);" (assignment_expression "iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1)" identifier = (call_expression "FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1)" identifier (argument_list "(param_1,*(undefined4 *)(param_1 + 8),0x99b,1)" ( identifier , (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) , number_literal , number_literal )))) ;) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) })) (if_statement "if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }" if (parenthesized_expression "(0 < iVar6)" ( (binary_expression "0 < iVar6" number_literal < identifier) )) (compound_statement "{\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }" { (expression_statement "FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);" (call_expression "FUN_00042400(param_1,0,iVar6 + -1,iVar6,1)" identifier (argument_list "(param_1,0,iVar6 + -1,iVar6,1)" ( identifier , number_literal , (binary_expression "iVar6 + -1" identifier + number_literal) , identifier , number_literal ))) ;) (expression_statement "iVar5 = *(int *)(param_1 + 0x1a4);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x1a4)" identifier = (pointer_expression "*(int *)(param_1 + 0x1a4)" * (cast_expression "(int *)(param_1 + 0x1a4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1a4)" ( (binary_expression "param_1 + 0x1a4" identifier + number_literal) ))))) ;) (goto_statement "goto LAB_000455e8;" goto statement_identifier ;) })) }) (else_clause "else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }" else (compound_statement "{\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }" { (labeled_statement "LAB_00045518:\n    bVar3 = false;" statement_identifier : (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" identifier = false) ;)) (labeled_statement "LAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);" statement_identifier : (expression_statement "puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);" (assignment_expression "puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1)" identifier = (cast_expression "(ushort *)FUN_00040730(param_1,iVar5,0x99b,1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00040730(param_1,iVar5,0x99b,1)" identifier (argument_list "(param_1,iVar5,0x99b,1)" ( identifier , identifier , number_literal , number_literal ))))) ;)) (expression_statement "pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);" (assignment_expression "pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4)" identifier = (cast_expression "(code *)(PTR_LAB_000ae3bc + 0x6e4)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_000ae3bc + 0x6e4)" ( (binary_expression "PTR_LAB_000ae3bc + 0x6e4" identifier + number_literal) )))) ;) (expression_statement "pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);" (assignment_expression "pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620)" identifier = (cast_expression "(code *)(PTR_LAB_000ae3bc + -0x620)" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_LAB_000ae3bc + -0x620)" ( (binary_expression "PTR_LAB_000ae3bc + -0x620" identifier + number_literal) )))) ;) (while_statement "while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }" while (parenthesized_expression "((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3)))))" ( (parenthesized_expression "(iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))" ( (binary_expression "iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3)))" (binary_expression "iVar5 < iVar6" identifier < identifier) || (parenthesized_expression "((iVar5 == iVar6 && (param_4 < param_3)))" ( (parenthesized_expression "(iVar5 == iVar6 && (param_4 < param_3))" ( (binary_expression "iVar5 == iVar6 && (param_4 < param_3)" (binary_expression "iVar5 == iVar6" identifier == identifier) && (parenthesized_expression "(param_4 < param_3)" ( (binary_expression "param_4 < param_3" identifier < identifier) ))) )) ))) )) )) (compound_statement "{\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }" { (expression_statement "(*pcVar7)(param_1,puVar4);" (call_expression "(*pcVar7)(param_1,puVar4)" (parenthesized_expression "(*pcVar7)" ( (pointer_expression "*pcVar7" * identifier) )) (argument_list "(param_1,puVar4)" ( identifier , identifier ))) ;) (if_statement "if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }" if (parenthesized_expression "(*(int *)(param_1 + 300) == param_4)" ( (binary_expression "*(int *)(param_1 + 300) == param_4" (pointer_expression "*(int *)(param_1 + 300)" * (cast_expression "(int *)(param_1 + 300)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) == identifier) )) (compound_statement "{\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }" { (if_statement "if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }" if (parenthesized_expression "(bVar1)" ( identifier )) (compound_statement "{\n          *puVar4 = 0;\n        }" { (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" * identifier) = number_literal) ;) }) (else_clause "else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }" else (compound_statement "{\n          *puVar4 = *puVar4 & 0xffcf;\n        }" { (expression_statement "*puVar4 = *puVar4 & 0xffcf;" (assignment_expression "*puVar4 = *puVar4 & 0xffcf" (pointer_expression "*puVar4" * identifier) = (binary_expression "*puVar4 & 0xffcf" (pointer_expression "*puVar4" * identifier) & number_literal)) ;) }))) }) (else_clause "else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }" else (compound_statement "{\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }" { (expression_statement "(*pcVar8)(puVar4,param_4,param_1 + 0x54);" (call_expression "(*pcVar8)(puVar4,param_4,param_1 + 0x54)" (parenthesized_expression "(*pcVar8)" ( (pointer_expression "*pcVar8" * identifier) )) (argument_list "(puVar4,param_4,param_1 + 0x54)" ( identifier , identifier , (binary_expression "param_1 + 0x54" identifier + number_literal) ))) ;) }))) (expression_statement "bVar2 = *(int *)(param_1 + 300) == param_4;" (assignment_expression "bVar2 = *(int *)(param_1 + 300) == param_4" identifier = (binary_expression "*(int *)(param_1 + 300) == param_4" (pointer_expression "*(int *)(param_1 + 300)" * (cast_expression "(int *)(param_1 + 300)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 300)" ( (binary_expression "param_1 + 300" identifier + number_literal) )))) == identifier)) ;) (expression_statement "param_4 = param_4 + 1;" (assignment_expression "param_4 = param_4 + 1" identifier = (binary_expression "param_4 + 1" identifier + number_literal)) ;) (if_statement "if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }" if (parenthesized_expression "(bVar2)" ( identifier )) (compound_statement "{\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }" { (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" identifier = (binary_expression "iVar5 + 1" identifier + number_literal)) ;) (if_statement "if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }" if (parenthesized_expression "(iVar5 < *(int *)(param_1 + 0x128))" ( (binary_expression "iVar5 < *(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) ))))) )) (compound_statement "{\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }" { (expression_statement "puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);" (assignment_expression "puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1)" identifier = (cast_expression "(ushort *)FUN_00040730(param_1,iVar5,0x9a7,1)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_00040730(param_1,iVar5,0x9a7,1)" identifier (argument_list "(param_1,iVar5,0x9a7,1)" ( identifier , identifier , number_literal , number_literal ))))) ;) (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" identifier = number_literal) ;) }) (else_clause "else {\n          param_4 = 0;\n        }" else (compound_statement "{\n          param_4 = 0;\n        }" { (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" identifier = number_literal) ;) }))) })) })) (if_statement "if (!bVar3) {\n      return;\n    }" if (parenthesized_expression "(!bVar3)" ( (unary_expression "!bVar3" ! identifier) )) (compound_statement "{\n      return;\n    }" { (return_statement "return;" return ;) })) }))) (expression_statement "iVar5 = *(int *)(param_1 + 0x1a4);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x1a4)" identifier = (pointer_expression "*(int *)(param_1 + 0x1a4)" * (cast_expression "(int *)(param_1 + 0x1a4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1a4)" ( (binary_expression "param_1 + 0x1a4" identifier + number_literal) ))))) ;) (labeled_statement "LAB_000455e8:\n  if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }" statement_identifier : (if_statement "if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }" if (parenthesized_expression "(iVar5 == 0)" ( (binary_expression "iVar5 == 0" identifier == number_literal) )) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }" { (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) ;) }))) (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) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == LIT)) ;) (if_statement if (parenthesized_expression ( 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 IDENT = LIT) ;) }) (else_clause else (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 IDENT = (binary_expression IDENT + LIT)) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (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 IDENT = (binary_expression IDENT == LIT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;)) (if_statement if (parenthesized_expression ( (binary_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) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) }))) })) (labeled_statement statement_identifier : (expression_statement (call_expression IDENT (argument_list ( IDENT , (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) )))) ))) ;)) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT == LIT) && (binary_expression IDENT == LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == LIT) )) || (parenthesized_expression ( (unary_expression ! IDENT) ))) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (binary_expression IDENT + LIT) , IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = BOOL) ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT ))))) ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (while_statement while (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT < IDENT) || (parenthesized_expression ( (parenthesized_expression ( (binary_expression (binary_expression IDENT == IDENT) && (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) ))) )) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT) )) (compound_statement { (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) & LIT)) ;) }))) }) (else_clause else (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * IDENT) )) (argument_list ( IDENT , IDENT , (binary_expression IDENT + LIT) ))) ;) }))) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == IDENT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }))) })) })) (if_statement if (parenthesized_expression ( (unary_expression ! IDENT) )) (compound_statement { (return_statement return ;) })) }))) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (labeled_statement statement_identifier : (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 FUN_00045424(int param_1,int param_2,int param_3,int param_4)\n\n{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  ushort *puVar4;\n  int iVar5;\n  int iVar6;\n  code *pcVar7;\n  code *pcVar8;\n  \n  bVar1 = param_2 == 0;\n  if (bVar1) {\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }\n  if (param_3 == 0) {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }\n  else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }\n  FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);\n  if (iVar5 == 0 && param_4 == 0) {\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }\n  iVar5 = *(int *)(param_1 + 0x1a4);\nLAB_000455e8:\n  if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00045424(int param_1,int param_2,int param_3,int param_4)" (identifier "FUN_00045424") (parameter_list "(int param_1,int param_2,int param_3,int param_4)" (( "(") (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")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  bool bVar1;\n  bool bVar2;\n  bool bVar3;\n  ushort *puVar4;\n  int iVar5;\n  int iVar6;\n  code *pcVar7;\n  code *pcVar8;\n  \n  bVar1 = param_2 == 0;\n  if (bVar1) {\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }\n  if (param_3 == 0) {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }\n  else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }\n  FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);\n  if (iVar5 == 0 && param_4 == 0) {\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }\n  iVar5 = *(int *)(param_1 + 0x1a4);\nLAB_000455e8:\n  if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }\n  return;\n}" ({ "{") (declaration "bool bVar1;" (primitive_type "bool") (identifier "bVar1") (; ";")) (declaration "bool bVar2;" (primitive_type "bool") (identifier "bVar2") (; ";")) (declaration "bool bVar3;" (primitive_type "bool") (identifier "bVar3") (; ";")) (declaration "ushort *puVar4;" (type_identifier "ushort") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "code *pcVar7;" (type_identifier "code") (pointer_declarator "*pcVar7" (* "*") (identifier "pcVar7")) (; ";")) (declaration "code *pcVar8;" (type_identifier "code") (pointer_declarator "*pcVar8" (* "*") (identifier "pcVar8")) (; ";")) (expression_statement "bVar1 = param_2 == 0;" (assignment_expression "bVar1 = param_2 == 0" (identifier "bVar1") (= "=") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0"))) (; ";")) (if_statement "if (bVar1) {\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }\n  else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }" (if "if") (parenthesized_expression "(bVar1)" (( "(") (identifier "bVar1") () ")")) (compound_statement "{\n    iVar6 = *(int *)(param_1 + 0x128);\n    iVar5 = 0;\n  }" ({ "{") (expression_statement "iVar6 = *(int *)(param_1 + 0x128);" (assignment_expression "iVar6 = *(int *)(param_1 + 0x128)" (identifier "iVar6") (= "=") (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 "iVar5 = 0;" (assignment_expression "iVar5 = 0" (identifier "iVar5") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }" (else "else") (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0x6c);\n    iVar6 = iVar5 + 1;\n  }" ({ "{") (expression_statement "iVar5 = *(int *)(param_1 + 0x6c);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x6c)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(param_1 + 0x6c)" (* "*") (cast_expression "(int *)(param_1 + 0x6c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x6c)" (( "(") (binary_expression "param_1 + 0x6c" (identifier "param_1") (+ "+") (number_literal "0x6c")) () ")"))))) (; ";")) (expression_statement "iVar6 = iVar5 + 1;" (assignment_expression "iVar6 = iVar5 + 1" (identifier "iVar6") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (} "}")))) (if_statement "if (param_3 == 0) {\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }\n  else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0x6c);\n    bVar3 = param_4 == 0;\n    param_4 = *(int *)(param_1 + 0x70);\n    if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }\nLAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));\n  }" ({ "{") (expression_statement "iVar5 = *(int *)(param_1 + 0x6c);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x6c)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(param_1 + 0x6c)" (* "*") (cast_expression "(int *)(param_1 + 0x6c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x6c)" (( "(") (binary_expression "param_1 + 0x6c" (identifier "param_1") (+ "+") (number_literal "0x6c")) () ")"))))) (; ";")) (expression_statement "bVar3 = param_4 == 0;" (assignment_expression "bVar3 = param_4 == 0" (identifier "bVar3") (= "=") (binary_expression "param_4 == 0" (identifier "param_4") (== "==") (number_literal "0"))) (; ";")) (expression_statement "param_4 = *(int *)(param_1 + 0x70);" (assignment_expression "param_4 = *(int *)(param_1 + 0x70)" (identifier "param_4") (= "=") (pointer_expression "*(int *)(param_1 + 0x70)" (* "*") (cast_expression "(int *)(param_1 + 0x70)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x70)" (( "(") (binary_expression "param_1 + 0x70" (identifier "param_1") (+ "+") (number_literal "0x70")) () ")"))))) (; ";")) (if_statement "if (bVar3) {\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }" (if "if") (parenthesized_expression "(bVar3)" (( "(") (identifier "bVar3") () ")")) (compound_statement "{\nLAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);\n      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }\n    }" ({ "{") (labeled_statement "LAB_0004548c:\n      iVar6 = *(int *)(param_1 + 0x6c);" (statement_identifier "LAB_0004548c") (: ":") (expression_statement "iVar6 = *(int *)(param_1 + 0x6c);" (assignment_expression "iVar6 = *(int *)(param_1 + 0x6c)" (identifier "iVar6") (= "=") (pointer_expression "*(int *)(param_1 + 0x6c)" (* "*") (cast_expression "(int *)(param_1 + 0x6c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x6c)" (( "(") (binary_expression "param_1 + 0x6c" (identifier "param_1") (+ "+") (number_literal "0x6c")) () ")"))))) (; ";"))) (if_statement "if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }\n      else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70))" (( "(") (binary_expression "*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)" (pointer_expression "*(int *)(param_1 + 300)" (* "*") (cast_expression "(int *)(param_1 + 300)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 300)" (( "(") (binary_expression "param_1 + 300" (identifier "param_1") (+ "+") (number_literal "300")) () ")")))) (== "==") (pointer_expression "*(int *)(param_1 + 0x70)" (* "*") (cast_expression "(int *)(param_1 + 0x70)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x70)" (( "(") (binary_expression "param_1 + 0x70" (identifier "param_1") (+ "+") (number_literal "0x70")) () ")"))))) () ")")) (compound_statement "{\n        iVar6 = iVar6 + 1;\n        param_3 = 0;\n      }" ({ "{") (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" (identifier "iVar6") (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "param_3 = 0;" (assignment_expression "param_3 = 0" (identifier "param_3") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }" (else "else") (compound_statement "{\n        param_3 = *(int *)(param_1 + 0x70) + 1;\n      }" ({ "{") (expression_statement "param_3 = *(int *)(param_1 + 0x70) + 1;" (assignment_expression "param_3 = *(int *)(param_1 + 0x70) + 1" (identifier "param_3") (= "=") (binary_expression "*(int *)(param_1 + 0x70) + 1" (pointer_expression "*(int *)(param_1 + 0x70)" (* "*") (cast_expression "(int *)(param_1 + 0x70)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x70)" (( "(") (binary_expression "param_1 + 0x70" (identifier "param_1") (+ "+") (number_literal "0x70")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (} "}")))) (} "}"))) (labeled_statement "LAB_000454a0:\n    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));" (statement_identifier "LAB_000454a0") (: ":") (expression_statement "FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));" (call_expression "FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c))" (identifier "FUN_000409b8") (argument_list "(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c))" (( "(") (identifier "param_1") (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x70)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x70)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x70)" (( "(") (binary_expression "param_1 + 0x70" (identifier "param_1") (+ "+") (number_literal "0x70")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x6c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x6c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x6c)" (( "(") (binary_expression "param_1 + 0x6c" (identifier "param_1") (+ "+") (number_literal "0x6c")) () ")")))) () ")"))) (; ";"))) (} "}")) (else_clause "else {\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }" (else "else") (compound_statement "{\n    if (param_4 == 0) goto LAB_0004548c;\n    if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }\n    param_4 = 0;\n    param_3 = 0;\n  }" ({ "{") (if_statement "if (param_4 == 0) goto LAB_0004548c;" (if "if") (parenthesized_expression "(param_4 == 0)" (( "(") (binary_expression "param_4 == 0" (identifier "param_4") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0004548c;" (goto "goto") (statement_identifier "LAB_0004548c") (; ";"))) (if_statement "if (param_3 == 0) {\n      param_4 = 0;\n      goto LAB_000454a0;\n    }" (if "if") (parenthesized_expression "(param_3 == 0)" (( "(") (binary_expression "param_3 == 0" (identifier "param_3") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      param_4 = 0;\n      goto LAB_000454a0;\n    }" ({ "{") (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" (identifier "param_4") (= "=") (number_literal "0")) (; ";")) (goto_statement "goto LAB_000454a0;" (goto "goto") (statement_identifier "LAB_000454a0") (; ";")) (} "}"))) (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" (identifier "param_4") (= "=") (number_literal "0")) (; ";")) (expression_statement "param_3 = 0;" (assignment_expression "param_3 = 0" (identifier "param_3") (= "=") (number_literal "0")) (; ";")) (} "}")))) (expression_statement "FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);" (call_expression "FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3)" (identifier "FUN_0003efc8") (argument_list "(param_1,iVar5,param_4,iVar6,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "iVar5") (, ",") (identifier "param_4") (, ",") (identifier "iVar6") (, ",") (identifier "param_3") () ")"))) (; ";")) (if_statement "if (iVar5 == 0 && param_4 == 0) {\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }\n  else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }" (if "if") (parenthesized_expression "(iVar5 == 0 && param_4 == 0)" (( "(") (binary_expression "iVar5 == 0 && param_4 == 0" (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) (&& "&&") (binary_expression "param_4 == 0" (identifier "param_4") (== "==") (number_literal "0"))) () ")")) (compound_statement "{\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }\n    if (param_3 != 0) goto LAB_00045518;\n    bVar3 = bVar1;\n    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;\n    if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }\n    if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }\n  }" ({ "{") (if_statement "if (*(int *)(param_1 + 0x128) == iVar6) {\n      term_invalidate(param_1);\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x128) == iVar6)" (( "(") (binary_expression "*(int *)(param_1 + 0x128) == iVar6" (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")) () ")")))) (== "==") (identifier "iVar6")) () ")")) (compound_statement "{\n      term_invalidate(param_1);\n    }" ({ "{") (expression_statement "term_invalidate(param_1);" (call_expression "term_invalidate(param_1)" (identifier "term_invalidate") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_3 != 0) goto LAB_00045518;" (if "if") (parenthesized_expression "(param_3 != 0)" (( "(") (binary_expression "param_3 != 0" (identifier "param_3") (!= "!=") (number_literal "0")) () ")")) (goto_statement "goto LAB_00045518;" (goto "goto") (statement_identifier "LAB_00045518") (; ";"))) (expression_statement "bVar3 = bVar1;" (assignment_expression "bVar3 = bVar1" (identifier "bVar3") (= "=") (identifier "bVar1")) (; ";")) (if_statement "if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;" (if "if") (parenthesized_expression "((*(int *)(param_1 + 0x1118) == 0) || (!bVar1))" (( "(") (binary_expression "(*(int *)(param_1 + 0x1118) == 0) || (!bVar1)" (parenthesized_expression "(*(int *)(param_1 + 0x1118) == 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x1118) == 0" (pointer_expression "*(int *)(param_1 + 0x1118)" (* "*") (cast_expression "(int *)(param_1 + 0x1118)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1118)" (( "(") (binary_expression "param_1 + 0x1118" (identifier "param_1") (+ "+") (number_literal "0x1118")) () ")")))) (== "==") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(!bVar1)" (( "(") (unary_expression "!bVar1" (! "!") (identifier "bVar1")) () ")"))) () ")")) (goto_statement "goto LAB_00045524;" (goto "goto") (statement_identifier "LAB_00045524") (; ";"))) (if_statement "if (*(int *)(param_1 + 0x128) == iVar6) {\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 0x128) == iVar6)" (( "(") (binary_expression "*(int *)(param_1 + 0x128) == iVar6" (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")) () ")")))) (== "==") (identifier "iVar6")) () ")")) (compound_statement "{\n      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);\n      iVar6 = iVar6 + 1;\n    }" ({ "{") (expression_statement "iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);" (assignment_expression "iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1)" (identifier "iVar6") (= "=") (call_expression "FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1)" (identifier "FUN_0004457c") (argument_list "(param_1,*(undefined4 *)(param_1 + 8),0x99b,1)" (( "(") (identifier "param_1") (, ",") (pointer_expression "*(undefined4 *)(param_1 + 8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (, ",") (number_literal "0x99b") (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" (identifier "iVar6") (= "=") (binary_expression "iVar6 + 1" (identifier "iVar6") (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (if_statement "if (0 < iVar6) {\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }" (if "if") (parenthesized_expression "(0 < iVar6)" (( "(") (binary_expression "0 < iVar6" (number_literal "0") (< "<") (identifier "iVar6")) () ")")) (compound_statement "{\n      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);\n      iVar5 = *(int *)(param_1 + 0x1a4);\n      goto LAB_000455e8;\n    }" ({ "{") (expression_statement "FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);" (call_expression "FUN_00042400(param_1,0,iVar6 + -1,iVar6,1)" (identifier "FUN_00042400") (argument_list "(param_1,0,iVar6 + -1,iVar6,1)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (binary_expression "iVar6 + -1" (identifier "iVar6") (+ "+") (number_literal "-1")) (, ",") (identifier "iVar6") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "iVar5 = *(int *)(param_1 + 0x1a4);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x1a4)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(param_1 + 0x1a4)" (* "*") (cast_expression "(int *)(param_1 + 0x1a4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1a4)" (( "(") (binary_expression "param_1 + 0x1a4" (identifier "param_1") (+ "+") (number_literal "0x1a4")) () ")"))))) (; ";")) (goto_statement "goto LAB_000455e8;" (goto "goto") (statement_identifier "LAB_000455e8") (; ";")) (} "}"))) (} "}")) (else_clause "else {\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }" (else "else") (compound_statement "{\nLAB_00045518:\n    bVar3 = false;\nLAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);\n    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);\n    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);\n    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }\n    if (!bVar3) {\n      return;\n    }\n  }" ({ "{") (labeled_statement "LAB_00045518:\n    bVar3 = false;" (statement_identifier "LAB_00045518") (: ":") (expression_statement "bVar3 = false;" (assignment_expression "bVar3 = false" (identifier "bVar3") (= "=") (false "false")) (; ";"))) (labeled_statement "LAB_00045524:\n    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);" (statement_identifier "LAB_00045524") (: ":") (expression_statement "puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);" (assignment_expression "puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1)" (identifier "puVar4") (= "=") (cast_expression "(ushort *)FUN_00040730(param_1,iVar5,0x99b,1)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00040730(param_1,iVar5,0x99b,1)" (identifier "FUN_00040730") (argument_list "(param_1,iVar5,0x99b,1)" (( "(") (identifier "param_1") (, ",") (identifier "iVar5") (, ",") (number_literal "0x99b") (, ",") (number_literal "1") () ")"))))) (; ";"))) (expression_statement "pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);" (assignment_expression "pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4)" (identifier "pcVar7") (= "=") (cast_expression "(code *)(PTR_LAB_000ae3bc + 0x6e4)" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_LAB_000ae3bc + 0x6e4)" (( "(") (binary_expression "PTR_LAB_000ae3bc + 0x6e4" (identifier "PTR_LAB_000ae3bc") (+ "+") (number_literal "0x6e4")) () ")")))) (; ";")) (expression_statement "pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);" (assignment_expression "pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620)" (identifier "pcVar8") (= "=") (cast_expression "(code *)(PTR_LAB_000ae3bc + -0x620)" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_LAB_000ae3bc + -0x620)" (( "(") (binary_expression "PTR_LAB_000ae3bc + -0x620" (identifier "PTR_LAB_000ae3bc") (+ "+") (number_literal "-0x620")) () ")")))) (; ";")) (while_statement "while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }" (while "while") (parenthesized_expression "((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3)))))" (( "(") (parenthesized_expression "(iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))" (( "(") (binary_expression "iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3)))" (binary_expression "iVar5 < iVar6" (identifier "iVar5") (< "<") (identifier "iVar6")) (|| "||") (parenthesized_expression "((iVar5 == iVar6 && (param_4 < param_3)))" (( "(") (parenthesized_expression "(iVar5 == iVar6 && (param_4 < param_3))" (( "(") (binary_expression "iVar5 == iVar6 && (param_4 < param_3)" (binary_expression "iVar5 == iVar6" (identifier "iVar5") (== "==") (identifier "iVar6")) (&& "&&") (parenthesized_expression "(param_4 < param_3)" (( "(") (binary_expression "param_4 < param_3" (identifier "param_4") (< "<") (identifier "param_3")) () ")"))) () ")")) () ")"))) () ")")) () ")")) (compound_statement "{\n      (*pcVar7)(param_1,puVar4);\n      if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }\n      bVar2 = *(int *)(param_1 + 300) == param_4;\n      param_4 = param_4 + 1;\n      if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }\n    }" ({ "{") (expression_statement "(*pcVar7)(param_1,puVar4);" (call_expression "(*pcVar7)(param_1,puVar4)" (parenthesized_expression "(*pcVar7)" (( "(") (pointer_expression "*pcVar7" (* "*") (identifier "pcVar7")) () ")")) (argument_list "(param_1,puVar4)" (( "(") (identifier "param_1") (, ",") (identifier "puVar4") () ")"))) (; ";")) (if_statement "if (*(int *)(param_1 + 300) == param_4) {\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }\n      else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 300) == param_4)" (( "(") (binary_expression "*(int *)(param_1 + 300) == param_4" (pointer_expression "*(int *)(param_1 + 300)" (* "*") (cast_expression "(int *)(param_1 + 300)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 300)" (( "(") (binary_expression "param_1 + 300" (identifier "param_1") (+ "+") (number_literal "300")) () ")")))) (== "==") (identifier "param_4")) () ")")) (compound_statement "{\n        if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }\n      }" ({ "{") (if_statement "if (bVar1) {\n          *puVar4 = 0;\n        }\n        else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }" (if "if") (parenthesized_expression "(bVar1)" (( "(") (identifier "bVar1") () ")")) (compound_statement "{\n          *puVar4 = 0;\n        }" ({ "{") (expression_statement "*puVar4 = 0;" (assignment_expression "*puVar4 = 0" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n          *puVar4 = *puVar4 & 0xffcf;\n        }" (else "else") (compound_statement "{\n          *puVar4 = *puVar4 & 0xffcf;\n        }" ({ "{") (expression_statement "*puVar4 = *puVar4 & 0xffcf;" (assignment_expression "*puVar4 = *puVar4 & 0xffcf" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (= "=") (binary_expression "*puVar4 & 0xffcf" (pointer_expression "*puVar4" (* "*") (identifier "puVar4")) (& "&") (number_literal "0xffcf"))) (; ";")) (} "}")))) (} "}")) (else_clause "else {\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }" (else "else") (compound_statement "{\n        (*pcVar8)(puVar4,param_4,param_1 + 0x54);\n      }" ({ "{") (expression_statement "(*pcVar8)(puVar4,param_4,param_1 + 0x54);" (call_expression "(*pcVar8)(puVar4,param_4,param_1 + 0x54)" (parenthesized_expression "(*pcVar8)" (( "(") (pointer_expression "*pcVar8" (* "*") (identifier "pcVar8")) () ")")) (argument_list "(puVar4,param_4,param_1 + 0x54)" (( "(") (identifier "puVar4") (, ",") (identifier "param_4") (, ",") (binary_expression "param_1 + 0x54" (identifier "param_1") (+ "+") (number_literal "0x54")) () ")"))) (; ";")) (} "}")))) (expression_statement "bVar2 = *(int *)(param_1 + 300) == param_4;" (assignment_expression "bVar2 = *(int *)(param_1 + 300) == param_4" (identifier "bVar2") (= "=") (binary_expression "*(int *)(param_1 + 300) == param_4" (pointer_expression "*(int *)(param_1 + 300)" (* "*") (cast_expression "(int *)(param_1 + 300)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 300)" (( "(") (binary_expression "param_1 + 300" (identifier "param_1") (+ "+") (number_literal "300")) () ")")))) (== "==") (identifier "param_4"))) (; ";")) (expression_statement "param_4 = param_4 + 1;" (assignment_expression "param_4 = param_4 + 1" (identifier "param_4") (= "=") (binary_expression "param_4 + 1" (identifier "param_4") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (bVar2) {\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }" (if "if") (parenthesized_expression "(bVar2)" (( "(") (identifier "bVar2") () ")")) (compound_statement "{\n        iVar5 = iVar5 + 1;\n        if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }\n      }" ({ "{") (expression_statement "iVar5 = iVar5 + 1;" (assignment_expression "iVar5 = iVar5 + 1" (identifier "iVar5") (= "=") (binary_expression "iVar5 + 1" (identifier "iVar5") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (iVar5 < *(int *)(param_1 + 0x128)) {\n          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }\n        else {\n          param_4 = 0;\n        }" (if "if") (parenthesized_expression "(iVar5 < *(int *)(param_1 + 0x128))" (( "(") (binary_expression "iVar5 < *(int *)(param_1 + 0x128)" (identifier "iVar5") (< "<") (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          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);\n          param_4 = 0;\n        }" ({ "{") (expression_statement "puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);" (assignment_expression "puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1)" (identifier "puVar4") (= "=") (cast_expression "(ushort *)FUN_00040730(param_1,iVar5,0x9a7,1)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_00040730(param_1,iVar5,0x9a7,1)" (identifier "FUN_00040730") (argument_list "(param_1,iVar5,0x9a7,1)" (( "(") (identifier "param_1") (, ",") (identifier "iVar5") (, ",") (number_literal "0x9a7") (, ",") (number_literal "1") () ")"))))) (; ";")) (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" (identifier "param_4") (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n          param_4 = 0;\n        }" (else "else") (compound_statement "{\n          param_4 = 0;\n        }" ({ "{") (expression_statement "param_4 = 0;" (assignment_expression "param_4 = 0" (identifier "param_4") (= "=") (number_literal "0")) (; ";")) (} "}")))) (} "}"))) (} "}"))) (if_statement "if (!bVar3) {\n      return;\n    }" (if "if") (parenthesized_expression "(!bVar3)" (( "(") (unary_expression "!bVar3" (! "!") (identifier "bVar3")) () ")")) (compound_statement "{\n      return;\n    }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (} "}")))) (expression_statement "iVar5 = *(int *)(param_1 + 0x1a4);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x1a4)" (identifier "iVar5") (= "=") (pointer_expression "*(int *)(param_1 + 0x1a4)" (* "*") (cast_expression "(int *)(param_1 + 0x1a4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1a4)" (( "(") (binary_expression "param_1 + 0x1a4" (identifier "param_1") (+ "+") (number_literal "0x1a4")) () ")"))))) (; ";")) (labeled_statement "LAB_000455e8:\n  if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }" (statement_identifier "LAB_000455e8") (: ":") (if_statement "if (iVar5 == 0) {\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }" (if "if") (parenthesized_expression "(iVar5 == 0)" (( "(") (binary_expression "iVar5 == 0" (identifier "iVar5") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *(undefined4 *)(param_1 + 0x14) = 0;\n  }" ({ "{") (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")) (; ";")) (} "}")))) (return_statement "return;" (return "return") (; ";")) (} "}")))

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

void function_1(type_1 *term,int var_1,int var_3,int var_4)

{
  bool bVar1;
  bool bVar2;
  bool bVar3;
  type_2 from;
  type_2 to;
  type_3 *ptVar4;
  int var_2;
  int var_6;
  int var_5;
  int var_14;
  int in_stack_ffffffb4;
  type_4 *var_13;
  int in_stack_ffffffbc;
  
  var_13 = &_gp;
  bVar1 = var_1 == 0;
  if (bVar1) {
    var_6 = term->rows;
    var_2 = 0;
  }
  else {
    var_2 = (term->curs).y;
    var_6 = var_2 + 1;
  }
  if (var_3 == 0) {
    var_2 = (term->curs).y;
    bVar3 = var_4 == 0;
    var_4 = (term->curs).x;
    if (bVar3) {
LAB_0004548c:
      var_5 = (term->curs).x;
      var_6 = (term->curs).y;
      if (term->cols == var_5) {
        var_6 = var_6 + 1;
        var_3 = 0;
      }
      else {
        var_3 = var_5 + 1;
      }
    }
LAB_000454a0:
    var_7(term,(term->curs).x,(term->curs).y);
  }
  else {
    if (var_4 == 0) goto LAB_0004548c;
    if (var_3 == 0) {
      var_4 = 0;
      goto LAB_000454a0;
    }
    var_4 = 0;
    var_3 = 0;
  }
  from.y = var_3;
  from.x = in_stack_ffffffb4;
  to.y = (int)var_13;
  to.x = in_stack_ffffffbc;
  var_8(term,from,to);
  if (var_2 == 0 && var_4 == 0) {
    if (term->rows == var_6) {
      var_9(term);
    }
    if (var_3 != 0) goto LAB_00045518;
    bVar3 = bVar1;
    if ((term->erase_to_scrollback == 0) || (!bVar1)) goto LAB_00045524;
    if (term->rows == var_6) {
      var_6 = var_10(term,term->screen);
      var_6 = var_6 + 1;
    }
    if (0 < var_6) {
      var_11(term,0,var_6 + -1,var_6,1);
      var_2 = term->alt_which;
      goto LAB_000455e8;
    }
  }
  else {
LAB_00045518:
    bVar3 = false;
LAB_00045524:
    ptVar4 = var_12(term,var_2,0x99b,1);
    var_5 = *(int *)(var_13 + -0x7cd4);
    var_14 = *(int *)(var_13 + -0x7cd4);
    while ((var_2 < var_6 || ((var_2 == var_6 && (var_4 < var_3))))) {
      (*(type_5 *)(var_5 + 0x6e4))(term,ptVar4);
      if (term->cols == var_4) {
        if (bVar1) {
          ptVar4->lattr = 0;
        }
        else {
          ptVar4->lattr = ptVar4->lattr & 0xffcf;
        }
      }
      else {
        (*(type_5 *)(var_14 + -0x620))(ptVar4,var_4,&term->erase_char);
      }
      bVar2 = term->cols == var_4;
      var_4 = var_4 + 1;
      if (bVar2) {
        var_2 = var_2 + 1;
        if (var_2 < term->rows) {
          ptVar4 = var_12(term,var_2,0x9a7,1);
          var_4 = 0;
        }
        else {
          var_4 = 0;
        }
      }
    }
    if (!bVar3) {
      return;
    }
  }
  var_2 = term->alt_which;
LAB_000455e8:
  if (var_2 == 0) {
    term->tempsblines = 0;
  }
  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)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (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)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (labeled_statement label: (statement_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)))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (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 (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))))))))) (labeled_statement label: (statement_identifier) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (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))))) (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)))))))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) right: (parenthesized_expression (unary_expression argument: (identifier))))) consequence: (goto_statement label: (statement_identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (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) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (binary_expression left: (identifier) right: (number_literal)) (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (goto_statement label: (statement_identifier))))) alternative: (else_clause (compound_statement (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (false)))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (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: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))) (while_statement condition: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (parenthesized_expression (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))))))))) body: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (identifier) (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)))))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (identifier))) arguments: (argument_list (identifier) (identifier) (binary_expression left: (identifier) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement 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))))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (number_literal) (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))))))))) (if_statement condition: (parenthesized_expression (unary_expression argument: (identifier))) consequence: (compound_statement (return_statement)))))) (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))))))) (labeled_statement label: (statement_identifier) (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 param_4)

{
  bool bVar1;
  bool bVar2;
  bool bVar3;
  ushort *puVar4;
  int iVar5;
  int iVar6;
  code *pcVar7;
  code *pcVar8;
  
  bVar1 = param_2 == 0;
  if (bVar1) {
    iVar6 = *(int *)(param_1 + 0x128);
    iVar5 = 0;
  }
  else {
    iVar5 = *(int *)(param_1 + 0x6c);
    iVar6 = iVar5 + 1;
  }
  if (param_3 == 0) {
    iVar5 = *(int *)(param_1 + 0x6c);
    bVar3 = param_4 == 0;
    param_4 = *(int *)(param_1 + 0x70);
    if (bVar3) {
LAB_0004548c:
      iVar6 = *(int *)(param_1 + 0x6c);
      if (*(int *)(param_1 + 300) == *(int *)(param_1 + 0x70)) {
        iVar6 = iVar6 + 1;
        param_3 = 0;
      }
      else {
        param_3 = *(int *)(param_1 + 0x70) + 1;
      }
    }
LAB_000454a0:
    FUN_000409b8(param_1,*(undefined4 *)(param_1 + 0x70),*(undefined4 *)(param_1 + 0x6c));
  }
  else {
    if (param_4 == 0) goto LAB_0004548c;
    if (param_3 == 0) {
      param_4 = 0;
      goto LAB_000454a0;
    }
    param_4 = 0;
    param_3 = 0;
  }
  FUN_0003efc8(param_1,iVar5,param_4,iVar6,param_3);
  if (iVar5 == 0 && param_4 == 0) {
    if (*(int *)(param_1 + 0x128) == iVar6) {
      term_invalidate(param_1);
    }
    if (param_3 != 0) goto LAB_00045518;
    bVar3 = bVar1;
    if ((*(int *)(param_1 + 0x1118) == 0) || (!bVar1)) goto LAB_00045524;
    if (*(int *)(param_1 + 0x128) == iVar6) {
      iVar6 = FUN_0004457c(param_1,*(undefined4 *)(param_1 + 8),0x99b,1);
      iVar6 = iVar6 + 1;
    }
    if (0 < iVar6) {
      FUN_00042400(param_1,0,iVar6 + -1,iVar6,1);
      iVar5 = *(int *)(param_1 + 0x1a4);
      goto LAB_000455e8;
    }
  }
  else {
LAB_00045518:
    bVar3 = false;
LAB_00045524:
    puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x99b,1);
    pcVar7 = (code *)(PTR_LAB_000ae3bc + 0x6e4);
    pcVar8 = (code *)(PTR_LAB_000ae3bc + -0x620);
    while ((iVar5 < iVar6 || ((iVar5 == iVar6 && (param_4 < param_3))))) {
      (*pcVar7)(param_1,puVar4);
      if (*(int *)(param_1 + 300) == param_4) {
        if (bVar1) {
          *puVar4 = 0;
        }
        else {
          *puVar4 = *puVar4 & 0xffcf;
        }
      }
      else {
        (*pcVar8)(puVar4,param_4,param_1 + 0x54);
      }
      bVar2 = *(int *)(param_1 + 300) == param_4;
      param_4 = param_4 + 1;
      if (bVar2) {
        iVar5 = iVar5 + 1;
        if (iVar5 < *(int *)(param_1 + 0x128)) {
          puVar4 = (ushort *)FUN_00040730(param_1,iVar5,0x9a7,1);
          param_4 = 0;
        }
        else {
          param_4 = 0;
        }
      }
    }
    if (!bVar3) {
      return;
    }
  }
  iVar5 = *(int *)(param_1 + 0x1a4);
LAB_000455e8:
  if (iVar5 == 0) {
    *(undefined4 *)(param_1 + 0x14) = 0;
  }
  return;
}

