
/* WARNING: Unknown calling convention */

char * app_push(void)

{
  size_t __n;
  char *__src;
  undefined8 uVar1;
  int iVar2;
  int *piVar3;
  void *__dest;
  bool bVar4;
  
  piVar3 = (int *)xmalloc(0x48);
  iVar2 = state;
  uVar1 = out_buf._8_8_;
  bVar4 = saved_input == (char *)0x0;
  *(undefined8 *)(piVar3 + 4) = out_buf._0_8_;
  *(undefined8 *)(piVar3 + 6) = uVar1;
  *piVar3 = iVar2;
  piVar3[1] = old_state;
  *(char **)(piVar3 + 2) = out_string;
  piVar3[8] = out_buf._16_4_;
  piVar3[9] = add_newlines;
  if (bVar4) {
    piVar3[10] = 0;
    piVar3[0xb] = 0;
  }
  else {
    __dest = (void *)xmalloc(saved_input_len);
    __src = saved_input;
    __n = saved_input_len;
    *(void **)(piVar3 + 10) = __dest;
    memcpy(__dest,__src,__n);
    *(size_t *)(piVar3 + 0xc) = __n;
  }
  state = 0;
  saved_input = (char *)0x0;
  *(char **)(piVar3 + 0xe) = mri_state;
  add_newlines = 0;
  *(char *)(piVar3 + 0x10) = mri_last_ch;
  return (char *)piVar3;
}



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

undefined4 * FUN_0010b0d0(void)

