
/* std::codecvt_base::result std::(anonymous namespace)::utf16_in<char16_t>(std::(anonymous
   namespace)::range<char const, true>&, std::(anonymous namespace)::range<char16_t, true>&,
   unsigned long, std::codecvt_mode, std::(anonymous namespace)::surrogates) */

char std::(anonymous_namespace)::utf16_in<char16_t>
               (range *param_1,unsigned_char *param_2,ulong param_3,uint param_4,int param_5)

{
  ushort *puVar1;
  ushort uVar2;
  ushort uVar3;
  ulong uVar4;
  ushort uVar5;
  long lVar6;
  long lVar7;
  
  if ((param_4 & 4) != 0) {
    read_bom<char_const,true,3ul>(param_1,param_2);
  }
  while( true ) {
    lVar7 = *(long *)param_1;
    lVar6 = *(long *)(param_1 + 8);
    if (lVar7 == lVar6) {
      return '\0';
    }
    while( true ) {
      if (*(long *)param_2 == *(long *)(param_2 + 8)) {
        return '\0';
      }
      uVar4 = read_utf8_code_point(param_1,param_3);
      if ((uint)uVar4 == 0xfffffffe) {
        return (param_5 != 0) + '\x01';
      }
      if (param_3 < (uVar4 & 0xffffffff)) {
        return '\x02';
      }
      puVar1 = *(ushort **)param_2;
      uVar2 = (ushort)uVar4;
      if (0xffff < (uint)uVar4) break;
      if (*(ushort **)(param_2 + 8) == puVar1) goto LAB_0051dea9;
      lVar7 = *(long *)param_1;
      lVar6 = *(long *)(param_1 + 8);
      if ((param_4 & 1) == 0) {
        uVar2 = uVar2 << 8 | uVar2 >> 8;
      }
      *(ushort **)param_2 = puVar1 + 1;
      *puVar1 = uVar2;
      if (lVar7 == lVar6) {
        return '\0';
      }
    }
    if ((ulong)((long)*(ushort **)(param_2 + 8) - (long)puVar1) < 4) break;
    uVar3 = (uVar2 & 0x3ff) + 0xdc00;
    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;
    if ((param_4 & 1) == 0) {
      uVar5 = uVar5 * 0x100 | uVar5 >> 8;
      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;
    }
    *puVar1 = uVar5;
    *(ushort **)param_2 = puVar1 + 2;
    puVar1[1] = uVar3;
  }
LAB_0051dea9:
  *(long *)param_1 = lVar7;
  *(long *)(param_1 + 8) = lVar6;
  return '\x01';
}



char FUN_0051ddf0(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)

{
  ushort *puVar1;
  ushort uVar2;
  ushort uVar3;
  ulong uVar4;
  ushort uVar5;
  long lVar6;
  long lVar7;
  
  if ((param_4 & 4) != 0) {
    FUN_0051d970();
  }
  while( true ) {
    lVar7 = *param_1;
    lVar6 = param_1[1];
    if (lVar7 == lVar6) {
      return '\0';
    }
    while( true ) {
      if (*param_2 == param_2[1]) {
        return '\0';
      }
      uVar4 = FUN_0051c5d0(param_1,param_3);
      if ((uint)uVar4 == 0xfffffffe) {
        return (param_5 != 0) + '\x01';
      }
      if (param_3 < (uVar4 & 0xffffffff)) {
        return '\x02';
      }
      puVar1 = (ushort *)*param_2;
      uVar2 = (ushort)uVar4;
      if (0xffff < (uint)uVar4) break;
      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;
      lVar7 = *param_1;
      lVar6 = param_1[1];
      if ((param_4 & 1) == 0) {
        uVar2 = uVar2 << 8 | uVar2 >> 8;
      }
      *param_2 = (long)(puVar1 + 1);
      *puVar1 = uVar2;
      if (lVar7 == lVar6) {
        return '\0';
      }
    }
    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;
    uVar3 = (uVar2 & 0x3ff) + 0xdc00;
    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;
    if ((param_4 & 1) == 0) {
      uVar5 = uVar5 * 0x100 | uVar5 >> 8;
      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;
    }
    *puVar1 = uVar5;
    *param_2 = (long)(puVar1 + 2);
    puVar1[1] = uVar3;
  }
LAB_0051dea9:
  *param_1 = lVar7;
  param_1[1] = lVar6;
  return '\x01';
}


