
void app_pop(char *arg)

{
  app_save *saved;
  
  state = *(int *)arg;
  out_buf._0_8_ = *(undefined8 *)(arg + 0x10);
  out_buf._8_8_ = *(undefined8 *)(arg + 0x18);
  old_state = *(int *)(arg + 4);
  out_string = *(char **)(arg + 8);
  out_buf._16_4_ = *(undefined4 *)(arg + 0x20);
  add_newlines = *(int *)(arg + 0x24);
  if (*(void **)(arg + 0x28) == (void *)0x0) {
    saved_input = (char *)0x0;
  }
  else {
    if (0x8000 < *(ulong *)(arg + 0x30)) {
                    /* WARNING: Subroutine does not return */
      as_abort("../../gas/app.c",0x133,"app_pop");
    }
    saved_input = (char *)memcpy(input_buffer,*(void **)(arg + 0x28),*(ulong *)(arg + 0x30));
    saved_input_len = *(size_t *)(arg + 0x30);
    free(*(void **)(arg + 0x28));
  }
  mri_state = *(char **)(arg + 0x38);
  mri_last_ch = arg[0x40];
  free(arg);
  return;
}



/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void FUN_0010a1a0(undefined4 *param_1)

{
  DAT_001e3144 = *param_1;
  _DAT_001e3120 = *(undefined8 *)(param_1 + 4);
  uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);
  DAT_001e3140 = param_1[1];
  DAT_001e3138 = *(undefined8 *)(param_1 + 2);
  DAT_001e3130 = param_1[8];
  DAT_001e3110 = param_1[9];
  if (*(void **)(param_1 + 10) == (void *)0x0) {
    DAT_001e3108 = (void *)0x0;
  }
  else {
    if (0x8000 < *(ulong *)(param_1 + 0xc)) {
                    /* WARNING: Subroutine does not return */
      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");
    }
    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));
    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);
    free(*(void **)(param_1 + 10));
  }
  DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);
  DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);
  free(param_1);
  return;
}


