
void read_keys_from(WINDOW *win)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined4 *puVar3;
  int code;
  int *piVar4;
  char *msg;
  void *pvVar5;
  int iVar6;
  undefined *puVar7;
  
  (*(code *)PTR_doupdate_0007cfcc)();
  if (PTR_DAT_0007c548[-0x29af] != '\0') {
    (*(code *)PTR_curs_set_0007d154)(1);
  }
  puVar2 = PTR_the_window_resized_0007ca8c;
  puVar1 = PTR_DAT_0007c548;
  iVar6 = 0;
  puVar7 = PTR_DAT_0007c570 + -0x5994;
  while( true ) {
    code = (*(code *)PTR_wgetch_0007d0c4)(win);
    if (*(int *)puVar2 != 0) {
      regenerate_screen();
      (*(code *)PTR_curs_set_0007d154)(0);
      puVar1 = PTR_DAT_0007c548;
      puVar3 = (undefined4 *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);
      *(undefined4 **)(puVar1 + -0x299c) = puVar3;
      *puVar3 = 0xfffffffe;
      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;
      return;
    }
    if (code != -1) break;
    iVar6 = iVar6 + 1;
    if (puVar1[-0x3af4] == '\0') {
      (*(code *)PTR_curs_set_0007d154)(0);
      return;
    }
    if (iVar6 == 0x80) {
      msg = (char *)(*(code *)PTR_dcgettext_0007d100)(0,puVar7,5);
      die(msg);
    }
  }
  (*(code *)PTR_curs_set_0007d154)(0);
  puVar1 = PTR_DAT_0007c548;
  piVar4 = (int *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);
  *(int **)(puVar1 + -0x299c) = piVar4;
  *piVar4 = code;
  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;
  if (code == -2) {
    return;
  }
  (*(code *)PTR_nodelay_0007d1a8)(win,1);
  puVar1 = PTR_DAT_0007c548;
  while( true ) {
    if (puVar1[-0x29b0] != '\0') {
      add_to_macrobuffer(code);
    }
    code = (*(code *)PTR_wgetch_0007d0c4)(win);
    iVar6 = *(int *)(puVar1 + -0x29a0);
    if (code == -1) break;
    *(int *)(puVar1 + -0x29a0) = iVar6 + 1;
    pvVar5 = nrealloc(*(void **)(puVar1 + -0x299c),(iVar6 + 1) * 4);
    *(void **)(puVar1 + -0x299c) = pvVar5;
    *(int *)((int)pvVar5 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = code;
  }
  if (PTR_DAT_0007c548[-0x3af4] == '\0') {
    return;
  }
  (*(code *)PTR_nodelay_0007d1a8)(win,0);
  return;
}



void read_keys_from(undefined4 param_1)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined4 *puVar3;
  int iVar4;
  int *piVar5;
  undefined4 uVar6;
  int iVar7;
  undefined *puVar8;
  
  (*(code *)PTR_doupdate_0007cfcc)();
  if (PTR_DAT_0007c548[-0x29af] != '\0') {
    (*(code *)PTR_curs_set_0007d154)(1);
  }
  puVar2 = PTR_the_window_resized_0007ca8c;
  puVar1 = PTR_DAT_0007c548;
  iVar7 = 0;
  puVar8 = PTR_DAT_0007c570 + -0x5994;
  while( true ) {
    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);
    if (*(int *)puVar2 != 0) {
      regenerate_screen();
      (*(code *)PTR_curs_set_0007d154)(0);
      puVar1 = PTR_DAT_0007c548;
      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);
      *(undefined4 **)(puVar1 + -0x299c) = puVar3;
      *puVar3 = 0xfffffffe;
      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;
      return;
    }
    if (iVar4 != -1) break;
    iVar7 = iVar7 + 1;
    if (puVar1[-0x3af4] == '\0') {
      (*(code *)PTR_curs_set_0007d154)(0);
      return;
    }
    if (iVar7 == 0x80) {
      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);
      die(uVar6);
    }
  }
  (*(code *)PTR_curs_set_0007d154)(0);
  puVar1 = PTR_DAT_0007c548;
  piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);
  *(int **)(puVar1 + -0x299c) = piVar5;
  *piVar5 = iVar4;
  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;
  if (iVar4 == -2) {
    return;
  }
  (*(code *)PTR_nodelay_0007d1a8)(param_1,1);
  puVar1 = PTR_DAT_0007c548;
  while( true ) {
    if (puVar1[-0x29b0] != '\0') {
      add_to_macrobuffer(iVar4);
    }
    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);
    iVar7 = *(int *)(puVar1 + -0x29a0);
    if (iVar4 == -1) break;
    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;
    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);
    *(int *)(puVar1 + -0x299c) = iVar7;
    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;
  }
  if (PTR_DAT_0007c548[-0x3af4] == '\0') {
    return;
  }
  (*(code *)PTR_nodelay_0007d1a8)(param_1,0);
  return;
}