PUSH R15
MOV R15,RSI
PUSH R14
PUSH R13
MOV R13,RDI
PUSH R12
MOV R12D,ECX
PUSH RBP
MOV RBP,RDX
PUSH RBX
SUB RSP,0x8
AND ECX,0x4
MOV dword ptr [RSP + 0x4],R8D
JNZ 0x0051df00
AND R12D,0x1
MOV R14,qword ptr [R13]
MOV RBX,qword ptr [R13 + 0x8]
CMP R14,RBX
JZ 0x0051de87
MOV RAX,qword ptr [R15 + 0x8]
CMP qword ptr [R15],RAX
JZ 0x0051de87
MOV RSI,RBP
MOV RDI,R13
CALL 0x0051c5d0
CMP EAX,-0x2
JZ 0x0051df10
MOV EDX,EAX
CMP RDX,RBP
JA 0x0051df30
MOV RDX,qword ptr [R15]
MOV RCX,qword ptr [R15 + 0x8]
CMP EAX,0xffff
JA 0x0051dea0
CMP RCX,RDX
JZ 0x0051dea9
MOV ECX,EAX
MOV R14,qword ptr [R13]
MOV RBX,qword ptr [R13 + 0x8]
ROL CX,0x8
TEST R12D,R12D
CMOVZ EAX,ECX
LEA RCX,[RDX + 0x2]
MOV qword ptr [R15],RCX
MOV word ptr [RDX],AX
CMP R14,RBX
JNZ 0x0051de29
ADD RSP,0x8
XOR EAX,EAX
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
SUB RCX,RDX
CMP RCX,0x3
JA 0x0051dec8
MOV qword ptr [R13],R14
MOV EAX,0x1
MOV qword ptr [R13 + 0x8],RBX
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOV ECX,EAX
AND AX,0x3ff
SHR ECX,0xa
SUB AX,0x2400
SUB CX,0x2840
TEST R12D,R12D
JNZ 0x0051dee7
ROL CX,0x8
ROL AX,0x8
MOV word ptr [RDX],CX
LEA RCX,[RDX + 0x4]
MOV qword ptr [R15],RCX
MOV word ptr [RDX + 0x2],AX
JMP 0x0051de1c
CALL 0x0051d970
JMP 0x0051de18
MOV EDX,dword ptr [RSP + 0x4]
XOR EAX,EAX
TEST EDX,EDX
SETNZ AL
ADD RSP,0x8
POP RBX
ADD EAX,0x1
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
ADD RSP,0x8
MOV EAX,0x2
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
(translation_unit "char FUN_0051ddf0(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)\n\n{\n  ushort *puVar1;\n  ushort uVar2;\n  ushort uVar3;\n  ulong uVar4;\n  ushort uVar5;\n  long lVar6;\n  long lVar7;\n  \n  if ((param_4 & 4) != 0) {\n    FUN_0051d970();\n  }\n  while( true ) {\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }\nLAB_0051dea9:\n  *param_1 = lVar7;\n  param_1[1] = lVar6;\n  return '\x01';\n}\n\n" (function_definition "char FUN_0051ddf0(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)\n\n{\n  ushort *puVar1;\n  ushort uVar2;\n  ushort uVar3;\n  ulong uVar4;\n  ushort uVar5;\n  long lVar6;\n  long lVar7;\n  \n  if ((param_4 & 4) != 0) {\n    FUN_0051d970();\n  }\n  while( true ) {\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }\nLAB_0051dea9:\n  *param_1 = lVar7;\n  param_1[1] = lVar6;\n  return '\x01';\n}" primitive_type (function_declarator "FUN_0051ddf0(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)" identifier (parameter_list "(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)" ( (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) (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "ulong param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  ushort *puVar1;\n  ushort uVar2;\n  ushort uVar3;\n  ulong uVar4;\n  ushort uVar5;\n  long lVar6;\n  long lVar7;\n  \n  if ((param_4 & 4) != 0) {\n    FUN_0051d970();\n  }\n  while( true ) {\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }\nLAB_0051dea9:\n  *param_1 = lVar7;\n  param_1[1] = lVar6;\n  return '\x01';\n}" { (declaration "ushort *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "ushort uVar5;" type_identifier identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (if_statement "if ((param_4 & 4) != 0) {\n    FUN_0051d970();\n  }" if (parenthesized_expression "((param_4 & 4) != 0)" ( (binary_expression "(param_4 & 4) != 0" (parenthesized_expression "(param_4 & 4)" ( (binary_expression "param_4 & 4" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_0051d970();\n  }" { (expression_statement "FUN_0051d970();" (call_expression "FUN_0051d970()" identifier (argument_list "()" ( ))) ;) })) (while_statement "while( true ) {\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }" { (expression_statement "lVar7 = *param_1;" (assignment_expression "lVar7 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "lVar6 = param_1[1];" (assignment_expression "lVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (lVar7 == lVar6) {\n      return '\0';\n    }" if (parenthesized_expression "(lVar7 == lVar6)" ( (binary_expression "lVar7 == lVar6" identifier == identifier) )) (compound_statement "{\n      return '\0';\n    }" { (return_statement "return '\0';" return (char_literal "'\0'" ' escape_sequence ') ;) })) (while_statement "while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }" { (if_statement "if (*param_2 == param_2[1]) {\n        return '\0';\n      }" if (parenthesized_expression "(*param_2 == param_2[1])" ( (binary_expression "*param_2 == param_2[1]" (pointer_expression "*param_2" * identifier) == (subscript_expression "param_2[1]" identifier [ number_literal ])) )) (compound_statement "{\n        return '\0';\n      }" { (return_statement "return '\0';" return (char_literal "'\0'" ' escape_sequence ') ;) })) (expression_statement "uVar4 = FUN_0051c5d0(param_1,param_3);" (assignment_expression "uVar4 = FUN_0051c5d0(param_1,param_3)" identifier = (call_expression "FUN_0051c5d0(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier )))) ;) (if_statement "if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }" if (parenthesized_expression "((uint)uVar4 == 0xfffffffe)" ( (binary_expression "(uint)uVar4 == 0xfffffffe" (cast_expression "(uint)uVar4" ( (type_descriptor "uint" type_identifier) ) identifier) == number_literal) )) (compound_statement "{\n        return (param_5 != 0) + '\x01';\n      }" { (return_statement "return (param_5 != 0) + '\x01';" return (binary_expression "(param_5 != 0) + '\x01'" (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) + (char_literal "'\x01'" ' escape_sequence ')) ;) })) (if_statement "if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }" if (parenthesized_expression "(param_3 < (uVar4 & 0xffffffff))" ( (binary_expression "param_3 < (uVar4 & 0xffffffff)" identifier < (parenthesized_expression "(uVar4 & 0xffffffff)" ( (binary_expression "uVar4 & 0xffffffff" identifier & number_literal) ))) )) (compound_statement "{\n        return '\x02';\n      }" { (return_statement "return '\x02';" return (char_literal "'\x02'" ' escape_sequence ') ;) })) (expression_statement "puVar1 = (ushort *)*param_2;" (assignment_expression "puVar1 = (ushort *)*param_2" identifier = (cast_expression "(ushort *)*param_2" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "uVar2 = (ushort)uVar4;" (assignment_expression "uVar2 = (ushort)uVar4" identifier = (cast_expression "(ushort)uVar4" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (if_statement "if (0xffff < (uint)uVar4) break;" if (parenthesized_expression "(0xffff < (uint)uVar4)" ( (binary_expression "0xffff < (uint)uVar4" number_literal < (cast_expression "(uint)uVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (break_statement "break;" break ;)) (if_statement "if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;" if (parenthesized_expression "((ushort *)param_2[1] == puVar1)" ( (binary_expression "(ushort *)param_2[1] == puVar1" (cast_expression "(ushort *)param_2[1]" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_2[1]" identifier [ number_literal ])) == identifier) )) (goto_statement "goto LAB_0051dea9;" goto statement_identifier ;)) (expression_statement "lVar7 = *param_1;" (assignment_expression "lVar7 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "lVar6 = param_1[1];" (assignment_expression "lVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }" if (parenthesized_expression "((param_4 & 1) == 0)" ( (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }" { (expression_statement "uVar2 = uVar2 << 8 | uVar2 >> 8;" (assignment_expression "uVar2 = uVar2 << 8 | uVar2 >> 8" identifier = (binary_expression "uVar2 << 8 | uVar2 >> 8" (binary_expression "uVar2 << 8" identifier << number_literal) | (binary_expression "uVar2 >> 8" identifier >> number_literal))) ;) })) (expression_statement "*param_2 = (long)(puVar1 + 1);" (assignment_expression "*param_2 = (long)(puVar1 + 1)" (pointer_expression "*param_2" * 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 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (if_statement "if (lVar7 == lVar6) {\n        return '\0';\n      }" if (parenthesized_expression "(lVar7 == lVar6)" ( (binary_expression "lVar7 == lVar6" identifier == identifier) )) (compound_statement "{\n        return '\0';\n      }" { (return_statement "return '\0';" return (char_literal "'\0'" ' escape_sequence ') ;) })) })) (if_statement "if ((ulong)(param_2[1] - (long)puVar1) < 4) break;" if (parenthesized_expression "((ulong)(param_2[1] - (long)puVar1) < 4)" ( (binary_expression "(ulong)(param_2[1] - (long)puVar1) < 4" (call_expression "(ulong)(param_2[1] - (long)puVar1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(param_2[1] - (long)puVar1)" ( (binary_expression "param_2[1] - (long)puVar1" (subscript_expression "param_2[1]" identifier [ number_literal ]) - (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar3 = (uVar2 & 0x3ff) + 0xdc00;" (assignment_expression "uVar3 = (uVar2 & 0x3ff) + 0xdc00" identifier = (binary_expression "(uVar2 & 0x3ff) + 0xdc00" (parenthesized_expression "(uVar2 & 0x3ff)" ( (binary_expression "uVar2 & 0x3ff" identifier & number_literal) )) + number_literal)) ;) (expression_statement "uVar5 = (short)(uVar4 >> 10) + 0xd7c0;" (assignment_expression "uVar5 = (short)(uVar4 >> 10) + 0xd7c0" identifier = (binary_expression "(short)(uVar4 >> 10) + 0xd7c0" (cast_expression "(short)(uVar4 >> 10)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "(uVar4 >> 10)" ( (binary_expression "uVar4 >> 10" identifier >> number_literal) ))) + number_literal)) ;) (if_statement "if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }" if (parenthesized_expression "((param_4 & 1) == 0)" ( (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }" { (expression_statement "uVar5 = uVar5 * 0x100 | uVar5 >> 8;" (assignment_expression "uVar5 = uVar5 * 0x100 | uVar5 >> 8" identifier = (binary_expression "uVar5 * 0x100 | uVar5 >> 8" (binary_expression "uVar5 * 0x100" identifier * number_literal) | (binary_expression "uVar5 >> 8" identifier >> number_literal))) ;) (expression_statement "uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;" (assignment_expression "uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8" identifier = (binary_expression "(uVar2 & 0x3ff) << 8 | uVar3 >> 8" (binary_expression "(uVar2 & 0x3ff) << 8" (parenthesized_expression "(uVar2 & 0x3ff)" ( (binary_expression "uVar2 & 0x3ff" identifier & number_literal) )) << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) })) (expression_statement "*puVar1 = uVar5;" (assignment_expression "*puVar1 = uVar5" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*param_2 = (long)(puVar1 + 2);" (assignment_expression "*param_2 = (long)(puVar1 + 2)" (pointer_expression "*param_2" * identifier) = (cast_expression "(long)(puVar1 + 2)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(puVar1 + 2)" ( (binary_expression "puVar1 + 2" identifier + number_literal) )))) ;) (expression_statement "puVar1[1] = uVar3;" (assignment_expression "puVar1[1] = uVar3" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) })) (labeled_statement "LAB_0051dea9:\n  *param_1 = lVar7;" statement_identifier : (expression_statement "*param_1 = lVar7;" (assignment_expression "*param_1 = lVar7" (pointer_expression "*param_1" * identifier) = identifier) ;)) (expression_statement "param_1[1] = lVar6;" (assignment_expression "param_1[1] = lVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return '\x01';" return (char_literal "'\x01'" ' escape_sequence ') ;) })))
(translation_unit "/* std::codecvt_base::result std::(anonymous namespace)::utf16_in<char16_t>(std::(anonymous\n   namespace)::range<char const, true>&, std::(anonymous namespace)::range<char16_t, true>&,\n   unsigned long, std::codecvt_mode, std::(anonymous namespace)::surrogates) */\n\nchar std::(anonymous_namespace)::utf16_in<char16_t>\n               (range *param_1,unsigned_char *param_2,ulong param_3,uint param_4,int param_5)\n\n{\n  ushort *puVar1;\n  ushort uVar2;\n  ushort uVar3;\n  ulong uVar4;\n  ushort uVar5;\n  long lVar6;\n  long lVar7;\n  \n  if ((param_4 & 4) != 0) {\n    read_bom<char_const,true,3ul>(param_1,param_2);\n  }\n  while( true ) {\n    lVar7 = *(long *)param_1;\n    lVar6 = *(long *)(param_1 + 8);\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*(long *)param_2 == *(long *)(param_2 + 8)) {\n        return '\0';\n      }\n      uVar4 = read_utf8_code_point(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = *(ushort **)param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if (*(ushort **)(param_2 + 8) == puVar1) goto LAB_0051dea9;\n      lVar7 = *(long *)param_1;\n      lVar6 = *(long *)(param_1 + 8);\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *(ushort **)param_2 = puVar1 + 1;\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)((long)*(ushort **)(param_2 + 8) - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *(ushort **)param_2 = puVar1 + 2;\n    puVar1[1] = uVar3;\n  }\nLAB_0051dea9:\n  *(long *)param_1 = lVar7;\n  *(long *)(param_1 + 8) = lVar6;\n  return '\x01';\n}\n\n" comment (function_definition "char std::(anonymous_namespace)::utf16_in<char16_t>\n               (range *param_1,unsigned_char *param_2,ulong param_3,uint param_4,int param_5)\n\n{\n  ushort *puVar1;\n  ushort uVar2;\n  ushort uVar3;\n  ulong uVar4;\n  ushort uVar5;\n  long lVar6;\n  long lVar7;\n  \n  if ((param_4 & 4) != 0) {\n    read_bom<char_const,true,3ul>(param_1,param_2);\n  }\n  while( true ) {\n    lVar7 = *(long *)param_1;\n    lVar6 = *(long *)(param_1 + 8);\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*(long *)param_2 == *(long *)(param_2 + 8)) {\n        return '\0';\n      }\n      uVar4 = read_utf8_code_point(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = *(ushort **)param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if (*(ushort **)(param_2 + 8) == puVar1) goto LAB_0051dea9;\n      lVar7 = *(long *)param_1;\n      lVar6 = *(long *)(param_1 + 8);\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *(ushort **)param_2 = puVar1 + 1;\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)((long)*(ushort **)(param_2 + 8) - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *(ushort **)param_2 = puVar1 + 2;\n    puVar1[1] = uVar3;\n  }\nLAB_0051dea9:\n  *(long *)param_1 = lVar7;\n  *(long *)(param_1 + 8) = lVar6;\n  return '\x01';\n}" primitive_type (ERROR "std::(anonymous_namespace)::" identifier : : ( identifier ) : :) (function_declarator "utf16_in<char16_t>\n               (range *param_1,unsigned_char *param_2,ulong param_3,uint param_4,int param_5)" identifier (ERROR "<char16_t>" < primitive_type >) (parameter_list "(range *param_1,unsigned_char *param_2,ulong param_3,uint param_4,int param_5)" ( (parameter_declaration "range *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "unsigned_char *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "ulong param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  ushort *puVar1;\n  ushort uVar2;\n  ushort uVar3;\n  ulong uVar4;\n  ushort uVar5;\n  long lVar6;\n  long lVar7;\n  \n  if ((param_4 & 4) != 0) {\n    read_bom<char_const,true,3ul>(param_1,param_2);\n  }\n  while( true ) {\n    lVar7 = *(long *)param_1;\n    lVar6 = *(long *)(param_1 + 8);\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*(long *)param_2 == *(long *)(param_2 + 8)) {\n        return '\0';\n      }\n      uVar4 = read_utf8_code_point(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = *(ushort **)param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if (*(ushort **)(param_2 + 8) == puVar1) goto LAB_0051dea9;\n      lVar7 = *(long *)param_1;\n      lVar6 = *(long *)(param_1 + 8);\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *(ushort **)param_2 = puVar1 + 1;\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)((long)*(ushort **)(param_2 + 8) - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *(ushort **)param_2 = puVar1 + 2;\n    puVar1[1] = uVar3;\n  }\nLAB_0051dea9:\n  *(long *)param_1 = lVar7;\n  *(long *)(param_1 + 8) = lVar6;\n  return '\x01';\n}" { (declaration "ushort *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "ushort uVar5;" type_identifier identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (if_statement "if ((param_4 & 4) != 0) {\n    read_bom<char_const,true,3ul>(param_1,param_2);\n  }" if (parenthesized_expression "((param_4 & 4) != 0)" ( (binary_expression "(param_4 & 4) != 0" (parenthesized_expression "(param_4 & 4)" ( (binary_expression "param_4 & 4" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    read_bom<char_const,true,3ul>(param_1,param_2);\n  }" { (expression_statement "read_bom<char_const,true,3ul>(param_1,param_2);" (comma_expression "read_bom<char_const,true,3ul>(param_1,param_2)" (binary_expression "read_bom<char_const" identifier < identifier) , (comma_expression "true,3ul>(param_1,param_2)" true , (binary_expression "3ul>(param_1,param_2)" number_literal > (parenthesized_expression "(param_1,param_2)" ( (comma_expression "param_1,param_2" identifier , identifier) ))))) ;) })) (while_statement "while( true ) {\n    lVar7 = *(long *)param_1;\n    lVar6 = *(long *)(param_1 + 8);\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*(long *)param_2 == *(long *)(param_2 + 8)) {\n        return '\0';\n      }\n      uVar4 = read_utf8_code_point(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = *(ushort **)param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if (*(ushort **)(param_2 + 8) == puVar1) goto LAB_0051dea9;\n      lVar7 = *(long *)param_1;\n      lVar6 = *(long *)(param_1 + 8);\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *(ushort **)param_2 = puVar1 + 1;\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)((long)*(ushort **)(param_2 + 8) - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *(ushort **)param_2 = puVar1 + 2;\n    puVar1[1] = uVar3;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    lVar7 = *(long *)param_1;\n    lVar6 = *(long *)(param_1 + 8);\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*(long *)param_2 == *(long *)(param_2 + 8)) {\n        return '\0';\n      }\n      uVar4 = read_utf8_code_point(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = *(ushort **)param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if (*(ushort **)(param_2 + 8) == puVar1) goto LAB_0051dea9;\n      lVar7 = *(long *)param_1;\n      lVar6 = *(long *)(param_1 + 8);\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *(ushort **)param_2 = puVar1 + 1;\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)((long)*(ushort **)(param_2 + 8) - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *(ushort **)param_2 = puVar1 + 2;\n    puVar1[1] = uVar3;\n  }" { (expression_statement "lVar7 = *(long *)param_1;" (assignment_expression "lVar7 = *(long *)param_1" identifier = (pointer_expression "*(long *)param_1" * (cast_expression "(long *)param_1" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "lVar6 = *(long *)(param_1 + 8);" (assignment_expression "lVar6 = *(long *)(param_1 + 8)" identifier = (pointer_expression "*(long *)(param_1 + 8)" * (cast_expression "(long *)(param_1 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (if_statement "if (lVar7 == lVar6) {\n      return '\0';\n    }" if (parenthesized_expression "(lVar7 == lVar6)" ( (binary_expression "lVar7 == lVar6" identifier == identifier) )) (compound_statement "{\n      return '\0';\n    }" { (return_statement "return '\0';" return (char_literal "'\0'" ' escape_sequence ') ;) })) (while_statement "while( true ) {\n      if (*(long *)param_2 == *(long *)(param_2 + 8)) {\n        return '\0';\n      }\n      uVar4 = read_utf8_code_point(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = *(ushort **)param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if (*(ushort **)(param_2 + 8) == puVar1) goto LAB_0051dea9;\n      lVar7 = *(long *)param_1;\n      lVar6 = *(long *)(param_1 + 8);\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *(ushort **)param_2 = puVar1 + 1;\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      if (*(long *)param_2 == *(long *)(param_2 + 8)) {\n        return '\0';\n      }\n      uVar4 = read_utf8_code_point(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = *(ushort **)param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if (*(ushort **)(param_2 + 8) == puVar1) goto LAB_0051dea9;\n      lVar7 = *(long *)param_1;\n      lVar6 = *(long *)(param_1 + 8);\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *(ushort **)param_2 = puVar1 + 1;\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }" { (if_statement "if (*(long *)param_2 == *(long *)(param_2 + 8)) {\n        return '\0';\n      }" if (parenthesized_expression "(*(long *)param_2 == *(long *)(param_2 + 8))" ( (binary_expression "*(long *)param_2 == *(long *)(param_2 + 8)" (pointer_expression "*(long *)param_2" * (cast_expression "(long *)param_2" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) == (pointer_expression "*(long *)(param_2 + 8)" * (cast_expression "(long *)(param_2 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) )) (compound_statement "{\n        return '\0';\n      }" { (return_statement "return '\0';" return (char_literal "'\0'" ' escape_sequence ') ;) })) (expression_statement "uVar4 = read_utf8_code_point(param_1,param_3);" (assignment_expression "uVar4 = read_utf8_code_point(param_1,param_3)" identifier = (call_expression "read_utf8_code_point(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier )))) ;) (if_statement "if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }" if (parenthesized_expression "((uint)uVar4 == 0xfffffffe)" ( (binary_expression "(uint)uVar4 == 0xfffffffe" (cast_expression "(uint)uVar4" ( (type_descriptor "uint" type_identifier) ) identifier) == number_literal) )) (compound_statement "{\n        return (param_5 != 0) + '\x01';\n      }" { (return_statement "return (param_5 != 0) + '\x01';" return (binary_expression "(param_5 != 0) + '\x01'" (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) + (char_literal "'\x01'" ' escape_sequence ')) ;) })) (if_statement "if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }" if (parenthesized_expression "(param_3 < (uVar4 & 0xffffffff))" ( (binary_expression "param_3 < (uVar4 & 0xffffffff)" identifier < (parenthesized_expression "(uVar4 & 0xffffffff)" ( (binary_expression "uVar4 & 0xffffffff" identifier & number_literal) ))) )) (compound_statement "{\n        return '\x02';\n      }" { (return_statement "return '\x02';" return (char_literal "'\x02'" ' escape_sequence ') ;) })) (expression_statement "puVar1 = *(ushort **)param_2;" (assignment_expression "puVar1 = *(ushort **)param_2" identifier = (pointer_expression "*(ushort **)param_2" * (cast_expression "(ushort **)param_2" ( (type_descriptor "ushort **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier))) ;) (expression_statement "uVar2 = (ushort)uVar4;" (assignment_expression "uVar2 = (ushort)uVar4" identifier = (cast_expression "(ushort)uVar4" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (if_statement "if (0xffff < (uint)uVar4) break;" if (parenthesized_expression "(0xffff < (uint)uVar4)" ( (binary_expression "0xffff < (uint)uVar4" number_literal < (cast_expression "(uint)uVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (break_statement "break;" break ;)) (if_statement "if (*(ushort **)(param_2 + 8) == puVar1) goto LAB_0051dea9;" if (parenthesized_expression "(*(ushort **)(param_2 + 8) == puVar1)" ( (binary_expression "*(ushort **)(param_2 + 8) == puVar1" (pointer_expression "*(ushort **)(param_2 + 8)" * (cast_expression "(ushort **)(param_2 + 8)" ( (type_descriptor "ushort **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) )))) == identifier) )) (goto_statement "goto LAB_0051dea9;" goto statement_identifier ;)) (expression_statement "lVar7 = *(long *)param_1;" (assignment_expression "lVar7 = *(long *)param_1" identifier = (pointer_expression "*(long *)param_1" * (cast_expression "(long *)param_1" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "lVar6 = *(long *)(param_1 + 8);" (assignment_expression "lVar6 = *(long *)(param_1 + 8)" identifier = (pointer_expression "*(long *)(param_1 + 8)" * (cast_expression "(long *)(param_1 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (if_statement "if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }" if (parenthesized_expression "((param_4 & 1) == 0)" ( (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }" { (expression_statement "uVar2 = uVar2 << 8 | uVar2 >> 8;" (assignment_expression "uVar2 = uVar2 << 8 | uVar2 >> 8" identifier = (binary_expression "uVar2 << 8 | uVar2 >> 8" (binary_expression "uVar2 << 8" identifier << number_literal) | (binary_expression "uVar2 >> 8" identifier >> number_literal))) ;) })) (expression_statement "*(ushort **)param_2 = puVar1 + 1;" (assignment_expression "*(ushort **)param_2 = puVar1 + 1" (pointer_expression "*(ushort **)param_2" * (cast_expression "(ushort **)param_2" ( (type_descriptor "ushort **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = (binary_expression "puVar1 + 1" identifier + number_literal)) ;) (expression_statement "*puVar1 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (if_statement "if (lVar7 == lVar6) {\n        return '\0';\n      }" if (parenthesized_expression "(lVar7 == lVar6)" ( (binary_expression "lVar7 == lVar6" identifier == identifier) )) (compound_statement "{\n        return '\0';\n      }" { (return_statement "return '\0';" return (char_literal "'\0'" ' escape_sequence ') ;) })) })) (if_statement "if ((ulong)((long)*(ushort **)(param_2 + 8) - (long)puVar1) < 4) break;" if (parenthesized_expression "((ulong)((long)*(ushort **)(param_2 + 8) - (long)puVar1) < 4)" ( (binary_expression "(ulong)((long)*(ushort **)(param_2 + 8) - (long)puVar1) < 4" (call_expression "(ulong)((long)*(ushort **)(param_2 + 8) - (long)puVar1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "((long)*(ushort **)(param_2 + 8) - (long)puVar1)" ( (binary_expression "(long)*(ushort **)(param_2 + 8) - (long)puVar1" (cast_expression "(long)*(ushort **)(param_2 + 8)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*(ushort **)(param_2 + 8)" * (cast_expression "(ushort **)(param_2 + 8)" ( (type_descriptor "ushort **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_2 + 8)" ( (binary_expression "param_2 + 8" identifier + number_literal) ))))) - (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar3 = (uVar2 & 0x3ff) + 0xdc00;" (assignment_expression "uVar3 = (uVar2 & 0x3ff) + 0xdc00" identifier = (binary_expression "(uVar2 & 0x3ff) + 0xdc00" (parenthesized_expression "(uVar2 & 0x3ff)" ( (binary_expression "uVar2 & 0x3ff" identifier & number_literal) )) + number_literal)) ;) (expression_statement "uVar5 = (short)(uVar4 >> 10) + 0xd7c0;" (assignment_expression "uVar5 = (short)(uVar4 >> 10) + 0xd7c0" identifier = (binary_expression "(short)(uVar4 >> 10) + 0xd7c0" (cast_expression "(short)(uVar4 >> 10)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "(uVar4 >> 10)" ( (binary_expression "uVar4 >> 10" identifier >> number_literal) ))) + number_literal)) ;) (if_statement "if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }" if (parenthesized_expression "((param_4 & 1) == 0)" ( (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }" { (expression_statement "uVar5 = uVar5 * 0x100 | uVar5 >> 8;" (assignment_expression "uVar5 = uVar5 * 0x100 | uVar5 >> 8" identifier = (binary_expression "uVar5 * 0x100 | uVar5 >> 8" (binary_expression "uVar5 * 0x100" identifier * number_literal) | (binary_expression "uVar5 >> 8" identifier >> number_literal))) ;) (expression_statement "uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;" (assignment_expression "uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8" identifier = (binary_expression "(uVar2 & 0x3ff) << 8 | uVar3 >> 8" (binary_expression "(uVar2 & 0x3ff) << 8" (parenthesized_expression "(uVar2 & 0x3ff)" ( (binary_expression "uVar2 & 0x3ff" identifier & number_literal) )) << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) })) (expression_statement "*puVar1 = uVar5;" (assignment_expression "*puVar1 = uVar5" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*(ushort **)param_2 = puVar1 + 2;" (assignment_expression "*(ushort **)param_2 = puVar1 + 2" (pointer_expression "*(ushort **)param_2" * (cast_expression "(ushort **)param_2" ( (type_descriptor "ushort **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) identifier)) = (binary_expression "puVar1 + 2" identifier + number_literal)) ;) (expression_statement "puVar1[1] = uVar3;" (assignment_expression "puVar1[1] = uVar3" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) })) (labeled_statement "LAB_0051dea9:\n  *(long *)param_1 = lVar7;" statement_identifier : (expression_statement "*(long *)param_1 = lVar7;" (assignment_expression "*(long *)param_1 = lVar7" (pointer_expression "*(long *)param_1" * (cast_expression "(long *)param_1" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) identifier)) = identifier) ;)) (expression_statement "*(long *)(param_1 + 8) = lVar6;" (assignment_expression "*(long *)(param_1 + 8) = lVar6" (pointer_expression "*(long *)(param_1 + 8)" * (cast_expression "(long *)(param_1 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (return_statement "return '\x01';" return (char_literal "'\x01'" ' escape_sequence ') ;) })))
(translation_unit "char FUN_0051ddf0(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)\n\n{\n  ushort *puVar1;\n  ushort uVar2;\n  ushort uVar3;\n  ulong uVar4;\n  ushort uVar5;\n  long lVar6;\n  long lVar7;\n  \n  if ((param_4 & 4) != 0) {\n    FUN_0051d970();\n  }\n  while( true ) {\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }\nLAB_0051dea9:\n  *param_1 = lVar7;\n  param_1[1] = lVar6;\n  return '\x01';\n}\n\n" (function_definition "char FUN_0051ddf0(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)\n\n{\n  ushort *puVar1;\n  ushort uVar2;\n  ushort uVar3;\n  ulong uVar4;\n  ushort uVar5;\n  long lVar6;\n  long lVar7;\n  \n  if ((param_4 & 4) != 0) {\n    FUN_0051d970();\n  }\n  while( true ) {\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }\nLAB_0051dea9:\n  *param_1 = lVar7;\n  param_1[1] = lVar6;\n  return '\x01';\n}" primitive_type (function_declarator "FUN_0051ddf0(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)" identifier (parameter_list "(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)" ( (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) (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "ulong param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) , (parameter_declaration "int param_5" primitive_type identifier) ))) (compound_statement "{\n  ushort *puVar1;\n  ushort uVar2;\n  ushort uVar3;\n  ulong uVar4;\n  ushort uVar5;\n  long lVar6;\n  long lVar7;\n  \n  if ((param_4 & 4) != 0) {\n    FUN_0051d970();\n  }\n  while( true ) {\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }\nLAB_0051dea9:\n  *param_1 = lVar7;\n  param_1[1] = lVar6;\n  return '\x01';\n}" { (declaration "ushort *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "ushort uVar2;" type_identifier identifier ;) (declaration "ushort uVar3;" type_identifier identifier ;) (declaration "ulong uVar4;" type_identifier identifier ;) (declaration "ushort uVar5;" type_identifier identifier ;) (declaration "long lVar6;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar7;" (sized_type_specifier "long" long) identifier ;) (if_statement "if ((param_4 & 4) != 0) {\n    FUN_0051d970();\n  }" if (parenthesized_expression "((param_4 & 4) != 0)" ( (binary_expression "(param_4 & 4) != 0" (parenthesized_expression "(param_4 & 4)" ( (binary_expression "param_4 & 4" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    FUN_0051d970();\n  }" { (expression_statement "FUN_0051d970();" (call_expression "FUN_0051d970()" identifier (argument_list "()" ( ))) ;) })) (while_statement "while( true ) {\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }" { (expression_statement "lVar7 = *param_1;" (assignment_expression "lVar7 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "lVar6 = param_1[1];" (assignment_expression "lVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if (lVar7 == lVar6) {\n      return '\0';\n    }" if (parenthesized_expression "(lVar7 == lVar6)" ( (binary_expression "lVar7 == lVar6" identifier == identifier) )) (compound_statement "{\n      return '\0';\n    }" { (return_statement "return '\0';" return (char_literal "'\0'" ' escape_sequence ') ;) })) (while_statement "while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }" { (if_statement "if (*param_2 == param_2[1]) {\n        return '\0';\n      }" if (parenthesized_expression "(*param_2 == param_2[1])" ( (binary_expression "*param_2 == param_2[1]" (pointer_expression "*param_2" * identifier) == (subscript_expression "param_2[1]" identifier [ number_literal ])) )) (compound_statement "{\n        return '\0';\n      }" { (return_statement "return '\0';" return (char_literal "'\0'" ' escape_sequence ') ;) })) (expression_statement "uVar4 = FUN_0051c5d0(param_1,param_3);" (assignment_expression "uVar4 = FUN_0051c5d0(param_1,param_3)" identifier = (call_expression "FUN_0051c5d0(param_1,param_3)" identifier (argument_list "(param_1,param_3)" ( identifier , identifier )))) ;) (if_statement "if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }" if (parenthesized_expression "((uint)uVar4 == 0xfffffffe)" ( (binary_expression "(uint)uVar4 == 0xfffffffe" (cast_expression "(uint)uVar4" ( (type_descriptor "uint" type_identifier) ) identifier) == number_literal) )) (compound_statement "{\n        return (param_5 != 0) + '\x01';\n      }" { (return_statement "return (param_5 != 0) + '\x01';" return (binary_expression "(param_5 != 0) + '\x01'" (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) + (char_literal "'\x01'" ' escape_sequence ')) ;) })) (if_statement "if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }" if (parenthesized_expression "(param_3 < (uVar4 & 0xffffffff))" ( (binary_expression "param_3 < (uVar4 & 0xffffffff)" identifier < (parenthesized_expression "(uVar4 & 0xffffffff)" ( (binary_expression "uVar4 & 0xffffffff" identifier & number_literal) ))) )) (compound_statement "{\n        return '\x02';\n      }" { (return_statement "return '\x02';" return (char_literal "'\x02'" ' escape_sequence ') ;) })) (expression_statement "puVar1 = (ushort *)*param_2;" (assignment_expression "puVar1 = (ushort *)*param_2" identifier = (cast_expression "(ushort *)*param_2" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_2" * identifier))) ;) (expression_statement "uVar2 = (ushort)uVar4;" (assignment_expression "uVar2 = (ushort)uVar4" identifier = (cast_expression "(ushort)uVar4" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (if_statement "if (0xffff < (uint)uVar4) break;" if (parenthesized_expression "(0xffff < (uint)uVar4)" ( (binary_expression "0xffff < (uint)uVar4" number_literal < (cast_expression "(uint)uVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (break_statement "break;" break ;)) (if_statement "if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;" if (parenthesized_expression "((ushort *)param_2[1] == puVar1)" ( (binary_expression "(ushort *)param_2[1] == puVar1" (cast_expression "(ushort *)param_2[1]" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_2[1]" identifier [ number_literal ])) == identifier) )) (goto_statement "goto LAB_0051dea9;" goto statement_identifier ;)) (expression_statement "lVar7 = *param_1;" (assignment_expression "lVar7 = *param_1" identifier = (pointer_expression "*param_1" * identifier)) ;) (expression_statement "lVar6 = param_1[1];" (assignment_expression "lVar6 = param_1[1]" identifier = (subscript_expression "param_1[1]" identifier [ number_literal ])) ;) (if_statement "if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }" if (parenthesized_expression "((param_4 & 1) == 0)" ( (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }" { (expression_statement "uVar2 = uVar2 << 8 | uVar2 >> 8;" (assignment_expression "uVar2 = uVar2 << 8 | uVar2 >> 8" identifier = (binary_expression "uVar2 << 8 | uVar2 >> 8" (binary_expression "uVar2 << 8" identifier << number_literal) | (binary_expression "uVar2 >> 8" identifier >> number_literal))) ;) })) (expression_statement "*param_2 = (long)(puVar1 + 1);" (assignment_expression "*param_2 = (long)(puVar1 + 1)" (pointer_expression "*param_2" * 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 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" * identifier) = identifier) ;) (if_statement "if (lVar7 == lVar6) {\n        return '\0';\n      }" if (parenthesized_expression "(lVar7 == lVar6)" ( (binary_expression "lVar7 == lVar6" identifier == identifier) )) (compound_statement "{\n        return '\0';\n      }" { (return_statement "return '\0';" return (char_literal "'\0'" ' escape_sequence ') ;) })) })) (if_statement "if ((ulong)(param_2[1] - (long)puVar1) < 4) break;" if (parenthesized_expression "((ulong)(param_2[1] - (long)puVar1) < 4)" ( (binary_expression "(ulong)(param_2[1] - (long)puVar1) < 4" (call_expression "(ulong)(param_2[1] - (long)puVar1)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(param_2[1] - (long)puVar1)" ( (binary_expression "param_2[1] - (long)puVar1" (subscript_expression "param_2[1]" identifier [ number_literal ]) - (cast_expression "(long)puVar1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) ))) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "uVar3 = (uVar2 & 0x3ff) + 0xdc00;" (assignment_expression "uVar3 = (uVar2 & 0x3ff) + 0xdc00" identifier = (binary_expression "(uVar2 & 0x3ff) + 0xdc00" (parenthesized_expression "(uVar2 & 0x3ff)" ( (binary_expression "uVar2 & 0x3ff" identifier & number_literal) )) + number_literal)) ;) (expression_statement "uVar5 = (short)(uVar4 >> 10) + 0xd7c0;" (assignment_expression "uVar5 = (short)(uVar4 >> 10) + 0xd7c0" identifier = (binary_expression "(short)(uVar4 >> 10) + 0xd7c0" (cast_expression "(short)(uVar4 >> 10)" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (parenthesized_expression "(uVar4 >> 10)" ( (binary_expression "uVar4 >> 10" identifier >> number_literal) ))) + number_literal)) ;) (if_statement "if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }" if (parenthesized_expression "((param_4 & 1) == 0)" ( (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" ( (binary_expression "param_4 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }" { (expression_statement "uVar5 = uVar5 * 0x100 | uVar5 >> 8;" (assignment_expression "uVar5 = uVar5 * 0x100 | uVar5 >> 8" identifier = (binary_expression "uVar5 * 0x100 | uVar5 >> 8" (binary_expression "uVar5 * 0x100" identifier * number_literal) | (binary_expression "uVar5 >> 8" identifier >> number_literal))) ;) (expression_statement "uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;" (assignment_expression "uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8" identifier = (binary_expression "(uVar2 & 0x3ff) << 8 | uVar3 >> 8" (binary_expression "(uVar2 & 0x3ff) << 8" (parenthesized_expression "(uVar2 & 0x3ff)" ( (binary_expression "uVar2 & 0x3ff" identifier & number_literal) )) << number_literal) | (binary_expression "uVar3 >> 8" identifier >> number_literal))) ;) })) (expression_statement "*puVar1 = uVar5;" (assignment_expression "*puVar1 = uVar5" (pointer_expression "*puVar1" * identifier) = identifier) ;) (expression_statement "*param_2 = (long)(puVar1 + 2);" (assignment_expression "*param_2 = (long)(puVar1 + 2)" (pointer_expression "*param_2" * identifier) = (cast_expression "(long)(puVar1 + 2)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(puVar1 + 2)" ( (binary_expression "puVar1 + 2" identifier + number_literal) )))) ;) (expression_statement "puVar1[1] = uVar3;" (assignment_expression "puVar1[1] = uVar3" (subscript_expression "puVar1[1]" identifier [ number_literal ]) = identifier) ;) })) (labeled_statement "LAB_0051dea9:\n  *param_1 = lVar7;" statement_identifier : (expression_statement "*param_1 = lVar7;" (assignment_expression "*param_1 = lVar7" (pointer_expression "*param_1" * identifier) = identifier) ;)) (expression_statement "param_1[1] = lVar6;" (assignment_expression "param_1[1] = lVar6" (subscript_expression "param_1[1]" identifier [ number_literal ]) = identifier) ;) (return_statement "return '\x01';" return (char_literal "'\x01'" ' escape_sequence ') ;) })))
(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) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return (char_literal ' escape_sequence ') ;) })) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == (subscript_expression IDENT [ LIT ])) )) (compound_statement { (return_statement return (char_literal ' escape_sequence ') ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) == LIT) )) (compound_statement { (return_statement return (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) + (char_literal ' escape_sequence ')) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (parenthesized_expression ( (binary_expression IDENT & LIT) ))) )) (compound_statement { (return_statement return (char_literal ' escape_sequence ') ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) == IDENT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (subscript_expression IDENT [ LIT ])) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT << LIT) | (binary_expression IDENT >> LIT))) ;) })) (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) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (return_statement return (char_literal ' escape_sequence ') ;) })) })) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) ))) < LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) ))) + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT * LIT) | (binary_expression IDENT >> LIT))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT) | (binary_expression IDENT >> LIT))) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = 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 (subscript_expression IDENT [ LIT ]) = IDENT) ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;)) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (return_statement return (char_literal ' escape_sequence ') ;) })))
(function_definition "char FUN_0051ddf0(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)\n\n{\n  ushort *puVar1;\n  ushort uVar2;\n  ushort uVar3;\n  ulong uVar4;\n  ushort uVar5;\n  long lVar6;\n  long lVar7;\n  \n  if ((param_4 & 4) != 0) {\n    FUN_0051d970();\n  }\n  while( true ) {\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }\nLAB_0051dea9:\n  *param_1 = lVar7;\n  param_1[1] = lVar6;\n  return '\x01';\n}" (primitive_type "char") (function_declarator "FUN_0051ddf0(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)" (identifier "FUN_0051ddf0") (parameter_list "(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)" (( "(") (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")) (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "ulong param_3" (type_identifier "ulong") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) (, ",") (parameter_declaration "int param_5" (primitive_type "int") (identifier "param_5")) () ")"))) (compound_statement "{\n  ushort *puVar1;\n  ushort uVar2;\n  ushort uVar3;\n  ulong uVar4;\n  ushort uVar5;\n  long lVar6;\n  long lVar7;\n  \n  if ((param_4 & 4) != 0) {\n    FUN_0051d970();\n  }\n  while( true ) {\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }\nLAB_0051dea9:\n  *param_1 = lVar7;\n  param_1[1] = lVar6;\n  return '\x01';\n}" ({ "{") (declaration "ushort *puVar1;" (type_identifier "ushort") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "ushort uVar2;" (type_identifier "ushort") (identifier "uVar2") (; ";")) (declaration "ushort uVar3;" (type_identifier "ushort") (identifier "uVar3") (; ";")) (declaration "ulong uVar4;" (type_identifier "ulong") (identifier "uVar4") (; ";")) (declaration "ushort uVar5;" (type_identifier "ushort") (identifier "uVar5") (; ";")) (declaration "long lVar6;" (sized_type_specifier "long" (long "long")) (identifier "lVar6") (; ";")) (declaration "long lVar7;" (sized_type_specifier "long" (long "long")) (identifier "lVar7") (; ";")) (if_statement "if ((param_4 & 4) != 0) {\n    FUN_0051d970();\n  }" (if "if") (parenthesized_expression "((param_4 & 4) != 0)" (( "(") (binary_expression "(param_4 & 4) != 0" (parenthesized_expression "(param_4 & 4)" (( "(") (binary_expression "param_4 & 4" (identifier "param_4") (& "&") (number_literal "4")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    FUN_0051d970();\n  }" ({ "{") (expression_statement "FUN_0051d970();" (call_expression "FUN_0051d970()" (identifier "FUN_0051d970") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (while_statement "while( true ) {\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    lVar7 = *param_1;\n    lVar6 = param_1[1];\n    if (lVar7 == lVar6) {\n      return '\0';\n    }\n    while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }\n    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;\n    uVar3 = (uVar2 & 0x3ff) + 0xdc00;\n    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;\n    if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }\n    *puVar1 = uVar5;\n    *param_2 = (long)(puVar1 + 2);\n    puVar1[1] = uVar3;\n  }" ({ "{") (expression_statement "lVar7 = *param_1;" (assignment_expression "lVar7 = *param_1" (identifier "lVar7") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "lVar6 = param_1[1];" (assignment_expression "lVar6 = param_1[1]" (identifier "lVar6") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if (lVar7 == lVar6) {\n      return '\0';\n    }" (if "if") (parenthesized_expression "(lVar7 == lVar6)" (( "(") (binary_expression "lVar7 == lVar6" (identifier "lVar7") (== "==") (identifier "lVar6")) () ")")) (compound_statement "{\n      return '\0';\n    }" ({ "{") (return_statement "return '\0';" (return "return") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")) (; ";")) (} "}"))) (while_statement "while( true ) {\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n      if (*param_2 == param_2[1]) {\n        return '\0';\n      }\n      uVar4 = FUN_0051c5d0(param_1,param_3);\n      if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }\n      if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }\n      puVar1 = (ushort *)*param_2;\n      uVar2 = (ushort)uVar4;\n      if (0xffff < (uint)uVar4) break;\n      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;\n      lVar7 = *param_1;\n      lVar6 = param_1[1];\n      if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }\n      *param_2 = (long)(puVar1 + 1);\n      *puVar1 = uVar2;\n      if (lVar7 == lVar6) {\n        return '\0';\n      }\n    }" ({ "{") (if_statement "if (*param_2 == param_2[1]) {\n        return '\0';\n      }" (if "if") (parenthesized_expression "(*param_2 == param_2[1])" (( "(") (binary_expression "*param_2 == param_2[1]" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (== "==") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) () ")")) (compound_statement "{\n        return '\0';\n      }" ({ "{") (return_statement "return '\0';" (return "return") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")) (; ";")) (} "}"))) (expression_statement "uVar4 = FUN_0051c5d0(param_1,param_3);" (assignment_expression "uVar4 = FUN_0051c5d0(param_1,param_3)" (identifier "uVar4") (= "=") (call_expression "FUN_0051c5d0(param_1,param_3)" (identifier "FUN_0051c5d0") (argument_list "(param_1,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if ((uint)uVar4 == 0xfffffffe) {\n        return (param_5 != 0) + '\x01';\n      }" (if "if") (parenthesized_expression "((uint)uVar4 == 0xfffffffe)" (( "(") (binary_expression "(uint)uVar4 == 0xfffffffe" (cast_expression "(uint)uVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar4")) (== "==") (number_literal "0xfffffffe")) () ")")) (compound_statement "{\n        return (param_5 != 0) + '\x01';\n      }" ({ "{") (return_statement "return (param_5 != 0) + '\x01';" (return "return") (binary_expression "(param_5 != 0) + '\x01'" (parenthesized_expression "(param_5 != 0)" (( "(") (binary_expression "param_5 != 0" (identifier "param_5") (!= "!=") (number_literal "0")) () ")")) (+ "+") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'"))) (; ";")) (} "}"))) (if_statement "if (param_3 < (uVar4 & 0xffffffff)) {\n        return '\x02';\n      }" (if "if") (parenthesized_expression "(param_3 < (uVar4 & 0xffffffff))" (( "(") (binary_expression "param_3 < (uVar4 & 0xffffffff)" (identifier "param_3") (< "<") (parenthesized_expression "(uVar4 & 0xffffffff)" (( "(") (binary_expression "uVar4 & 0xffffffff" (identifier "uVar4") (& "&") (number_literal "0xffffffff")) () ")"))) () ")")) (compound_statement "{\n        return '\x02';\n      }" ({ "{") (return_statement "return '\x02';" (return "return") (char_literal "'\x02'" (' "'") (escape_sequence "\x02") (' "'")) (; ";")) (} "}"))) (expression_statement "puVar1 = (ushort *)*param_2;" (assignment_expression "puVar1 = (ushort *)*param_2" (identifier "puVar1") (= "=") (cast_expression "(ushort *)*param_2" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_2" (* "*") (identifier "param_2")))) (; ";")) (expression_statement "uVar2 = (ushort)uVar4;" (assignment_expression "uVar2 = (ushort)uVar4" (identifier "uVar2") (= "=") (cast_expression "(ushort)uVar4" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (identifier "uVar4"))) (; ";")) (if_statement "if (0xffff < (uint)uVar4) break;" (if "if") (parenthesized_expression "(0xffff < (uint)uVar4)" (( "(") (binary_expression "0xffff < (uint)uVar4" (number_literal "0xffff") (< "<") (cast_expression "(uint)uVar4" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "uVar4"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;" (if "if") (parenthesized_expression "((ushort *)param_2[1] == puVar1)" (( "(") (binary_expression "(ushort *)param_2[1] == puVar1" (cast_expression "(ushort *)param_2[1]" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]"))) (== "==") (identifier "puVar1")) () ")")) (goto_statement "goto LAB_0051dea9;" (goto "goto") (statement_identifier "LAB_0051dea9") (; ";"))) (expression_statement "lVar7 = *param_1;" (assignment_expression "lVar7 = *param_1" (identifier "lVar7") (= "=") (pointer_expression "*param_1" (* "*") (identifier "param_1"))) (; ";")) (expression_statement "lVar6 = param_1[1];" (assignment_expression "lVar6 = param_1[1]" (identifier "lVar6") (= "=") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (; ";")) (if_statement "if ((param_4 & 1) == 0) {\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }" (if "if") (parenthesized_expression "((param_4 & 1) == 0)" (( "(") (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" (( "(") (binary_expression "param_4 & 1" (identifier "param_4") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar2 = uVar2 << 8 | uVar2 >> 8;\n      }" ({ "{") (expression_statement "uVar2 = uVar2 << 8 | uVar2 >> 8;" (assignment_expression "uVar2 = uVar2 << 8 | uVar2 >> 8" (identifier "uVar2") (= "=") (binary_expression "uVar2 << 8 | uVar2 >> 8" (binary_expression "uVar2 << 8" (identifier "uVar2") (<< "<<") (number_literal "8")) (| "|") (binary_expression "uVar2 >> 8" (identifier "uVar2") (>> ">>") (number_literal "8")))) (; ";")) (} "}"))) (expression_statement "*param_2 = (long)(puVar1 + 1);" (assignment_expression "*param_2 = (long)(puVar1 + 1)" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (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 = uVar2;" (assignment_expression "*puVar1 = uVar2" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "uVar2")) (; ";")) (if_statement "if (lVar7 == lVar6) {\n        return '\0';\n      }" (if "if") (parenthesized_expression "(lVar7 == lVar6)" (( "(") (binary_expression "lVar7 == lVar6" (identifier "lVar7") (== "==") (identifier "lVar6")) () ")")) (compound_statement "{\n        return '\0';\n      }" ({ "{") (return_statement "return '\0';" (return "return") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'")) (; ";")) (} "}"))) (} "}"))) (if_statement "if ((ulong)(param_2[1] - (long)puVar1) < 4) break;" (if "if") (parenthesized_expression "((ulong)(param_2[1] - (long)puVar1) < 4)" (( "(") (binary_expression "(ulong)(param_2[1] - (long)puVar1) < 4" (call_expression "(ulong)(param_2[1] - (long)puVar1)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(param_2[1] - (long)puVar1)" (( "(") (binary_expression "param_2[1] - (long)puVar1" (subscript_expression "param_2[1]" (identifier "param_2") ([ "[") (number_literal "1") (] "]")) (- "-") (cast_expression "(long)puVar1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar1"))) () ")"))) (< "<") (number_literal "4")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "uVar3 = (uVar2 & 0x3ff) + 0xdc00;" (assignment_expression "uVar3 = (uVar2 & 0x3ff) + 0xdc00" (identifier "uVar3") (= "=") (binary_expression "(uVar2 & 0x3ff) + 0xdc00" (parenthesized_expression "(uVar2 & 0x3ff)" (( "(") (binary_expression "uVar2 & 0x3ff" (identifier "uVar2") (& "&") (number_literal "0x3ff")) () ")")) (+ "+") (number_literal "0xdc00"))) (; ";")) (expression_statement "uVar5 = (short)(uVar4 >> 10) + 0xd7c0;" (assignment_expression "uVar5 = (short)(uVar4 >> 10) + 0xd7c0" (identifier "uVar5") (= "=") (binary_expression "(short)(uVar4 >> 10) + 0xd7c0" (cast_expression "(short)(uVar4 >> 10)" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (parenthesized_expression "(uVar4 >> 10)" (( "(") (binary_expression "uVar4 >> 10" (identifier "uVar4") (>> ">>") (number_literal "10")) () ")"))) (+ "+") (number_literal "0xd7c0"))) (; ";")) (if_statement "if ((param_4 & 1) == 0) {\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }" (if "if") (parenthesized_expression "((param_4 & 1) == 0)" (( "(") (binary_expression "(param_4 & 1) == 0" (parenthesized_expression "(param_4 & 1)" (( "(") (binary_expression "param_4 & 1" (identifier "param_4") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar5 = uVar5 * 0x100 | uVar5 >> 8;\n      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;\n    }" ({ "{") (expression_statement "uVar5 = uVar5 * 0x100 | uVar5 >> 8;" (assignment_expression "uVar5 = uVar5 * 0x100 | uVar5 >> 8" (identifier "uVar5") (= "=") (binary_expression "uVar5 * 0x100 | uVar5 >> 8" (binary_expression "uVar5 * 0x100" (identifier "uVar5") (* "*") (number_literal "0x100")) (| "|") (binary_expression "uVar5 >> 8" (identifier "uVar5") (>> ">>") (number_literal "8")))) (; ";")) (expression_statement "uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;" (assignment_expression "uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8" (identifier "uVar3") (= "=") (binary_expression "(uVar2 & 0x3ff) << 8 | uVar3 >> 8" (binary_expression "(uVar2 & 0x3ff) << 8" (parenthesized_expression "(uVar2 & 0x3ff)" (( "(") (binary_expression "uVar2 & 0x3ff" (identifier "uVar2") (& "&") (number_literal "0x3ff")) () ")")) (<< "<<") (number_literal "8")) (| "|") (binary_expression "uVar3 >> 8" (identifier "uVar3") (>> ">>") (number_literal "8")))) (; ";")) (} "}"))) (expression_statement "*puVar1 = uVar5;" (assignment_expression "*puVar1 = uVar5" (pointer_expression "*puVar1" (* "*") (identifier "puVar1")) (= "=") (identifier "uVar5")) (; ";")) (expression_statement "*param_2 = (long)(puVar1 + 2);" (assignment_expression "*param_2 = (long)(puVar1 + 2)" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (cast_expression "(long)(puVar1 + 2)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(puVar1 + 2)" (( "(") (binary_expression "puVar1 + 2" (identifier "puVar1") (+ "+") (number_literal "2")) () ")")))) (; ";")) (expression_statement "puVar1[1] = uVar3;" (assignment_expression "puVar1[1] = uVar3" (subscript_expression "puVar1[1]" (identifier "puVar1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "uVar3")) (; ";")) (} "}"))) (labeled_statement "LAB_0051dea9:\n  *param_1 = lVar7;" (statement_identifier "LAB_0051dea9") (: ":") (expression_statement "*param_1 = lVar7;" (assignment_expression "*param_1 = lVar7" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (identifier "lVar7")) (; ";"))) (expression_statement "param_1[1] = lVar6;" (assignment_expression "param_1[1] = lVar6" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "lVar6")) (; ";")) (return_statement "return '\x01';" (return "return") (char_literal "'\x01'" (' "'") (escape_sequence "\x01") (' "'")) (; ";")) (} "}")))

/* std::codecvt_base::result std::(anonymous namespace)::utf16_in<char16_t>(std::(anonymous
   namespace)::range<char const, true>&, std::(anonymous namespace)::range<char16_t, true>&,
   unsigned long, std::codecvt_mode, std::(anonymous namespace)::surrogates) */

char std::(anonymous_namespace)::function_1<char16_t>
               (type_1 *var_4,type_2 *var_7,type_3 var_10,type_4 var_1,int var_9)

{
  type_5 *var_12;
  type_5 var_13;
  type_5 var_15;
  type_3 var_11;
  type_5 var_14;
  long var_6;
  long var_5;
  
  if ((var_1 & 4) != 0) {
    var_2<var_3,true,3ul>(var_4,var_7);
  }
  while( true ) {
    var_5 = *(long *)var_4;
    var_6 = *(long *)(var_4 + 8);
    if (var_5 == var_6) {
      return '\0';
    }
    while( true ) {
      if (*(long *)var_7 == *(long *)(var_7 + 8)) {
        return '\0';
      }
      var_11 = var_8(var_4,var_10);
      if ((type_4)var_11 == 0xfffffffe) {
        return (var_9 != 0) + '\x01';
      }
      if (var_10 < (var_11 & 0xffffffff)) {
        return '\x02';
      }
      var_12 = *(type_5 **)var_7;
      var_13 = (type_5)var_11;
      if (0xffff < (type_4)var_11) break;
      if (*(type_5 **)(var_7 + 8) == var_12) goto LAB_0051dea9;
      var_5 = *(long *)var_4;
      var_6 = *(long *)(var_4 + 8);
      if ((var_1 & 1) == 0) {
        var_13 = var_13 << 8 | var_13 >> 8;
      }
      *(type_5 **)var_7 = var_12 + 1;
      *var_12 = var_13;
      if (var_5 == var_6) {
        return '\0';
      }
    }
    if ((type_3)((long)*(type_5 **)(var_7 + 8) - (long)var_12) < 4) break;
    var_15 = (var_13 & 0x3ff) + 0xdc00;
    var_14 = (short)(var_11 >> 10) + 0xd7c0;
    if ((var_1 & 1) == 0) {
      var_14 = var_14 * 0x100 | var_14 >> 8;
      var_15 = (var_13 & 0x3ff) << 8 | var_15 >> 8;
    }
    *var_12 = var_14;
    *(type_5 **)var_7 = var_12 + 2;
    var_12[1] = var_15;
  }
LAB_0051dea9:
  *(long *)var_4 = var_5;
  *(long *)(var_4 + 8) = var_6;
  return '\x01';
}


(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: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (char_literal (escape_sequence))))) (while_statement condition: (parenthesized_expression (true)) body: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (identifier)) right: (subscript_expression argument: (identifier) index: (number_literal)))) consequence: (compound_statement (return_statement (char_literal (escape_sequence))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal))) consequence: (compound_statement (return_statement (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (char_literal (escape_sequence)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) consequence: (compound_statement (return_statement (char_literal (escape_sequence))))) (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: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))) consequence: (break_statement)) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (subscript_expression argument: (identifier) index: (number_literal))) right: (identifier))) consequence: (goto_statement label: (statement_identifier))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (subscript_expression argument: (identifier) index: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))))) (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: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (return_statement (char_literal (escape_sequence))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier))))) right: (number_literal))) consequence: (break_statement)) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (identifier) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)) right: (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (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: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))))) (labeled_statement label: (statement_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))) (return_statement (char_literal (escape_sequence))))))

