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

void term_print_finish(Terminal *term)

{
  bufchain_conflict *ch;
  int len_00;
  long in_FS_OFFSET;
  char c;
  wchar_t len;
  void *data;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  if ((term->printing != L'\0') || (term->only_printing != L'\0')) {
    term_print_flush(term);
    ch = &term->printer_buf;
    while( true ) {
      len_00 = bufchain_size((bufchain *)ch);
      if (len_00 < 1) break;
      bufchain_prefix((bufchain *)ch,&data,&len);
                    /* WARNING: Load size is inaccurate */
      c = *data;
      if ((c & 0x7fU) == 0x1b) {
        bufchain_consume((bufchain *)ch,len_00);
        break;
      }
      printer_job_data(term->print_job,&c,1);
      bufchain_consume((bufchain *)ch,1);
    }
    printer_finish_job(term->print_job);
    term->print_job = (printer_job *)0x0;
    term->only_printing = L'\0';
    term->printing = L'\0';
  }
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



void FUN_0012ecae(long param_1)

{
  long lVar1;
  int iVar2;
  long in_FS_OFFSET;
  byte local_4d;
  undefined1 local_4c [4];
  byte *local_48;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {
    FUN_0012ec09(param_1);
    lVar1 = param_1 + 0x148;
    while( true ) {
      iVar2 = FUN_00122228(lVar1);
      if (iVar2 < 1) break;
      FUN_0012222c(lVar1,&local_48,local_4c);
      local_4d = *local_48;
      if ((local_4d & 0x7f) == 0x1b) {
        FUN_00122c87(lVar1,iVar2);
        break;
      }
      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);
      FUN_00122c87(lVar1,1);
    }
    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));
    *(undefined8 *)(param_1 + 0x160) = 0;
    *(undefined4 *)(param_1 + 0x140) = 0;
    *(undefined4 *)(param_1 + 0x13c) = 0;
  }
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x28
MOV R12,RDI
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
CMP dword ptr [RDI + 0x13c],0x0
JNZ 0x0012ece5
CMP dword ptr [RDI + 0x140],0x0
JZ 0x0012ed92
MOV RDI,R12
CALL 0x0012ec09
LEA RBX,[R12 + 0x148]
LEA R14,[RSP + 0xc]
LEA R13,[RSP + 0x10]
LEA R15,[RSP + 0xb]
MOV RDI,RBX
CALL 0x00122228
MOV EBP,EAX
TEST EAX,EAX
JLE 0x0012ed61
MOV RDX,R14
MOV RSI,R13
MOV RDI,RBX
CALL 0x0012222c
MOV RAX,qword ptr [RSP + 0x10]
MOVZX EAX,byte ptr [RAX]
MOV byte ptr [RSP + 0xb],AL
AND EAX,0x7f
CMP AL,0x1b
JZ 0x0012ed57
MOV RDI,qword ptr [R12 + 0x160]
MOV EDX,0x1
MOV RSI,R15
CALL 0x00152cd0
MOV ESI,0x1
MOV RDI,RBX
CALL 0x00122c87
JMP 0x0012ed04
MOV ESI,EBP
MOV RDI,RBX
CALL 0x00122c87
MOV RDI,qword ptr [R12 + 0x160]
CALL 0x00152cf5
MOV qword ptr [R12 + 0x160],0x0
MOV dword ptr [R12 + 0x140],0x0
MOV dword ptr [R12 + 0x13c],0x0
MOV RAX,qword ptr [RSP + 0x18]
XOR RAX,qword ptr FS:[0x28]
JNZ 0x0012edb1
ADD RSP,0x28
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
CALL 0x001111e0
(translation_unit "void FUN_0012ecae(long param_1)\n\n{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  byte local_4d;\n  undefined1 local_4c [4];\n  byte *local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "void FUN_0012ecae(long param_1)\n\n{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  byte local_4d;\n  undefined1 local_4c [4];\n  byte *local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "FUN_0012ecae(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  byte local_4d;\n  undefined1 local_4c [4];\n  byte *local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "byte local_4d;" type_identifier identifier ;) (declaration "undefined1 local_4c [4];" type_identifier (array_declarator "local_4c [4]" identifier [ number_literal ]) ;) (declaration "byte *local_48;" type_identifier (pointer_declarator "*local_48" * identifier) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }" if (parenthesized_expression "((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0))" ( (binary_expression "(*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)" (parenthesized_expression "(*(int *)(param_1 + 0x13c) != 0)" ( (binary_expression "*(int *)(param_1 + 0x13c) != 0" (pointer_expression "*(int *)(param_1 + 0x13c)" * (cast_expression "(int *)(param_1 + 0x13c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x13c)" ( (binary_expression "param_1 + 0x13c" identifier + number_literal) )))) != number_literal) )) || (parenthesized_expression "(*(int *)(param_1 + 0x140) != 0)" ( (binary_expression "*(int *)(param_1 + 0x140) != 0" (pointer_expression "*(int *)(param_1 + 0x140)" * (cast_expression "(int *)(param_1 + 0x140)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }" { (expression_statement "FUN_0012ec09(param_1);" (call_expression "FUN_0012ec09(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "lVar1 = param_1 + 0x148;" (assignment_expression "lVar1 = param_1 + 0x148" identifier = (binary_expression "param_1 + 0x148" identifier + number_literal)) ;) (while_statement "while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }" { (expression_statement "iVar2 = FUN_00122228(lVar1);" (assignment_expression "iVar2 = FUN_00122228(lVar1)" identifier = (call_expression "FUN_00122228(lVar1)" identifier (argument_list "(lVar1)" ( identifier )))) ;) (if_statement "if (iVar2 < 1) break;" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (break_statement "break;" break ;)) (expression_statement "FUN_0012222c(lVar1,&local_48,local_4c);" (call_expression "FUN_0012222c(lVar1,&local_48,local_4c)" identifier (argument_list "(lVar1,&local_48,local_4c)" ( identifier , (pointer_expression "&local_48" & identifier) , identifier ))) ;) (expression_statement "local_4d = *local_48;" (assignment_expression "local_4d = *local_48" identifier = (pointer_expression "*local_48" * identifier)) ;) (if_statement "if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }" if (parenthesized_expression "((local_4d & 0x7f) == 0x1b)" ( (binary_expression "(local_4d & 0x7f) == 0x1b" (parenthesized_expression "(local_4d & 0x7f)" ( (binary_expression "local_4d & 0x7f" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }" { (expression_statement "FUN_00122c87(lVar1,iVar2);" (call_expression "FUN_00122c87(lVar1,iVar2)" identifier (argument_list "(lVar1,iVar2)" ( identifier , identifier ))) ;) (break_statement "break;" break ;) })) (expression_statement "FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);" (call_expression "FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1)" identifier (argument_list "(*(undefined8 *)(param_1 + 0x160),&local_4d,1)" ( (pointer_expression "*(undefined8 *)(param_1 + 0x160)" * (cast_expression "(undefined8 *)(param_1 + 0x160)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) , (pointer_expression "&local_4d" & identifier) , number_literal ))) ;) (expression_statement "FUN_00122c87(lVar1,1);" (call_expression "FUN_00122c87(lVar1,1)" identifier (argument_list "(lVar1,1)" ( identifier , number_literal ))) ;) })) (expression_statement "FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));" (call_expression "FUN_00152cf5(*(undefined8 *)(param_1 + 0x160))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x160))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x160)" * (cast_expression "(undefined8 *)(param_1 + 0x160)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined8 *)(param_1 + 0x160) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x160) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x160)" * (cast_expression "(undefined8 *)(param_1 + 0x160)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x140) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x140) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x140)" * (cast_expression "(undefined4 *)(param_1 + 0x140)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x13c) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x13c) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x13c)" * (cast_expression "(undefined4 *)(param_1 + 0x13c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x13c)" ( (binary_expression "param_1 + 0x13c" identifier + number_literal) )))) = number_literal) ;) })) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Enum "anon_enum_32": Some values do not have unique names */\n\nvoid term_print_finish(Terminal *term)\n\n{\n  bufchain_conflict *ch;\n  int len_00;\n  long in_FS_OFFSET;\n  char c;\n  wchar_t len;\n  void *data;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if ((term->printing != L'\0') || (term->only_printing != L'\0')) {\n    term_print_flush(term);\n    ch = &term->printer_buf;\n    while( true ) {\n      len_00 = bufchain_size((bufchain *)ch);\n      if (len_00 < 1) break;\n      bufchain_prefix((bufchain *)ch,&data,&len);\n                    /* WARNING: Load size is inaccurate */\n      c = *data;\n      if ((c & 0x7fU) == 0x1b) {\n        bufchain_consume((bufchain *)ch,len_00);\n        break;\n      }\n      printer_job_data(term->print_job,&c,1);\n      bufchain_consume((bufchain *)ch,1);\n    }\n    printer_finish_job(term->print_job);\n    term->print_job = (printer_job *)0x0;\n    term->only_printing = L'\0';\n    term->printing = L'\0';\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" comment (function_definition "void term_print_finish(Terminal *term)\n\n{\n  bufchain_conflict *ch;\n  int len_00;\n  long in_FS_OFFSET;\n  char c;\n  wchar_t len;\n  void *data;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if ((term->printing != L'\0') || (term->only_printing != L'\0')) {\n    term_print_flush(term);\n    ch = &term->printer_buf;\n    while( true ) {\n      len_00 = bufchain_size((bufchain *)ch);\n      if (len_00 < 1) break;\n      bufchain_prefix((bufchain *)ch,&data,&len);\n                    /* WARNING: Load size is inaccurate */\n      c = *data;\n      if ((c & 0x7fU) == 0x1b) {\n        bufchain_consume((bufchain *)ch,len_00);\n        break;\n      }\n      printer_job_data(term->print_job,&c,1);\n      bufchain_consume((bufchain *)ch,1);\n    }\n    printer_finish_job(term->print_job);\n    term->print_job = (printer_job *)0x0;\n    term->only_printing = L'\0';\n    term->printing = L'\0';\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "term_print_finish(Terminal *term)" identifier (parameter_list "(Terminal *term)" ( (parameter_declaration "Terminal *term" type_identifier (pointer_declarator "*term" * identifier)) ))) (compound_statement "{\n  bufchain_conflict *ch;\n  int len_00;\n  long in_FS_OFFSET;\n  char c;\n  wchar_t len;\n  void *data;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if ((term->printing != L'\0') || (term->only_printing != L'\0')) {\n    term_print_flush(term);\n    ch = &term->printer_buf;\n    while( true ) {\n      len_00 = bufchain_size((bufchain *)ch);\n      if (len_00 < 1) break;\n      bufchain_prefix((bufchain *)ch,&data,&len);\n                    /* WARNING: Load size is inaccurate */\n      c = *data;\n      if ((c & 0x7fU) == 0x1b) {\n        bufchain_consume((bufchain *)ch,len_00);\n        break;\n      }\n      printer_job_data(term->print_job,&c,1);\n      bufchain_consume((bufchain *)ch,1);\n    }\n    printer_finish_job(term->print_job);\n    term->print_job = (printer_job *)0x0;\n    term->only_printing = L'\0';\n    term->printing = L'\0';\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "bufchain_conflict *ch;" type_identifier (pointer_declarator "*ch" * identifier) ;) (declaration "int len_00;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "char c;" primitive_type identifier ;) (declaration "wchar_t len;" type_identifier identifier ;) (declaration "void *data;" primitive_type (pointer_declarator "*data" * identifier) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if ((term->printing != L'\0') || (term->only_printing != L'\0')) {\n    term_print_flush(term);\n    ch = &term->printer_buf;\n    while( true ) {\n      len_00 = bufchain_size((bufchain *)ch);\n      if (len_00 < 1) break;\n      bufchain_prefix((bufchain *)ch,&data,&len);\n                    /* WARNING: Load size is inaccurate */\n      c = *data;\n      if ((c & 0x7fU) == 0x1b) {\n        bufchain_consume((bufchain *)ch,len_00);\n        break;\n      }\n      printer_job_data(term->print_job,&c,1);\n      bufchain_consume((bufchain *)ch,1);\n    }\n    printer_finish_job(term->print_job);\n    term->print_job = (printer_job *)0x0;\n    term->only_printing = L'\0';\n    term->printing = L'\0';\n  }" if (parenthesized_expression "((term->printing != L'\0') || (term->only_printing != L'\0'))" ( (binary_expression "(term->printing != L'\0') || (term->only_printing != L'\0')" (parenthesized_expression "(term->printing != L'\0')" ( (binary_expression "term->printing != L'\0'" (field_expression "term->printing" identifier -> field_identifier) != (char_literal "L'\0'" L' escape_sequence ')) )) || (parenthesized_expression "(term->only_printing != L'\0')" ( (binary_expression "term->only_printing != L'\0'" (field_expression "term->only_printing" identifier -> field_identifier) != (char_literal "L'\0'" L' escape_sequence ')) ))) )) (compound_statement "{\n    term_print_flush(term);\n    ch = &term->printer_buf;\n    while( true ) {\n      len_00 = bufchain_size((bufchain *)ch);\n      if (len_00 < 1) break;\n      bufchain_prefix((bufchain *)ch,&data,&len);\n                    /* WARNING: Load size is inaccurate */\n      c = *data;\n      if ((c & 0x7fU) == 0x1b) {\n        bufchain_consume((bufchain *)ch,len_00);\n        break;\n      }\n      printer_job_data(term->print_job,&c,1);\n      bufchain_consume((bufchain *)ch,1);\n    }\n    printer_finish_job(term->print_job);\n    term->print_job = (printer_job *)0x0;\n    term->only_printing = L'\0';\n    term->printing = L'\0';\n  }" { (expression_statement "term_print_flush(term);" (call_expression "term_print_flush(term)" identifier (argument_list "(term)" ( identifier ))) ;) (expression_statement "ch = &term->printer_buf;" (assignment_expression "ch = &term->printer_buf" identifier = (pointer_expression "&term->printer_buf" & (field_expression "term->printer_buf" identifier -> field_identifier))) ;) (while_statement "while( true ) {\n      len_00 = bufchain_size((bufchain *)ch);\n      if (len_00 < 1) break;\n      bufchain_prefix((bufchain *)ch,&data,&len);\n                    /* WARNING: Load size is inaccurate */\n      c = *data;\n      if ((c & 0x7fU) == 0x1b) {\n        bufchain_consume((bufchain *)ch,len_00);\n        break;\n      }\n      printer_job_data(term->print_job,&c,1);\n      bufchain_consume((bufchain *)ch,1);\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      len_00 = bufchain_size((bufchain *)ch);\n      if (len_00 < 1) break;\n      bufchain_prefix((bufchain *)ch,&data,&len);\n                    /* WARNING: Load size is inaccurate */\n      c = *data;\n      if ((c & 0x7fU) == 0x1b) {\n        bufchain_consume((bufchain *)ch,len_00);\n        break;\n      }\n      printer_job_data(term->print_job,&c,1);\n      bufchain_consume((bufchain *)ch,1);\n    }" { (expression_statement "len_00 = bufchain_size((bufchain *)ch);" (assignment_expression "len_00 = bufchain_size((bufchain *)ch)" identifier = (call_expression "bufchain_size((bufchain *)ch)" identifier (argument_list "((bufchain *)ch)" ( (cast_expression "(bufchain *)ch" ( (type_descriptor "bufchain *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (if_statement "if (len_00 < 1) break;" if (parenthesized_expression "(len_00 < 1)" ( (binary_expression "len_00 < 1" identifier < number_literal) )) (break_statement "break;" break ;)) (expression_statement "bufchain_prefix((bufchain *)ch,&data,&len);" (call_expression "bufchain_prefix((bufchain *)ch,&data,&len)" identifier (argument_list "((bufchain *)ch,&data,&len)" ( (cast_expression "(bufchain *)ch" ( (type_descriptor "bufchain *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (pointer_expression "&data" & identifier) , (pointer_expression "&len" & identifier) ))) ;) comment (expression_statement "c = *data;" (assignment_expression "c = *data" identifier = (pointer_expression "*data" * identifier)) ;) (if_statement "if ((c & 0x7fU) == 0x1b) {\n        bufchain_consume((bufchain *)ch,len_00);\n        break;\n      }" if (parenthesized_expression "((c & 0x7fU) == 0x1b)" ( (binary_expression "(c & 0x7fU) == 0x1b" (parenthesized_expression "(c & 0x7fU)" ( (binary_expression "c & 0x7fU" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        bufchain_consume((bufchain *)ch,len_00);\n        break;\n      }" { (expression_statement "bufchain_consume((bufchain *)ch,len_00);" (call_expression "bufchain_consume((bufchain *)ch,len_00)" identifier (argument_list "((bufchain *)ch,len_00)" ( (cast_expression "(bufchain *)ch" ( (type_descriptor "bufchain *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;) (break_statement "break;" break ;) })) (expression_statement "printer_job_data(term->print_job,&c,1);" (call_expression "printer_job_data(term->print_job,&c,1)" identifier (argument_list "(term->print_job,&c,1)" ( (field_expression "term->print_job" identifier -> field_identifier) , (pointer_expression "&c" & identifier) , number_literal ))) ;) (expression_statement "bufchain_consume((bufchain *)ch,1);" (call_expression "bufchain_consume((bufchain *)ch,1)" identifier (argument_list "((bufchain *)ch,1)" ( (cast_expression "(bufchain *)ch" ( (type_descriptor "bufchain *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , number_literal ))) ;) })) (expression_statement "printer_finish_job(term->print_job);" (call_expression "printer_finish_job(term->print_job)" identifier (argument_list "(term->print_job)" ( (field_expression "term->print_job" identifier -> field_identifier) ))) ;) (expression_statement "term->print_job = (printer_job *)0x0;" (assignment_expression "term->print_job = (printer_job *)0x0" (field_expression "term->print_job" identifier -> field_identifier) = (cast_expression "(printer_job *)0x0" ( (type_descriptor "printer_job *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "term->only_printing = L'\0';" (assignment_expression "term->only_printing = L'\0'" (field_expression "term->only_printing" identifier -> field_identifier) = (char_literal "L'\0'" L' escape_sequence ')) ;) (expression_statement "term->printing = L'\0';" (assignment_expression "term->printing = L'\0'" (field_expression "term->printing" identifier -> field_identifier) = (char_literal "L'\0'" L' escape_sequence ')) ;) })) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_0012ecae(long param_1)\n\n{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  byte local_4d;\n  undefined1 local_4c [4];\n  byte *local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "void FUN_0012ecae(long param_1)\n\n{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  byte local_4d;\n  undefined1 local_4c [4];\n  byte *local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" primitive_type (function_declarator "FUN_0012ecae(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  byte local_4d;\n  undefined1 local_4c [4];\n  byte *local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "byte local_4d;" type_identifier identifier ;) (declaration "undefined1 local_4c [4];" type_identifier (array_declarator "local_4c [4]" identifier [ number_literal ]) ;) (declaration "byte *local_48;" type_identifier (pointer_declarator "*local_48" * identifier) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }" if (parenthesized_expression "((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0))" ( (binary_expression "(*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)" (parenthesized_expression "(*(int *)(param_1 + 0x13c) != 0)" ( (binary_expression "*(int *)(param_1 + 0x13c) != 0" (pointer_expression "*(int *)(param_1 + 0x13c)" * (cast_expression "(int *)(param_1 + 0x13c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x13c)" ( (binary_expression "param_1 + 0x13c" identifier + number_literal) )))) != number_literal) )) || (parenthesized_expression "(*(int *)(param_1 + 0x140) != 0)" ( (binary_expression "*(int *)(param_1 + 0x140) != 0" (pointer_expression "*(int *)(param_1 + 0x140)" * (cast_expression "(int *)(param_1 + 0x140)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) )))) != number_literal) ))) )) (compound_statement "{\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }" { (expression_statement "FUN_0012ec09(param_1);" (call_expression "FUN_0012ec09(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (expression_statement "lVar1 = param_1 + 0x148;" (assignment_expression "lVar1 = param_1 + 0x148" identifier = (binary_expression "param_1 + 0x148" identifier + number_literal)) ;) (while_statement "while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }" { (expression_statement "iVar2 = FUN_00122228(lVar1);" (assignment_expression "iVar2 = FUN_00122228(lVar1)" identifier = (call_expression "FUN_00122228(lVar1)" identifier (argument_list "(lVar1)" ( identifier )))) ;) (if_statement "if (iVar2 < 1) break;" if (parenthesized_expression "(iVar2 < 1)" ( (binary_expression "iVar2 < 1" identifier < number_literal) )) (break_statement "break;" break ;)) (expression_statement "FUN_0012222c(lVar1,&local_48,local_4c);" (call_expression "FUN_0012222c(lVar1,&local_48,local_4c)" identifier (argument_list "(lVar1,&local_48,local_4c)" ( identifier , (pointer_expression "&local_48" & identifier) , identifier ))) ;) (expression_statement "local_4d = *local_48;" (assignment_expression "local_4d = *local_48" identifier = (pointer_expression "*local_48" * identifier)) ;) (if_statement "if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }" if (parenthesized_expression "((local_4d & 0x7f) == 0x1b)" ( (binary_expression "(local_4d & 0x7f) == 0x1b" (parenthesized_expression "(local_4d & 0x7f)" ( (binary_expression "local_4d & 0x7f" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }" { (expression_statement "FUN_00122c87(lVar1,iVar2);" (call_expression "FUN_00122c87(lVar1,iVar2)" identifier (argument_list "(lVar1,iVar2)" ( identifier , identifier ))) ;) (break_statement "break;" break ;) })) (expression_statement "FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);" (call_expression "FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1)" identifier (argument_list "(*(undefined8 *)(param_1 + 0x160),&local_4d,1)" ( (pointer_expression "*(undefined8 *)(param_1 + 0x160)" * (cast_expression "(undefined8 *)(param_1 + 0x160)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) , (pointer_expression "&local_4d" & identifier) , number_literal ))) ;) (expression_statement "FUN_00122c87(lVar1,1);" (call_expression "FUN_00122c87(lVar1,1)" identifier (argument_list "(lVar1,1)" ( identifier , number_literal ))) ;) })) (expression_statement "FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));" (call_expression "FUN_00152cf5(*(undefined8 *)(param_1 + 0x160))" identifier (argument_list "(*(undefined8 *)(param_1 + 0x160))" ( (pointer_expression "*(undefined8 *)(param_1 + 0x160)" * (cast_expression "(undefined8 *)(param_1 + 0x160)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) ))) ;) (expression_statement "*(undefined8 *)(param_1 + 0x160) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x160) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x160)" * (cast_expression "(undefined8 *)(param_1 + 0x160)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x160)" ( (binary_expression "param_1 + 0x160" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x140) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x140) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x140)" * (cast_expression "(undefined4 *)(param_1 + 0x140)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x140)" ( (binary_expression "param_1 + 0x140" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x13c) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x13c) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x13c)" * (cast_expression "(undefined4 *)(param_1 + 0x13c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x13c)" ( (binary_expression "param_1 + 0x13c" identifier + number_literal) )))) = number_literal) ;) })) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) ))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (break_statement break ;)) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (break_statement break ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (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 == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_0012ecae(long param_1)\n\n{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  byte local_4d;\n  undefined1 local_4c [4];\n  byte *local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" (primitive_type "void") (function_declarator "FUN_0012ecae(long param_1)" (identifier "FUN_0012ecae") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")"))) (compound_statement "{\n  long lVar1;\n  int iVar2;\n  long in_FS_OFFSET;\n  byte local_4d;\n  undefined1 local_4c [4];\n  byte *local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "byte local_4d;" (type_identifier "byte") (identifier "local_4d") (; ";")) (declaration "undefined1 local_4c [4];" (type_identifier "undefined1") (array_declarator "local_4c [4]" (identifier "local_4c") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "byte *local_48;" (type_identifier "byte") (pointer_declarator "*local_48" (* "*") (identifier "local_48")) (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (if_statement "if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }" (if "if") (parenthesized_expression "((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0))" (( "(") (binary_expression "(*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)" (parenthesized_expression "(*(int *)(param_1 + 0x13c) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x13c) != 0" (pointer_expression "*(int *)(param_1 + 0x13c)" (* "*") (cast_expression "(int *)(param_1 + 0x13c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x13c)" (( "(") (binary_expression "param_1 + 0x13c" (identifier "param_1") (+ "+") (number_literal "0x13c")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "(*(int *)(param_1 + 0x140) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 0x140) != 0" (pointer_expression "*(int *)(param_1 + 0x140)" (* "*") (cast_expression "(int *)(param_1 + 0x140)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x140)" (( "(") (binary_expression "param_1 + 0x140" (identifier "param_1") (+ "+") (number_literal "0x140")) () ")")))) (!= "!=") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    FUN_0012ec09(param_1);\n    lVar1 = param_1 + 0x148;\n    while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }\n    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));\n    *(undefined8 *)(param_1 + 0x160) = 0;\n    *(undefined4 *)(param_1 + 0x140) = 0;\n    *(undefined4 *)(param_1 + 0x13c) = 0;\n  }" ({ "{") (expression_statement "FUN_0012ec09(param_1);" (call_expression "FUN_0012ec09(param_1)" (identifier "FUN_0012ec09") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (expression_statement "lVar1 = param_1 + 0x148;" (assignment_expression "lVar1 = param_1 + 0x148" (identifier "lVar1") (= "=") (binary_expression "param_1 + 0x148" (identifier "param_1") (+ "+") (number_literal "0x148"))) (; ";")) (while_statement "while( true ) {\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      iVar2 = FUN_00122228(lVar1);\n      if (iVar2 < 1) break;\n      FUN_0012222c(lVar1,&local_48,local_4c);\n      local_4d = *local_48;\n      if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }\n      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);\n      FUN_00122c87(lVar1,1);\n    }" ({ "{") (expression_statement "iVar2 = FUN_00122228(lVar1);" (assignment_expression "iVar2 = FUN_00122228(lVar1)" (identifier "iVar2") (= "=") (call_expression "FUN_00122228(lVar1)" (identifier "FUN_00122228") (argument_list "(lVar1)" (( "(") (identifier "lVar1") () ")")))) (; ";")) (if_statement "if (iVar2 < 1) break;" (if "if") (parenthesized_expression "(iVar2 < 1)" (( "(") (binary_expression "iVar2 < 1" (identifier "iVar2") (< "<") (number_literal "1")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "FUN_0012222c(lVar1,&local_48,local_4c);" (call_expression "FUN_0012222c(lVar1,&local_48,local_4c)" (identifier "FUN_0012222c") (argument_list "(lVar1,&local_48,local_4c)" (( "(") (identifier "lVar1") (, ",") (pointer_expression "&local_48" (& "&") (identifier "local_48")) (, ",") (identifier "local_4c") () ")"))) (; ";")) (expression_statement "local_4d = *local_48;" (assignment_expression "local_4d = *local_48" (identifier "local_4d") (= "=") (pointer_expression "*local_48" (* "*") (identifier "local_48"))) (; ";")) (if_statement "if ((local_4d & 0x7f) == 0x1b) {\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }" (if "if") (parenthesized_expression "((local_4d & 0x7f) == 0x1b)" (( "(") (binary_expression "(local_4d & 0x7f) == 0x1b" (parenthesized_expression "(local_4d & 0x7f)" (( "(") (binary_expression "local_4d & 0x7f" (identifier "local_4d") (& "&") (number_literal "0x7f")) () ")")) (== "==") (number_literal "0x1b")) () ")")) (compound_statement "{\n        FUN_00122c87(lVar1,iVar2);\n        break;\n      }" ({ "{") (expression_statement "FUN_00122c87(lVar1,iVar2);" (call_expression "FUN_00122c87(lVar1,iVar2)" (identifier "FUN_00122c87") (argument_list "(lVar1,iVar2)" (( "(") (identifier "lVar1") (, ",") (identifier "iVar2") () ")"))) (; ";")) (break_statement "break;" (break "break") (; ";")) (} "}"))) (expression_statement "FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);" (call_expression "FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1)" (identifier "FUN_00152cd0") (argument_list "(*(undefined8 *)(param_1 + 0x160),&local_4d,1)" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x160)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x160)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x160)" (( "(") (binary_expression "param_1 + 0x160" (identifier "param_1") (+ "+") (number_literal "0x160")) () ")")))) (, ",") (pointer_expression "&local_4d" (& "&") (identifier "local_4d")) (, ",") (number_literal "1") () ")"))) (; ";")) (expression_statement "FUN_00122c87(lVar1,1);" (call_expression "FUN_00122c87(lVar1,1)" (identifier "FUN_00122c87") (argument_list "(lVar1,1)" (( "(") (identifier "lVar1") (, ",") (number_literal "1") () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));" (call_expression "FUN_00152cf5(*(undefined8 *)(param_1 + 0x160))" (identifier "FUN_00152cf5") (argument_list "(*(undefined8 *)(param_1 + 0x160))" (( "(") (pointer_expression "*(undefined8 *)(param_1 + 0x160)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x160)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x160)" (( "(") (binary_expression "param_1 + 0x160" (identifier "param_1") (+ "+") (number_literal "0x160")) () ")")))) () ")"))) (; ";")) (expression_statement "*(undefined8 *)(param_1 + 0x160) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x160) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x160)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x160)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x160)" (( "(") (binary_expression "param_1 + 0x160" (identifier "param_1") (+ "+") (number_literal "0x160")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x140) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x140) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x140)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x140)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x140)" (( "(") (binary_expression "param_1 + 0x140" (identifier "param_1") (+ "+") (number_literal "0x140")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x13c) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x13c) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x13c)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x13c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x13c)" (( "(") (binary_expression "param_1 + 0x13c" (identifier "param_1") (+ "+") (number_literal "0x13c")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}"))) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

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

void function_1(type_1 *term)

{
  type_2 *ch;
  int var_4;
  long var_1;
  char var_6;
  type_3 len;
  void *data;
  long var_10;
  
  var_10 = *(long *)(var_1 + 0x28);
  if ((term->printing != L'\0') || (term->only_printing != L'\0')) {
    var_2(term);
    ch = &term->printer_buf;
    while( true ) {
      var_4 = var_3((type_4 *)ch);
      if (var_4 < 1) break;
      var_5((type_4 *)ch,&data,&len);
                    /* WARNING: Load size is inaccurate */
      var_6 = *data;
      if ((var_6 & 0x7fU) == 0x1b) {
        var_7((type_4 *)ch,var_4);
        break;
      }
      var_8(term->print_job,&var_6,1);
      var_7((type_4 *)ch,1);
    }
    var_9(term->print_job);
    term->print_job = (type_5 *)0x0;
    term->only_printing = L'\0';
    term->printing = L'\0';
  }
  if (var_10 == *(long *)(var_1 + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_11();
}


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

void MASKED(long param_1)

{
  long lVar1;
  int iVar2;
  long in_FS_OFFSET;
  byte local_4d;
  undefined1 local_4c [4];
  byte *local_48;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  if ((*(int *)(param_1 + 0x13c) != 0) || (*(int *)(param_1 + 0x140) != 0)) {
    FUN_0012ec09(param_1);
    lVar1 = param_1 + 0x148;
    while( true ) {
      iVar2 = FUN_00122228(lVar1);
      if (iVar2 < 1) break;
      FUN_0012222c(lVar1,&local_48,local_4c);
      local_4d = *local_48;
      if ((local_4d & 0x7f) == 0x1b) {
        FUN_00122c87(lVar1,iVar2);
        break;
      }
      FUN_00152cd0(*(undefined8 *)(param_1 + 0x160),&local_4d,1);
      FUN_00122c87(lVar1,1);
    }
    FUN_00152cf5(*(undefined8 *)(param_1 + 0x160));
    *(undefined8 *)(param_1 + 0x160) = 0;
    *(undefined4 *)(param_1 + 0x140) = 0;
    *(undefined4 *)(param_1 + 0x13c) = 0;
  }
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