PUSH RBX
MOV EAX,dword ptr [RDI]
MOV RBX,RDI
MOVDQU XMM0,xmmword ptr [RDI + 0x10]
MOV RSI,qword ptr [RDI + 0x28]
MOV dword ptr [0x001e3144],EAX
MOV EAX,dword ptr [RDI + 0x4]
MOV dword ptr [0x001e3140],EAX
MOV RAX,qword ptr [RDI + 0x8]
MOVAPS xmmword ptr [0x001e3120],XMM0
MOV qword ptr [0x001e3138],RAX
MOV EAX,dword ptr [RDI + 0x20]
MOV dword ptr [0x001e3130],EAX
MOV EAX,dword ptr [RDI + 0x24]
MOV dword ptr [0x001e3110],EAX
TEST RSI,RSI
JZ 0x0010a240
MOV RDX,qword ptr [RDI + 0x30]
CMP RDX,0x8000
JA 0x0010a24d
LEA RCX,[0x1db100]
MOV RDI,RCX
CALL 0x00108470
MOV RDI,qword ptr [RBX + 0x28]
MOV qword ptr [0x001e3108],RAX
MOV RAX,qword ptr [RBX + 0x30]
MOV qword ptr [0x001e3100],RAX
CALL 0x00108740
MOV RAX,qword ptr [RBX + 0x38]
MOV RDI,RBX
MOV qword ptr [0x001db0e8],RAX
MOVZX EAX,byte ptr [RBX + 0x40]
POP RBX
MOV byte ptr [0x001db0e2],AL
JMP 0x00108740
MOV qword ptr [0x001e3108],0x0
JMP 0x0010a21e
LEA RDX,[0x149210]
MOV ESI,0x133
LEA RDI,[0x149004]
CALL 0x0011dd00
(translation_unit "/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */\n\nvoid FUN_0010a1a0(undefined4 *param_1)\n\n{\n  DAT_001e3144 = *param_1;\n  _DAT_001e3120 = *(undefined8 *)(param_1 + 4);\n  uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);\n  DAT_001e3140 = param_1[1];\n  DAT_001e3138 = *(undefined8 *)(param_1 + 2);\n  DAT_001e3130 = param_1[8];\n  DAT_001e3110 = param_1[9];\n  if (*(void **)(param_1 + 10) == (void *)0x0) {\n    DAT_001e3108 = (void *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }\n  DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);\n  DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);\n  free(param_1);\n  return;\n}\n\n" comment (function_definition "void FUN_0010a1a0(undefined4 *param_1)\n\n{\n  DAT_001e3144 = *param_1;\n  _DAT_001e3120 = *(undefined8 *)(param_1 + 4);\n  uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);\n  DAT_001e3140 = param_1[1];\n  DAT_001e3138 = *(undefined8 *)(param_1 + 2);\n  DAT_001e3130 = param_1[8];\n  DAT_001e3110 = param_1[9];\n  if (*(void **)(param_1 + 10) == (void *)0x0) {\n    DAT_001e3108 = (void *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }\n  DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);\n  DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);\n  free(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_0010a1a0(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  DAT_001e3144 = *param_1;\n  _DAT_001e3120 = *(undefined8 *)(param_1 + 4);\n  uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);\n  DAT_001e3140 = param_1[1];\n  DAT_001e3138 = *(undefined8 *)(param_1 + 2);\n  DAT_001e3130 = param_1[8];\n  DAT_001e3110 = param_1[9];\n  if (*(void **)(param_1 + 10) == (void *)0x0) {\n    DAT_001e3108 = (void *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }\n  DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);\n  DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);\n  free(param_1);\n  return;\n}" { (expression_statement "DAT_001e3144 = *param_1;" (assignment_expression "DAT_001e3144 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "_DAT_001e3120 = *(undefined8 *)(param_1 + 4);" (assignment_expression "_DAT_001e3120 = *(undefined8 *)(param_1 + 4)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 4)" * (cast_expression "(undefined8 *)(param_1 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);" (assignment_expression "uRam00000000001e3128 = *(undefined8 *)(param_1 + 6)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 6)" * (cast_expression "(undefined8 *)(param_1 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 6)" ( (binary_expression "param_1 + 6" identifier + number_literal) ))))) ;) (expression_statement "DAT_001e3140 = param_1[1];" (assignment_expression "DAT_001e3140 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "DAT_001e3138 = *(undefined8 *)(param_1 + 2);" (assignment_expression "DAT_001e3138 = *(undefined8 *)(param_1 + 2)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 2)" * (cast_expression "(undefined8 *)(param_1 + 2)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) ))))) ;) (expression_statement "DAT_001e3130 = param_1[8];" (assignment_expression "DAT_001e3130 = param_1[8]" identifier = (subscript_expression "param_1[8]" identifier [ number_literal ])) ;) (expression_statement "DAT_001e3110 = param_1[9];" (assignment_expression "DAT_001e3110 = param_1[9]" identifier = (subscript_expression "param_1[9]" identifier [ number_literal ])) ;) (if_statement "if (*(void **)(param_1 + 10) == (void *)0x0) {\n    DAT_001e3108 = (void *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }" if (parenthesized_expression "(*(void **)(param_1 + 10) == (void *)0x0)" ( (binary_expression "*(void **)(param_1 + 10) == (void *)0x0" (pointer_expression "*(void **)(param_1 + 10)" * (cast_expression "(void **)(param_1 + 10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 10)" ( (binary_expression "param_1 + 10" identifier + number_literal) )))) == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    DAT_001e3108 = (void *)0x0;\n  }" { (expression_statement "DAT_001e3108 = (void *)0x0;" (assignment_expression "DAT_001e3108 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }" else (compound_statement "{\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }" { (if_statement "if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    /* WARNING: Subroutine does not return */\n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }" if (parenthesized_expression "(0x8000 < *(ulong *)(param_1 + 0xc))" ( (binary_expression "0x8000 < *(ulong *)(param_1 + 0xc)" number_literal < (pointer_expression "*(ulong *)(param_1 + 0xc)" * (cast_expression "(ulong *)(param_1 + 0xc)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }" { comment (expression_statement "FUN_0011dd00("../../gas/app.c",0x133,"app_pop");" (call_expression "FUN_0011dd00("../../gas/app.c",0x133,"app_pop")" identifier (argument_list "("../../gas/app.c",0x133,"app_pop")" ( (string_literal ""../../gas/app.c"" " string_content ") , number_literal , (string_literal ""app_pop"" " string_content ") ))) ;) })) (expression_statement "DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));" (assignment_expression "DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc))" identifier = (call_expression "memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc))" identifier (argument_list "(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc))" ( (pointer_expression "&DAT_001db100" & identifier) , (pointer_expression "*(void **)(param_1 + 10)" * (cast_expression "(void **)(param_1 + 10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 10)" ( (binary_expression "param_1 + 10" identifier + number_literal) )))) , (pointer_expression "*(ulong *)(param_1 + 0xc)" * (cast_expression "(ulong *)(param_1 + 0xc)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) )))) ;) (expression_statement "DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);" (assignment_expression "DAT_001e3100 = *(undefined8 *)(param_1 + 0xc)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0xc)" * (cast_expression "(undefined8 *)(param_1 + 0xc)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "free(*(void **)(param_1 + 10));" (call_expression "free(*(void **)(param_1 + 10))" identifier (argument_list "(*(void **)(param_1 + 10))" ( (pointer_expression "*(void **)(param_1 + 10)" * (cast_expression "(void **)(param_1 + 10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 10)" ( (binary_expression "param_1 + 10" identifier + number_literal) )))) ))) ;) }))) (expression_statement "DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);" (assignment_expression "DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0xe)" * (cast_expression "(undefined8 *)(param_1 + 0xe)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) ))))) ;) (expression_statement "DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);" (assignment_expression "DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10)" identifier = (pointer_expression "*(undefined1 *)(param_1 + 0x10)" * (cast_expression "(undefined1 *)(param_1 + 0x10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void app_pop(char *arg)\n\n{\n  app_save *saved;\n  \n  state = *(int *)arg;\n  out_buf._0_8_ = *(undefined8 *)(arg + 0x10);\n  out_buf._8_8_ = *(undefined8 *)(arg + 0x18);\n  old_state = *(int *)(arg + 4);\n  out_string = *(char **)(arg + 8);\n  out_buf._16_4_ = *(undefined4 *)(arg + 0x20);\n  add_newlines = *(int *)(arg + 0x24);\n  if (*(void **)(arg + 0x28) == (void *)0x0) {\n    saved_input = (char *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(arg + 0x30)) {\n                    /* WARNING: Subroutine does not return */\n      as_abort("../../gas/app.c",0x133,"app_pop");\n    }\n    saved_input = (char *)memcpy(input_buffer,*(void **)(arg + 0x28),*(ulong *)(arg + 0x30));\n    saved_input_len = *(size_t *)(arg + 0x30);\n    free(*(void **)(arg + 0x28));\n  }\n  mri_state = *(char **)(arg + 0x38);\n  mri_last_ch = arg[0x40];\n  free(arg);\n  return;\n}\n\n" (function_definition "void app_pop(char *arg)\n\n{\n  app_save *saved;\n  \n  state = *(int *)arg;\n  out_buf._0_8_ = *(undefined8 *)(arg + 0x10);\n  out_buf._8_8_ = *(undefined8 *)(arg + 0x18);\n  old_state = *(int *)(arg + 4);\n  out_string = *(char **)(arg + 8);\n  out_buf._16_4_ = *(undefined4 *)(arg + 0x20);\n  add_newlines = *(int *)(arg + 0x24);\n  if (*(void **)(arg + 0x28) == (void *)0x0) {\n    saved_input = (char *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(arg + 0x30)) {\n                    /* WARNING: Subroutine does not return */\n      as_abort("../../gas/app.c",0x133,"app_pop");\n    }\n    saved_input = (char *)memcpy(input_buffer,*(void **)(arg + 0x28),*(ulong *)(arg + 0x30));\n    saved_input_len = *(size_t *)(arg + 0x30);\n    free(*(void **)(arg + 0x28));\n  }\n  mri_state = *(char **)(arg + 0x38);\n  mri_last_ch = arg[0x40];\n  free(arg);\n  return;\n}" primitive_type (function_declarator "app_pop(char *arg)" identifier (parameter_list "(char *arg)" ( (parameter_declaration "char *arg" primitive_type (pointer_declarator "*arg" * identifier)) ))) (compound_statement "{\n  app_save *saved;\n  \n  state = *(int *)arg;\n  out_buf._0_8_ = *(undefined8 *)(arg + 0x10);\n  out_buf._8_8_ = *(undefined8 *)(arg + 0x18);\n  old_state = *(int *)(arg + 4);\n  out_string = *(char **)(arg + 8);\n  out_buf._16_4_ = *(undefined4 *)(arg + 0x20);\n  add_newlines = *(int *)(arg + 0x24);\n  if (*(void **)(arg + 0x28) == (void *)0x0) {\n    saved_input = (char *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(arg + 0x30)) {\n                    /* WARNING: Subroutine does not return */\n      as_abort("../../gas/app.c",0x133,"app_pop");\n    }\n    saved_input = (char *)memcpy(input_buffer,*(void **)(arg + 0x28),*(ulong *)(arg + 0x30));\n    saved_input_len = *(size_t *)(arg + 0x30);\n    free(*(void **)(arg + 0x28));\n  }\n  mri_state = *(char **)(arg + 0x38);\n  mri_last_ch = arg[0x40];\n  free(arg);\n  return;\n}" { (declaration "app_save *saved;" type_identifier (pointer_declarator "*saved" * identifier) ;) (expression_statement "state = *(int *)arg;" (assignment_expression "state = *(int *)arg" identifier = (pointer_expression "*(int *)arg" * (cast_expression "(int *)arg" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "out_buf._0_8_ = *(undefined8 *)(arg + 0x10);" (assignment_expression "out_buf._0_8_ = *(undefined8 *)(arg + 0x10)" (field_expression "out_buf._0_8_" identifier . field_identifier) = (pointer_expression "*(undefined8 *)(arg + 0x10)" * (cast_expression "(undefined8 *)(arg + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(arg + 0x10)" ( (binary_expression "arg + 0x10" identifier + number_literal) ))))) ;) (expression_statement "out_buf._8_8_ = *(undefined8 *)(arg + 0x18);" (assignment_expression "out_buf._8_8_ = *(undefined8 *)(arg + 0x18)" (field_expression "out_buf._8_8_" identifier . field_identifier) = (pointer_expression "*(undefined8 *)(arg + 0x18)" * (cast_expression "(undefined8 *)(arg + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(arg + 0x18)" ( (binary_expression "arg + 0x18" identifier + number_literal) ))))) ;) (expression_statement "old_state = *(int *)(arg + 4);" (assignment_expression "old_state = *(int *)(arg + 4)" identifier = (pointer_expression "*(int *)(arg + 4)" * (cast_expression "(int *)(arg + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(arg + 4)" ( (binary_expression "arg + 4" identifier + number_literal) ))))) ;) (expression_statement "out_string = *(char **)(arg + 8);" (assignment_expression "out_string = *(char **)(arg + 8)" identifier = (pointer_expression "*(char **)(arg + 8)" * (cast_expression "(char **)(arg + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(arg + 8)" ( (binary_expression "arg + 8" identifier + number_literal) ))))) ;) (expression_statement "out_buf._16_4_ = *(undefined4 *)(arg + 0x20);" (assignment_expression "out_buf._16_4_ = *(undefined4 *)(arg + 0x20)" (field_expression "out_buf._16_4_" identifier . field_identifier) = (pointer_expression "*(undefined4 *)(arg + 0x20)" * (cast_expression "(undefined4 *)(arg + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(arg + 0x20)" ( (binary_expression "arg + 0x20" identifier + number_literal) ))))) ;) (expression_statement "add_newlines = *(int *)(arg + 0x24);" (assignment_expression "add_newlines = *(int *)(arg + 0x24)" identifier = (pointer_expression "*(int *)(arg + 0x24)" * (cast_expression "(int *)(arg + 0x24)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(arg + 0x24)" ( (binary_expression "arg + 0x24" identifier + number_literal) ))))) ;) (if_statement "if (*(void **)(arg + 0x28) == (void *)0x0) {\n    saved_input = (char *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(arg + 0x30)) {\n                    /* WARNING: Subroutine does not return */\n      as_abort("../../gas/app.c",0x133,"app_pop");\n    }\n    saved_input = (char *)memcpy(input_buffer,*(void **)(arg + 0x28),*(ulong *)(arg + 0x30));\n    saved_input_len = *(size_t *)(arg + 0x30);\n    free(*(void **)(arg + 0x28));\n  }" if (parenthesized_expression "(*(void **)(arg + 0x28) == (void *)0x0)" ( (binary_expression "*(void **)(arg + 0x28) == (void *)0x0" (pointer_expression "*(void **)(arg + 0x28)" * (cast_expression "(void **)(arg + 0x28)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(arg + 0x28)" ( (binary_expression "arg + 0x28" identifier + number_literal) )))) == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    saved_input = (char *)0x0;\n  }" { (expression_statement "saved_input = (char *)0x0;" (assignment_expression "saved_input = (char *)0x0" identifier = (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    if (0x8000 < *(ulong *)(arg + 0x30)) {\n                    /* WARNING: Subroutine does not return */\n      as_abort("../../gas/app.c",0x133,"app_pop");\n    }\n    saved_input = (char *)memcpy(input_buffer,*(void **)(arg + 0x28),*(ulong *)(arg + 0x30));\n    saved_input_len = *(size_t *)(arg + 0x30);\n    free(*(void **)(arg + 0x28));\n  }" else (compound_statement "{\n    if (0x8000 < *(ulong *)(arg + 0x30)) {\n                    /* WARNING: Subroutine does not return */\n      as_abort("../../gas/app.c",0x133,"app_pop");\n    }\n    saved_input = (char *)memcpy(input_buffer,*(void **)(arg + 0x28),*(ulong *)(arg + 0x30));\n    saved_input_len = *(size_t *)(arg + 0x30);\n    free(*(void **)(arg + 0x28));\n  }" { (if_statement "if (0x8000 < *(ulong *)(arg + 0x30)) {\n                    /* WARNING: Subroutine does not return */\n      as_abort("../../gas/app.c",0x133,"app_pop");\n    }" if (parenthesized_expression "(0x8000 < *(ulong *)(arg + 0x30))" ( (binary_expression "0x8000 < *(ulong *)(arg + 0x30)" number_literal < (pointer_expression "*(ulong *)(arg + 0x30)" * (cast_expression "(ulong *)(arg + 0x30)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(arg + 0x30)" ( (binary_expression "arg + 0x30" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n      as_abort("../../gas/app.c",0x133,"app_pop");\n    }" { comment (expression_statement "as_abort("../../gas/app.c",0x133,"app_pop");" (call_expression "as_abort("../../gas/app.c",0x133,"app_pop")" identifier (argument_list "("../../gas/app.c",0x133,"app_pop")" ( (string_literal ""../../gas/app.c"" " string_content ") , number_literal , (string_literal ""app_pop"" " string_content ") ))) ;) })) (expression_statement "saved_input = (char *)memcpy(input_buffer,*(void **)(arg + 0x28),*(ulong *)(arg + 0x30));" (assignment_expression "saved_input = (char *)memcpy(input_buffer,*(void **)(arg + 0x28),*(ulong *)(arg + 0x30))" identifier = (cast_expression "(char *)memcpy(input_buffer,*(void **)(arg + 0x28),*(ulong *)(arg + 0x30))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "memcpy(input_buffer,*(void **)(arg + 0x28),*(ulong *)(arg + 0x30))" identifier (argument_list "(input_buffer,*(void **)(arg + 0x28),*(ulong *)(arg + 0x30))" ( identifier , (pointer_expression "*(void **)(arg + 0x28)" * (cast_expression "(void **)(arg + 0x28)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(arg + 0x28)" ( (binary_expression "arg + 0x28" identifier + number_literal) )))) , (pointer_expression "*(ulong *)(arg + 0x30)" * (cast_expression "(ulong *)(arg + 0x30)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(arg + 0x30)" ( (binary_expression "arg + 0x30" identifier + number_literal) )))) ))))) ;) (expression_statement "saved_input_len = *(size_t *)(arg + 0x30);" (assignment_expression "saved_input_len = *(size_t *)(arg + 0x30)" identifier = (pointer_expression "*(size_t *)(arg + 0x30)" * (cast_expression "(size_t *)(arg + 0x30)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(arg + 0x30)" ( (binary_expression "arg + 0x30" identifier + number_literal) ))))) ;) (expression_statement "free(*(void **)(arg + 0x28));" (call_expression "free(*(void **)(arg + 0x28))" identifier (argument_list "(*(void **)(arg + 0x28))" ( (pointer_expression "*(void **)(arg + 0x28)" * (cast_expression "(void **)(arg + 0x28)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(arg + 0x28)" ( (binary_expression "arg + 0x28" identifier + number_literal) )))) ))) ;) }))) (expression_statement "mri_state = *(char **)(arg + 0x38);" (assignment_expression "mri_state = *(char **)(arg + 0x38)" identifier = (pointer_expression "*(char **)(arg + 0x38)" * (cast_expression "(char **)(arg + 0x38)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(arg + 0x38)" ( (binary_expression "arg + 0x38" identifier + number_literal) ))))) ;) (expression_statement "mri_last_ch = arg[0x40];" (assignment_expression "mri_last_ch = arg[0x40]" identifier = (subscript_expression "arg[0x40]" identifier [ number_literal ])) ;) (expression_statement "free(arg);" (call_expression "free(arg)" identifier (argument_list "(arg)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0010a1a0(undefined4 *param_1)\n\n{\n  DAT_001e3144 = *param_1;\n  _DAT_001e3120 = *(undefined8 *)(param_1 + 4);\n  uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);\n  DAT_001e3140 = param_1[1];\n  DAT_001e3138 = *(undefined8 *)(param_1 + 2);\n  DAT_001e3130 = param_1[8];\n  DAT_001e3110 = param_1[9];\n  if (*(void **)(param_1 + 10) == (void *)0x0) {\n    DAT_001e3108 = (void *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }\n  DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);\n  DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);\n  free(param_1);\n  return;\n}\n\n" (function_definition "void FUN_0010a1a0(undefined4 *param_1)\n\n{\n  DAT_001e3144 = *param_1;\n  _DAT_001e3120 = *(undefined8 *)(param_1 + 4);\n  uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);\n  DAT_001e3140 = param_1[1];\n  DAT_001e3138 = *(undefined8 *)(param_1 + 2);\n  DAT_001e3130 = param_1[8];\n  DAT_001e3110 = param_1[9];\n  if (*(void **)(param_1 + 10) == (void *)0x0) {\n    DAT_001e3108 = (void *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }\n  DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);\n  DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);\n  free(param_1);\n  return;\n}" primitive_type (function_declarator "FUN_0010a1a0(undefined4 *param_1)" identifier (parameter_list "(undefined4 *param_1)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  DAT_001e3144 = *param_1;\n  _DAT_001e3120 = *(undefined8 *)(param_1 + 4);\n  uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);\n  DAT_001e3140 = param_1[1];\n  DAT_001e3138 = *(undefined8 *)(param_1 + 2);\n  DAT_001e3130 = param_1[8];\n  DAT_001e3110 = param_1[9];\n  if (*(void **)(param_1 + 10) == (void *)0x0) {\n    DAT_001e3108 = (void *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }\n  DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);\n  DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);\n  free(param_1);\n  return;\n}" { (expression_statement "DAT_001e3144 = *param_1;" (assignment_expression "DAT_001e3144 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "_DAT_001e3120 = *(undefined8 *)(param_1 + 4);" (assignment_expression "_DAT_001e3120 = *(undefined8 *)(param_1 + 4)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 4)" * (cast_expression "(undefined8 *)(param_1 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) ))))) ;) (expression_statement "uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);" (assignment_expression "uRam00000000001e3128 = *(undefined8 *)(param_1 + 6)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 6)" * (cast_expression "(undefined8 *)(param_1 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 6)" ( (binary_expression "param_1 + 6" identifier + number_literal) ))))) ;) (expression_statement "DAT_001e3140 = param_1[1];" (assignment_expression "DAT_001e3140 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (expression_statement "DAT_001e3138 = *(undefined8 *)(param_1 + 2);" (assignment_expression "DAT_001e3138 = *(undefined8 *)(param_1 + 2)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 2)" * (cast_expression "(undefined8 *)(param_1 + 2)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 2)" ( (binary_expression "param_1 + 2" identifier + number_literal) ))))) ;) (expression_statement "DAT_001e3130 = param_1[8];" (assignment_expression "DAT_001e3130 = param_1[8]" identifier = (subscript_expression "param_1[8]" identifier [ number_literal ])) ;) (expression_statement "DAT_001e3110 = param_1[9];" (assignment_expression "DAT_001e3110 = param_1[9]" identifier = (subscript_expression "param_1[9]" identifier [ number_literal ])) ;) (if_statement "if (*(void **)(param_1 + 10) == (void *)0x0) {\n    DAT_001e3108 = (void *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }" if (parenthesized_expression "(*(void **)(param_1 + 10) == (void *)0x0)" ( (binary_expression "*(void **)(param_1 + 10) == (void *)0x0" (pointer_expression "*(void **)(param_1 + 10)" * (cast_expression "(void **)(param_1 + 10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 10)" ( (binary_expression "param_1 + 10" identifier + number_literal) )))) == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    DAT_001e3108 = (void *)0x0;\n  }" { (expression_statement "DAT_001e3108 = (void *)0x0;" (assignment_expression "DAT_001e3108 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) }) (else_clause "else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }" else (compound_statement "{\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }" { (if_statement "if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }" if (parenthesized_expression "(0x8000 < *(ulong *)(param_1 + 0xc))" ( (binary_expression "0x8000 < *(ulong *)(param_1 + 0xc)" number_literal < (pointer_expression "*(ulong *)(param_1 + 0xc)" * (cast_expression "(ulong *)(param_1 + 0xc)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }" { (expression_statement "FUN_0011dd00("../../gas/app.c",0x133,"app_pop");" (call_expression "FUN_0011dd00("../../gas/app.c",0x133,"app_pop")" identifier (argument_list "("../../gas/app.c",0x133,"app_pop")" ( (string_literal ""../../gas/app.c"" " string_content ") , number_literal , (string_literal ""app_pop"" " string_content ") ))) ;) })) (expression_statement "DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));" (assignment_expression "DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc))" identifier = (call_expression "memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc))" identifier (argument_list "(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc))" ( (pointer_expression "&DAT_001db100" & identifier) , (pointer_expression "*(void **)(param_1 + 10)" * (cast_expression "(void **)(param_1 + 10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 10)" ( (binary_expression "param_1 + 10" identifier + number_literal) )))) , (pointer_expression "*(ulong *)(param_1 + 0xc)" * (cast_expression "(ulong *)(param_1 + 0xc)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) )))) ;) (expression_statement "DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);" (assignment_expression "DAT_001e3100 = *(undefined8 *)(param_1 + 0xc)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0xc)" * (cast_expression "(undefined8 *)(param_1 + 0xc)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "free(*(void **)(param_1 + 10));" (call_expression "free(*(void **)(param_1 + 10))" identifier (argument_list "(*(void **)(param_1 + 10))" ( (pointer_expression "*(void **)(param_1 + 10)" * (cast_expression "(void **)(param_1 + 10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 10)" ( (binary_expression "param_1 + 10" identifier + number_literal) )))) ))) ;) }))) (expression_statement "DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);" (assignment_expression "DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe)" identifier = (pointer_expression "*(undefined8 *)(param_1 + 0xe)" * (cast_expression "(undefined8 *)(param_1 + 0xe)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xe)" ( (binary_expression "param_1 + 0xe" identifier + number_literal) ))))) ;) (expression_statement "DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);" (assignment_expression "DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10)" identifier = (pointer_expression "*(undefined1 *)(param_1 + 0x10)" * (cast_expression "(undefined1 *)(param_1 + 0x10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "free(param_1);" (call_expression "free(param_1)" identifier (argument_list "(param_1)" ( identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) }))) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0010a1a0(undefined4 *param_1)\n\n{\n  DAT_001e3144 = *param_1;\n  _DAT_001e3120 = *(undefined8 *)(param_1 + 4);\n  uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);\n  DAT_001e3140 = param_1[1];\n  DAT_001e3138 = *(undefined8 *)(param_1 + 2);\n  DAT_001e3130 = param_1[8];\n  DAT_001e3110 = param_1[9];\n  if (*(void **)(param_1 + 10) == (void *)0x0) {\n    DAT_001e3108 = (void *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }\n  DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);\n  DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);\n  free(param_1);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0010a1a0(undefined4 *param_1)" (identifier "FUN_0010a1a0") (parameter_list "(undefined4 *param_1)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  DAT_001e3144 = *param_1;\n  _DAT_001e3120 = *(undefined8 *)(param_1 + 4);\n  uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);\n  DAT_001e3140 = param_1[1];\n  DAT_001e3138 = *(undefined8 *)(param_1 + 2);\n  DAT_001e3130 = param_1[8];\n  DAT_001e3110 = param_1[9];\n  if (*(void **)(param_1 + 10) == (void *)0x0) {\n    DAT_001e3108 = (void *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }\n  DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);\n  DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);\n  free(param_1);\n  return;\n}" ({ "{") (expression_statement "DAT_001e3144 = *param_1;" (assignment_expression "DAT_001e3144 = *param_1" (identifier "DAT_001e3144") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "_DAT_001e3120 = *(undefined8 *)(param_1 + 4);" (assignment_expression "_DAT_001e3120 = *(undefined8 *)(param_1 + 4)" (identifier "_DAT_001e3120") (= "=") (pointer_expression "*(undefined8 *)(param_1 + 4)" (* "*") (cast_expression "(undefined8 *)(param_1 + 4)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")"))))) (; ";")) (expression_statement "uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);" (assignment_expression "uRam00000000001e3128 = *(undefined8 *)(param_1 + 6)" (identifier "uRam00000000001e3128") (= "=") (pointer_expression "*(undefined8 *)(param_1 + 6)" (* "*") (cast_expression "(undefined8 *)(param_1 + 6)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 6)" (( "(") (binary_expression "param_1 + 6" (identifier "param_1") (+ "+") (number_literal "6")) () ")"))))) (; ";")) (expression_statement "DAT_001e3140 = param_1[1];" (assignment_expression "DAT_001e3140 = param_1[1]" (identifier "DAT_001e3140") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (expression_statement "DAT_001e3138 = *(undefined8 *)(param_1 + 2);" (assignment_expression "DAT_001e3138 = *(undefined8 *)(param_1 + 2)" (identifier "DAT_001e3138") (= "=") (pointer_expression "*(undefined8 *)(param_1 + 2)" (* "*") (cast_expression "(undefined8 *)(param_1 + 2)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 2)" (( "(") (binary_expression "param_1 + 2" (identifier "param_1") (+ "+") (number_literal "2")) () ")"))))) (; ";")) (expression_statement "DAT_001e3130 = param_1[8];" (assignment_expression "DAT_001e3130 = param_1[8]" (identifier "DAT_001e3130") (= "=") (subscript_expression "param_1[8]" (identifier "param_1") ([ "[") (number_literal "8") (] "]"))) (; ";")) (expression_statement "DAT_001e3110 = param_1[9];" (assignment_expression "DAT_001e3110 = param_1[9]" (identifier "DAT_001e3110") (= "=") (subscript_expression "param_1[9]" (identifier "param_1") ([ "[") (number_literal "9") (] "]"))) (; ";")) (if_statement "if (*(void **)(param_1 + 10) == (void *)0x0) {\n    DAT_001e3108 = (void *)0x0;\n  }\n  else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }" (if "if") (parenthesized_expression "(*(void **)(param_1 + 10) == (void *)0x0)" (( "(") (binary_expression "*(void **)(param_1 + 10) == (void *)0x0" (pointer_expression "*(void **)(param_1 + 10)" (* "*") (cast_expression "(void **)(param_1 + 10)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 10)" (( "(") (binary_expression "param_1 + 10" (identifier "param_1") (+ "+") (number_literal "10")) () ")")))) (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    DAT_001e3108 = (void *)0x0;\n  }" ({ "{") (expression_statement "DAT_001e3108 = (void *)0x0;" (assignment_expression "DAT_001e3108 = (void *)0x0" (identifier "DAT_001e3108") (= "=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")) (else_clause "else {\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }" (else "else") (compound_statement "{\n    if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }\n    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));\n    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);\n    free(*(void **)(param_1 + 10));\n  }" ({ "{") (if_statement "if (0x8000 < *(ulong *)(param_1 + 0xc)) {\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }" (if "if") (parenthesized_expression "(0x8000 < *(ulong *)(param_1 + 0xc))" (( "(") (binary_expression "0x8000 < *(ulong *)(param_1 + 0xc)" (number_literal "0x8000") (< "<") (pointer_expression "*(ulong *)(param_1 + 0xc)" (* "*") (cast_expression "(ulong *)(param_1 + 0xc)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) () ")")) (compound_statement "{\n                    \n      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");\n    }" ({ "{") (expression_statement "FUN_0011dd00("../../gas/app.c",0x133,"app_pop");" (call_expression "FUN_0011dd00("../../gas/app.c",0x133,"app_pop")" (identifier "FUN_0011dd00") (argument_list "("../../gas/app.c",0x133,"app_pop")" (( "(") (string_literal ""../../gas/app.c"" (" """) (string_content "../../gas/app.c") (" """)) (, ",") (number_literal "0x133") (, ",") (string_literal ""app_pop"" (" """) (string_content "app_pop") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));" (assignment_expression "DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc))" (identifier "DAT_001e3108") (= "=") (call_expression "memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc))" (identifier "memcpy") (argument_list "(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc))" (( "(") (pointer_expression "&DAT_001db100" (& "&") (identifier "DAT_001db100")) (, ",") (pointer_expression "*(void **)(param_1 + 10)" (* "*") (cast_expression "(void **)(param_1 + 10)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 10)" (( "(") (binary_expression "param_1 + 10" (identifier "param_1") (+ "+") (number_literal "10")) () ")")))) (, ",") (pointer_expression "*(ulong *)(param_1 + 0xc)" (* "*") (cast_expression "(ulong *)(param_1 + 0xc)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) () ")")))) (; ";")) (expression_statement "DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);" (assignment_expression "DAT_001e3100 = *(undefined8 *)(param_1 + 0xc)" (identifier "DAT_001e3100") (= "=") (pointer_expression "*(undefined8 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "free(*(void **)(param_1 + 10));" (call_expression "free(*(void **)(param_1 + 10))" (identifier "free") (argument_list "(*(void **)(param_1 + 10))" (( "(") (pointer_expression "*(void **)(param_1 + 10)" (* "*") (cast_expression "(void **)(param_1 + 10)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 10)" (( "(") (binary_expression "param_1 + 10" (identifier "param_1") (+ "+") (number_literal "10")) () ")")))) () ")"))) (; ";")) (} "}")))) (expression_statement "DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);" (assignment_expression "DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe)" (identifier "DAT_001db0e8") (= "=") (pointer_expression "*(undefined8 *)(param_1 + 0xe)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0xe)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xe)" (( "(") (binary_expression "param_1 + 0xe" (identifier "param_1") (+ "+") (number_literal "0xe")) () ")"))))) (; ";")) (expression_statement "DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);" (assignment_expression "DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10)" (identifier "DAT_001db0e2") (= "=") (pointer_expression "*(undefined1 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "free(param_1);" (call_expression "free(param_1)" (identifier "free") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(char *var_1)

{
  type_1 *saved;
  
  state = *(int *)var_1;
  out_buf._0_8_ = *(type_2 *)(var_1 + 0x10);
  out_buf._8_8_ = *(type_2 *)(var_1 + 0x18);
  old_state = *(int *)(var_1 + 4);
  out_string = *(char **)(var_1 + 8);
  out_buf._16_4_ = *(type_3 *)(var_1 + 0x20);
  add_newlines = *(int *)(var_1 + 0x24);
  if (*(void **)(var_1 + 0x28) == (void *)0x0) {
    saved_input = (char *)0x0;
  }
  else {
    if (0x8000 < *(type_4 *)(var_1 + 0x30)) {
                    /* WARNING: Subroutine does not return */
      var_2("../../gas/app.c",0x133,"app_pop");
    }
    saved_input = (char *)var_3(input_buffer,*(void **)(var_1 + 0x28),*(type_4 *)(var_1 + 0x30));
    saved_input_len = *(size_t *)(var_1 + 0x30);
    var_4(*(void **)(var_1 + 0x28));
  }
  mri_state = *(char **)(var_1 + 0x38);
  mri_last_ch = var_1[0x40];
  var_4(var_1);
  return;
}


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

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */

void MASKED(undefined4 *param_1)

{
  DAT_001e3144 = *param_1;
  _DAT_001e3120 = *(undefined8 *)(param_1 + 4);
  uRam00000000001e3128 = *(undefined8 *)(param_1 + 6);
  DAT_001e3140 = param_1[1];
  DAT_001e3138 = *(undefined8 *)(param_1 + 2);
  DAT_001e3130 = param_1[8];
  DAT_001e3110 = param_1[9];
  if (*(void **)(param_1 + 10) == (void *)0x0) {
    DAT_001e3108 = (void *)0x0;
  }
  else {
    if (0x8000 < *(ulong *)(param_1 + 0xc)) {
                    /* WARNING: Subroutine does not return */
      FUN_0011dd00("../../gas/app.c",0x133,"app_pop");
    }
    DAT_001e3108 = memcpy(&DAT_001db100,*(void **)(param_1 + 10),*(ulong *)(param_1 + 0xc));
    DAT_001e3100 = *(undefined8 *)(param_1 + 0xc);
    free(*(void **)(param_1 + 10));
  }
  DAT_001db0e8 = *(undefined8 *)(param_1 + 0xe);
  DAT_001db0e2 = *(undefined1 *)(param_1 + 0x10);
  free(param_1);
  return;
}