char MASKED(long *param_1,long *param_2,ulong param_3,uint param_4,int param_5)

{
  ushort *puVar1;
  ushort uVar2;
  ushort uVar3;
  ulong uVar4;
  ushort uVar5;
  long lVar6;
  long lVar7;
  
  if ((param_4 & 4) != 0) {
    FUN_0051d970();
  }
  while( true ) {
    lVar7 = *param_1;
    lVar6 = param_1[1];
    if (lVar7 == lVar6) {
      return '\0';
    }
    while( true ) {
      if (*param_2 == param_2[1]) {
        return '\0';
      }
      uVar4 = FUN_0051c5d0(param_1,param_3);
      if ((uint)uVar4 == 0xfffffffe) {
        return (param_5 != 0) + '\x01';
      }
      if (param_3 < (uVar4 & 0xffffffff)) {
        return '\x02';
      }
      puVar1 = (ushort *)*param_2;
      uVar2 = (ushort)uVar4;
      if (0xffff < (uint)uVar4) break;
      if ((ushort *)param_2[1] == puVar1) goto LAB_0051dea9;
      lVar7 = *param_1;
      lVar6 = param_1[1];
      if ((param_4 & 1) == 0) {
        uVar2 = uVar2 << 8 | uVar2 >> 8;
      }
      *param_2 = (long)(puVar1 + 1);
      *puVar1 = uVar2;
      if (lVar7 == lVar6) {
        return '\0';
      }
    }
    if ((ulong)(param_2[1] - (long)puVar1) < 4) break;
    uVar3 = (uVar2 & 0x3ff) + 0xdc00;
    uVar5 = (short)(uVar4 >> 10) + 0xd7c0;
    if ((param_4 & 1) == 0) {
      uVar5 = uVar5 * 0x100 | uVar5 >> 8;
      uVar3 = (uVar2 & 0x3ff) << 8 | uVar3 >> 8;
    }
    *puVar1 = uVar5;
    *param_2 = (long)(puVar1 + 2);
    puVar1[1] = uVar3;
  }
LAB_0051dea9:
  *param_1 = lVar7;
  param_1[1] = lVar6;
  return '\x01';
}