lui gp,0x4
addiu gp,gp,-0x2b4c
addu gp,gp,t9
addiu sp,sp,-0x38
sw ra,0x34(sp)
sw s6,0x30(sp)
sw s5,0x2c(sp)
sw s4,0x28(sp)
sw s3,0x24(sp)
sw s2,0x20(sp)
sw s1,0x1c(sp)
sw s0,0x18(sp)
sw gp,0x10(sp)
or s1,a0,zero
lw t9,-0x7554(gp)
jalr t9
_nop
lw gp,0x10(sp)
lw v0,-0x7fd8(gp)
lbu v0,-0x29af(v0)
bne v0,zero,0x000470e0
_li a0,0x1
or s2,zero,zero
lw s3,-0x7a94(gp)
li s4,-0x1
lw s5,-0x7fd8(gp)
lw s6,-0x7fb0(gp)
b 0x0004718c
_addiu s6,s6,-0x5994
lw t9,-0x73cc(gp)
jalr t9
_nop
lw gp,0x10(sp)
b 0x000470c8
_or s2,zero,zero
bal 0x000320a4
_nop
lw gp,0x10(sp)
or a0,zero,zero
lw t9,-0x73cc(gp)
jalr t9
_nop
lw gp,0x10(sp)
lw s0,-0x7fd8(gp)
li a1,0x4
lw a0,-0x299c(s0)
lw t9,-0x7eac(gp)
bal 0x00046324
_nop
lw gp,0x10(sp)
sw v0,-0x299c(s0)
li v1,-0x2
sw v1,0x0(v0)
lw v0,-0x7fd8(gp)
li v1,0x1
sw v1,-0x29a0(v0)
lw ra,0x34(sp)
lw s6,0x30(sp)
lw s5,0x2c(sp)
lw s4,0x28(sp)
lw s3,0x24(sp)
lw s2,0x20(sp)
lw s1,0x1c(sp)
lw s0,0x18(sp)
jr ra
_addiu sp,sp,0x38
lbu v0,-0x3af4(s5)
beq v0,zero,0x00047230
_addiu s2,s2,0x1
li v0,0x80
beq s2,v0,0x0004724c
_li a2,0x5
or a0,s1,zero
lw t9,-0x745c(gp)
jalr t9
_nop
lw gp,0x10(sp)
or s0,v0,zero
lw v0,0x0(s3)
bne v0,zero,0x000470f8
_lw t9,-0x7724(gp)
beq s0,s4,0x00047174
_or a0,zero,zero
lw t9,-0x73cc(gp)
jalr t9
_nop
lw gp,0x10(sp)
lw s2,-0x7fd8(gp)
li a1,0x4
lw a0,-0x299c(s2)
lw t9,-0x7eac(gp)
bal 0x00046324
_nop
lw gp,0x10(sp)
sw v0,-0x299c(s2)
sw s0,0x0(v0)
lw v0,-0x7fd8(gp)
li v1,0x1
sw v1,-0x29a0(v0)
li v0,-0x2
beq s0,v0,0x0004714c
_li a1,0x1
or a0,s1,zero
lw t9,-0x7378(gp)
jalr t9
_nop
lw gp,0x10(sp)
lw s5,-0x7fd8(gp)
lw s2,-0x7fd8(gp)
lw s3,-0x7fd8(gp)
lui s4,0x3fff
b 0x000472e8
_ori s4,s4,0xffff
or a0,zero,zero
lw t9,-0x73cc(gp)
jalr t9
_nop
lw gp,0x10(sp)
b 0x00047150
_lw ra,0x34(sp)
or a1,s6,zero
or a0,zero,zero
lw t9,-0x7420(gp)
jalr t9
_nop
lw gp,0x10(sp)
or a0,v0,zero
lw t9,-0x7d44(gp)
bal 0x0002faf0
_nop
lw gp,0x10(sp)
b 0x00047190
_or a0,s1,zero
bal 0x00046f50
_nop
lw gp,0x10(sp)
or a0,s1,zero
lw t9,-0x745c(gp)
jalr t9
_nop
lw gp,0x10(sp)
or s0,v0,zero
li v0,-0x1
beq s0,v0,0x000472fc
_lw a1,-0x29a0(s2)
addiu a1,a1,0x1
sw a1,-0x29a0(s2)
sll a1,a1,0x2
lw a0,-0x299c(s3)
lw t9,-0x7eac(gp)
bal 0x00046324
_nop
lw gp,0x10(sp)
sw v0,-0x299c(s3)
lw v1,-0x29a0(s2)
addu v1,v1,s4
sll v1,v1,0x2
addu v0,v0,v1
sw s0,0x0(v0)
lbu v0,-0x29b0(s5)
beq v0,zero,0x0004728c
_or a0,s0,zero
b 0x00047280
_lw t9,-0x7720(gp)
lw v0,-0x7fd8(gp)
lbu v0,-0x3af4(v0)
beq v0,zero,0x0004714c
_or a1,zero,zero
or a0,s1,zero
lw t9,-0x7378(gp)
jalr t9
_nop
lw gp,0x10(sp)
b 0x00047150
_lw ra,0x34(sp)
(translation_unit "void read_keys_from(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined *puVar8;\n  \n  (*(code *)PTR_doupdate_0007cfcc)();\n  if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }\n  puVar2 = PTR_the_window_resized_0007ca8c;\n  puVar1 = PTR_DAT_0007c548;\n  iVar7 = 0;\n  puVar8 = PTR_DAT_0007c570 + -0x5994;\n  while( true ) {\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }\n  (*(code *)PTR_curs_set_0007d154)(0);\n  puVar1 = PTR_DAT_0007c548;\n  piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n  *(int **)(puVar1 + -0x299c) = piVar5;\n  *piVar5 = iVar4;\n  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n  if (iVar4 == -2) {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,1);\n  puVar1 = PTR_DAT_0007c548;\n  while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }\n  if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,0);\n  return;\n}\n\n" (function_definition "void read_keys_from(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined *puVar8;\n  \n  (*(code *)PTR_doupdate_0007cfcc)();\n  if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }\n  puVar2 = PTR_the_window_resized_0007ca8c;\n  puVar1 = PTR_DAT_0007c548;\n  iVar7 = 0;\n  puVar8 = PTR_DAT_0007c570 + -0x5994;\n  while( true ) {\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }\n  (*(code *)PTR_curs_set_0007d154)(0);\n  puVar1 = PTR_DAT_0007c548;\n  piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n  *(int **)(puVar1 + -0x299c) = piVar5;\n  *piVar5 = iVar4;\n  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n  if (iVar4 == -2) {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,1);\n  puVar1 = PTR_DAT_0007c548;\n  while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }\n  if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,0);\n  return;\n}" primitive_type (function_declarator "read_keys_from(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined *puVar8;\n  \n  (*(code *)PTR_doupdate_0007cfcc)();\n  if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }\n  puVar2 = PTR_the_window_resized_0007ca8c;\n  puVar1 = PTR_DAT_0007c548;\n  iVar7 = 0;\n  puVar8 = PTR_DAT_0007c570 + -0x5994;\n  while( true ) {\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }\n  (*(code *)PTR_curs_set_0007d154)(0);\n  puVar1 = PTR_DAT_0007c548;\n  piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n  *(int **)(puVar1 + -0x299c) = piVar5;\n  *piVar5 = iVar4;\n  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n  if (iVar4 == -2) {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,1);\n  puVar1 = PTR_DAT_0007c548;\n  while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }\n  if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,0);\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (expression_statement "(*(code *)PTR_doupdate_0007cfcc)();" (call_expression "(*(code *)PTR_doupdate_0007cfcc)()" (parenthesized_expression "(*(code *)PTR_doupdate_0007cfcc)" ( (pointer_expression "*(code *)PTR_doupdate_0007cfcc" * (cast_expression "(code *)PTR_doupdate_0007cfcc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (if_statement "if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }" if (parenthesized_expression "(PTR_DAT_0007c548[-0x29af] != '\0')" ( (binary_expression "PTR_DAT_0007c548[-0x29af] != '\0'" (subscript_expression "PTR_DAT_0007c548[-0x29af]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }" { (expression_statement "(*(code *)PTR_curs_set_0007d154)(1);" (call_expression "(*(code *)PTR_curs_set_0007d154)(1)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" ( (pointer_expression "*(code *)PTR_curs_set_0007d154" * (cast_expression "(code *)PTR_curs_set_0007d154" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "puVar2 = PTR_the_window_resized_0007ca8c;" (assignment_expression "puVar2 = PTR_the_window_resized_0007ca8c" identifier = identifier) ;) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" identifier = identifier) ;) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (expression_statement "puVar8 = PTR_DAT_0007c570 + -0x5994;" (assignment_expression "puVar8 = PTR_DAT_0007c570 + -0x5994" identifier = (binary_expression "PTR_DAT_0007c570 + -0x5994" identifier + number_literal)) ;) (while_statement "while( true ) {\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }" { (expression_statement "iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);" (assignment_expression "iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1)" identifier = (call_expression "(*(code *)PTR_wgetch_0007d0c4)(param_1)" (parenthesized_expression "(*(code *)PTR_wgetch_0007d0c4)" ( (pointer_expression "*(code *)PTR_wgetch_0007d0c4" * (cast_expression "(code *)PTR_wgetch_0007d0c4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }" if (parenthesized_expression "(*(int *)puVar2 != 0)" ( (binary_expression "*(int *)puVar2 != 0" (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) (compound_statement "{\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }" { (expression_statement "regenerate_screen();" (call_expression "regenerate_screen()" identifier (argument_list "()" ( ))) ;) (expression_statement "(*(code *)PTR_curs_set_0007d154)(0);" (call_expression "(*(code *)PTR_curs_set_0007d154)(0)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" ( (pointer_expression "*(code *)PTR_curs_set_0007d154" * (cast_expression "(code *)PTR_curs_set_0007d154" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" identifier = identifier) ;) (expression_statement "puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);" (assignment_expression "puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" identifier = (cast_expression "(undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" identifier (argument_list "(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" ( (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x299c)" * (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x299c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0007c548 + -0x299c)" ( (binary_expression "PTR_DAT_0007c548 + -0x299c" identifier + number_literal) )))) , number_literal ))))) ;) (expression_statement "*(undefined4 **)(puVar1 + -0x299c) = puVar3;" (assignment_expression "*(undefined4 **)(puVar1 + -0x299c) = puVar3" (pointer_expression "*(undefined4 **)(puVar1 + -0x299c)" * (cast_expression "(undefined4 **)(puVar1 + -0x299c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + -0x299c)" ( (binary_expression "puVar1 + -0x299c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar3 = 0xfffffffe;" (assignment_expression "*puVar3 = 0xfffffffe" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;" (assignment_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1" (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" * (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0007c548 + -0x29a0)" ( (binary_expression "PTR_DAT_0007c548 + -0x29a0" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar4 != -1) break;" if (parenthesized_expression "(iVar4 != -1)" ( (binary_expression "iVar4 != -1" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (if_statement "if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }" if (parenthesized_expression "(puVar1[-0x3af4] == '\0')" ( (binary_expression "puVar1[-0x3af4] == '\0'" (subscript_expression "puVar1[-0x3af4]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }" { (expression_statement "(*(code *)PTR_curs_set_0007d154)(0);" (call_expression "(*(code *)PTR_curs_set_0007d154)(0)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" ( (pointer_expression "*(code *)PTR_curs_set_0007d154" * (cast_expression "(code *)PTR_curs_set_0007d154" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }" if (parenthesized_expression "(iVar7 == 0x80)" ( (binary_expression "iVar7 == 0x80" identifier == number_literal) )) (compound_statement "{\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }" { (expression_statement "uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);" (assignment_expression "uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5)" identifier = (call_expression "(*(code *)PTR_dcgettext_0007d100)(0,puVar8,5)" (parenthesized_expression "(*(code *)PTR_dcgettext_0007d100)" ( (pointer_expression "*(code *)PTR_dcgettext_0007d100" * (cast_expression "(code *)PTR_dcgettext_0007d100" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,puVar8,5)" ( number_literal , identifier , number_literal )))) ;) (expression_statement "die(uVar6);" (call_expression "die(uVar6)" identifier (argument_list "(uVar6)" ( identifier ))) ;) })) })) (expression_statement "(*(code *)PTR_curs_set_0007d154)(0);" (call_expression "(*(code *)PTR_curs_set_0007d154)(0)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" ( (pointer_expression "*(code *)PTR_curs_set_0007d154" * (cast_expression "(code *)PTR_curs_set_0007d154" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" identifier = identifier) ;) (expression_statement "piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);" (assignment_expression "piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" identifier = (cast_expression "(int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" identifier (argument_list "(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" ( (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x299c)" * (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x299c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0007c548 + -0x299c)" ( (binary_expression "PTR_DAT_0007c548 + -0x299c" identifier + number_literal) )))) , number_literal ))))) ;) (expression_statement "*(int **)(puVar1 + -0x299c) = piVar5;" (assignment_expression "*(int **)(puVar1 + -0x299c) = piVar5" (pointer_expression "*(int **)(puVar1 + -0x299c)" * (cast_expression "(int **)(puVar1 + -0x299c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + -0x299c)" ( (binary_expression "puVar1 + -0x299c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*piVar5 = iVar4;" (assignment_expression "*piVar5 = iVar4" (pointer_expression "*piVar5" * identifier) = identifier) ;) (expression_statement "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;" (assignment_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1" (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" * (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0007c548 + -0x29a0)" ( (binary_expression "PTR_DAT_0007c548 + -0x29a0" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (iVar4 == -2) {\n    return;\n  }" if (parenthesized_expression "(iVar4 == -2)" ( (binary_expression "iVar4 == -2" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_nodelay_0007d1a8)(param_1,1);" (call_expression "(*(code *)PTR_nodelay_0007d1a8)(param_1,1)" (parenthesized_expression "(*(code *)PTR_nodelay_0007d1a8)" ( (pointer_expression "*(code *)PTR_nodelay_0007d1a8" * (cast_expression "(code *)PTR_nodelay_0007d1a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,1)" ( identifier , number_literal ))) ;) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" identifier = identifier) ;) (while_statement "while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }" { (if_statement "if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }" if (parenthesized_expression "(puVar1[-0x29b0] != '\0')" ( (binary_expression "puVar1[-0x29b0] != '\0'" (subscript_expression "puVar1[-0x29b0]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      add_to_macrobuffer(iVar4);\n    }" { (expression_statement "add_to_macrobuffer(iVar4);" (call_expression "add_to_macrobuffer(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) })) (expression_statement "iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);" (assignment_expression "iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1)" identifier = (call_expression "(*(code *)PTR_wgetch_0007d0c4)(param_1)" (parenthesized_expression "(*(code *)PTR_wgetch_0007d0c4)" ( (pointer_expression "*(code *)PTR_wgetch_0007d0c4" * (cast_expression "(code *)PTR_wgetch_0007d0c4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar7 = *(int *)(puVar1 + -0x29a0);" (assignment_expression "iVar7 = *(int *)(puVar1 + -0x29a0)" identifier = (pointer_expression "*(int *)(puVar1 + -0x29a0)" * (cast_expression "(int *)(puVar1 + -0x29a0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x29a0)" ( (binary_expression "puVar1 + -0x29a0" identifier + number_literal) ))))) ;) (if_statement "if (iVar4 == -1) break;" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "*(int *)(puVar1 + -0x29a0) = iVar7 + 1;" (assignment_expression "*(int *)(puVar1 + -0x29a0) = iVar7 + 1" (pointer_expression "*(int *)(puVar1 + -0x29a0)" * (cast_expression "(int *)(puVar1 + -0x29a0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x29a0)" ( (binary_expression "puVar1 + -0x29a0" identifier + number_literal) )))) = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (expression_statement "iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);" (assignment_expression "iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4)" identifier = (call_expression "nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4)" identifier (argument_list "(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4)" ( (pointer_expression "*(undefined4 *)(puVar1 + -0x299c)" * (cast_expression "(undefined4 *)(puVar1 + -0x299c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x299c)" ( (binary_expression "puVar1 + -0x299c" identifier + number_literal) )))) , (binary_expression "(iVar7 + 1) * 4" (parenthesized_expression "(iVar7 + 1)" ( (binary_expression "iVar7 + 1" identifier + number_literal) )) * number_literal) )))) ;) (expression_statement "*(int *)(puVar1 + -0x299c) = iVar7;" (assignment_expression "*(int *)(puVar1 + -0x299c) = iVar7" (pointer_expression "*(int *)(puVar1 + -0x299c)" * (cast_expression "(int *)(puVar1 + -0x299c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x299c)" ( (binary_expression "puVar1 + -0x299c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;" (assignment_expression "*(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4" (pointer_expression "*(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4)" * (cast_expression "(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4)" ( (binary_expression "iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4" identifier + (binary_expression "(*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4" (parenthesized_expression "(*(int *)(puVar1 + -0x29a0) + 0x3fffffff)" ( (binary_expression "*(int *)(puVar1 + -0x29a0) + 0x3fffffff" (pointer_expression "*(int *)(puVar1 + -0x29a0)" * (cast_expression "(int *)(puVar1 + -0x29a0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x29a0)" ( (binary_expression "puVar1 + -0x29a0" identifier + number_literal) )))) + number_literal) )) * number_literal)) )))) = identifier) ;) })) (if_statement "if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }" if (parenthesized_expression "(PTR_DAT_0007c548[-0x3af4] == '\0')" ( (binary_expression "PTR_DAT_0007c548[-0x3af4] == '\0'" (subscript_expression "PTR_DAT_0007c548[-0x3af4]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_nodelay_0007d1a8)(param_1,0);" (call_expression "(*(code *)PTR_nodelay_0007d1a8)(param_1,0)" (parenthesized_expression "(*(code *)PTR_nodelay_0007d1a8)" ( (pointer_expression "*(code *)PTR_nodelay_0007d1a8" * (cast_expression "(code *)PTR_nodelay_0007d1a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,0)" ( identifier , number_literal ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void read_keys_from(WINDOW *win)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 *puVar3;\n  int code;\n  int *piVar4;\n  char *msg;\n  void *pvVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  (*(code *)PTR_doupdate_0007cfcc)();\n  if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }\n  puVar2 = PTR_the_window_resized_0007ca8c;\n  puVar1 = PTR_DAT_0007c548;\n  iVar6 = 0;\n  puVar7 = PTR_DAT_0007c570 + -0x5994;\n  while( true ) {\n    code = (*(code *)PTR_wgetch_0007d0c4)(win);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (code != -1) break;\n    iVar6 = iVar6 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar6 == 0x80) {\n      msg = (char *)(*(code *)PTR_dcgettext_0007d100)(0,puVar7,5);\n      die(msg);\n    }\n  }\n  (*(code *)PTR_curs_set_0007d154)(0);\n  puVar1 = PTR_DAT_0007c548;\n  piVar4 = (int *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);\n  *(int **)(puVar1 + -0x299c) = piVar4;\n  *piVar4 = code;\n  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n  if (code == -2) {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(win,1);\n  puVar1 = PTR_DAT_0007c548;\n  while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(code);\n    }\n    code = (*(code *)PTR_wgetch_0007d0c4)(win);\n    iVar6 = *(int *)(puVar1 + -0x29a0);\n    if (code == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar6 + 1;\n    pvVar5 = nrealloc(*(void **)(puVar1 + -0x299c),(iVar6 + 1) * 4);\n    *(void **)(puVar1 + -0x299c) = pvVar5;\n    *(int *)((int)pvVar5 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = code;\n  }\n  if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(win,0);\n  return;\n}\n\n" (function_definition "void read_keys_from(WINDOW *win)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 *puVar3;\n  int code;\n  int *piVar4;\n  char *msg;\n  void *pvVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  (*(code *)PTR_doupdate_0007cfcc)();\n  if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }\n  puVar2 = PTR_the_window_resized_0007ca8c;\n  puVar1 = PTR_DAT_0007c548;\n  iVar6 = 0;\n  puVar7 = PTR_DAT_0007c570 + -0x5994;\n  while( true ) {\n    code = (*(code *)PTR_wgetch_0007d0c4)(win);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (code != -1) break;\n    iVar6 = iVar6 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar6 == 0x80) {\n      msg = (char *)(*(code *)PTR_dcgettext_0007d100)(0,puVar7,5);\n      die(msg);\n    }\n  }\n  (*(code *)PTR_curs_set_0007d154)(0);\n  puVar1 = PTR_DAT_0007c548;\n  piVar4 = (int *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);\n  *(int **)(puVar1 + -0x299c) = piVar4;\n  *piVar4 = code;\n  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n  if (code == -2) {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(win,1);\n  puVar1 = PTR_DAT_0007c548;\n  while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(code);\n    }\n    code = (*(code *)PTR_wgetch_0007d0c4)(win);\n    iVar6 = *(int *)(puVar1 + -0x29a0);\n    if (code == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar6 + 1;\n    pvVar5 = nrealloc(*(void **)(puVar1 + -0x299c),(iVar6 + 1) * 4);\n    *(void **)(puVar1 + -0x299c) = pvVar5;\n    *(int *)((int)pvVar5 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = code;\n  }\n  if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(win,0);\n  return;\n}" primitive_type (function_declarator "read_keys_from(WINDOW *win)" identifier (parameter_list "(WINDOW *win)" ( (parameter_declaration "WINDOW *win" type_identifier (pointer_declarator "*win" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 *puVar3;\n  int code;\n  int *piVar4;\n  char *msg;\n  void *pvVar5;\n  int iVar6;\n  undefined *puVar7;\n  \n  (*(code *)PTR_doupdate_0007cfcc)();\n  if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }\n  puVar2 = PTR_the_window_resized_0007ca8c;\n  puVar1 = PTR_DAT_0007c548;\n  iVar6 = 0;\n  puVar7 = PTR_DAT_0007c570 + -0x5994;\n  while( true ) {\n    code = (*(code *)PTR_wgetch_0007d0c4)(win);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (code != -1) break;\n    iVar6 = iVar6 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar6 == 0x80) {\n      msg = (char *)(*(code *)PTR_dcgettext_0007d100)(0,puVar7,5);\n      die(msg);\n    }\n  }\n  (*(code *)PTR_curs_set_0007d154)(0);\n  puVar1 = PTR_DAT_0007c548;\n  piVar4 = (int *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);\n  *(int **)(puVar1 + -0x299c) = piVar4;\n  *piVar4 = code;\n  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n  if (code == -2) {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(win,1);\n  puVar1 = PTR_DAT_0007c548;\n  while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(code);\n    }\n    code = (*(code *)PTR_wgetch_0007d0c4)(win);\n    iVar6 = *(int *)(puVar1 + -0x29a0);\n    if (code == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar6 + 1;\n    pvVar5 = nrealloc(*(void **)(puVar1 + -0x299c),(iVar6 + 1) * 4);\n    *(void **)(puVar1 + -0x299c) = pvVar5;\n    *(int *)((int)pvVar5 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = code;\n  }\n  if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(win,0);\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int code;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "char *msg;" primitive_type (pointer_declarator "*msg" * identifier) ;) (declaration "void *pvVar5;" primitive_type (pointer_declarator "*pvVar5" * identifier) ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (expression_statement "(*(code *)PTR_doupdate_0007cfcc)();" (call_expression "(*(code *)PTR_doupdate_0007cfcc)()" (parenthesized_expression "(*(code *)PTR_doupdate_0007cfcc)" ( (pointer_expression "*(code *)PTR_doupdate_0007cfcc" * (cast_expression "(code *)PTR_doupdate_0007cfcc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (if_statement "if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }" if (parenthesized_expression "(PTR_DAT_0007c548[-0x29af] != '\0')" ( (binary_expression "PTR_DAT_0007c548[-0x29af] != '\0'" (subscript_expression "PTR_DAT_0007c548[-0x29af]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }" { (expression_statement "(*(code *)PTR_curs_set_0007d154)(1);" (call_expression "(*(code *)PTR_curs_set_0007d154)(1)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" ( (pointer_expression "*(code *)PTR_curs_set_0007d154" * (cast_expression "(code *)PTR_curs_set_0007d154" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "puVar2 = PTR_the_window_resized_0007ca8c;" (assignment_expression "puVar2 = PTR_the_window_resized_0007ca8c" identifier = identifier) ;) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" identifier = identifier) ;) (expression_statement "iVar6 = 0;" (assignment_expression "iVar6 = 0" identifier = number_literal) ;) (expression_statement "puVar7 = PTR_DAT_0007c570 + -0x5994;" (assignment_expression "puVar7 = PTR_DAT_0007c570 + -0x5994" identifier = (binary_expression "PTR_DAT_0007c570 + -0x5994" identifier + number_literal)) ;) (while_statement "while( true ) {\n    code = (*(code *)PTR_wgetch_0007d0c4)(win);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (code != -1) break;\n    iVar6 = iVar6 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar6 == 0x80) {\n      msg = (char *)(*(code *)PTR_dcgettext_0007d100)(0,puVar7,5);\n      die(msg);\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    code = (*(code *)PTR_wgetch_0007d0c4)(win);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (code != -1) break;\n    iVar6 = iVar6 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar6 == 0x80) {\n      msg = (char *)(*(code *)PTR_dcgettext_0007d100)(0,puVar7,5);\n      die(msg);\n    }\n  }" { (expression_statement "code = (*(code *)PTR_wgetch_0007d0c4)(win);" (assignment_expression "code = (*(code *)PTR_wgetch_0007d0c4)(win)" identifier = (call_expression "(*(code *)PTR_wgetch_0007d0c4)(win)" (parenthesized_expression "(*(code *)PTR_wgetch_0007d0c4)" ( (pointer_expression "*(code *)PTR_wgetch_0007d0c4" * (cast_expression "(code *)PTR_wgetch_0007d0c4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(win)" ( identifier )))) ;) (if_statement "if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }" if (parenthesized_expression "(*(int *)puVar2 != 0)" ( (binary_expression "*(int *)puVar2 != 0" (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) (compound_statement "{\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }" { (expression_statement "regenerate_screen();" (call_expression "regenerate_screen()" identifier (argument_list "()" ( ))) ;) (expression_statement "(*(code *)PTR_curs_set_0007d154)(0);" (call_expression "(*(code *)PTR_curs_set_0007d154)(0)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" ( (pointer_expression "*(code *)PTR_curs_set_0007d154" * (cast_expression "(code *)PTR_curs_set_0007d154" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" identifier = identifier) ;) (expression_statement "puVar3 = (undefined4 *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);" (assignment_expression "puVar3 = (undefined4 *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4)" identifier = (cast_expression "(undefined4 *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4)" identifier (argument_list "(*(void **)(PTR_DAT_0007c548 + -0x299c),4)" ( (pointer_expression "*(void **)(PTR_DAT_0007c548 + -0x299c)" * (cast_expression "(void **)(PTR_DAT_0007c548 + -0x299c)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_0007c548 + -0x299c)" ( (binary_expression "PTR_DAT_0007c548 + -0x299c" identifier + number_literal) )))) , number_literal ))))) ;) (expression_statement "*(undefined4 **)(puVar1 + -0x299c) = puVar3;" (assignment_expression "*(undefined4 **)(puVar1 + -0x299c) = puVar3" (pointer_expression "*(undefined4 **)(puVar1 + -0x299c)" * (cast_expression "(undefined4 **)(puVar1 + -0x299c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + -0x299c)" ( (binary_expression "puVar1 + -0x299c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar3 = 0xfffffffe;" (assignment_expression "*puVar3 = 0xfffffffe" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;" (assignment_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1" (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" * (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0007c548 + -0x29a0)" ( (binary_expression "PTR_DAT_0007c548 + -0x29a0" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (if_statement "if (code != -1) break;" if (parenthesized_expression "(code != -1)" ( (binary_expression "code != -1" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar6 = iVar6 + 1;" (assignment_expression "iVar6 = iVar6 + 1" identifier = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (if_statement "if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }" if (parenthesized_expression "(puVar1[-0x3af4] == '\0')" ( (binary_expression "puVar1[-0x3af4] == '\0'" (subscript_expression "puVar1[-0x3af4]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }" { (expression_statement "(*(code *)PTR_curs_set_0007d154)(0);" (call_expression "(*(code *)PTR_curs_set_0007d154)(0)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" ( (pointer_expression "*(code *)PTR_curs_set_0007d154" * (cast_expression "(code *)PTR_curs_set_0007d154" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar6 == 0x80) {\n      msg = (char *)(*(code *)PTR_dcgettext_0007d100)(0,puVar7,5);\n      die(msg);\n    }" if (parenthesized_expression "(iVar6 == 0x80)" ( (binary_expression "iVar6 == 0x80" identifier == number_literal) )) (compound_statement "{\n      msg = (char *)(*(code *)PTR_dcgettext_0007d100)(0,puVar7,5);\n      die(msg);\n    }" { (expression_statement "msg = (char *)(*(code *)PTR_dcgettext_0007d100)(0,puVar7,5);" (assignment_expression "msg = (char *)(*(code *)PTR_dcgettext_0007d100)(0,puVar7,5)" identifier = (cast_expression "(char *)(*(code *)PTR_dcgettext_0007d100)(0,puVar7,5)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "(*(code *)PTR_dcgettext_0007d100)(0,puVar7,5)" (parenthesized_expression "(*(code *)PTR_dcgettext_0007d100)" ( (pointer_expression "*(code *)PTR_dcgettext_0007d100" * (cast_expression "(code *)PTR_dcgettext_0007d100" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,puVar7,5)" ( number_literal , identifier , number_literal ))))) ;) (expression_statement "die(msg);" (call_expression "die(msg)" identifier (argument_list "(msg)" ( identifier ))) ;) })) })) (expression_statement "(*(code *)PTR_curs_set_0007d154)(0);" (call_expression "(*(code *)PTR_curs_set_0007d154)(0)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" ( (pointer_expression "*(code *)PTR_curs_set_0007d154" * (cast_expression "(code *)PTR_curs_set_0007d154" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" identifier = identifier) ;) (expression_statement "piVar4 = (int *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4);" (assignment_expression "piVar4 = (int *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4)" identifier = (cast_expression "(int *)nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "nrealloc(*(void **)(PTR_DAT_0007c548 + -0x299c),4)" identifier (argument_list "(*(void **)(PTR_DAT_0007c548 + -0x299c),4)" ( (pointer_expression "*(void **)(PTR_DAT_0007c548 + -0x299c)" * (cast_expression "(void **)(PTR_DAT_0007c548 + -0x299c)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_DAT_0007c548 + -0x299c)" ( (binary_expression "PTR_DAT_0007c548 + -0x299c" identifier + number_literal) )))) , number_literal ))))) ;) (expression_statement "*(int **)(puVar1 + -0x299c) = piVar4;" (assignment_expression "*(int **)(puVar1 + -0x299c) = piVar4" (pointer_expression "*(int **)(puVar1 + -0x299c)" * (cast_expression "(int **)(puVar1 + -0x299c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + -0x299c)" ( (binary_expression "puVar1 + -0x299c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*piVar4 = code;" (assignment_expression "*piVar4 = code" (pointer_expression "*piVar4" * identifier) = identifier) ;) (expression_statement "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;" (assignment_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1" (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" * (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0007c548 + -0x29a0)" ( (binary_expression "PTR_DAT_0007c548 + -0x29a0" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (code == -2) {\n    return;\n  }" if (parenthesized_expression "(code == -2)" ( (binary_expression "code == -2" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_nodelay_0007d1a8)(win,1);" (call_expression "(*(code *)PTR_nodelay_0007d1a8)(win,1)" (parenthesized_expression "(*(code *)PTR_nodelay_0007d1a8)" ( (pointer_expression "*(code *)PTR_nodelay_0007d1a8" * (cast_expression "(code *)PTR_nodelay_0007d1a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(win,1)" ( identifier , number_literal ))) ;) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" identifier = identifier) ;) (while_statement "while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(code);\n    }\n    code = (*(code *)PTR_wgetch_0007d0c4)(win);\n    iVar6 = *(int *)(puVar1 + -0x29a0);\n    if (code == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar6 + 1;\n    pvVar5 = nrealloc(*(void **)(puVar1 + -0x299c),(iVar6 + 1) * 4);\n    *(void **)(puVar1 + -0x299c) = pvVar5;\n    *(int *)((int)pvVar5 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = code;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(code);\n    }\n    code = (*(code *)PTR_wgetch_0007d0c4)(win);\n    iVar6 = *(int *)(puVar1 + -0x29a0);\n    if (code == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar6 + 1;\n    pvVar5 = nrealloc(*(void **)(puVar1 + -0x299c),(iVar6 + 1) * 4);\n    *(void **)(puVar1 + -0x299c) = pvVar5;\n    *(int *)((int)pvVar5 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = code;\n  }" { (if_statement "if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(code);\n    }" if (parenthesized_expression "(puVar1[-0x29b0] != '\0')" ( (binary_expression "puVar1[-0x29b0] != '\0'" (subscript_expression "puVar1[-0x29b0]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      add_to_macrobuffer(code);\n    }" { (expression_statement "add_to_macrobuffer(code);" (call_expression "add_to_macrobuffer(code)" identifier (argument_list "(code)" ( identifier ))) ;) })) (expression_statement "code = (*(code *)PTR_wgetch_0007d0c4)(win);" (assignment_expression "code = (*(code *)PTR_wgetch_0007d0c4)(win)" identifier = (call_expression "(*(code *)PTR_wgetch_0007d0c4)(win)" (parenthesized_expression "(*(code *)PTR_wgetch_0007d0c4)" ( (pointer_expression "*(code *)PTR_wgetch_0007d0c4" * (cast_expression "(code *)PTR_wgetch_0007d0c4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(win)" ( identifier )))) ;) (expression_statement "iVar6 = *(int *)(puVar1 + -0x29a0);" (assignment_expression "iVar6 = *(int *)(puVar1 + -0x29a0)" identifier = (pointer_expression "*(int *)(puVar1 + -0x29a0)" * (cast_expression "(int *)(puVar1 + -0x29a0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x29a0)" ( (binary_expression "puVar1 + -0x29a0" identifier + number_literal) ))))) ;) (if_statement "if (code == -1) break;" if (parenthesized_expression "(code == -1)" ( (binary_expression "code == -1" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "*(int *)(puVar1 + -0x29a0) = iVar6 + 1;" (assignment_expression "*(int *)(puVar1 + -0x29a0) = iVar6 + 1" (pointer_expression "*(int *)(puVar1 + -0x29a0)" * (cast_expression "(int *)(puVar1 + -0x29a0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x29a0)" ( (binary_expression "puVar1 + -0x29a0" identifier + number_literal) )))) = (binary_expression "iVar6 + 1" identifier + number_literal)) ;) (expression_statement "pvVar5 = nrealloc(*(void **)(puVar1 + -0x299c),(iVar6 + 1) * 4);" (assignment_expression "pvVar5 = nrealloc(*(void **)(puVar1 + -0x299c),(iVar6 + 1) * 4)" identifier = (call_expression "nrealloc(*(void **)(puVar1 + -0x299c),(iVar6 + 1) * 4)" identifier (argument_list "(*(void **)(puVar1 + -0x299c),(iVar6 + 1) * 4)" ( (pointer_expression "*(void **)(puVar1 + -0x299c)" * (cast_expression "(void **)(puVar1 + -0x299c)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + -0x299c)" ( (binary_expression "puVar1 + -0x299c" identifier + number_literal) )))) , (binary_expression "(iVar6 + 1) * 4" (parenthesized_expression "(iVar6 + 1)" ( (binary_expression "iVar6 + 1" identifier + number_literal) )) * number_literal) )))) ;) (expression_statement "*(void **)(puVar1 + -0x299c) = pvVar5;" (assignment_expression "*(void **)(puVar1 + -0x299c) = pvVar5" (pointer_expression "*(void **)(puVar1 + -0x299c)" * (cast_expression "(void **)(puVar1 + -0x299c)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + -0x299c)" ( (binary_expression "puVar1 + -0x299c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)((int)pvVar5 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = code;" (assignment_expression "*(int *)((int)pvVar5 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = code" (pointer_expression "*(int *)((int)pvVar5 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4)" * (cast_expression "(int *)((int)pvVar5 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)pvVar5 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4)" ( (binary_expression "(int)pvVar5 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4" (cast_expression "(int)pvVar5" ( (type_descriptor "int" primitive_type) ) identifier) + (binary_expression "(*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4" (parenthesized_expression "(*(int *)(puVar1 + -0x29a0) + 0x3fffffff)" ( (binary_expression "*(int *)(puVar1 + -0x29a0) + 0x3fffffff" (pointer_expression "*(int *)(puVar1 + -0x29a0)" * (cast_expression "(int *)(puVar1 + -0x29a0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x29a0)" ( (binary_expression "puVar1 + -0x29a0" identifier + number_literal) )))) + number_literal) )) * number_literal)) )))) = identifier) ;) })) (if_statement "if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }" if (parenthesized_expression "(PTR_DAT_0007c548[-0x3af4] == '\0')" ( (binary_expression "PTR_DAT_0007c548[-0x3af4] == '\0'" (subscript_expression "PTR_DAT_0007c548[-0x3af4]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_nodelay_0007d1a8)(win,0);" (call_expression "(*(code *)PTR_nodelay_0007d1a8)(win,0)" (parenthesized_expression "(*(code *)PTR_nodelay_0007d1a8)" ( (pointer_expression "*(code *)PTR_nodelay_0007d1a8" * (cast_expression "(code *)PTR_nodelay_0007d1a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(win,0)" ( identifier , number_literal ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void read_keys_from(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined *puVar8;\n  \n  (*(code *)PTR_doupdate_0007cfcc)();\n  if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }\n  puVar2 = PTR_the_window_resized_0007ca8c;\n  puVar1 = PTR_DAT_0007c548;\n  iVar7 = 0;\n  puVar8 = PTR_DAT_0007c570 + -0x5994;\n  while( true ) {\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }\n  (*(code *)PTR_curs_set_0007d154)(0);\n  puVar1 = PTR_DAT_0007c548;\n  piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n  *(int **)(puVar1 + -0x299c) = piVar5;\n  *piVar5 = iVar4;\n  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n  if (iVar4 == -2) {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,1);\n  puVar1 = PTR_DAT_0007c548;\n  while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }\n  if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,0);\n  return;\n}\n\n" (function_definition "void read_keys_from(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined *puVar8;\n  \n  (*(code *)PTR_doupdate_0007cfcc)();\n  if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }\n  puVar2 = PTR_the_window_resized_0007ca8c;\n  puVar1 = PTR_DAT_0007c548;\n  iVar7 = 0;\n  puVar8 = PTR_DAT_0007c570 + -0x5994;\n  while( true ) {\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }\n  (*(code *)PTR_curs_set_0007d154)(0);\n  puVar1 = PTR_DAT_0007c548;\n  piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n  *(int **)(puVar1 + -0x299c) = piVar5;\n  *piVar5 = iVar4;\n  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n  if (iVar4 == -2) {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,1);\n  puVar1 = PTR_DAT_0007c548;\n  while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }\n  if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,0);\n  return;\n}" primitive_type (function_declarator "read_keys_from(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined *puVar8;\n  \n  (*(code *)PTR_doupdate_0007cfcc)();\n  if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }\n  puVar2 = PTR_the_window_resized_0007ca8c;\n  puVar1 = PTR_DAT_0007c548;\n  iVar7 = 0;\n  puVar8 = PTR_DAT_0007c570 + -0x5994;\n  while( true ) {\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }\n  (*(code *)PTR_curs_set_0007d154)(0);\n  puVar1 = PTR_DAT_0007c548;\n  piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n  *(int **)(puVar1 + -0x299c) = piVar5;\n  *piVar5 = iVar4;\n  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n  if (iVar4 == -2) {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,1);\n  puVar1 = PTR_DAT_0007c548;\n  while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }\n  if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,0);\n  return;\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "undefined4 uVar6;" type_identifier identifier ;) (declaration "int iVar7;" primitive_type identifier ;) (declaration "undefined *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (expression_statement "(*(code *)PTR_doupdate_0007cfcc)();" (call_expression "(*(code *)PTR_doupdate_0007cfcc)()" (parenthesized_expression "(*(code *)PTR_doupdate_0007cfcc)" ( (pointer_expression "*(code *)PTR_doupdate_0007cfcc" * (cast_expression "(code *)PTR_doupdate_0007cfcc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( ))) ;) (if_statement "if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }" if (parenthesized_expression "(PTR_DAT_0007c548[-0x29af] != '\0')" ( (binary_expression "PTR_DAT_0007c548[-0x29af] != '\0'" (subscript_expression "PTR_DAT_0007c548[-0x29af]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }" { (expression_statement "(*(code *)PTR_curs_set_0007d154)(1);" (call_expression "(*(code *)PTR_curs_set_0007d154)(1)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" ( (pointer_expression "*(code *)PTR_curs_set_0007d154" * (cast_expression "(code *)PTR_curs_set_0007d154" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(1)" ( number_literal ))) ;) })) (expression_statement "puVar2 = PTR_the_window_resized_0007ca8c;" (assignment_expression "puVar2 = PTR_the_window_resized_0007ca8c" identifier = identifier) ;) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" identifier = identifier) ;) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" identifier = number_literal) ;) (expression_statement "puVar8 = PTR_DAT_0007c570 + -0x5994;" (assignment_expression "puVar8 = PTR_DAT_0007c570 + -0x5994" identifier = (binary_expression "PTR_DAT_0007c570 + -0x5994" identifier + number_literal)) ;) (while_statement "while( true ) {\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }" { (expression_statement "iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);" (assignment_expression "iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1)" identifier = (call_expression "(*(code *)PTR_wgetch_0007d0c4)(param_1)" (parenthesized_expression "(*(code *)PTR_wgetch_0007d0c4)" ( (pointer_expression "*(code *)PTR_wgetch_0007d0c4" * (cast_expression "(code *)PTR_wgetch_0007d0c4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (if_statement "if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }" if (parenthesized_expression "(*(int *)puVar2 != 0)" ( (binary_expression "*(int *)puVar2 != 0" (pointer_expression "*(int *)puVar2" * (cast_expression "(int *)puVar2" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) != number_literal) )) (compound_statement "{\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }" { (expression_statement "regenerate_screen();" (call_expression "regenerate_screen()" identifier (argument_list "()" ( ))) ;) (expression_statement "(*(code *)PTR_curs_set_0007d154)(0);" (call_expression "(*(code *)PTR_curs_set_0007d154)(0)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" ( (pointer_expression "*(code *)PTR_curs_set_0007d154" * (cast_expression "(code *)PTR_curs_set_0007d154" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" identifier = identifier) ;) (expression_statement "puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);" (assignment_expression "puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" identifier = (cast_expression "(undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" identifier (argument_list "(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" ( (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x299c)" * (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x299c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0007c548 + -0x299c)" ( (binary_expression "PTR_DAT_0007c548 + -0x299c" identifier + number_literal) )))) , number_literal ))))) ;) (expression_statement "*(undefined4 **)(puVar1 + -0x299c) = puVar3;" (assignment_expression "*(undefined4 **)(puVar1 + -0x299c) = puVar3" (pointer_expression "*(undefined4 **)(puVar1 + -0x299c)" * (cast_expression "(undefined4 **)(puVar1 + -0x299c)" ( (type_descriptor "undefined4 **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + -0x299c)" ( (binary_expression "puVar1 + -0x299c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar3 = 0xfffffffe;" (assignment_expression "*puVar3 = 0xfffffffe" (pointer_expression "*puVar3" * identifier) = number_literal) ;) (expression_statement "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;" (assignment_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1" (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" * (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0007c548 + -0x29a0)" ( (binary_expression "PTR_DAT_0007c548 + -0x29a0" identifier + number_literal) )))) = number_literal) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar4 != -1) break;" if (parenthesized_expression "(iVar4 != -1)" ( (binary_expression "iVar4 != -1" identifier != number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" identifier = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (if_statement "if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }" if (parenthesized_expression "(puVar1[-0x3af4] == '\0')" ( (binary_expression "puVar1[-0x3af4] == '\0'" (subscript_expression "puVar1[-0x3af4]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }" { (expression_statement "(*(code *)PTR_curs_set_0007d154)(0);" (call_expression "(*(code *)PTR_curs_set_0007d154)(0)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" ( (pointer_expression "*(code *)PTR_curs_set_0007d154" * (cast_expression "(code *)PTR_curs_set_0007d154" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (return_statement "return;" return ;) })) (if_statement "if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }" if (parenthesized_expression "(iVar7 == 0x80)" ( (binary_expression "iVar7 == 0x80" identifier == number_literal) )) (compound_statement "{\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }" { (expression_statement "uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);" (assignment_expression "uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5)" identifier = (call_expression "(*(code *)PTR_dcgettext_0007d100)(0,puVar8,5)" (parenthesized_expression "(*(code *)PTR_dcgettext_0007d100)" ( (pointer_expression "*(code *)PTR_dcgettext_0007d100" * (cast_expression "(code *)PTR_dcgettext_0007d100" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0,puVar8,5)" ( number_literal , identifier , number_literal )))) ;) (expression_statement "die(uVar6);" (call_expression "die(uVar6)" identifier (argument_list "(uVar6)" ( identifier ))) ;) })) })) (expression_statement "(*(code *)PTR_curs_set_0007d154)(0);" (call_expression "(*(code *)PTR_curs_set_0007d154)(0)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" ( (pointer_expression "*(code *)PTR_curs_set_0007d154" * (cast_expression "(code *)PTR_curs_set_0007d154" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(0)" ( number_literal ))) ;) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" identifier = identifier) ;) (expression_statement "piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);" (assignment_expression "piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" identifier = (cast_expression "(int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" identifier (argument_list "(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" ( (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x299c)" * (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x299c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0007c548 + -0x299c)" ( (binary_expression "PTR_DAT_0007c548 + -0x299c" identifier + number_literal) )))) , number_literal ))))) ;) (expression_statement "*(int **)(puVar1 + -0x299c) = piVar5;" (assignment_expression "*(int **)(puVar1 + -0x299c) = piVar5" (pointer_expression "*(int **)(puVar1 + -0x299c)" * (cast_expression "(int **)(puVar1 + -0x299c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar1 + -0x299c)" ( (binary_expression "puVar1 + -0x299c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*piVar5 = iVar4;" (assignment_expression "*piVar5 = iVar4" (pointer_expression "*piVar5" * identifier) = identifier) ;) (expression_statement "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;" (assignment_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1" (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" * (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_DAT_0007c548 + -0x29a0)" ( (binary_expression "PTR_DAT_0007c548 + -0x29a0" identifier + number_literal) )))) = number_literal) ;) (if_statement "if (iVar4 == -2) {\n    return;\n  }" if (parenthesized_expression "(iVar4 == -2)" ( (binary_expression "iVar4 == -2" identifier == number_literal) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_nodelay_0007d1a8)(param_1,1);" (call_expression "(*(code *)PTR_nodelay_0007d1a8)(param_1,1)" (parenthesized_expression "(*(code *)PTR_nodelay_0007d1a8)" ( (pointer_expression "*(code *)PTR_nodelay_0007d1a8" * (cast_expression "(code *)PTR_nodelay_0007d1a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,1)" ( identifier , number_literal ))) ;) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" identifier = identifier) ;) (while_statement "while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }" { (if_statement "if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }" if (parenthesized_expression "(puVar1[-0x29b0] != '\0')" ( (binary_expression "puVar1[-0x29b0] != '\0'" (subscript_expression "puVar1[-0x29b0]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      add_to_macrobuffer(iVar4);\n    }" { (expression_statement "add_to_macrobuffer(iVar4);" (call_expression "add_to_macrobuffer(iVar4)" identifier (argument_list "(iVar4)" ( identifier ))) ;) })) (expression_statement "iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);" (assignment_expression "iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1)" identifier = (call_expression "(*(code *)PTR_wgetch_0007d0c4)(param_1)" (parenthesized_expression "(*(code *)PTR_wgetch_0007d0c4)" ( (pointer_expression "*(code *)PTR_wgetch_0007d0c4" * (cast_expression "(code *)PTR_wgetch_0007d0c4" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar7 = *(int *)(puVar1 + -0x29a0);" (assignment_expression "iVar7 = *(int *)(puVar1 + -0x29a0)" identifier = (pointer_expression "*(int *)(puVar1 + -0x29a0)" * (cast_expression "(int *)(puVar1 + -0x29a0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x29a0)" ( (binary_expression "puVar1 + -0x29a0" identifier + number_literal) ))))) ;) (if_statement "if (iVar4 == -1) break;" if (parenthesized_expression "(iVar4 == -1)" ( (binary_expression "iVar4 == -1" identifier == number_literal) )) (break_statement "break;" break ;)) (expression_statement "*(int *)(puVar1 + -0x29a0) = iVar7 + 1;" (assignment_expression "*(int *)(puVar1 + -0x29a0) = iVar7 + 1" (pointer_expression "*(int *)(puVar1 + -0x29a0)" * (cast_expression "(int *)(puVar1 + -0x29a0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x29a0)" ( (binary_expression "puVar1 + -0x29a0" identifier + number_literal) )))) = (binary_expression "iVar7 + 1" identifier + number_literal)) ;) (expression_statement "iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);" (assignment_expression "iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4)" identifier = (call_expression "nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4)" identifier (argument_list "(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4)" ( (pointer_expression "*(undefined4 *)(puVar1 + -0x299c)" * (cast_expression "(undefined4 *)(puVar1 + -0x299c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x299c)" ( (binary_expression "puVar1 + -0x299c" identifier + number_literal) )))) , (binary_expression "(iVar7 + 1) * 4" (parenthesized_expression "(iVar7 + 1)" ( (binary_expression "iVar7 + 1" identifier + number_literal) )) * number_literal) )))) ;) (expression_statement "*(int *)(puVar1 + -0x299c) = iVar7;" (assignment_expression "*(int *)(puVar1 + -0x299c) = iVar7" (pointer_expression "*(int *)(puVar1 + -0x299c)" * (cast_expression "(int *)(puVar1 + -0x299c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x299c)" ( (binary_expression "puVar1 + -0x299c" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;" (assignment_expression "*(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4" (pointer_expression "*(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4)" * (cast_expression "(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4)" ( (binary_expression "iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4" identifier + (binary_expression "(*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4" (parenthesized_expression "(*(int *)(puVar1 + -0x29a0) + 0x3fffffff)" ( (binary_expression "*(int *)(puVar1 + -0x29a0) + 0x3fffffff" (pointer_expression "*(int *)(puVar1 + -0x29a0)" * (cast_expression "(int *)(puVar1 + -0x29a0)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar1 + -0x29a0)" ( (binary_expression "puVar1 + -0x29a0" identifier + number_literal) )))) + number_literal) )) * number_literal)) )))) = identifier) ;) })) (if_statement "if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }" if (parenthesized_expression "(PTR_DAT_0007c548[-0x3af4] == '\0')" ( (binary_expression "PTR_DAT_0007c548[-0x3af4] == '\0'" (subscript_expression "PTR_DAT_0007c548[-0x3af4]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "(*(code *)PTR_nodelay_0007d1a8)(param_1,0);" (call_expression "(*(code *)PTR_nodelay_0007d1a8)(param_1,0)" (parenthesized_expression "(*(code *)PTR_nodelay_0007d1a8)" ( (pointer_expression "*(code *)PTR_nodelay_0007d1a8" * (cast_expression "(code *)PTR_nodelay_0007d1a8" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,0)" ( identifier , number_literal ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT ))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT ))) ;) (return_statement return ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT , IDENT , LIT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( LIT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (break_statement break ;)) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (binary_expression (parenthesized_expression ( (binary_expression IDENT + LIT) )) * LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT) )) * LIT)) )))) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT ))) ;) (return_statement return ;) })))
(function_definition "void read_keys_from(undefined4 param_1)\n\n{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined *puVar8;\n  \n  (*(code *)PTR_doupdate_0007cfcc)();\n  if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }\n  puVar2 = PTR_the_window_resized_0007ca8c;\n  puVar1 = PTR_DAT_0007c548;\n  iVar7 = 0;\n  puVar8 = PTR_DAT_0007c570 + -0x5994;\n  while( true ) {\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }\n  (*(code *)PTR_curs_set_0007d154)(0);\n  puVar1 = PTR_DAT_0007c548;\n  piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n  *(int **)(puVar1 + -0x299c) = piVar5;\n  *piVar5 = iVar4;\n  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n  if (iVar4 == -2) {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,1);\n  puVar1 = PTR_DAT_0007c548;\n  while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }\n  if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,0);\n  return;\n}" (primitive_type "void") (function_declarator "read_keys_from(undefined4 param_1)" (identifier "read_keys_from") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  undefined *puVar2;\n  undefined4 *puVar3;\n  int iVar4;\n  int *piVar5;\n  undefined4 uVar6;\n  int iVar7;\n  undefined *puVar8;\n  \n  (*(code *)PTR_doupdate_0007cfcc)();\n  if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }\n  puVar2 = PTR_the_window_resized_0007ca8c;\n  puVar1 = PTR_DAT_0007c548;\n  iVar7 = 0;\n  puVar8 = PTR_DAT_0007c570 + -0x5994;\n  while( true ) {\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }\n  (*(code *)PTR_curs_set_0007d154)(0);\n  puVar1 = PTR_DAT_0007c548;\n  piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n  *(int **)(puVar1 + -0x299c) = piVar5;\n  *piVar5 = iVar4;\n  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n  if (iVar4 == -2) {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,1);\n  puVar1 = PTR_DAT_0007c548;\n  while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }\n  if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }\n  (*(code *)PTR_nodelay_0007d1a8)(param_1,0);\n  return;\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined *puVar2;" (type_identifier "undefined") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (declaration "undefined4 uVar6;" (type_identifier "undefined4") (identifier "uVar6") (; ";")) (declaration "int iVar7;" (primitive_type "int") (identifier "iVar7") (; ";")) (declaration "undefined *puVar8;" (type_identifier "undefined") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (expression_statement "(*(code *)PTR_doupdate_0007cfcc)();" (call_expression "(*(code *)PTR_doupdate_0007cfcc)()" (parenthesized_expression "(*(code *)PTR_doupdate_0007cfcc)" (( "(") (pointer_expression "*(code *)PTR_doupdate_0007cfcc" (* "*") (cast_expression "(code *)PTR_doupdate_0007cfcc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_doupdate_0007cfcc"))) () ")")) (argument_list "()" (( "(") () ")"))) (; ";")) (if_statement "if (PTR_DAT_0007c548[-0x29af] != '\0') {\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }" (if "if") (parenthesized_expression "(PTR_DAT_0007c548[-0x29af] != '\0')" (( "(") (binary_expression "PTR_DAT_0007c548[-0x29af] != '\0'" (subscript_expression "PTR_DAT_0007c548[-0x29af]" (identifier "PTR_DAT_0007c548") ([ "[") (number_literal "-0x29af") (] "]")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    (*(code *)PTR_curs_set_0007d154)(1);\n  }" ({ "{") (expression_statement "(*(code *)PTR_curs_set_0007d154)(1);" (call_expression "(*(code *)PTR_curs_set_0007d154)(1)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" (( "(") (pointer_expression "*(code *)PTR_curs_set_0007d154" (* "*") (cast_expression "(code *)PTR_curs_set_0007d154" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_curs_set_0007d154"))) () ")")) (argument_list "(1)" (( "(") (number_literal "1") () ")"))) (; ";")) (} "}"))) (expression_statement "puVar2 = PTR_the_window_resized_0007ca8c;" (assignment_expression "puVar2 = PTR_the_window_resized_0007ca8c" (identifier "puVar2") (= "=") (identifier "PTR_the_window_resized_0007ca8c")) (; ";")) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" (identifier "puVar1") (= "=") (identifier "PTR_DAT_0007c548")) (; ";")) (expression_statement "iVar7 = 0;" (assignment_expression "iVar7 = 0" (identifier "iVar7") (= "=") (number_literal "0")) (; ";")) (expression_statement "puVar8 = PTR_DAT_0007c570 + -0x5994;" (assignment_expression "puVar8 = PTR_DAT_0007c570 + -0x5994" (identifier "puVar8") (= "=") (binary_expression "PTR_DAT_0007c570 + -0x5994" (identifier "PTR_DAT_0007c570") (+ "+") (number_literal "-0x5994"))) (; ";")) (while_statement "while( true ) {\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }\n    if (iVar4 != -1) break;\n    iVar7 = iVar7 + 1;\n    if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }\n    if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }\n  }" ({ "{") (expression_statement "iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);" (assignment_expression "iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1)" (identifier "iVar4") (= "=") (call_expression "(*(code *)PTR_wgetch_0007d0c4)(param_1)" (parenthesized_expression "(*(code *)PTR_wgetch_0007d0c4)" (( "(") (pointer_expression "*(code *)PTR_wgetch_0007d0c4" (* "*") (cast_expression "(code *)PTR_wgetch_0007d0c4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_wgetch_0007d0c4"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (if_statement "if (*(int *)puVar2 != 0) {\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }" (if "if") (parenthesized_expression "(*(int *)puVar2 != 0)" (( "(") (binary_expression "*(int *)puVar2 != 0" (pointer_expression "*(int *)puVar2" (* "*") (cast_expression "(int *)puVar2" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar2"))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      regenerate_screen();\n      (*(code *)PTR_curs_set_0007d154)(0);\n      puVar1 = PTR_DAT_0007c548;\n      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);\n      *(undefined4 **)(puVar1 + -0x299c) = puVar3;\n      *puVar3 = 0xfffffffe;\n      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;\n      return;\n    }" ({ "{") (expression_statement "regenerate_screen();" (call_expression "regenerate_screen()" (identifier "regenerate_screen") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "(*(code *)PTR_curs_set_0007d154)(0);" (call_expression "(*(code *)PTR_curs_set_0007d154)(0)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" (( "(") (pointer_expression "*(code *)PTR_curs_set_0007d154" (* "*") (cast_expression "(code *)PTR_curs_set_0007d154" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_curs_set_0007d154"))) () ")")) (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" (identifier "puVar1") (= "=") (identifier "PTR_DAT_0007c548")) (; ";")) (expression_statement "puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);" (assignment_expression "puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" (identifier "nrealloc") (argument_list "(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" (( "(") (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x299c)" (* "*") (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x299c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_0007c548 + -0x299c)" (( "(") (binary_expression "PTR_DAT_0007c548 + -0x299c" (identifier "PTR_DAT_0007c548") (+ "+") (number_literal "-0x299c")) () ")")))) (, ",") (number_literal "4") () ")"))))) (; ";")) (expression_statement "*(undefined4 **)(puVar1 + -0x299c) = puVar3;" (assignment_expression "*(undefined4 **)(puVar1 + -0x299c) = puVar3" (pointer_expression "*(undefined4 **)(puVar1 + -0x299c)" (* "*") (cast_expression "(undefined4 **)(puVar1 + -0x299c)" (( "(") (type_descriptor "undefined4 **" (type_identifier "undefined4") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar1 + -0x299c)" (( "(") (binary_expression "puVar1 + -0x299c" (identifier "puVar1") (+ "+") (number_literal "-0x299c")) () ")")))) (= "=") (identifier "puVar3")) (; ";")) (expression_statement "*puVar3 = 0xfffffffe;" (assignment_expression "*puVar3 = 0xfffffffe" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (number_literal "0xfffffffe")) (; ";")) (expression_statement "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;" (assignment_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1" (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" (* "*") (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_0007c548 + -0x29a0)" (( "(") (binary_expression "PTR_DAT_0007c548 + -0x29a0" (identifier "PTR_DAT_0007c548") (+ "+") (number_literal "-0x29a0")) () ")")))) (= "=") (number_literal "1")) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (iVar4 != -1) break;" (if "if") (parenthesized_expression "(iVar4 != -1)" (( "(") (binary_expression "iVar4 != -1" (identifier "iVar4") (!= "!=") (number_literal "-1")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar7 = iVar7 + 1;" (assignment_expression "iVar7 = iVar7 + 1" (identifier "iVar7") (= "=") (binary_expression "iVar7 + 1" (identifier "iVar7") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (puVar1[-0x3af4] == '\0') {\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }" (if "if") (parenthesized_expression "(puVar1[-0x3af4] == '\0')" (( "(") (binary_expression "puVar1[-0x3af4] == '\0'" (subscript_expression "puVar1[-0x3af4]" (identifier "puVar1") ([ "[") (number_literal "-0x3af4") (] "]")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      (*(code *)PTR_curs_set_0007d154)(0);\n      return;\n    }" ({ "{") (expression_statement "(*(code *)PTR_curs_set_0007d154)(0);" (call_expression "(*(code *)PTR_curs_set_0007d154)(0)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" (( "(") (pointer_expression "*(code *)PTR_curs_set_0007d154" (* "*") (cast_expression "(code *)PTR_curs_set_0007d154" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_curs_set_0007d154"))) () ")")) (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}"))) (if_statement "if (iVar7 == 0x80) {\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }" (if "if") (parenthesized_expression "(iVar7 == 0x80)" (( "(") (binary_expression "iVar7 == 0x80" (identifier "iVar7") (== "==") (number_literal "0x80")) () ")")) (compound_statement "{\n      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);\n      die(uVar6);\n    }" ({ "{") (expression_statement "uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);" (assignment_expression "uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5)" (identifier "uVar6") (= "=") (call_expression "(*(code *)PTR_dcgettext_0007d100)(0,puVar8,5)" (parenthesized_expression "(*(code *)PTR_dcgettext_0007d100)" (( "(") (pointer_expression "*(code *)PTR_dcgettext_0007d100" (* "*") (cast_expression "(code *)PTR_dcgettext_0007d100" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_dcgettext_0007d100"))) () ")")) (argument_list "(0,puVar8,5)" (( "(") (number_literal "0") (, ",") (identifier "puVar8") (, ",") (number_literal "5") () ")")))) (; ";")) (expression_statement "die(uVar6);" (call_expression "die(uVar6)" (identifier "die") (argument_list "(uVar6)" (( "(") (identifier "uVar6") () ")"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "(*(code *)PTR_curs_set_0007d154)(0);" (call_expression "(*(code *)PTR_curs_set_0007d154)(0)" (parenthesized_expression "(*(code *)PTR_curs_set_0007d154)" (( "(") (pointer_expression "*(code *)PTR_curs_set_0007d154" (* "*") (cast_expression "(code *)PTR_curs_set_0007d154" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_curs_set_0007d154"))) () ")")) (argument_list "(0)" (( "(") (number_literal "0") () ")"))) (; ";")) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" (identifier "puVar1") (= "=") (identifier "PTR_DAT_0007c548")) (; ";")) (expression_statement "piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);" (assignment_expression "piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" (identifier "piVar5") (= "=") (cast_expression "(int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" (identifier "nrealloc") (argument_list "(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4)" (( "(") (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x299c)" (* "*") (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x299c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_0007c548 + -0x299c)" (( "(") (binary_expression "PTR_DAT_0007c548 + -0x299c" (identifier "PTR_DAT_0007c548") (+ "+") (number_literal "-0x299c")) () ")")))) (, ",") (number_literal "4") () ")"))))) (; ";")) (expression_statement "*(int **)(puVar1 + -0x299c) = piVar5;" (assignment_expression "*(int **)(puVar1 + -0x299c) = piVar5" (pointer_expression "*(int **)(puVar1 + -0x299c)" (* "*") (cast_expression "(int **)(puVar1 + -0x299c)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar1 + -0x299c)" (( "(") (binary_expression "puVar1 + -0x299c" (identifier "puVar1") (+ "+") (number_literal "-0x299c")) () ")")))) (= "=") (identifier "piVar5")) (; ";")) (expression_statement "*piVar5 = iVar4;" (assignment_expression "*piVar5 = iVar4" (pointer_expression "*piVar5" (* "*") (identifier "piVar5")) (= "=") (identifier "iVar4")) (; ";")) (expression_statement "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;" (assignment_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1" (pointer_expression "*(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" (* "*") (cast_expression "(undefined4 *)(PTR_DAT_0007c548 + -0x29a0)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_DAT_0007c548 + -0x29a0)" (( "(") (binary_expression "PTR_DAT_0007c548 + -0x29a0" (identifier "PTR_DAT_0007c548") (+ "+") (number_literal "-0x29a0")) () ")")))) (= "=") (number_literal "1")) (; ";")) (if_statement "if (iVar4 == -2) {\n    return;\n  }" (if "if") (parenthesized_expression "(iVar4 == -2)" (( "(") (binary_expression "iVar4 == -2" (identifier "iVar4") (== "==") (number_literal "-2")) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_nodelay_0007d1a8)(param_1,1);" (call_expression "(*(code *)PTR_nodelay_0007d1a8)(param_1,1)" (parenthesized_expression "(*(code *)PTR_nodelay_0007d1a8)" (( "(") (pointer_expression "*(code *)PTR_nodelay_0007d1a8" (* "*") (cast_expression "(code *)PTR_nodelay_0007d1a8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_nodelay_0007d1a8"))) () ")")) (argument_list "(param_1,1)" (( "(") (identifier "param_1") (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "puVar1 = PTR_DAT_0007c548;" (assignment_expression "puVar1 = PTR_DAT_0007c548" (identifier "puVar1") (= "=") (identifier "PTR_DAT_0007c548")) (; ";")) (while_statement "while( true ) {\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }\n    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);\n    iVar7 = *(int *)(puVar1 + -0x29a0);\n    if (iVar4 == -1) break;\n    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;\n    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);\n    *(int *)(puVar1 + -0x299c) = iVar7;\n    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;\n  }" ({ "{") (if_statement "if (puVar1[-0x29b0] != '\0') {\n      add_to_macrobuffer(iVar4);\n    }" (if "if") (parenthesized_expression "(puVar1[-0x29b0] != '\0')" (( "(") (binary_expression "puVar1[-0x29b0] != '\0'" (subscript_expression "puVar1[-0x29b0]" (identifier "puVar1") ([ "[") (number_literal "-0x29b0") (] "]")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      add_to_macrobuffer(iVar4);\n    }" ({ "{") (expression_statement "add_to_macrobuffer(iVar4);" (call_expression "add_to_macrobuffer(iVar4)" (identifier "add_to_macrobuffer") (argument_list "(iVar4)" (( "(") (identifier "iVar4") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);" (assignment_expression "iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1)" (identifier "iVar4") (= "=") (call_expression "(*(code *)PTR_wgetch_0007d0c4)(param_1)" (parenthesized_expression "(*(code *)PTR_wgetch_0007d0c4)" (( "(") (pointer_expression "*(code *)PTR_wgetch_0007d0c4" (* "*") (cast_expression "(code *)PTR_wgetch_0007d0c4" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_wgetch_0007d0c4"))) () ")")) (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "iVar7 = *(int *)(puVar1 + -0x29a0);" (assignment_expression "iVar7 = *(int *)(puVar1 + -0x29a0)" (identifier "iVar7") (= "=") (pointer_expression "*(int *)(puVar1 + -0x29a0)" (* "*") (cast_expression "(int *)(puVar1 + -0x29a0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + -0x29a0)" (( "(") (binary_expression "puVar1 + -0x29a0" (identifier "puVar1") (+ "+") (number_literal "-0x29a0")) () ")"))))) (; ";")) (if_statement "if (iVar4 == -1) break;" (if "if") (parenthesized_expression "(iVar4 == -1)" (( "(") (binary_expression "iVar4 == -1" (identifier "iVar4") (== "==") (number_literal "-1")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "*(int *)(puVar1 + -0x29a0) = iVar7 + 1;" (assignment_expression "*(int *)(puVar1 + -0x29a0) = iVar7 + 1" (pointer_expression "*(int *)(puVar1 + -0x29a0)" (* "*") (cast_expression "(int *)(puVar1 + -0x29a0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + -0x29a0)" (( "(") (binary_expression "puVar1 + -0x29a0" (identifier "puVar1") (+ "+") (number_literal "-0x29a0")) () ")")))) (= "=") (binary_expression "iVar7 + 1" (identifier "iVar7") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);" (assignment_expression "iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4)" (identifier "iVar7") (= "=") (call_expression "nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4)" (identifier "nrealloc") (argument_list "(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4)" (( "(") (pointer_expression "*(undefined4 *)(puVar1 + -0x299c)" (* "*") (cast_expression "(undefined4 *)(puVar1 + -0x299c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + -0x299c)" (( "(") (binary_expression "puVar1 + -0x299c" (identifier "puVar1") (+ "+") (number_literal "-0x299c")) () ")")))) (, ",") (binary_expression "(iVar7 + 1) * 4" (parenthesized_expression "(iVar7 + 1)" (( "(") (binary_expression "iVar7 + 1" (identifier "iVar7") (+ "+") (number_literal "1")) () ")")) (* "*") (number_literal "4")) () ")")))) (; ";")) (expression_statement "*(int *)(puVar1 + -0x299c) = iVar7;" (assignment_expression "*(int *)(puVar1 + -0x299c) = iVar7" (pointer_expression "*(int *)(puVar1 + -0x299c)" (* "*") (cast_expression "(int *)(puVar1 + -0x299c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + -0x299c)" (( "(") (binary_expression "puVar1 + -0x299c" (identifier "puVar1") (+ "+") (number_literal "-0x299c")) () ")")))) (= "=") (identifier "iVar7")) (; ";")) (expression_statement "*(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;" (assignment_expression "*(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4" (pointer_expression "*(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4)" (* "*") (cast_expression "(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4)" (( "(") (binary_expression "iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4" (identifier "iVar7") (+ "+") (binary_expression "(*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4" (parenthesized_expression "(*(int *)(puVar1 + -0x29a0) + 0x3fffffff)" (( "(") (binary_expression "*(int *)(puVar1 + -0x29a0) + 0x3fffffff" (pointer_expression "*(int *)(puVar1 + -0x29a0)" (* "*") (cast_expression "(int *)(puVar1 + -0x29a0)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar1 + -0x29a0)" (( "(") (binary_expression "puVar1 + -0x29a0" (identifier "puVar1") (+ "+") (number_literal "-0x29a0")) () ")")))) (+ "+") (number_literal "0x3fffffff")) () ")")) (* "*") (number_literal "4"))) () ")")))) (= "=") (identifier "iVar4")) (; ";")) (} "}"))) (if_statement "if (PTR_DAT_0007c548[-0x3af4] == '\0') {\n    return;\n  }" (if "if") (parenthesized_expression "(PTR_DAT_0007c548[-0x3af4] == '\0')" (( "(") (binary_expression "PTR_DAT_0007c548[-0x3af4] == '\0'" (subscript_expression "PTR_DAT_0007c548[-0x3af4]" (identifier "PTR_DAT_0007c548") ([ "[") (number_literal "-0x3af4") (] "]")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "(*(code *)PTR_nodelay_0007d1a8)(param_1,0);" (call_expression "(*(code *)PTR_nodelay_0007d1a8)(param_1,0)" (parenthesized_expression "(*(code *)PTR_nodelay_0007d1a8)" (( "(") (pointer_expression "*(code *)PTR_nodelay_0007d1a8" (* "*") (cast_expression "(code *)PTR_nodelay_0007d1a8" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_nodelay_0007d1a8"))) () ")")) (argument_list "(param_1,0)" (( "(") (identifier "param_1") (, ",") (number_literal "0") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))
(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (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 (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)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal)))) (return_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal) (identifier) (number_literal))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (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: (number_literal)))))) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (number_literal)))) (return_statement))))

void MASKED(undefined4 param_1)

{
  undefined *puVar1;
  undefined *puVar2;
  undefined4 *puVar3;
  int iVar4;
  int *piVar5;
  undefined4 uVar6;
  int iVar7;
  undefined *puVar8;
  
  (*(code *)PTR_doupdate_0007cfcc)();
  if (PTR_DAT_0007c548[-0x29af] != '\0') {
    (*(code *)PTR_curs_set_0007d154)(1);
  }
  puVar2 = PTR_the_window_resized_0007ca8c;
  puVar1 = PTR_DAT_0007c548;
  iVar7 = 0;
  puVar8 = PTR_DAT_0007c570 + -0x5994;
  while( true ) {
    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);
    if (*(int *)puVar2 != 0) {
      regenerate_screen();
      (*(code *)PTR_curs_set_0007d154)(0);
      puVar1 = PTR_DAT_0007c548;
      puVar3 = (undefined4 *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);
      *(undefined4 **)(puVar1 + -0x299c) = puVar3;
      *puVar3 = 0xfffffffe;
      *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;
      return;
    }
    if (iVar4 != -1) break;
    iVar7 = iVar7 + 1;
    if (puVar1[-0x3af4] == '\0') {
      (*(code *)PTR_curs_set_0007d154)(0);
      return;
    }
    if (iVar7 == 0x80) {
      uVar6 = (*(code *)PTR_dcgettext_0007d100)(0,puVar8,5);
      die(uVar6);
    }
  }
  (*(code *)PTR_curs_set_0007d154)(0);
  puVar1 = PTR_DAT_0007c548;
  piVar5 = (int *)nrealloc(*(undefined4 *)(PTR_DAT_0007c548 + -0x299c),4);
  *(int **)(puVar1 + -0x299c) = piVar5;
  *piVar5 = iVar4;
  *(undefined4 *)(PTR_DAT_0007c548 + -0x29a0) = 1;
  if (iVar4 == -2) {
    return;
  }
  (*(code *)PTR_nodelay_0007d1a8)(param_1,1);
  puVar1 = PTR_DAT_0007c548;
  while( true ) {
    if (puVar1[-0x29b0] != '\0') {
      add_to_macrobuffer(iVar4);
    }
    iVar4 = (*(code *)PTR_wgetch_0007d0c4)(param_1);
    iVar7 = *(int *)(puVar1 + -0x29a0);
    if (iVar4 == -1) break;
    *(int *)(puVar1 + -0x29a0) = iVar7 + 1;
    iVar7 = nrealloc(*(undefined4 *)(puVar1 + -0x299c),(iVar7 + 1) * 4);
    *(int *)(puVar1 + -0x299c) = iVar7;
    *(int *)(iVar7 + (*(int *)(puVar1 + -0x29a0) + 0x3fffffff) * 4) = iVar4;
  }
  if (PTR_DAT_0007c548[-0x3af4] == '\0') {
    return;
  }
  (*(code *)PTR_nodelay_0007d1a8)(param_1,0);
  return;
}

