
void charset_emit(void *ctx,long output)

{
  char *pcVar1;
  char *pcVar2;
  char *pcVar4;
  int iVar5;
  long in_FS_OFFSET;
  char outval;
  long local_10;
  char *pcVar3;
  
  local_10 = *(long *)(in_FS_OFFSET + 0x28);
  if (output == 0xffff) {
    iVar5 = *(int *)((long)ctx + 0x18);
    if (iVar5 <= *(int *)((long)ctx + 8)) {
      if (iVar5 < 1) goto LAB_00112597;
      pcVar4 = *(char **)((long)ctx + 0x10);
      goto LAB_001125c8;
    }
  }
  else {
    outval = (char)output;
    if (0 < *(int *)((long)ctx + 8)) {
      iVar5 = 1;
      pcVar4 = &outval;
LAB_001125c8:
      pcVar3 = pcVar4;
      do {
        pcVar2 = pcVar3 + 1;
                    /* WARNING: Load size is inaccurate */
        pcVar1 = *ctx;
        *(char **)ctx = pcVar1 + 1;
        *pcVar1 = *pcVar3;
        *(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;
        pcVar3 = pcVar2;
      } while (0 < (iVar5 + (int)pcVar4) - (int)pcVar2);
      goto LAB_00112597;
    }
  }
  *(undefined4 *)((long)ctx + 0x1c) = 1;
LAB_00112597:
  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return;
}



void FUN_00112568(long *param_1,long param_2)

{
  undefined1 *puVar1;
  undefined1 *puVar2;
  undefined1 *puVar4;
  int iVar5;
  long in_FS_OFFSET;
  undefined1 local_11;
  long local_10;
  undefined1 *puVar3;
  
  local_10 = *(long *)(in_FS_OFFSET + 0x28);
  if (param_2 == 0xffff) {
    iVar5 = (int)param_1[3];
    if (iVar5 <= (int)param_1[1]) {
      if (iVar5 < 1) goto LAB_00112597;
      puVar4 = (undefined1 *)param_1[2];
      goto LAB_001125c8;
    }
  }
  else {
    local_11 = (char)param_2;
    if (0 < (int)param_1[1]) {
      iVar5 = 1;
      puVar4 = &local_11;
LAB_001125c8:
      puVar3 = puVar4;
      do {
        puVar2 = puVar3 + 1;
        puVar1 = (undefined1 *)*param_1;
        *param_1 = (long)(puVar1 + 1);
        *puVar1 = *puVar3;
        *(int *)(param_1 + 1) = (int)param_1[1] + -1;
        puVar3 = puVar2;
      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);
      goto LAB_00112597;
    }
  }
  *(undefined4 *)((long)param_1 + 0x1c) = 1;
LAB_00112597:
  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return;
}


SUB RSP,0x18
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x8],RAX
XOR EAX,EAX
CMP RSI,0xffff
JZ 0x001125ac
MOV byte ptr [RSP + 0x7],SIL
CMP dword ptr [RDI + 0x8],0x0
JG 0x001125be
MOV dword ptr [RDI + 0x1c],0x1
MOV RAX,qword ptr [RSP + 0x8]
XOR RAX,qword ptr FS:[0x28]
JNZ 0x001125ef
ADD RSP,0x18
RET
MOV ESI,dword ptr [RDI + 0x18]
CMP dword ptr [RDI + 0x8],ESI
JL 0x00112590
TEST ESI,ESI
JLE 0x00112597
MOV RDX,qword ptr [RDI + 0x10]
JMP 0x001125c8
MOV ESI,0x1
LEA RDX,[RSP + 0x7]
MOV RAX,RDX
ADD ESI,EDX
ADD RAX,0x1
MOV RDX,qword ptr [RDI]
LEA RCX,[RDX + 0x1]
MOV qword ptr [RDI],RCX
MOVZX ECX,byte ptr [RAX + -0x1]
MOV byte ptr [RDX],CL
SUB dword ptr [RDI + 0x8],0x1
MOV EDX,ESI
SUB EDX,EAX
TEST EDX,EDX
JG 0x001125cd
JMP 0x00112597
CALL 0x001111e0
(translation_unit "void FUN_00112568(long *param_1,long param_2)\n\n{\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar4;\n  int iVar5;\n  long in_FS_OFFSET;\n  undefined1 local_11;\n  long local_10;\n  undefined1 *puVar3;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0xffff) {\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }\n  *(undefined4 *)((long)param_1 + 0x1c) = 1;\nLAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return;\n}\n\n" (function_definition "void FUN_00112568(long *param_1,long param_2)\n\n{\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar4;\n  int iVar5;\n  long in_FS_OFFSET;\n  undefined1 local_11;\n  long local_10;\n  undefined1 *puVar3;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0xffff) {\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }\n  *(undefined4 *)((long)param_1 + 0x1c) = 1;\nLAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00112568(long *param_1,long param_2)" identifier (parameter_list "(long *param_1,long param_2)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar4;\n  int iVar5;\n  long in_FS_OFFSET;\n  undefined1 local_11;\n  long local_10;\n  undefined1 *puVar3;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0xffff) {\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }\n  *(undefined4 *)((long)param_1 + 0x1c) = 1;\nLAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 local_11;" type_identifier identifier ;) (declaration "long local_10;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (expression_statement "local_10 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_10 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_2 == 0xffff) {\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }" if (parenthesized_expression "(param_2 == 0xffff)" ( (binary_expression "param_2 == 0xffff" identifier == number_literal) )) (compound_statement "{\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }" { (expression_statement "iVar5 = (int)param_1[3];" (assignment_expression "iVar5 = (int)param_1[3]" identifier = (cast_expression "(int)param_1[3]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) ;) (if_statement "if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }" if (parenthesized_expression "(iVar5 <= (int)param_1[1])" ( (binary_expression "iVar5 <= (int)param_1[1]" identifier <= (cast_expression "(int)param_1[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) (compound_statement "{\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }" { (if_statement "if (iVar5 < 1) goto LAB_00112597;" if (parenthesized_expression "(iVar5 < 1)" ( (binary_expression "iVar5 < 1" identifier < number_literal) )) (goto_statement "goto LAB_00112597;" goto statement_identifier ;)) (expression_statement "puVar4 = (undefined1 *)param_1[2];" (assignment_expression "puVar4 = (undefined1 *)param_1[2]" identifier = (cast_expression "(undefined1 *)param_1[2]" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (goto_statement "goto LAB_001125c8;" goto statement_identifier ;) })) }) (else_clause "else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }" else (compound_statement "{\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }" { (expression_statement "local_11 = (char)param_2;" (assignment_expression "local_11 = (char)param_2" identifier = (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (if_statement "if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }" if (parenthesized_expression "(0 < (int)param_1[1])" ( (binary_expression "0 < (int)param_1[1]" number_literal < (cast_expression "(int)param_1[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) (compound_statement "{\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }" { (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (expression_statement "puVar4 = &local_11;" (assignment_expression "puVar4 = &local_11" identifier = (pointer_expression "&local_11" & identifier)) ;) (labeled_statement "LAB_001125c8:\n      puVar3 = puVar4;" statement_identifier : (expression_statement "puVar3 = puVar4;" (assignment_expression "puVar3 = puVar4" identifier = identifier) ;)) (do_statement "do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);" do (compound_statement "{\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      }" { (expression_statement "puVar2 = puVar3 + 1;" (assignment_expression "puVar2 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) (expression_statement "puVar1 = (undefined1 *)*param_1;" (assignment_expression "puVar1 = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "*param_1 = (long)(puVar1 + 1);" (assignment_expression "*param_1 = (long)(puVar1 + 1)" (pointer_expression "*param_1" * identifier) = (cast_expression "(long)(puVar1 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) )))) ;) (expression_statement "*puVar1 = *puVar3;" (assignment_expression "*puVar1 = *puVar3" (pointer_expression "*puVar1" * identifier) = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "*(int *)(param_1 + 1) = (int)param_1[1] + -1;" (assignment_expression "*(int *)(param_1 + 1) = (int)param_1[1] + -1" (pointer_expression "*(int *)(param_1 + 1)" * (cast_expression "(int *)(param_1 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) = (binary_expression "(int)param_1[1] + -1" (cast_expression "(int)param_1[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) + number_literal)) ;) (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(0 < (iVar5 + (int)puVar4) - (int)puVar2)" ( (binary_expression "0 < (iVar5 + (int)puVar4) - (int)puVar2" number_literal < (binary_expression "(iVar5 + (int)puVar4) - (int)puVar2" (parenthesized_expression "(iVar5 + (int)puVar4)" ( (binary_expression "iVar5 + (int)puVar4" identifier + (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier)) )) - (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier))) )) ;) (goto_statement "goto LAB_00112597;" goto statement_identifier ;) })) }))) (expression_statement "*(undefined4 *)((long)param_1 + 0x1c) = 1;" (assignment_expression "*(undefined4 *)((long)param_1 + 0x1c) = 1" (pointer_expression "*(undefined4 *)((long)param_1 + 0x1c)" * (cast_expression "(undefined4 *)((long)param_1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x1c)" ( (binary_expression "(long)param_1 + 0x1c" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (labeled_statement "LAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_10 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_10 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return;" return ;) })))
(translation_unit "void charset_emit(void *ctx,long output)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  char *pcVar4;\n  int iVar5;\n  long in_FS_OFFSET;\n  char outval;\n  long local_10;\n  char *pcVar3;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (output == 0xffff) {\n    iVar5 = *(int *)((long)ctx + 0x18);\n    if (iVar5 <= *(int *)((long)ctx + 8)) {\n      if (iVar5 < 1) goto LAB_00112597;\n      pcVar4 = *(char **)((long)ctx + 0x10);\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    outval = (char)output;\n    if (0 < *(int *)((long)ctx + 8)) {\n      iVar5 = 1;\n      pcVar4 = &outval;\nLAB_001125c8:\n      pcVar3 = pcVar4;\n      do {\n        pcVar2 = pcVar3 + 1;\n                    /* WARNING: Load size is inaccurate */\n        pcVar1 = *ctx;\n        *(char **)ctx = pcVar1 + 1;\n        *pcVar1 = *pcVar3;\n        *(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;\n        pcVar3 = pcVar2;\n      } while (0 < (iVar5 + (int)pcVar4) - (int)pcVar2);\n      goto LAB_00112597;\n    }\n  }\n  *(undefined4 *)((long)ctx + 0x1c) = 1;\nLAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return;\n}\n\n" (function_definition "void charset_emit(void *ctx,long output)\n\n{\n  char *pcVar1;\n  char *pcVar2;\n  char *pcVar4;\n  int iVar5;\n  long in_FS_OFFSET;\n  char outval;\n  long local_10;\n  char *pcVar3;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (output == 0xffff) {\n    iVar5 = *(int *)((long)ctx + 0x18);\n    if (iVar5 <= *(int *)((long)ctx + 8)) {\n      if (iVar5 < 1) goto LAB_00112597;\n      pcVar4 = *(char **)((long)ctx + 0x10);\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    outval = (char)output;\n    if (0 < *(int *)((long)ctx + 8)) {\n      iVar5 = 1;\n      pcVar4 = &outval;\nLAB_001125c8:\n      pcVar3 = pcVar4;\n      do {\n        pcVar2 = pcVar3 + 1;\n                    /* WARNING: Load size is inaccurate */\n        pcVar1 = *ctx;\n        *(char **)ctx = pcVar1 + 1;\n        *pcVar1 = *pcVar3;\n        *(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;\n        pcVar3 = pcVar2;\n      } while (0 < (iVar5 + (int)pcVar4) - (int)pcVar2);\n      goto LAB_00112597;\n    }\n  }\n  *(undefined4 *)((long)ctx + 0x1c) = 1;\nLAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return;\n}" primitive_type (function_declarator "charset_emit(void *ctx,long output)" identifier (parameter_list "(void *ctx,long output)" ( (parameter_declaration "void *ctx" primitive_type (pointer_declarator "*ctx" * identifier)) , (parameter_declaration "long output" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  char *pcVar1;\n  char *pcVar2;\n  char *pcVar4;\n  int iVar5;\n  long in_FS_OFFSET;\n  char outval;\n  long local_10;\n  char *pcVar3;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (output == 0xffff) {\n    iVar5 = *(int *)((long)ctx + 0x18);\n    if (iVar5 <= *(int *)((long)ctx + 8)) {\n      if (iVar5 < 1) goto LAB_00112597;\n      pcVar4 = *(char **)((long)ctx + 0x10);\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    outval = (char)output;\n    if (0 < *(int *)((long)ctx + 8)) {\n      iVar5 = 1;\n      pcVar4 = &outval;\nLAB_001125c8:\n      pcVar3 = pcVar4;\n      do {\n        pcVar2 = pcVar3 + 1;\n                    /* WARNING: Load size is inaccurate */\n        pcVar1 = *ctx;\n        *(char **)ctx = pcVar1 + 1;\n        *pcVar1 = *pcVar3;\n        *(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;\n        pcVar3 = pcVar2;\n      } while (0 < (iVar5 + (int)pcVar4) - (int)pcVar2);\n      goto LAB_00112597;\n    }\n  }\n  *(undefined4 *)((long)ctx + 0x1c) = 1;\nLAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }\n  return;\n}" { (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "char *pcVar2;" primitive_type (pointer_declarator "*pcVar2" * identifier) ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "char outval;" primitive_type identifier ;) (declaration "long local_10;" (sized_type_specifier "long" long) identifier ;) (declaration "char *pcVar3;" primitive_type (pointer_declarator "*pcVar3" * identifier) ;) (expression_statement "local_10 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_10 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (output == 0xffff) {\n    iVar5 = *(int *)((long)ctx + 0x18);\n    if (iVar5 <= *(int *)((long)ctx + 8)) {\n      if (iVar5 < 1) goto LAB_00112597;\n      pcVar4 = *(char **)((long)ctx + 0x10);\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    outval = (char)output;\n    if (0 < *(int *)((long)ctx + 8)) {\n      iVar5 = 1;\n      pcVar4 = &outval;\nLAB_001125c8:\n      pcVar3 = pcVar4;\n      do {\n        pcVar2 = pcVar3 + 1;\n                    /* WARNING: Load size is inaccurate */\n        pcVar1 = *ctx;\n        *(char **)ctx = pcVar1 + 1;\n        *pcVar1 = *pcVar3;\n        *(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;\n        pcVar3 = pcVar2;\n      } while (0 < (iVar5 + (int)pcVar4) - (int)pcVar2);\n      goto LAB_00112597;\n    }\n  }" if (parenthesized_expression "(output == 0xffff)" ( (binary_expression "output == 0xffff" identifier == number_literal) )) (compound_statement "{\n    iVar5 = *(int *)((long)ctx + 0x18);\n    if (iVar5 <= *(int *)((long)ctx + 8)) {\n      if (iVar5 < 1) goto LAB_00112597;\n      pcVar4 = *(char **)((long)ctx + 0x10);\n      goto LAB_001125c8;\n    }\n  }" { (expression_statement "iVar5 = *(int *)((long)ctx + 0x18);" (assignment_expression "iVar5 = *(int *)((long)ctx + 0x18)" identifier = (pointer_expression "*(int *)((long)ctx + 0x18)" * (cast_expression "(int *)((long)ctx + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)ctx + 0x18)" ( (binary_expression "(long)ctx + 0x18" (cast_expression "(long)ctx" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) ;) (if_statement "if (iVar5 <= *(int *)((long)ctx + 8)) {\n      if (iVar5 < 1) goto LAB_00112597;\n      pcVar4 = *(char **)((long)ctx + 0x10);\n      goto LAB_001125c8;\n    }" if (parenthesized_expression "(iVar5 <= *(int *)((long)ctx + 8))" ( (binary_expression "iVar5 <= *(int *)((long)ctx + 8)" identifier <= (pointer_expression "*(int *)((long)ctx + 8)" * (cast_expression "(int *)((long)ctx + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)ctx + 8)" ( (binary_expression "(long)ctx + 8" (cast_expression "(long)ctx" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) )) (compound_statement "{\n      if (iVar5 < 1) goto LAB_00112597;\n      pcVar4 = *(char **)((long)ctx + 0x10);\n      goto LAB_001125c8;\n    }" { (if_statement "if (iVar5 < 1) goto LAB_00112597;" if (parenthesized_expression "(iVar5 < 1)" ( (binary_expression "iVar5 < 1" identifier < number_literal) )) (goto_statement "goto LAB_00112597;" goto statement_identifier ;)) (expression_statement "pcVar4 = *(char **)((long)ctx + 0x10);" (assignment_expression "pcVar4 = *(char **)((long)ctx + 0x10)" identifier = (pointer_expression "*(char **)((long)ctx + 0x10)" * (cast_expression "(char **)((long)ctx + 0x10)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((long)ctx + 0x10)" ( (binary_expression "(long)ctx + 0x10" (cast_expression "(long)ctx" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) ;) (goto_statement "goto LAB_001125c8;" goto statement_identifier ;) })) }) (else_clause "else {\n    outval = (char)output;\n    if (0 < *(int *)((long)ctx + 8)) {\n      iVar5 = 1;\n      pcVar4 = &outval;\nLAB_001125c8:\n      pcVar3 = pcVar4;\n      do {\n        pcVar2 = pcVar3 + 1;\n                    /* WARNING: Load size is inaccurate */\n        pcVar1 = *ctx;\n        *(char **)ctx = pcVar1 + 1;\n        *pcVar1 = *pcVar3;\n        *(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;\n        pcVar3 = pcVar2;\n      } while (0 < (iVar5 + (int)pcVar4) - (int)pcVar2);\n      goto LAB_00112597;\n    }\n  }" else (compound_statement "{\n    outval = (char)output;\n    if (0 < *(int *)((long)ctx + 8)) {\n      iVar5 = 1;\n      pcVar4 = &outval;\nLAB_001125c8:\n      pcVar3 = pcVar4;\n      do {\n        pcVar2 = pcVar3 + 1;\n                    /* WARNING: Load size is inaccurate */\n        pcVar1 = *ctx;\n        *(char **)ctx = pcVar1 + 1;\n        *pcVar1 = *pcVar3;\n        *(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;\n        pcVar3 = pcVar2;\n      } while (0 < (iVar5 + (int)pcVar4) - (int)pcVar2);\n      goto LAB_00112597;\n    }\n  }" { (expression_statement "outval = (char)output;" (assignment_expression "outval = (char)output" identifier = (cast_expression "(char)output" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (if_statement "if (0 < *(int *)((long)ctx + 8)) {\n      iVar5 = 1;\n      pcVar4 = &outval;\nLAB_001125c8:\n      pcVar3 = pcVar4;\n      do {\n        pcVar2 = pcVar3 + 1;\n                    /* WARNING: Load size is inaccurate */\n        pcVar1 = *ctx;\n        *(char **)ctx = pcVar1 + 1;\n        *pcVar1 = *pcVar3;\n        *(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;\n        pcVar3 = pcVar2;\n      } while (0 < (iVar5 + (int)pcVar4) - (int)pcVar2);\n      goto LAB_00112597;\n    }" if (parenthesized_expression "(0 < *(int *)((long)ctx + 8))" ( (binary_expression "0 < *(int *)((long)ctx + 8)" number_literal < (pointer_expression "*(int *)((long)ctx + 8)" * (cast_expression "(int *)((long)ctx + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)ctx + 8)" ( (binary_expression "(long)ctx + 8" (cast_expression "(long)ctx" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) ))))) )) (compound_statement "{\n      iVar5 = 1;\n      pcVar4 = &outval;\nLAB_001125c8:\n      pcVar3 = pcVar4;\n      do {\n        pcVar2 = pcVar3 + 1;\n                    /* WARNING: Load size is inaccurate */\n        pcVar1 = *ctx;\n        *(char **)ctx = pcVar1 + 1;\n        *pcVar1 = *pcVar3;\n        *(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;\n        pcVar3 = pcVar2;\n      } while (0 < (iVar5 + (int)pcVar4) - (int)pcVar2);\n      goto LAB_00112597;\n    }" { (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (expression_statement "pcVar4 = &outval;" (assignment_expression "pcVar4 = &outval" identifier = (pointer_expression "&outval" & identifier)) ;) (labeled_statement "LAB_001125c8:\n      pcVar3 = pcVar4;" statement_identifier : (expression_statement "pcVar3 = pcVar4;" (assignment_expression "pcVar3 = pcVar4" identifier = identifier) ;)) (do_statement "do {\n        pcVar2 = pcVar3 + 1;\n                    /* WARNING: Load size is inaccurate */\n        pcVar1 = *ctx;\n        *(char **)ctx = pcVar1 + 1;\n        *pcVar1 = *pcVar3;\n        *(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;\n        pcVar3 = pcVar2;\n      } while (0 < (iVar5 + (int)pcVar4) - (int)pcVar2);" do (compound_statement "{\n        pcVar2 = pcVar3 + 1;\n                    /* WARNING: Load size is inaccurate */\n        pcVar1 = *ctx;\n        *(char **)ctx = pcVar1 + 1;\n        *pcVar1 = *pcVar3;\n        *(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;\n        pcVar3 = pcVar2;\n      }" { (expression_statement "pcVar2 = pcVar3 + 1;" (assignment_expression "pcVar2 = pcVar3 + 1" identifier = (binary_expression "pcVar3 + 1" identifier + number_literal)) ;) comment (expression_statement "pcVar1 = *ctx;" (assignment_expression "pcVar1 = *ctx" identifier = (pointer_expression "*ctx" * identifier)) ;) (expression_statement "*(char **)ctx = pcVar1 + 1;" (assignment_expression "*(char **)ctx = pcVar1 + 1" (pointer_expression "*(char **)ctx" * (cast_expression "(char **)ctx" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = (binary_expression "pcVar1 + 1" identifier + number_literal)) ;) (expression_statement "*pcVar1 = *pcVar3;" (assignment_expression "*pcVar1 = *pcVar3" (pointer_expression "*pcVar1" * identifier) = (pointer_expression "*pcVar3" * identifier)) ;) (expression_statement "*(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;" (assignment_expression "*(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1" (pointer_expression "*(int *)((long)ctx + 8)" * (cast_expression "(int *)((long)ctx + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)ctx + 8)" ( (binary_expression "(long)ctx + 8" (cast_expression "(long)ctx" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = (binary_expression "*(int *)((long)ctx + 8) + -1" (pointer_expression "*(int *)((long)ctx + 8)" * (cast_expression "(int *)((long)ctx + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)ctx + 8)" ( (binary_expression "(long)ctx + 8" (cast_expression "(long)ctx" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) + number_literal)) ;) (expression_statement "pcVar3 = pcVar2;" (assignment_expression "pcVar3 = pcVar2" identifier = identifier) ;) }) while (parenthesized_expression "(0 < (iVar5 + (int)pcVar4) - (int)pcVar2)" ( (binary_expression "0 < (iVar5 + (int)pcVar4) - (int)pcVar2" number_literal < (binary_expression "(iVar5 + (int)pcVar4) - (int)pcVar2" (parenthesized_expression "(iVar5 + (int)pcVar4)" ( (binary_expression "iVar5 + (int)pcVar4" identifier + (cast_expression "(int)pcVar4" ( (type_descriptor "int" primitive_type) ) identifier)) )) - (cast_expression "(int)pcVar2" ( (type_descriptor "int" primitive_type) ) identifier))) )) ;) (goto_statement "goto LAB_00112597;" goto statement_identifier ;) })) }))) (expression_statement "*(undefined4 *)((long)ctx + 0x1c) = 1;" (assignment_expression "*(undefined4 *)((long)ctx + 0x1c) = 1" (pointer_expression "*(undefined4 *)((long)ctx + 0x1c)" * (cast_expression "(undefined4 *)((long)ctx + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)ctx + 0x1c)" ( (binary_expression "(long)ctx + 0x1c" (cast_expression "(long)ctx" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (labeled_statement "LAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_10 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_10 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __stack_chk_fail();\n  }" { comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return;" return ;) })))
(translation_unit "void FUN_00112568(long *param_1,long param_2)\n\n{\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar4;\n  int iVar5;\n  long in_FS_OFFSET;\n  undefined1 local_11;\n  long local_10;\n  undefined1 *puVar3;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0xffff) {\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }\n  *(undefined4 *)((long)param_1 + 0x1c) = 1;\nLAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return;\n}\n\n" (function_definition "void FUN_00112568(long *param_1,long param_2)\n\n{\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar4;\n  int iVar5;\n  long in_FS_OFFSET;\n  undefined1 local_11;\n  long local_10;\n  undefined1 *puVar3;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0xffff) {\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }\n  *(undefined4 *)((long)param_1 + 0x1c) = 1;\nLAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return;\n}" primitive_type (function_declarator "FUN_00112568(long *param_1,long param_2)" identifier (parameter_list "(long *param_1,long param_2)" ( (parameter_declaration "long *param_1" (sized_type_specifier "long" long) (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar4;\n  int iVar5;\n  long in_FS_OFFSET;\n  undefined1 local_11;\n  long local_10;\n  undefined1 *puVar3;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0xffff) {\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }\n  *(undefined4 *)((long)param_1 + 0x1c) = 1;\nLAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return;\n}" { (declaration "undefined1 *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "undefined1 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined1 *puVar4;" type_identifier (pointer_declarator "*puVar4" * identifier) ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 local_11;" type_identifier identifier ;) (declaration "long local_10;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined1 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (expression_statement "local_10 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_10 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (if_statement "if (param_2 == 0xffff) {\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }" if (parenthesized_expression "(param_2 == 0xffff)" ( (binary_expression "param_2 == 0xffff" identifier == number_literal) )) (compound_statement "{\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }" { (expression_statement "iVar5 = (int)param_1[3];" (assignment_expression "iVar5 = (int)param_1[3]" identifier = (cast_expression "(int)param_1[3]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[3]" identifier [ number_literal ]))) ;) (if_statement "if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }" if (parenthesized_expression "(iVar5 <= (int)param_1[1])" ( (binary_expression "iVar5 <= (int)param_1[1]" identifier <= (cast_expression "(int)param_1[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) (compound_statement "{\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }" { (if_statement "if (iVar5 < 1) goto LAB_00112597;" if (parenthesized_expression "(iVar5 < 1)" ( (binary_expression "iVar5 < 1" identifier < number_literal) )) (goto_statement "goto LAB_00112597;" goto statement_identifier ;)) (expression_statement "puVar4 = (undefined1 *)param_1[2];" (assignment_expression "puVar4 = (undefined1 *)param_1[2]" identifier = (cast_expression "(undefined1 *)param_1[2]" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[2]" identifier [ number_literal ]))) ;) (goto_statement "goto LAB_001125c8;" goto statement_identifier ;) })) }) (else_clause "else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }" else (compound_statement "{\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }" { (expression_statement "local_11 = (char)param_2;" (assignment_expression "local_11 = (char)param_2" identifier = (cast_expression "(char)param_2" ( (type_descriptor "char" primitive_type) ) identifier)) ;) (if_statement "if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }" if (parenthesized_expression "(0 < (int)param_1[1])" ( (binary_expression "0 < (int)param_1[1]" number_literal < (cast_expression "(int)param_1[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[1]" identifier [ number_literal ]))) )) (compound_statement "{\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }" { (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" identifier = number_literal) ;) (expression_statement "puVar4 = &local_11;" (assignment_expression "puVar4 = &local_11" identifier = (pointer_expression "&local_11" & identifier)) ;) (labeled_statement "LAB_001125c8:\n      puVar3 = puVar4;" statement_identifier : (expression_statement "puVar3 = puVar4;" (assignment_expression "puVar3 = puVar4" identifier = identifier) ;)) (do_statement "do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);" do (compound_statement "{\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      }" { (expression_statement "puVar2 = puVar3 + 1;" (assignment_expression "puVar2 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) (expression_statement "puVar1 = (undefined1 *)*param_1;" (assignment_expression "puVar1 = (undefined1 *)*param_1" identifier = (cast_expression "(undefined1 *)*param_1" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (expression_statement "*param_1 = (long)(puVar1 + 1);" (assignment_expression "*param_1 = (long)(puVar1 + 1)" (pointer_expression "*param_1" * identifier) = (cast_expression "(long)(puVar1 + 1)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(puVar1 + 1)" ( (binary_expression "puVar1 + 1" identifier + number_literal) )))) ;) (expression_statement "*puVar1 = *puVar3;" (assignment_expression "*puVar1 = *puVar3" (pointer_expression "*puVar1" * identifier) = (pointer_expression "*puVar3" * identifier)) ;) (expression_statement "*(int *)(param_1 + 1) = (int)param_1[1] + -1;" (assignment_expression "*(int *)(param_1 + 1) = (int)param_1[1] + -1" (pointer_expression "*(int *)(param_1 + 1)" * (cast_expression "(int *)(param_1 + 1)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 1)" ( (binary_expression "param_1 + 1" identifier + number_literal) )))) = (binary_expression "(int)param_1[1] + -1" (cast_expression "(int)param_1[1]" ( (type_descriptor "int" primitive_type) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) + number_literal)) ;) (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" identifier = identifier) ;) }) while (parenthesized_expression "(0 < (iVar5 + (int)puVar4) - (int)puVar2)" ( (binary_expression "0 < (iVar5 + (int)puVar4) - (int)puVar2" number_literal < (binary_expression "(iVar5 + (int)puVar4) - (int)puVar2" (parenthesized_expression "(iVar5 + (int)puVar4)" ( (binary_expression "iVar5 + (int)puVar4" identifier + (cast_expression "(int)puVar4" ( (type_descriptor "int" primitive_type) ) identifier)) )) - (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier))) )) ;) (goto_statement "goto LAB_00112597;" goto statement_identifier ;) })) }))) (expression_statement "*(undefined4 *)((long)param_1 + 0x1c) = 1;" (assignment_expression "*(undefined4 *)((long)param_1 + 0x1c) = 1" (pointer_expression "*(undefined4 *)((long)param_1 + 0x1c)" * (cast_expression "(undefined4 *)((long)param_1 + 0x1c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + 0x1c)" ( (binary_expression "(long)param_1 + 0x1c" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = number_literal) ;) (labeled_statement "LAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" statement_identifier : (if_statement "if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" if (parenthesized_expression "(local_10 != *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_10 != *(long *)(in_FS_OFFSET + 0x28)" identifier != (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" { (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) }))) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = IDENT) ;)) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ])) + LIT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) }) while (parenthesized_expression ( (binary_expression LIT < (binary_expression (parenthesized_expression ( (binary_expression IDENT + (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) )) ;) (goto_statement goto statement_identifier ;) })) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) = LIT) ;) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) }))) (return_statement return ;) })))
(function_definition "void FUN_00112568(long *param_1,long param_2)\n\n{\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar4;\n  int iVar5;\n  long in_FS_OFFSET;\n  undefined1 local_11;\n  long local_10;\n  undefined1 *puVar3;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0xffff) {\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }\n  *(undefined4 *)((long)param_1 + 0x1c) = 1;\nLAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return;\n}" (primitive_type "void") (function_declarator "FUN_00112568(long *param_1,long param_2)" (identifier "FUN_00112568") (parameter_list "(long *param_1,long param_2)" (( "(") (parameter_declaration "long *param_1" (sized_type_specifier "long" (long "long")) (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) () ")"))) (compound_statement "{\n  undefined1 *puVar1;\n  undefined1 *puVar2;\n  undefined1 *puVar4;\n  int iVar5;\n  long in_FS_OFFSET;\n  undefined1 local_11;\n  long local_10;\n  undefined1 *puVar3;\n  \n  local_10 = *(long *)(in_FS_OFFSET + 0x28);\n  if (param_2 == 0xffff) {\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }\n  *(undefined4 *)((long)param_1 + 0x1c) = 1;\nLAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }\n  return;\n}" ({ "{") (declaration "undefined1 *puVar1;" (type_identifier "undefined1") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "undefined1 *puVar2;" (type_identifier "undefined1") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined1 *puVar4;" (type_identifier "undefined1") (pointer_declarator "*puVar4" (* "*") (identifier "puVar4")) (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined1 local_11;" (type_identifier "undefined1") (identifier "local_11") (; ";")) (declaration "long local_10;" (sized_type_specifier "long" (long "long")) (identifier "local_10") (; ";")) (declaration "undefined1 *puVar3;" (type_identifier "undefined1") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (expression_statement "local_10 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_10 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_10") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (if_statement "if (param_2 == 0xffff) {\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }\n  else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }" (if "if") (parenthesized_expression "(param_2 == 0xffff)" (( "(") (binary_expression "param_2 == 0xffff" (identifier "param_2") (== "==") (number_literal "0xffff")) () ")")) (compound_statement "{\n    iVar5 = (int)param_1[3];\n    if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }\n  }" ({ "{") (expression_statement "iVar5 = (int)param_1[3];" (assignment_expression "iVar5 = (int)param_1[3]" (identifier "iVar5") (= "=") (cast_expression "(int)param_1[3]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_1[3]" (identifier "param_1") ([ "[") (number_literal "3") (] "]")))) (; ";")) (if_statement "if (iVar5 <= (int)param_1[1]) {\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }" (if "if") (parenthesized_expression "(iVar5 <= (int)param_1[1])" (( "(") (binary_expression "iVar5 <= (int)param_1[1]" (identifier "iVar5") (<= "<=") (cast_expression "(int)param_1[1]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) () ")")) (compound_statement "{\n      if (iVar5 < 1) goto LAB_00112597;\n      puVar4 = (undefined1 *)param_1[2];\n      goto LAB_001125c8;\n    }" ({ "{") (if_statement "if (iVar5 < 1) goto LAB_00112597;" (if "if") (parenthesized_expression "(iVar5 < 1)" (( "(") (binary_expression "iVar5 < 1" (identifier "iVar5") (< "<") (number_literal "1")) () ")")) (goto_statement "goto LAB_00112597;" (goto "goto") (statement_identifier "LAB_00112597") (; ";"))) (expression_statement "puVar4 = (undefined1 *)param_1[2];" (assignment_expression "puVar4 = (undefined1 *)param_1[2]" (identifier "puVar4") (= "=") (cast_expression "(undefined1 *)param_1[2]" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[2]" (identifier "param_1") ([ "[") (number_literal "2") (] "]")))) (; ";")) (goto_statement "goto LAB_001125c8;" (goto "goto") (statement_identifier "LAB_001125c8") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }" (else "else") (compound_statement "{\n    local_11 = (char)param_2;\n    if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }\n  }" ({ "{") (expression_statement "local_11 = (char)param_2;" (assignment_expression "local_11 = (char)param_2" (identifier "local_11") (= "=") (cast_expression "(char)param_2" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (identifier "param_2"))) (; ";")) (if_statement "if (0 < (int)param_1[1]) {\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }" (if "if") (parenthesized_expression "(0 < (int)param_1[1])" (( "(") (binary_expression "0 < (int)param_1[1]" (number_literal "0") (< "<") (cast_expression "(int)param_1[1]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")))) () ")")) (compound_statement "{\n      iVar5 = 1;\n      puVar4 = &local_11;\nLAB_001125c8:\n      puVar3 = puVar4;\n      do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);\n      goto LAB_00112597;\n    }" ({ "{") (expression_statement "iVar5 = 1;" (assignment_expression "iVar5 = 1" (identifier "iVar5") (= "=") (number_literal "1")) (; ";")) (expression_statement "puVar4 = &local_11;" (assignment_expression "puVar4 = &local_11" (identifier "puVar4") (= "=") (pointer_expression "&local_11" (& "&") (identifier "local_11"))) (; ";")) (labeled_statement "LAB_001125c8:\n      puVar3 = puVar4;" (statement_identifier "LAB_001125c8") (: ":") (expression_statement "puVar3 = puVar4;" (assignment_expression "puVar3 = puVar4" (identifier "puVar3") (= "=") (identifier "puVar4")) (; ";"))) (do_statement "do {\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);" (do "do") (compound_statement "{\n        puVar2 = puVar3 + 1;\n        puVar1 = (undefined1 *)*param_1;\n        *param_1 = (long)(puVar1 + 1);\n        *puVar1 = *puVar3;\n        *(int *)(param_1 + 1) = (int)param_1[1] + -1;\n        puVar3 = puVar2;\n      }" ({ "{") (expression_statement "puVar2 = puVar3 + 1;" (assignment_expression "puVar2 = puVar3 + 1" (identifier "puVar2") (= "=") (binary_expression "puVar3 + 1" (identifier "puVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "puVar1 = (undefined1 *)*param_1;" (assignment_expression "puVar1 = (undefined1 *)*param_1" (identifier "puVar1") (= "=") (cast_expression "(undefined1 *)*param_1" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (expression_statement "*param_1 = (long)(puVar1 + 1);" (assignment_expression "*param_1 = (long)(puVar1 + 1)" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (cast_expression "(long)(puVar1 + 1)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(puVar1 + 1)" (( "(") (binary_expression "puVar1 + 1" (identifier "puVar1") (+ "+") (number_literal "1")) () ")")))) (; ";")) (expression_statement "*puVar1 = *puVar3;" (assignment_expression "*puVar1 = *puVar3" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (pointer_expression "*puVar3" (* "*") (identifier "puVar3"))) (; ";")) (expression_statement "*(int *)(param_1 + 1) = (int)param_1[1] + -1;" (assignment_expression "*(int *)(param_1 + 1) = (int)param_1[1] + -1" (pointer_expression "*(int *)(param_1 + 1)" (* "*") (cast_expression "(int *)(param_1 + 1)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 1)" (( "(") (binary_expression "param_1 + 1" (identifier "param_1") (+ "+") (number_literal "1")) () ")")))) (= "=") (binary_expression "(int)param_1[1] + -1" (cast_expression "(int)param_1[1]" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "puVar3 = puVar2;" (assignment_expression "puVar3 = puVar2" (identifier "puVar3") (= "=") (identifier "puVar2")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(0 < (iVar5 + (int)puVar4) - (int)puVar2)" (( "(") (binary_expression "0 < (iVar5 + (int)puVar4) - (int)puVar2" (number_literal "0") (< "<") (binary_expression "(iVar5 + (int)puVar4) - (int)puVar2" (parenthesized_expression "(iVar5 + (int)puVar4)" (( "(") (binary_expression "iVar5 + (int)puVar4" (identifier "iVar5") (+ "+") (cast_expression "(int)puVar4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar4"))) () ")")) (- "-") (cast_expression "(int)puVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar2")))) () ")")) (; ";")) (goto_statement "goto LAB_00112597;" (goto "goto") (statement_identifier "LAB_00112597") (; ";")) (} "}"))) (} "}")))) (expression_statement "*(undefined4 *)((long)param_1 + 0x1c) = 1;" (assignment_expression "*(undefined4 *)((long)param_1 + 0x1c) = 1" (pointer_expression "*(undefined4 *)((long)param_1 + 0x1c)" (* "*") (cast_expression "(undefined4 *)((long)param_1 + 0x1c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + 0x1c)" (( "(") (binary_expression "(long)param_1 + 0x1c" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (number_literal "0x1c")) () ")")))) (= "=") (number_literal "1")) (; ";")) (labeled_statement "LAB_00112597:\n  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (statement_identifier "LAB_00112597") (: ":") (if_statement "if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {\n                    \n    __stack_chk_fail();\n  }" (if "if") (parenthesized_expression "(local_10 != *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_10 != *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_10") (!= "!=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n                    \n    __stack_chk_fail();\n  }" ({ "{") (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(void *ctx,long var_2)

{
  char *var_5;
  char *pcVar2;
  char *pcVar4;
  int var_3;
  long var_1;
  char outval;
  long var_6;
  char *var_4;
  
  var_6 = *(long *)(var_1 + 0x28);
  if (var_2 == 0xffff) {
    var_3 = *(int *)((long)ctx + 0x18);
    if (var_3 <= *(int *)((long)ctx + 8)) {
      if (var_3 < 1) goto LAB_00112597;
      pcVar4 = *(char **)((long)ctx + 0x10);
      goto LAB_001125c8;
    }
  }
  else {
    outval = (char)var_2;
    if (0 < *(int *)((long)ctx + 8)) {
      var_3 = 1;
      pcVar4 = &outval;
LAB_001125c8:
      var_4 = pcVar4;
      do {
        pcVar2 = var_4 + 1;
                    /* WARNING: Load size is inaccurate */
        var_5 = *ctx;
        *(char **)ctx = var_5 + 1;
        *var_5 = *var_4;
        *(int *)((long)ctx + 8) = *(int *)((long)ctx + 8) + -1;
        var_4 = pcVar2;
      } while (0 < (var_3 + (int)pcVar4) - (int)pcVar2);
      goto LAB_00112597;
    }
  }
  *(type_1 *)((long)ctx + 0x1c) = 1;
LAB_00112597:
  if (var_6 != *(long *)(var_1 + 0x28)) {
                    /* WARNING: Subroutine does not return */
    var_7();
  }
  return;
}


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

void MASKED(long *param_1,long param_2)

{
  undefined1 *puVar1;
  undefined1 *puVar2;
  undefined1 *puVar4;
  int iVar5;
  long in_FS_OFFSET;
  undefined1 local_11;
  long local_10;
  undefined1 *puVar3;
  
  local_10 = *(long *)(in_FS_OFFSET + 0x28);
  if (param_2 == 0xffff) {
    iVar5 = (int)param_1[3];
    if (iVar5 <= (int)param_1[1]) {
      if (iVar5 < 1) goto LAB_00112597;
      puVar4 = (undefined1 *)param_1[2];
      goto LAB_001125c8;
    }
  }
  else {
    local_11 = (char)param_2;
    if (0 < (int)param_1[1]) {
      iVar5 = 1;
      puVar4 = &local_11;
LAB_001125c8:
      puVar3 = puVar4;
      do {
        puVar2 = puVar3 + 1;
        puVar1 = (undefined1 *)*param_1;
        *param_1 = (long)(puVar1 + 1);
        *puVar1 = *puVar3;
        *(int *)(param_1 + 1) = (int)param_1[1] + -1;
        puVar3 = puVar2;
      } while (0 < (iVar5 + (int)puVar4) - (int)puVar2);
      goto LAB_00112597;
    }
  }
  *(undefined4 *)((long)param_1 + 0x1c) = 1;
LAB_00112597:
  if (local_10 != *(long *)(in_FS_OFFSET + 0x28)) {
                    /* WARNING: Subroutine does not return */
    __stack_chk_fail();
  }
  return;
}