{
  size_t __n;
  void *__src;
  undefined8 uVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  void *__dest;
  bool bVar4;
  
  puVar3 = (undefined4 *)xmalloc(0x48);
  uVar2 = DAT_0016d9c4;
  uVar1 = uRam000000000016d9a8;
  bVar4 = DAT_0016d988 == (void *)0x0;
  *(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;
  *(undefined8 *)(puVar3 + 6) = uVar1;
  *puVar3 = uVar2;
  puVar3[1] = DAT_0016d9c0;
  *(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;
  puVar3[8] = DAT_0016d9b0;
  puVar3[9] = DAT_0016d990;
  if (bVar4) {
    *(undefined8 *)(puVar3 + 10) = 0;
  }
  else {
    __dest = (void *)xmalloc(DAT_0016d980);
    __src = DAT_0016d988;
    __n = DAT_0016d980;
    *(void **)(puVar3 + 10) = __dest;
    memcpy(__dest,__src,__n);
    *(size_t *)(puVar3 + 0xc) = __n;
  }
  DAT_0016d9c4 = 0;
  DAT_0016d988 = (void *)0x0;
  *(undefined8 *)(puVar3 + 0xe) = DAT_00165968;
  DAT_0016d990 = 0;
  *(undefined1 *)(puVar3 + 0x10) = DAT_00165962;
  return puVar3;
}


PUSH RBP
MOV EDI,0x48
PUSH RBX
SUB RSP,0x8
CALL 0x00109758
MOVDQA XMM0,xmmword ptr [0x0016d9a0]
CMP qword ptr [0x0016d988],0x0
MOV RBX,RAX
MOV EAX,dword ptr [0x0016d9c4]
MOVUPS xmmword ptr [RBX + 0x10],XMM0
MOV dword ptr [RBX],EAX
MOV EAX,dword ptr [0x0016d9c0]
MOV dword ptr [RBX + 0x4],EAX
MOV RAX,qword ptr [0x0016d9b8]
MOV qword ptr [RBX + 0x8],RAX
MOV EAX,dword ptr [0x0016d9b0]
MOV dword ptr [RBX + 0x20],EAX
MOV EAX,dword ptr [0x0016d990]
MOV dword ptr [RBX + 0x24],EAX
JZ 0x0010b198
MOV RDI,qword ptr [0x0016d980]
CALL 0x00109758
MOV RBP,qword ptr [0x0016d980]
MOV RSI,qword ptr [0x0016d988]
MOV RDI,RAX
MOV qword ptr [RBX + 0x28],RAX
MOV RDX,RBP
CALL 0x00109460
MOV qword ptr [RBX + 0x30],RBP
MOV RAX,qword ptr [0x00165968]
MOV dword ptr [0x0016d9c4],0x0
MOV qword ptr [0x0016d988],0x0
MOV qword ptr [RBX + 0x38],RAX
MOVZX EAX,byte ptr [0x00165962]
MOV dword ptr [0x0016d990],0x0
MOV byte ptr [RBX + 0x40],AL
ADD RSP,0x8
MOV RAX,RBX
POP RBX
POP RBP
RET
MOV qword ptr [RBX + 0x28],0x0
JMP 0x0010b154
(translation_unit "/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */\n\nundefined4 * FUN_0010b0d0(void)\n\n{\n  size_t __n;\n  void *__src;\n  undefined8 uVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  void *__dest;\n  bool bVar4;\n  \n  puVar3 = (undefined4 *)xmalloc(0x48);\n  uVar2 = DAT_0016d9c4;\n  uVar1 = uRam000000000016d9a8;\n  bVar4 = DAT_0016d988 == (void *)0x0;\n  *(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;\n  *(undefined8 *)(puVar3 + 6) = uVar1;\n  *puVar3 = uVar2;\n  puVar3[1] = DAT_0016d9c0;\n  *(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;\n  puVar3[8] = DAT_0016d9b0;\n  puVar3[9] = DAT_0016d990;\n  if (bVar4) {\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }\n  DAT_0016d9c4 = 0;\n  DAT_0016d988 = (void *)0x0;\n  *(undefined8 *)(puVar3 + 0xe) = DAT_00165968;\n  DAT_0016d990 = 0;\n  *(undefined1 *)(puVar3 + 0x10) = DAT_00165962;\n  return puVar3;\n}\n\n" comment (function_definition "undefined4 * FUN_0010b0d0(void)\n\n{\n  size_t __n;\n  void *__src;\n  undefined8 uVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  void *__dest;\n  bool bVar4;\n  \n  puVar3 = (undefined4 *)xmalloc(0x48);\n  uVar2 = DAT_0016d9c4;\n  uVar1 = uRam000000000016d9a8;\n  bVar4 = DAT_0016d988 == (void *)0x0;\n  *(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;\n  *(undefined8 *)(puVar3 + 6) = uVar1;\n  *puVar3 = uVar2;\n  puVar3[1] = DAT_0016d9c0;\n  *(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;\n  puVar3[8] = DAT_0016d9b0;\n  puVar3[9] = DAT_0016d990;\n  if (bVar4) {\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }\n  DAT_0016d9c4 = 0;\n  DAT_0016d988 = (void *)0x0;\n  *(undefined8 *)(puVar3 + 0xe) = DAT_00165968;\n  DAT_0016d990 = 0;\n  *(undefined1 *)(puVar3 + 0x10) = DAT_00165962;\n  return puVar3;\n}" type_identifier (pointer_declarator "* FUN_0010b0d0(void)" * (function_declarator "FUN_0010b0d0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  size_t __n;\n  void *__src;\n  undefined8 uVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  void *__dest;\n  bool bVar4;\n  \n  puVar3 = (undefined4 *)xmalloc(0x48);\n  uVar2 = DAT_0016d9c4;\n  uVar1 = uRam000000000016d9a8;\n  bVar4 = DAT_0016d988 == (void *)0x0;\n  *(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;\n  *(undefined8 *)(puVar3 + 6) = uVar1;\n  *puVar3 = uVar2;\n  puVar3[1] = DAT_0016d9c0;\n  *(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;\n  puVar3[8] = DAT_0016d9b0;\n  puVar3[9] = DAT_0016d990;\n  if (bVar4) {\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }\n  DAT_0016d9c4 = 0;\n  DAT_0016d988 = (void *)0x0;\n  *(undefined8 *)(puVar3 + 0xe) = DAT_00165968;\n  DAT_0016d990 = 0;\n  *(undefined1 *)(puVar3 + 0x10) = DAT_00165962;\n  return puVar3;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "void *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "bool bVar4;" primitive_type identifier ;) (expression_statement "puVar3 = (undefined4 *)xmalloc(0x48);" (assignment_expression "puVar3 = (undefined4 *)xmalloc(0x48)" identifier = (cast_expression "(undefined4 *)xmalloc(0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x48)" identifier (argument_list "(0x48)" ( number_literal ))))) ;) (expression_statement "uVar2 = DAT_0016d9c4;" (assignment_expression "uVar2 = DAT_0016d9c4" identifier = identifier) ;) (expression_statement "uVar1 = uRam000000000016d9a8;" (assignment_expression "uVar1 = uRam000000000016d9a8" identifier = identifier) ;) (expression_statement "bVar4 = DAT_0016d988 == (void *)0x0;" (assignment_expression "bVar4 = DAT_0016d988 == (void *)0x0" identifier = (binary_expression "DAT_0016d988 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (expression_statement "*(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;" (assignment_expression "*(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0" (pointer_expression "*(undefined8 *)(puVar3 + 4)" * (cast_expression "(undefined8 *)(puVar3 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 4)" ( (binary_expression "puVar3 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(puVar3 + 6) = uVar1;" (assignment_expression "*(undefined8 *)(puVar3 + 6) = uVar1" (pointer_expression "*(undefined8 *)(puVar3 + 6)" * (cast_expression "(undefined8 *)(puVar3 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 6)" ( (binary_expression "puVar3 + 6" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar3 = uVar2;" (assignment_expression "*puVar3 = uVar2" (pointer_expression "*puVar3" * identifier) = identifier) ;) (expression_statement "puVar3[1] = DAT_0016d9c0;" (assignment_expression "puVar3[1] = DAT_0016d9c0" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;" (assignment_expression "*(undefined8 *)(puVar3 + 2) = DAT_0016d9b8" (pointer_expression "*(undefined8 *)(puVar3 + 2)" * (cast_expression "(undefined8 *)(puVar3 + 2)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 2)" ( (binary_expression "puVar3 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar3[8] = DAT_0016d9b0;" (assignment_expression "puVar3[8] = DAT_0016d9b0" (subscript_expression "puVar3[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[9] = DAT_0016d990;" (assignment_expression "puVar3[9] = DAT_0016d990" (subscript_expression "puVar3[9]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (bVar4) {\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }" { (expression_statement "*(undefined8 *)(puVar3 + 10) = 0;" (assignment_expression "*(undefined8 *)(puVar3 + 10) = 0" (pointer_expression "*(undefined8 *)(puVar3 + 10)" * (cast_expression "(undefined8 *)(puVar3 + 10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 10)" ( (binary_expression "puVar3 + 10" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }" else (compound_statement "{\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }" { (expression_statement "__dest = (void *)xmalloc(DAT_0016d980);" (assignment_expression "__dest = (void *)xmalloc(DAT_0016d980)" identifier = (cast_expression "(void *)xmalloc(DAT_0016d980)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(DAT_0016d980)" identifier (argument_list "(DAT_0016d980)" ( identifier ))))) ;) (expression_statement "__src = DAT_0016d988;" (assignment_expression "__src = DAT_0016d988" identifier = identifier) ;) (expression_statement "__n = DAT_0016d980;" (assignment_expression "__n = DAT_0016d980" identifier = identifier) ;) (expression_statement "*(void **)(puVar3 + 10) = __dest;" (assignment_expression "*(void **)(puVar3 + 10) = __dest" (pointer_expression "*(void **)(puVar3 + 10)" * (cast_expression "(void **)(puVar3 + 10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar3 + 10)" ( (binary_expression "puVar3 + 10" identifier + number_literal) )))) = identifier) ;) (expression_statement "memcpy(__dest,__src,__n);" (call_expression "memcpy(__dest,__src,__n)" identifier (argument_list "(__dest,__src,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(size_t *)(puVar3 + 0xc) = __n;" (assignment_expression "*(size_t *)(puVar3 + 0xc) = __n" (pointer_expression "*(size_t *)(puVar3 + 0xc)" * (cast_expression "(size_t *)(puVar3 + 0xc)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 0xc)" ( (binary_expression "puVar3 + 0xc" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "DAT_0016d9c4 = 0;" (assignment_expression "DAT_0016d9c4 = 0" identifier = number_literal) ;) (expression_statement "DAT_0016d988 = (void *)0x0;" (assignment_expression "DAT_0016d988 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "*(undefined8 *)(puVar3 + 0xe) = DAT_00165968;" (assignment_expression "*(undefined8 *)(puVar3 + 0xe) = DAT_00165968" (pointer_expression "*(undefined8 *)(puVar3 + 0xe)" * (cast_expression "(undefined8 *)(puVar3 + 0xe)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 0xe)" ( (binary_expression "puVar3 + 0xe" identifier + number_literal) )))) = identifier) ;) (expression_statement "DAT_0016d990 = 0;" (assignment_expression "DAT_0016d990 = 0" identifier = number_literal) ;) (expression_statement "*(undefined1 *)(puVar3 + 0x10) = DAT_00165962;" (assignment_expression "*(undefined1 *)(puVar3 + 0x10) = DAT_00165962" (pointer_expression "*(undefined1 *)(puVar3 + 0x10)" * (cast_expression "(undefined1 *)(puVar3 + 0x10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 0x10)" ( (binary_expression "puVar3 + 0x10" identifier + number_literal) )))) = identifier) ;) (return_statement "return puVar3;" return identifier ;) })))
(translation_unit "/* WARNING: Unknown calling convention */\n\nchar * app_push(void)\n\n{\n  size_t __n;\n  char *__src;\n  undefined8 uVar1;\n  int iVar2;\n  int *piVar3;\n  void *__dest;\n  bool bVar4;\n  \n  piVar3 = (int *)xmalloc(0x48);\n  iVar2 = state;\n  uVar1 = out_buf._8_8_;\n  bVar4 = saved_input == (char *)0x0;\n  *(undefined8 *)(piVar3 + 4) = out_buf._0_8_;\n  *(undefined8 *)(piVar3 + 6) = uVar1;\n  *piVar3 = iVar2;\n  piVar3[1] = old_state;\n  *(char **)(piVar3 + 2) = out_string;\n  piVar3[8] = out_buf._16_4_;\n  piVar3[9] = add_newlines;\n  if (bVar4) {\n    piVar3[10] = 0;\n    piVar3[0xb] = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(saved_input_len);\n    __src = saved_input;\n    __n = saved_input_len;\n    *(void **)(piVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(piVar3 + 0xc) = __n;\n  }\n  state = 0;\n  saved_input = (char *)0x0;\n  *(char **)(piVar3 + 0xe) = mri_state;\n  add_newlines = 0;\n  *(char *)(piVar3 + 0x10) = mri_last_ch;\n  return (char *)piVar3;\n}\n\n" comment (function_definition "char * app_push(void)\n\n{\n  size_t __n;\n  char *__src;\n  undefined8 uVar1;\n  int iVar2;\n  int *piVar3;\n  void *__dest;\n  bool bVar4;\n  \n  piVar3 = (int *)xmalloc(0x48);\n  iVar2 = state;\n  uVar1 = out_buf._8_8_;\n  bVar4 = saved_input == (char *)0x0;\n  *(undefined8 *)(piVar3 + 4) = out_buf._0_8_;\n  *(undefined8 *)(piVar3 + 6) = uVar1;\n  *piVar3 = iVar2;\n  piVar3[1] = old_state;\n  *(char **)(piVar3 + 2) = out_string;\n  piVar3[8] = out_buf._16_4_;\n  piVar3[9] = add_newlines;\n  if (bVar4) {\n    piVar3[10] = 0;\n    piVar3[0xb] = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(saved_input_len);\n    __src = saved_input;\n    __n = saved_input_len;\n    *(void **)(piVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(piVar3 + 0xc) = __n;\n  }\n  state = 0;\n  saved_input = (char *)0x0;\n  *(char **)(piVar3 + 0xe) = mri_state;\n  add_newlines = 0;\n  *(char *)(piVar3 + 0x10) = mri_last_ch;\n  return (char *)piVar3;\n}" primitive_type (pointer_declarator "* app_push(void)" * (function_declarator "app_push(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  size_t __n;\n  char *__src;\n  undefined8 uVar1;\n  int iVar2;\n  int *piVar3;\n  void *__dest;\n  bool bVar4;\n  \n  piVar3 = (int *)xmalloc(0x48);\n  iVar2 = state;\n  uVar1 = out_buf._8_8_;\n  bVar4 = saved_input == (char *)0x0;\n  *(undefined8 *)(piVar3 + 4) = out_buf._0_8_;\n  *(undefined8 *)(piVar3 + 6) = uVar1;\n  *piVar3 = iVar2;\n  piVar3[1] = old_state;\n  *(char **)(piVar3 + 2) = out_string;\n  piVar3[8] = out_buf._16_4_;\n  piVar3[9] = add_newlines;\n  if (bVar4) {\n    piVar3[10] = 0;\n    piVar3[0xb] = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(saved_input_len);\n    __src = saved_input;\n    __n = saved_input_len;\n    *(void **)(piVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(piVar3 + 0xc) = __n;\n  }\n  state = 0;\n  saved_input = (char *)0x0;\n  *(char **)(piVar3 + 0xe) = mri_state;\n  add_newlines = 0;\n  *(char *)(piVar3 + 0x10) = mri_last_ch;\n  return (char *)piVar3;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "char *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "bool bVar4;" primitive_type identifier ;) (expression_statement "piVar3 = (int *)xmalloc(0x48);" (assignment_expression "piVar3 = (int *)xmalloc(0x48)" identifier = (cast_expression "(int *)xmalloc(0x48)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x48)" identifier (argument_list "(0x48)" ( number_literal ))))) ;) (expression_statement "iVar2 = state;" (assignment_expression "iVar2 = state" identifier = identifier) ;) (expression_statement "uVar1 = out_buf._8_8_;" (assignment_expression "uVar1 = out_buf._8_8_" identifier = (field_expression "out_buf._8_8_" identifier . field_identifier)) ;) (expression_statement "bVar4 = saved_input == (char *)0x0;" (assignment_expression "bVar4 = saved_input == (char *)0x0" identifier = (binary_expression "saved_input == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (expression_statement "*(undefined8 *)(piVar3 + 4) = out_buf._0_8_;" (assignment_expression "*(undefined8 *)(piVar3 + 4) = out_buf._0_8_" (pointer_expression "*(undefined8 *)(piVar3 + 4)" * (cast_expression "(undefined8 *)(piVar3 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3 + 4)" ( (binary_expression "piVar3 + 4" identifier + number_literal) )))) = (field_expression "out_buf._0_8_" identifier . field_identifier)) ;) (expression_statement "*(undefined8 *)(piVar3 + 6) = uVar1;" (assignment_expression "*(undefined8 *)(piVar3 + 6) = uVar1" (pointer_expression "*(undefined8 *)(piVar3 + 6)" * (cast_expression "(undefined8 *)(piVar3 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3 + 6)" ( (binary_expression "piVar3 + 6" identifier + number_literal) )))) = identifier) ;) (expression_statement "*piVar3 = iVar2;" (assignment_expression "*piVar3 = iVar2" (pointer_expression "*piVar3" * identifier) = identifier) ;) (expression_statement "piVar3[1] = old_state;" (assignment_expression "piVar3[1] = old_state" (subscript_expression "piVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(char **)(piVar3 + 2) = out_string;" (assignment_expression "*(char **)(piVar3 + 2) = out_string" (pointer_expression "*(char **)(piVar3 + 2)" * (cast_expression "(char **)(piVar3 + 2)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar3 + 2)" ( (binary_expression "piVar3 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "piVar3[8] = out_buf._16_4_;" (assignment_expression "piVar3[8] = out_buf._16_4_" (subscript_expression "piVar3[8]" identifier [ number_literal ]) = (field_expression "out_buf._16_4_" identifier . field_identifier)) ;) (expression_statement "piVar3[9] = add_newlines;" (assignment_expression "piVar3[9] = add_newlines" (subscript_expression "piVar3[9]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (bVar4) {\n    piVar3[10] = 0;\n    piVar3[0xb] = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(saved_input_len);\n    __src = saved_input;\n    __n = saved_input_len;\n    *(void **)(piVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(piVar3 + 0xc) = __n;\n  }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n    piVar3[10] = 0;\n    piVar3[0xb] = 0;\n  }" { (expression_statement "piVar3[10] = 0;" (assignment_expression "piVar3[10] = 0" (subscript_expression "piVar3[10]" identifier [ number_literal ]) = number_literal) ;) (expression_statement "piVar3[0xb] = 0;" (assignment_expression "piVar3[0xb] = 0" (subscript_expression "piVar3[0xb]" identifier [ number_literal ]) = number_literal) ;) }) (else_clause "else {\n    __dest = (void *)xmalloc(saved_input_len);\n    __src = saved_input;\n    __n = saved_input_len;\n    *(void **)(piVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(piVar3 + 0xc) = __n;\n  }" else (compound_statement "{\n    __dest = (void *)xmalloc(saved_input_len);\n    __src = saved_input;\n    __n = saved_input_len;\n    *(void **)(piVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(piVar3 + 0xc) = __n;\n  }" { (expression_statement "__dest = (void *)xmalloc(saved_input_len);" (assignment_expression "__dest = (void *)xmalloc(saved_input_len)" identifier = (cast_expression "(void *)xmalloc(saved_input_len)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(saved_input_len)" identifier (argument_list "(saved_input_len)" ( identifier ))))) ;) (expression_statement "__src = saved_input;" (assignment_expression "__src = saved_input" identifier = identifier) ;) (expression_statement "__n = saved_input_len;" (assignment_expression "__n = saved_input_len" identifier = identifier) ;) (expression_statement "*(void **)(piVar3 + 10) = __dest;" (assignment_expression "*(void **)(piVar3 + 10) = __dest" (pointer_expression "*(void **)(piVar3 + 10)" * (cast_expression "(void **)(piVar3 + 10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar3 + 10)" ( (binary_expression "piVar3 + 10" identifier + number_literal) )))) = identifier) ;) (expression_statement "memcpy(__dest,__src,__n);" (call_expression "memcpy(__dest,__src,__n)" identifier (argument_list "(__dest,__src,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(size_t *)(piVar3 + 0xc) = __n;" (assignment_expression "*(size_t *)(piVar3 + 0xc) = __n" (pointer_expression "*(size_t *)(piVar3 + 0xc)" * (cast_expression "(size_t *)(piVar3 + 0xc)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3 + 0xc)" ( (binary_expression "piVar3 + 0xc" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "state = 0;" (assignment_expression "state = 0" identifier = number_literal) ;) (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)) ;) (expression_statement "*(char **)(piVar3 + 0xe) = mri_state;" (assignment_expression "*(char **)(piVar3 + 0xe) = mri_state" (pointer_expression "*(char **)(piVar3 + 0xe)" * (cast_expression "(char **)(piVar3 + 0xe)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(piVar3 + 0xe)" ( (binary_expression "piVar3 + 0xe" identifier + number_literal) )))) = identifier) ;) (expression_statement "add_newlines = 0;" (assignment_expression "add_newlines = 0" identifier = number_literal) ;) (expression_statement "*(char *)(piVar3 + 0x10) = mri_last_ch;" (assignment_expression "*(char *)(piVar3 + 0x10) = mri_last_ch" (pointer_expression "*(char *)(piVar3 + 0x10)" * (cast_expression "(char *)(piVar3 + 0x10)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(piVar3 + 0x10)" ( (binary_expression "piVar3 + 0x10" identifier + number_literal) )))) = identifier) ;) (return_statement "return (char *)piVar3;" return (cast_expression "(char *)piVar3" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) ;) })))
(translation_unit "undefined4 * FUN_0010b0d0(void)\n\n{\n  size_t __n;\n  void *__src;\n  undefined8 uVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  void *__dest;\n  bool bVar4;\n  \n  puVar3 = (undefined4 *)xmalloc(0x48);\n  uVar2 = DAT_0016d9c4;\n  uVar1 = uRam000000000016d9a8;\n  bVar4 = DAT_0016d988 == (void *)0x0;\n  *(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;\n  *(undefined8 *)(puVar3 + 6) = uVar1;\n  *puVar3 = uVar2;\n  puVar3[1] = DAT_0016d9c0;\n  *(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;\n  puVar3[8] = DAT_0016d9b0;\n  puVar3[9] = DAT_0016d990;\n  if (bVar4) {\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }\n  DAT_0016d9c4 = 0;\n  DAT_0016d988 = (void *)0x0;\n  *(undefined8 *)(puVar3 + 0xe) = DAT_00165968;\n  DAT_0016d990 = 0;\n  *(undefined1 *)(puVar3 + 0x10) = DAT_00165962;\n  return puVar3;\n}\n\n" (function_definition "undefined4 * FUN_0010b0d0(void)\n\n{\n  size_t __n;\n  void *__src;\n  undefined8 uVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  void *__dest;\n  bool bVar4;\n  \n  puVar3 = (undefined4 *)xmalloc(0x48);\n  uVar2 = DAT_0016d9c4;\n  uVar1 = uRam000000000016d9a8;\n  bVar4 = DAT_0016d988 == (void *)0x0;\n  *(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;\n  *(undefined8 *)(puVar3 + 6) = uVar1;\n  *puVar3 = uVar2;\n  puVar3[1] = DAT_0016d9c0;\n  *(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;\n  puVar3[8] = DAT_0016d9b0;\n  puVar3[9] = DAT_0016d990;\n  if (bVar4) {\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }\n  DAT_0016d9c4 = 0;\n  DAT_0016d988 = (void *)0x0;\n  *(undefined8 *)(puVar3 + 0xe) = DAT_00165968;\n  DAT_0016d990 = 0;\n  *(undefined1 *)(puVar3 + 0x10) = DAT_00165962;\n  return puVar3;\n}" type_identifier (pointer_declarator "* FUN_0010b0d0(void)" * (function_declarator "FUN_0010b0d0(void)" identifier (parameter_list "(void)" ( (parameter_declaration "void" primitive_type) )))) (compound_statement "{\n  size_t __n;\n  void *__src;\n  undefined8 uVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  void *__dest;\n  bool bVar4;\n  \n  puVar3 = (undefined4 *)xmalloc(0x48);\n  uVar2 = DAT_0016d9c4;\n  uVar1 = uRam000000000016d9a8;\n  bVar4 = DAT_0016d988 == (void *)0x0;\n  *(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;\n  *(undefined8 *)(puVar3 + 6) = uVar1;\n  *puVar3 = uVar2;\n  puVar3[1] = DAT_0016d9c0;\n  *(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;\n  puVar3[8] = DAT_0016d9b0;\n  puVar3[9] = DAT_0016d990;\n  if (bVar4) {\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }\n  DAT_0016d9c4 = 0;\n  DAT_0016d988 = (void *)0x0;\n  *(undefined8 *)(puVar3 + 0xe) = DAT_00165968;\n  DAT_0016d990 = 0;\n  *(undefined1 *)(puVar3 + 0x10) = DAT_00165962;\n  return puVar3;\n}" { (declaration "size_t __n;" primitive_type identifier ;) (declaration "void *__src;" primitive_type (pointer_declarator "*__src" * identifier) ;) (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined4 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "void *__dest;" primitive_type (pointer_declarator "*__dest" * identifier) ;) (declaration "bool bVar4;" primitive_type identifier ;) (expression_statement "puVar3 = (undefined4 *)xmalloc(0x48);" (assignment_expression "puVar3 = (undefined4 *)xmalloc(0x48)" identifier = (cast_expression "(undefined4 *)xmalloc(0x48)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(0x48)" identifier (argument_list "(0x48)" ( number_literal ))))) ;) (expression_statement "uVar2 = DAT_0016d9c4;" (assignment_expression "uVar2 = DAT_0016d9c4" identifier = identifier) ;) (expression_statement "uVar1 = uRam000000000016d9a8;" (assignment_expression "uVar1 = uRam000000000016d9a8" identifier = identifier) ;) (expression_statement "bVar4 = DAT_0016d988 == (void *)0x0;" (assignment_expression "bVar4 = DAT_0016d988 == (void *)0x0" identifier = (binary_expression "DAT_0016d988 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal))) ;) (expression_statement "*(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;" (assignment_expression "*(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0" (pointer_expression "*(undefined8 *)(puVar3 + 4)" * (cast_expression "(undefined8 *)(puVar3 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 4)" ( (binary_expression "puVar3 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(undefined8 *)(puVar3 + 6) = uVar1;" (assignment_expression "*(undefined8 *)(puVar3 + 6) = uVar1" (pointer_expression "*(undefined8 *)(puVar3 + 6)" * (cast_expression "(undefined8 *)(puVar3 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 6)" ( (binary_expression "puVar3 + 6" identifier + number_literal) )))) = identifier) ;) (expression_statement "*puVar3 = uVar2;" (assignment_expression "*puVar3 = uVar2" (pointer_expression "*puVar3" * identifier) = identifier) ;) (expression_statement "puVar3[1] = DAT_0016d9c0;" (assignment_expression "puVar3[1] = DAT_0016d9c0" (subscript_expression "puVar3[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "*(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;" (assignment_expression "*(undefined8 *)(puVar3 + 2) = DAT_0016d9b8" (pointer_expression "*(undefined8 *)(puVar3 + 2)" * (cast_expression "(undefined8 *)(puVar3 + 2)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 2)" ( (binary_expression "puVar3 + 2" identifier + number_literal) )))) = identifier) ;) (expression_statement "puVar3[8] = DAT_0016d9b0;" (assignment_expression "puVar3[8] = DAT_0016d9b0" (subscript_expression "puVar3[8]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar3[9] = DAT_0016d990;" (assignment_expression "puVar3[9] = DAT_0016d990" (subscript_expression "puVar3[9]" identifier [ number_literal ]) = identifier) ;) (if_statement "if (bVar4) {\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }" if (parenthesized_expression "(bVar4)" ( identifier )) (compound_statement "{\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }" { (expression_statement "*(undefined8 *)(puVar3 + 10) = 0;" (assignment_expression "*(undefined8 *)(puVar3 + 10) = 0" (pointer_expression "*(undefined8 *)(puVar3 + 10)" * (cast_expression "(undefined8 *)(puVar3 + 10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 10)" ( (binary_expression "puVar3 + 10" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }" else (compound_statement "{\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }" { (expression_statement "__dest = (void *)xmalloc(DAT_0016d980);" (assignment_expression "__dest = (void *)xmalloc(DAT_0016d980)" identifier = (cast_expression "(void *)xmalloc(DAT_0016d980)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "xmalloc(DAT_0016d980)" identifier (argument_list "(DAT_0016d980)" ( identifier ))))) ;) (expression_statement "__src = DAT_0016d988;" (assignment_expression "__src = DAT_0016d988" identifier = identifier) ;) (expression_statement "__n = DAT_0016d980;" (assignment_expression "__n = DAT_0016d980" identifier = identifier) ;) (expression_statement "*(void **)(puVar3 + 10) = __dest;" (assignment_expression "*(void **)(puVar3 + 10) = __dest" (pointer_expression "*(void **)(puVar3 + 10)" * (cast_expression "(void **)(puVar3 + 10)" ( (type_descriptor "void **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(puVar3 + 10)" ( (binary_expression "puVar3 + 10" identifier + number_literal) )))) = identifier) ;) (expression_statement "memcpy(__dest,__src,__n);" (call_expression "memcpy(__dest,__src,__n)" identifier (argument_list "(__dest,__src,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "*(size_t *)(puVar3 + 0xc) = __n;" (assignment_expression "*(size_t *)(puVar3 + 0xc) = __n" (pointer_expression "*(size_t *)(puVar3 + 0xc)" * (cast_expression "(size_t *)(puVar3 + 0xc)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 0xc)" ( (binary_expression "puVar3 + 0xc" identifier + number_literal) )))) = identifier) ;) }))) (expression_statement "DAT_0016d9c4 = 0;" (assignment_expression "DAT_0016d9c4 = 0" identifier = number_literal) ;) (expression_statement "DAT_0016d988 = (void *)0x0;" (assignment_expression "DAT_0016d988 = (void *)0x0" identifier = (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) ;) (expression_statement "*(undefined8 *)(puVar3 + 0xe) = DAT_00165968;" (assignment_expression "*(undefined8 *)(puVar3 + 0xe) = DAT_00165968" (pointer_expression "*(undefined8 *)(puVar3 + 0xe)" * (cast_expression "(undefined8 *)(puVar3 + 0xe)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 0xe)" ( (binary_expression "puVar3 + 0xe" identifier + number_literal) )))) = identifier) ;) (expression_statement "DAT_0016d990 = 0;" (assignment_expression "DAT_0016d990 = 0" identifier = number_literal) ;) (expression_statement "*(undefined1 *)(puVar3 + 0x10) = DAT_00165962;" (assignment_expression "*(undefined1 *)(puVar3 + 0x10) = DAT_00165962" (pointer_expression "*(undefined1 *)(puVar3 + 0x10)" * (cast_expression "(undefined1 *)(puVar3 + 0x10)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(puVar3 + 0x10)" ( (binary_expression "puVar3 + 0x10" identifier + number_literal) )))) = identifier) ;) (return_statement "return puVar3;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) }))) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4 * FUN_0010b0d0(void)\n\n{\n  size_t __n;\n  void *__src;\n  undefined8 uVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  void *__dest;\n  bool bVar4;\n  \n  puVar3 = (undefined4 *)xmalloc(0x48);\n  uVar2 = DAT_0016d9c4;\n  uVar1 = uRam000000000016d9a8;\n  bVar4 = DAT_0016d988 == (void *)0x0;\n  *(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;\n  *(undefined8 *)(puVar3 + 6) = uVar1;\n  *puVar3 = uVar2;\n  puVar3[1] = DAT_0016d9c0;\n  *(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;\n  puVar3[8] = DAT_0016d9b0;\n  puVar3[9] = DAT_0016d990;\n  if (bVar4) {\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }\n  DAT_0016d9c4 = 0;\n  DAT_0016d988 = (void *)0x0;\n  *(undefined8 *)(puVar3 + 0xe) = DAT_00165968;\n  DAT_0016d990 = 0;\n  *(undefined1 *)(puVar3 + 0x10) = DAT_00165962;\n  return puVar3;\n}" (type_identifier "undefined4") (pointer_declarator "* FUN_0010b0d0(void)" (* "*") (function_declarator "FUN_0010b0d0(void)" (identifier "FUN_0010b0d0") (parameter_list "(void)" (( "(") (parameter_declaration "void" (primitive_type "void")) () ")")))) (compound_statement "{\n  size_t __n;\n  void *__src;\n  undefined8 uVar1;\n  undefined4 uVar2;\n  undefined4 *puVar3;\n  void *__dest;\n  bool bVar4;\n  \n  puVar3 = (undefined4 *)xmalloc(0x48);\n  uVar2 = DAT_0016d9c4;\n  uVar1 = uRam000000000016d9a8;\n  bVar4 = DAT_0016d988 == (void *)0x0;\n  *(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;\n  *(undefined8 *)(puVar3 + 6) = uVar1;\n  *puVar3 = uVar2;\n  puVar3[1] = DAT_0016d9c0;\n  *(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;\n  puVar3[8] = DAT_0016d9b0;\n  puVar3[9] = DAT_0016d990;\n  if (bVar4) {\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }\n  DAT_0016d9c4 = 0;\n  DAT_0016d988 = (void *)0x0;\n  *(undefined8 *)(puVar3 + 0xe) = DAT_00165968;\n  DAT_0016d990 = 0;\n  *(undefined1 *)(puVar3 + 0x10) = DAT_00165962;\n  return puVar3;\n}" ({ "{") (declaration "size_t __n;" (primitive_type "size_t") (identifier "__n") (; ";")) (declaration "void *__src;" (primitive_type "void") (pointer_declarator "*__src" (* "*") (identifier "__src")) (; ";")) (declaration "undefined8 uVar1;" (type_identifier "undefined8") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined4 *puVar3;" (type_identifier "undefined4") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "void *__dest;" (primitive_type "void") (pointer_declarator "*__dest" (* "*") (identifier "__dest")) (; ";")) (declaration "bool bVar4;" (primitive_type "bool") (identifier "bVar4") (; ";")) (expression_statement "puVar3 = (undefined4 *)xmalloc(0x48);" (assignment_expression "puVar3 = (undefined4 *)xmalloc(0x48)" (identifier "puVar3") (= "=") (cast_expression "(undefined4 *)xmalloc(0x48)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(0x48)" (identifier "xmalloc") (argument_list "(0x48)" (( "(") (number_literal "0x48") () ")"))))) (; ";")) (expression_statement "uVar2 = DAT_0016d9c4;" (assignment_expression "uVar2 = DAT_0016d9c4" (identifier "uVar2") (= "=") (identifier "DAT_0016d9c4")) (; ";")) (expression_statement "uVar1 = uRam000000000016d9a8;" (assignment_expression "uVar1 = uRam000000000016d9a8" (identifier "uVar1") (= "=") (identifier "uRam000000000016d9a8")) (; ";")) (expression_statement "bVar4 = DAT_0016d988 == (void *)0x0;" (assignment_expression "bVar4 = DAT_0016d988 == (void *)0x0" (identifier "bVar4") (= "=") (binary_expression "DAT_0016d988 == (void *)0x0" (identifier "DAT_0016d988") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0")))) (; ";")) (expression_statement "*(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;" (assignment_expression "*(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0" (pointer_expression "*(undefined8 *)(puVar3 + 4)" (* "*") (cast_expression "(undefined8 *)(puVar3 + 4)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 4)" (( "(") (binary_expression "puVar3 + 4" (identifier "puVar3") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "_DAT_0016d9a0")) (; ";")) (expression_statement "*(undefined8 *)(puVar3 + 6) = uVar1;" (assignment_expression "*(undefined8 *)(puVar3 + 6) = uVar1" (pointer_expression "*(undefined8 *)(puVar3 + 6)" (* "*") (cast_expression "(undefined8 *)(puVar3 + 6)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 6)" (( "(") (binary_expression "puVar3 + 6" (identifier "puVar3") (+ "+") (number_literal "6")) () ")")))) (= "=") (identifier "uVar1")) (; ";")) (expression_statement "*puVar3 = uVar2;" (assignment_expression "*puVar3 = uVar2" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (identifier "uVar2")) (; ";")) (expression_statement "puVar3[1] = DAT_0016d9c0;" (assignment_expression "puVar3[1] = DAT_0016d9c0" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "DAT_0016d9c0")) (; ";")) (expression_statement "*(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;" (assignment_expression "*(undefined8 *)(puVar3 + 2) = DAT_0016d9b8" (pointer_expression "*(undefined8 *)(puVar3 + 2)" (* "*") (cast_expression "(undefined8 *)(puVar3 + 2)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 2)" (( "(") (binary_expression "puVar3 + 2" (identifier "puVar3") (+ "+") (number_literal "2")) () ")")))) (= "=") (identifier "DAT_0016d9b8")) (; ";")) (expression_statement "puVar3[8] = DAT_0016d9b0;" (assignment_expression "puVar3[8] = DAT_0016d9b0" (subscript_expression "puVar3[8]" (identifier "puVar3") ([ "[") (number_literal "8") (] "]")) (= "=") (identifier "DAT_0016d9b0")) (; ";")) (expression_statement "puVar3[9] = DAT_0016d990;" (assignment_expression "puVar3[9] = DAT_0016d990" (subscript_expression "puVar3[9]" (identifier "puVar3") ([ "[") (number_literal "9") (] "]")) (= "=") (identifier "DAT_0016d990")) (; ";")) (if_statement "if (bVar4) {\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }\n  else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }" (if "if") (parenthesized_expression "(bVar4)" (( "(") (identifier "bVar4") () ")")) (compound_statement "{\n    *(undefined8 *)(puVar3 + 10) = 0;\n  }" ({ "{") (expression_statement "*(undefined8 *)(puVar3 + 10) = 0;" (assignment_expression "*(undefined8 *)(puVar3 + 10) = 0" (pointer_expression "*(undefined8 *)(puVar3 + 10)" (* "*") (cast_expression "(undefined8 *)(puVar3 + 10)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 10)" (( "(") (binary_expression "puVar3 + 10" (identifier "puVar3") (+ "+") (number_literal "10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }" (else "else") (compound_statement "{\n    __dest = (void *)xmalloc(DAT_0016d980);\n    __src = DAT_0016d988;\n    __n = DAT_0016d980;\n    *(void **)(puVar3 + 10) = __dest;\n    memcpy(__dest,__src,__n);\n    *(size_t *)(puVar3 + 0xc) = __n;\n  }" ({ "{") (expression_statement "__dest = (void *)xmalloc(DAT_0016d980);" (assignment_expression "__dest = (void *)xmalloc(DAT_0016d980)" (identifier "__dest") (= "=") (cast_expression "(void *)xmalloc(DAT_0016d980)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "xmalloc(DAT_0016d980)" (identifier "xmalloc") (argument_list "(DAT_0016d980)" (( "(") (identifier "DAT_0016d980") () ")"))))) (; ";")) (expression_statement "__src = DAT_0016d988;" (assignment_expression "__src = DAT_0016d988" (identifier "__src") (= "=") (identifier "DAT_0016d988")) (; ";")) (expression_statement "__n = DAT_0016d980;" (assignment_expression "__n = DAT_0016d980" (identifier "__n") (= "=") (identifier "DAT_0016d980")) (; ";")) (expression_statement "*(void **)(puVar3 + 10) = __dest;" (assignment_expression "*(void **)(puVar3 + 10) = __dest" (pointer_expression "*(void **)(puVar3 + 10)" (* "*") (cast_expression "(void **)(puVar3 + 10)" (( "(") (type_descriptor "void **" (primitive_type "void") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(puVar3 + 10)" (( "(") (binary_expression "puVar3 + 10" (identifier "puVar3") (+ "+") (number_literal "10")) () ")")))) (= "=") (identifier "__dest")) (; ";")) (expression_statement "memcpy(__dest,__src,__n);" (call_expression "memcpy(__dest,__src,__n)" (identifier "memcpy") (argument_list "(__dest,__src,__n)" (( "(") (identifier "__dest") (, ",") (identifier "__src") (, ",") (identifier "__n") () ")"))) (; ";")) (expression_statement "*(size_t *)(puVar3 + 0xc) = __n;" (assignment_expression "*(size_t *)(puVar3 + 0xc) = __n" (pointer_expression "*(size_t *)(puVar3 + 0xc)" (* "*") (cast_expression "(size_t *)(puVar3 + 0xc)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 0xc)" (( "(") (binary_expression "puVar3 + 0xc" (identifier "puVar3") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "__n")) (; ";")) (} "}")))) (expression_statement "DAT_0016d9c4 = 0;" (assignment_expression "DAT_0016d9c4 = 0" (identifier "DAT_0016d9c4") (= "=") (number_literal "0")) (; ";")) (expression_statement "DAT_0016d988 = (void *)0x0;" (assignment_expression "DAT_0016d988 = (void *)0x0" (identifier "DAT_0016d988") (= "=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (expression_statement "*(undefined8 *)(puVar3 + 0xe) = DAT_00165968;" (assignment_expression "*(undefined8 *)(puVar3 + 0xe) = DAT_00165968" (pointer_expression "*(undefined8 *)(puVar3 + 0xe)" (* "*") (cast_expression "(undefined8 *)(puVar3 + 0xe)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 0xe)" (( "(") (binary_expression "puVar3 + 0xe" (identifier "puVar3") (+ "+") (number_literal "0xe")) () ")")))) (= "=") (identifier "DAT_00165968")) (; ";")) (expression_statement "DAT_0016d990 = 0;" (assignment_expression "DAT_0016d990 = 0" (identifier "DAT_0016d990") (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined1 *)(puVar3 + 0x10) = DAT_00165962;" (assignment_expression "*(undefined1 *)(puVar3 + 0x10) = DAT_00165962" (pointer_expression "*(undefined1 *)(puVar3 + 0x10)" (* "*") (cast_expression "(undefined1 *)(puVar3 + 0x10)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(puVar3 + 0x10)" (( "(") (binary_expression "puVar3 + 0x10" (identifier "puVar3") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "DAT_00165962")) (; ";")) (return_statement "return puVar3;" (return "return") (identifier "puVar3") (; ";")) (} "}")))

/* WARNING: Unknown calling convention */

char * function_1(void)

{
  size_t __n;
  char *__src;
  type_1 uVar1;
  int iVar2;
  int *var_3;
  void *__dest;
  bool bVar4;
  
  var_3 = (int *)var_1(0x48);
  iVar2 = state;
  uVar1 = out_buf._8_8_;
  bVar4 = var_2 == (char *)0x0;
  *(type_1 *)(var_3 + 4) = out_buf._0_8_;
  *(type_1 *)(var_3 + 6) = uVar1;
  *var_3 = iVar2;
  var_3[1] = old_state;
  *(char **)(var_3 + 2) = out_string;
  var_3[8] = out_buf._16_4_;
  var_3[9] = add_newlines;
  if (bVar4) {
    var_3[10] = 0;
    var_3[0xb] = 0;
  }
  else {
    __dest = (void *)var_1(saved_input_len);
    __src = var_2;
    __n = saved_input_len;
    *(void **)(var_3 + 10) = __dest;
    var_4(__dest,__src,__n);
    *(size_t *)(var_3 + 0xc) = __n;
  }
  state = 0;
  var_2 = (char *)0x0;
  *(char **)(var_3 + 0xe) = mri_state;
  add_newlines = 0;
  *(char *)(var_3 + 0x10) = mri_last_ch;
  return (char *)var_3;
}


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

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

undefined4 * MASKED(void)

{
  size_t __n;
  void *__src;
  undefined8 uVar1;
  undefined4 uVar2;
  undefined4 *puVar3;
  void *__dest;
  bool bVar4;
  
  puVar3 = (undefined4 *)xmalloc(0x48);
  uVar2 = DAT_0016d9c4;
  uVar1 = uRam000000000016d9a8;
  bVar4 = DAT_0016d988 == (void *)0x0;
  *(undefined8 *)(puVar3 + 4) = _DAT_0016d9a0;
  *(undefined8 *)(puVar3 + 6) = uVar1;
  *puVar3 = uVar2;
  puVar3[1] = DAT_0016d9c0;
  *(undefined8 *)(puVar3 + 2) = DAT_0016d9b8;
  puVar3[8] = DAT_0016d9b0;
  puVar3[9] = DAT_0016d990;
  if (bVar4) {
    *(undefined8 *)(puVar3 + 10) = 0;
  }
  else {
    __dest = (void *)xmalloc(DAT_0016d980);
    __src = DAT_0016d988;
    __n = DAT_0016d980;
    *(void **)(puVar3 + 10) = __dest;
    memcpy(__dest,__src,__n);
    *(size_t *)(puVar3 + 0xc) = __n;
  }
  DAT_0016d9c4 = 0;
  DAT_0016d988 = (void *)0x0;
  *(undefined8 *)(puVar3 + 0xe) = DAT_00165968;
  DAT_0016d990 = 0;
  *(undefined1 *)(puVar3 + 0x10) = DAT_00165962;
  return puVar3;
}

