
/* std::codecvt_base::result std::(anonymous namespace)::utf16_out<char16_t>(std::(anonymous
   namespace)::range<char16_t const, true>&, std::(anonymous namespace)::range<char, true>&,
   unsigned long, std::codecvt_mode, std::(anonymous namespace)::surrogates) [clone .part.20] */

undefined4 __regparm3
std::(anonymous_namespace)::utf16_out<char16_t>
          (int *param_1,range *param_2,wchar32 param_3,int param_4)

{
  char cVar1;
  ushort *puVar2;
  wchar32 wVar3;
  int iVar4;
  
  puVar2 = (ushort *)*param_1;
  while( true ) {
    if ((ushort *)param_1[1] == puVar2) {
      return 0;
    }
    wVar3 = (wchar32)*puVar2;
    if ((uint)(wVar3 + L'\xffff2800') < 0x400) {
      if (param_4 == 1) {
        return 2;
      }
      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {
        return 0;
      }
      if (0x3ff < puVar2[1] - 0xdc00) {
        return 2;
      }
      iVar4 = 2;
      wVar3 = puVar2[1] + 0xfca02400 + wVar3 * 0x400;
    }
    else {
      if ((uint)(wVar3 + L'\xffff2400') < 0x400) {
        return 2;
      }
      iVar4 = 1;
    }
    if ((uint)param_3 < (uint)wVar3) {
      return 2;
    }
    cVar1 = write_utf8_code_point(param_2,wVar3);
    if (cVar1 == '\0') break;
    puVar2 = (ushort *)(*param_1 + iVar4 * 2);
    *param_1 = (int)puVar2;
  }
  return 1;
}



undefined4 __regparm3 FUN_00233a70(int *param_1,undefined4 param_2,uint param_3,int param_4)

{
  char cVar1;
  ushort *puVar2;
  uint uVar3;
  int iVar4;
  
  puVar2 = (ushort *)*param_1;
  while( true ) {
    if ((ushort *)param_1[1] == puVar2) {
      return 0;
    }
    uVar3 = (uint)*puVar2;
    if (uVar3 - 0xd800 < 0x400) {
      if (param_4 == 1) {
        return 2;
      }
      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {
        return 0;
      }
      if (0x3ff < puVar2[1] - 0xdc00) {
        return 2;
      }
      iVar4 = 2;
      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;
    }
    else {
      if (uVar3 - 0xdc00 < 0x400) {
        return 2;
      }
      iVar4 = 1;
    }
    if (param_3 < uVar3) {
      return 2;
    }
    cVar1 = FUN_002337d0();
    if (cVar1 == '\0') break;
    puVar2 = (ushort *)(*param_1 + iVar4 * 2);
    *param_1 = (int)puVar2;
  }
  return 1;
}


PUSH EBP
PUSH EDI
MOV EDI,EDX
PUSH ESI
MOV ESI,ECX
PUSH EBX
MOV EBX,EAX
MOV EAX,dword ptr [EAX]
JMP 0x00233ac3
CMP dword ptr [ESP + 0x14],0x1
JZ 0x00233af7
CMP ECX,0x1
JBE 0x00233b08
MOVZX EAX,word ptr [EAX + 0x2]
LEA ECX,[EAX + 0xffff2400]
CMP ECX,0x3ff
JA 0x00233af7
SHL EDX,0xa
MOV EBP,0x2
LEA EDX,[EAX + EDX*0x1 + 0xfca02400]
CMP EDX,ESI
JA 0x00233af7
MOV EAX,EDI
CALL 0x002337d0
TEST AL,AL
JZ 0x00233b10
MOV EAX,dword ptr [EBX]
LEA EAX,[EAX + EBP*0x2]
MOV dword ptr [EBX],EAX
MOV EDX,dword ptr [EBX + 0x4]
MOV ECX,EDX
SUB ECX,EAX
SAR ECX,0x1
CMP EDX,EAX
JZ 0x00233b08
MOVZX EDX,word ptr [EAX]
LEA EBP,[EDX + 0xffff2800]
CMP EBP,0x3ff
JBE 0x00233a80
LEA EAX,[EDX + 0xffff2400]
CMP EAX,0x3ff
JBE 0x00233af7
MOV EBP,0x1
CMP EDX,ESI
JBE 0x00233ab1
POP EBX
MOV EAX,0x2
POP ESI
POP EDI
POP EBP
RET
POP EBX
XOR EAX,EAX
POP ESI
POP EDI
POP EBP
RET
POP EBX
MOV EAX,0x1
POP ESI
POP EDI
POP EBP
RET
(translation_unit "undefined4 __regparm3 FUN_00233a70(int *param_1,undefined4 param_2,uint param_3,int param_4)\n\n{\n  char cVar1;\n  ushort *puVar2;\n  uint uVar3;\n  int iVar4;\n  \n  puVar2 = (ushort *)*param_1;\n  while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }\n  return 1;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_00233a70(int *param_1,undefined4 param_2,uint param_3,int param_4)\n\n{\n  char cVar1;\n  ushort *puVar2;\n  uint uVar3;\n  int iVar4;\n  \n  puVar2 = (ushort *)*param_1;\n  while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }\n  return 1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00233a70(int *param_1,undefined4 param_2,uint param_3,int param_4)" identifier (parameter_list "(int *param_1,undefined4 param_2,uint param_3,int param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  ushort *puVar2;\n  uint uVar3;\n  int iVar4;\n  \n  puVar2 = (ushort *)*param_1;\n  while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }\n  return 1;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "ushort *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar2 = (ushort *)*param_1;" (assignment_expression "puVar2 = (ushort *)*param_1" identifier = (cast_expression "(ushort *)*param_1" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (while_statement "while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }" { (if_statement "if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }" if (parenthesized_expression "((ushort *)param_1[1] == puVar2)" ( (binary_expression "(ushort *)param_1[1] == puVar2" (cast_expression "(ushort *)param_1[1]" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) == identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar3 = (uint)*puVar2;" (assignment_expression "uVar3 = (uint)*puVar2" identifier = (binary_expression "(uint)*puVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }" if (parenthesized_expression "(uVar3 - 0xd800 < 0x400)" ( (binary_expression "uVar3 - 0xd800 < 0x400" (binary_expression "uVar3 - 0xd800" identifier - number_literal) < number_literal) )) (compound_statement "{\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }" { (if_statement "if (param_4 == 1) {\n        return 2;\n      }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n        return 2;\n      }" { (return_statement "return 2;" return number_literal ;) })) (if_statement "if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }" if (parenthesized_expression "((uint)(param_1[1] - (int)puVar2 >> 1) < 2)" ( (binary_expression "(uint)(param_1[1] - (int)puVar2 >> 1) < 2" (call_expression "(uint)(param_1[1] - (int)puVar2 >> 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar2 >> 1)" ( (binary_expression "param_1[1] - (int)puVar2 >> 1" (binary_expression "param_1[1] - (int)puVar2" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal) ))) < number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }" if (parenthesized_expression "(0x3ff < puVar2[1] - 0xdc00)" ( (binary_expression "0x3ff < puVar2[1] - 0xdc00" number_literal < (binary_expression "puVar2[1] - 0xdc00" (subscript_expression "puVar2[1]" identifier [ number_literal ]) - number_literal)) )) (compound_statement "{\n        return 2;\n      }" { (return_statement "return 2;" return number_literal ;) })) (expression_statement "iVar4 = 2;" (assignment_expression "iVar4 = 2" identifier = number_literal) ;) (expression_statement "uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;" (assignment_expression "uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400" identifier = (binary_expression "puVar2[1] + 0xfca02400 + uVar3 * 0x400" (binary_expression "puVar2[1] + 0xfca02400" (subscript_expression "puVar2[1]" identifier [ number_literal ]) + number_literal) + (binary_expression "uVar3 * 0x400" identifier * number_literal))) ;) }) (else_clause "else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }" else (compound_statement "{\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }" { (if_statement "if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }" if (parenthesized_expression "(uVar3 - 0xdc00 < 0x400)" ( (binary_expression "uVar3 - 0xdc00 < 0x400" (binary_expression "uVar3 - 0xdc00" identifier - number_literal) < number_literal) )) (compound_statement "{\n        return 2;\n      }" { (return_statement "return 2;" return number_literal ;) })) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) }))) (if_statement "if (param_3 < uVar3) {\n      return 2;\n    }" if (parenthesized_expression "(param_3 < uVar3)" ( (binary_expression "param_3 < uVar3" identifier < identifier) )) (compound_statement "{\n      return 2;\n    }" { (return_statement "return 2;" return number_literal ;) })) (expression_statement "cVar1 = FUN_002337d0();" (assignment_expression "cVar1 = FUN_002337d0()" identifier = (call_expression "FUN_002337d0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (cVar1 == '\0') break;" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "puVar2 = (ushort *)(*param_1 + iVar4 * 2);" (assignment_expression "puVar2 = (ushort *)(*param_1 + iVar4 * 2)" identifier = (cast_expression "(ushort *)(*param_1 + iVar4 * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + iVar4 * 2)" ( (binary_expression "*param_1 + iVar4 * 2" (pointer_expression "*param_1" * identifier) + (binary_expression "iVar4 * 2" identifier * number_literal)) )))) ;) (expression_statement "*param_1 = (int)puVar2;" (assignment_expression "*param_1 = (int)puVar2" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (return_statement "return 1;" return number_literal ;) })))
(translation_unit "/* std::codecvt_base::result std::(anonymous namespace)::utf16_out<char16_t>(std::(anonymous\n   namespace)::range<char16_t const, true>&, std::(anonymous namespace)::range<char, true>&,\n   unsigned long, std::codecvt_mode, std::(anonymous namespace)::surrogates) [clone .part.20] */\n\nundefined4 __regparm3\nstd::(anonymous_namespace)::utf16_out<char16_t>\n          (int *param_1,range *param_2,wchar32 param_3,int param_4)\n\n{\n  char cVar1;\n  ushort *puVar2;\n  wchar32 wVar3;\n  int iVar4;\n  \n  puVar2 = (ushort *)*param_1;\n  while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    wVar3 = (wchar32)*puVar2;\n    if ((uint)(wVar3 + L'\xffff2800') < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      wVar3 = puVar2[1] + 0xfca02400 + wVar3 * 0x400;\n    }\n    else {\n      if ((uint)(wVar3 + L'\xffff2400') < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if ((uint)param_3 < (uint)wVar3) {\n      return 2;\n    }\n    cVar1 = write_utf8_code_point(param_2,wVar3);\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }\n  return 1;\n}\n\n" comment (declaration "undefined4 __regparm3" type_identifier identifier ;) (labeled_statement "std::(anonymous_namespace)::utf16_out<char16_t>\n          (int *param_1,range *param_2,wchar32 param_3,int param_4)" statement_identifier (ERROR "::(anonymous_namespace):" : : (parenthesized_expression "(anonymous_namespace)" ( identifier )) :) : (expression_statement "utf16_out<char16_t>\n          (int *param_1,range *param_2,wchar32 param_3,int param_4)" (binary_expression "utf16_out<char16_t>\n          (int *param_1,range *param_2,wchar32 param_3,int param_4)" (binary_expression "utf16_out<char16_t" identifier < identifier) > (parenthesized_expression "(int *param_1,range *param_2,wchar32 param_3,int param_4)" ( (ERROR "int *" (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *))) (comma_expression "param_1,range *param_2,wchar32 param_3,int param_4" identifier , (comma_expression "range *param_2,wchar32 param_3,int param_4" (binary_expression "range *param_2" identifier * identifier) , (ERROR "wchar32" identifier) (comma_expression "param_3,int param_4" identifier , (ERROR "int" identifier) identifier))) ))) ;)) (compound_statement "{\n  char cVar1;\n  ushort *puVar2;\n  wchar32 wVar3;\n  int iVar4;\n  \n  puVar2 = (ushort *)*param_1;\n  while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    wVar3 = (wchar32)*puVar2;\n    if ((uint)(wVar3 + L'\xffff2800') < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      wVar3 = puVar2[1] + 0xfca02400 + wVar3 * 0x400;\n    }\n    else {\n      if ((uint)(wVar3 + L'\xffff2400') < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if ((uint)param_3 < (uint)wVar3) {\n      return 2;\n    }\n    cVar1 = write_utf8_code_point(param_2,wVar3);\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }\n  return 1;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "ushort *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "wchar32 wVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar2 = (ushort *)*param_1;" (assignment_expression "puVar2 = (ushort *)*param_1" identifier = (cast_expression "(ushort *)*param_1" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (while_statement "while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    wVar3 = (wchar32)*puVar2;\n    if ((uint)(wVar3 + L'\xffff2800') < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      wVar3 = puVar2[1] + 0xfca02400 + wVar3 * 0x400;\n    }\n    else {\n      if ((uint)(wVar3 + L'\xffff2400') < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if ((uint)param_3 < (uint)wVar3) {\n      return 2;\n    }\n    cVar1 = write_utf8_code_point(param_2,wVar3);\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    wVar3 = (wchar32)*puVar2;\n    if ((uint)(wVar3 + L'\xffff2800') < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      wVar3 = puVar2[1] + 0xfca02400 + wVar3 * 0x400;\n    }\n    else {\n      if ((uint)(wVar3 + L'\xffff2400') < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if ((uint)param_3 < (uint)wVar3) {\n      return 2;\n    }\n    cVar1 = write_utf8_code_point(param_2,wVar3);\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }" { (if_statement "if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }" if (parenthesized_expression "((ushort *)param_1[1] == puVar2)" ( (binary_expression "(ushort *)param_1[1] == puVar2" (cast_expression "(ushort *)param_1[1]" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) == identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "wVar3 = (wchar32)*puVar2;" (assignment_expression "wVar3 = (wchar32)*puVar2" identifier = (binary_expression "(wchar32)*puVar2" (parenthesized_expression "(wchar32)" ( identifier )) * identifier)) ;) (if_statement "if ((uint)(wVar3 + L'\xffff2800') < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      wVar3 = puVar2[1] + 0xfca02400 + wVar3 * 0x400;\n    }\n    else {\n      if ((uint)(wVar3 + L'\xffff2400') < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }" if (parenthesized_expression "((uint)(wVar3 + L'\xffff2800') < 0x400)" ( (binary_expression "(uint)(wVar3 + L'\xffff2800') < 0x400" (call_expression "(uint)(wVar3 + L'\xffff2800')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(wVar3 + L'\xffff2800')" ( (binary_expression "wVar3 + L'\xffff2800'" identifier + (char_literal "L'\xffff2800'" L' escape_sequence character character character character ')) ))) < number_literal) )) (compound_statement "{\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      wVar3 = puVar2[1] + 0xfca02400 + wVar3 * 0x400;\n    }" { (if_statement "if (param_4 == 1) {\n        return 2;\n      }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n        return 2;\n      }" { (return_statement "return 2;" return number_literal ;) })) (if_statement "if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }" if (parenthesized_expression "((uint)(param_1[1] - (int)puVar2 >> 1) < 2)" ( (binary_expression "(uint)(param_1[1] - (int)puVar2 >> 1) < 2" (call_expression "(uint)(param_1[1] - (int)puVar2 >> 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar2 >> 1)" ( (binary_expression "param_1[1] - (int)puVar2 >> 1" (binary_expression "param_1[1] - (int)puVar2" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal) ))) < number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }" if (parenthesized_expression "(0x3ff < puVar2[1] - 0xdc00)" ( (binary_expression "0x3ff < puVar2[1] - 0xdc00" number_literal < (binary_expression "puVar2[1] - 0xdc00" (subscript_expression "puVar2[1]" identifier [ number_literal ]) - number_literal)) )) (compound_statement "{\n        return 2;\n      }" { (return_statement "return 2;" return number_literal ;) })) (expression_statement "iVar4 = 2;" (assignment_expression "iVar4 = 2" identifier = number_literal) ;) (expression_statement "wVar3 = puVar2[1] + 0xfca02400 + wVar3 * 0x400;" (assignment_expression "wVar3 = puVar2[1] + 0xfca02400 + wVar3 * 0x400" identifier = (binary_expression "puVar2[1] + 0xfca02400 + wVar3 * 0x400" (binary_expression "puVar2[1] + 0xfca02400" (subscript_expression "puVar2[1]" identifier [ number_literal ]) + number_literal) + (binary_expression "wVar3 * 0x400" identifier * number_literal))) ;) }) (else_clause "else {\n      if ((uint)(wVar3 + L'\xffff2400') < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }" else (compound_statement "{\n      if ((uint)(wVar3 + L'\xffff2400') < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }" { (if_statement "if ((uint)(wVar3 + L'\xffff2400') < 0x400) {\n        return 2;\n      }" if (parenthesized_expression "((uint)(wVar3 + L'\xffff2400') < 0x400)" ( (binary_expression "(uint)(wVar3 + L'\xffff2400') < 0x400" (call_expression "(uint)(wVar3 + L'\xffff2400')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(wVar3 + L'\xffff2400')" ( (binary_expression "wVar3 + L'\xffff2400'" identifier + (char_literal "L'\xffff2400'" L' escape_sequence character character character character ')) ))) < number_literal) )) (compound_statement "{\n        return 2;\n      }" { (return_statement "return 2;" return number_literal ;) })) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) }))) (if_statement "if ((uint)param_3 < (uint)wVar3) {\n      return 2;\n    }" if (parenthesized_expression "((uint)param_3 < (uint)wVar3)" ( (binary_expression "(uint)param_3 < (uint)wVar3" (cast_expression "(uint)param_3" ( (type_descriptor "uint" type_identifier) ) identifier) < (cast_expression "(uint)wVar3" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\n      return 2;\n    }" { (return_statement "return 2;" return number_literal ;) })) (expression_statement "cVar1 = write_utf8_code_point(param_2,wVar3);" (assignment_expression "cVar1 = write_utf8_code_point(param_2,wVar3)" identifier = (call_expression "write_utf8_code_point(param_2,wVar3)" identifier (argument_list "(param_2,wVar3)" ( identifier , identifier )))) ;) (if_statement "if (cVar1 == '\0') break;" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "puVar2 = (ushort *)(*param_1 + iVar4 * 2);" (assignment_expression "puVar2 = (ushort *)(*param_1 + iVar4 * 2)" identifier = (cast_expression "(ushort *)(*param_1 + iVar4 * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + iVar4 * 2)" ( (binary_expression "*param_1 + iVar4 * 2" (pointer_expression "*param_1" * identifier) + (binary_expression "iVar4 * 2" identifier * number_literal)) )))) ;) (expression_statement "*param_1 = (int)puVar2;" (assignment_expression "*param_1 = (int)puVar2" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (return_statement "return 1;" return number_literal ;) }))
(translation_unit "undefined4 __regparm3 FUN_00233a70(int *param_1,undefined4 param_2,uint param_3,int param_4)\n\n{\n  char cVar1;\n  ushort *puVar2;\n  uint uVar3;\n  int iVar4;\n  \n  puVar2 = (ushort *)*param_1;\n  while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }\n  return 1;\n}\n\n" (function_definition "undefined4 __regparm3 FUN_00233a70(int *param_1,undefined4 param_2,uint param_3,int param_4)\n\n{\n  char cVar1;\n  ushort *puVar2;\n  uint uVar3;\n  int iVar4;\n  \n  puVar2 = (ushort *)*param_1;\n  while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }\n  return 1;\n}" type_identifier (ERROR "__regparm3" identifier) (function_declarator "FUN_00233a70(int *param_1,undefined4 param_2,uint param_3,int param_4)" identifier (parameter_list "(int *param_1,undefined4 param_2,uint param_3,int param_4)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int param_4" primitive_type identifier) ))) (compound_statement "{\n  char cVar1;\n  ushort *puVar2;\n  uint uVar3;\n  int iVar4;\n  \n  puVar2 = (ushort *)*param_1;\n  while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }\n  return 1;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "ushort *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (expression_statement "puVar2 = (ushort *)*param_1;" (assignment_expression "puVar2 = (ushort *)*param_1" identifier = (cast_expression "(ushort *)*param_1" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (while_statement "while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }" { (if_statement "if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }" if (parenthesized_expression "((ushort *)param_1[1] == puVar2)" ( (binary_expression "(ushort *)param_1[1] == puVar2" (cast_expression "(ushort *)param_1[1]" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (subscript_expression "param_1[1]" identifier [ number_literal ])) == identifier) )) (compound_statement "{\n      return 0;\n    }" { (return_statement "return 0;" return number_literal ;) })) (expression_statement "uVar3 = (uint)*puVar2;" (assignment_expression "uVar3 = (uint)*puVar2" identifier = (binary_expression "(uint)*puVar2" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }" if (parenthesized_expression "(uVar3 - 0xd800 < 0x400)" ( (binary_expression "uVar3 - 0xd800 < 0x400" (binary_expression "uVar3 - 0xd800" identifier - number_literal) < number_literal) )) (compound_statement "{\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }" { (if_statement "if (param_4 == 1) {\n        return 2;\n      }" if (parenthesized_expression "(param_4 == 1)" ( (binary_expression "param_4 == 1" identifier == number_literal) )) (compound_statement "{\n        return 2;\n      }" { (return_statement "return 2;" return number_literal ;) })) (if_statement "if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }" if (parenthesized_expression "((uint)(param_1[1] - (int)puVar2 >> 1) < 2)" ( (binary_expression "(uint)(param_1[1] - (int)puVar2 >> 1) < 2" (call_expression "(uint)(param_1[1] - (int)puVar2 >> 1)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar2 >> 1)" ( (binary_expression "param_1[1] - (int)puVar2 >> 1" (binary_expression "param_1[1] - (int)puVar2" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) >> number_literal) ))) < number_literal) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (if_statement "if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }" if (parenthesized_expression "(0x3ff < puVar2[1] - 0xdc00)" ( (binary_expression "0x3ff < puVar2[1] - 0xdc00" number_literal < (binary_expression "puVar2[1] - 0xdc00" (subscript_expression "puVar2[1]" identifier [ number_literal ]) - number_literal)) )) (compound_statement "{\n        return 2;\n      }" { (return_statement "return 2;" return number_literal ;) })) (expression_statement "iVar4 = 2;" (assignment_expression "iVar4 = 2" identifier = number_literal) ;) (expression_statement "uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;" (assignment_expression "uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400" identifier = (binary_expression "puVar2[1] + 0xfca02400 + uVar3 * 0x400" (binary_expression "puVar2[1] + 0xfca02400" (subscript_expression "puVar2[1]" identifier [ number_literal ]) + number_literal) + (binary_expression "uVar3 * 0x400" identifier * number_literal))) ;) }) (else_clause "else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }" else (compound_statement "{\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }" { (if_statement "if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }" if (parenthesized_expression "(uVar3 - 0xdc00 < 0x400)" ( (binary_expression "uVar3 - 0xdc00 < 0x400" (binary_expression "uVar3 - 0xdc00" identifier - number_literal) < number_literal) )) (compound_statement "{\n        return 2;\n      }" { (return_statement "return 2;" return number_literal ;) })) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" identifier = number_literal) ;) }))) (if_statement "if (param_3 < uVar3) {\n      return 2;\n    }" if (parenthesized_expression "(param_3 < uVar3)" ( (binary_expression "param_3 < uVar3" identifier < identifier) )) (compound_statement "{\n      return 2;\n    }" { (return_statement "return 2;" return number_literal ;) })) (expression_statement "cVar1 = FUN_002337d0();" (assignment_expression "cVar1 = FUN_002337d0()" identifier = (call_expression "FUN_002337d0()" identifier (argument_list "()" ( )))) ;) (if_statement "if (cVar1 == '\0') break;" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (break_statement "break;" break ;)) (expression_statement "puVar2 = (ushort *)(*param_1 + iVar4 * 2);" (assignment_expression "puVar2 = (ushort *)(*param_1 + iVar4 * 2)" identifier = (cast_expression "(ushort *)(*param_1 + iVar4 * 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + iVar4 * 2)" ( (binary_expression "*param_1 + iVar4 * 2" (pointer_expression "*param_1" * identifier) + (binary_expression "iVar4 * 2" identifier * number_literal)) )))) ;) (expression_statement "*param_1 = (int)puVar2;" (assignment_expression "*param_1 = (int)puVar2" (pointer_expression "*param_1" * identifier) = (cast_expression "(int)puVar2" ( (type_descriptor "int" primitive_type) ) identifier)) ;) })) (return_statement "return 1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (ERROR IDENT) (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ])) == IDENT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) >> LIT) ))) < LIT) )) (compound_statement { (return_statement return LIT ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression (subscript_expression IDENT [ LIT ]) - LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (subscript_expression IDENT [ LIT ]) + LIT) + (binary_expression IDENT * LIT))) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + (binary_expression IDENT * LIT)) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) })) (return_statement return LIT ;) })))
(function_definition "undefined4 __regparm3 FUN_00233a70(int *param_1,undefined4 param_2,uint param_3,int param_4)\n\n{\n  char cVar1;\n  ushort *puVar2;\n  uint uVar3;\n  int iVar4;\n  \n  puVar2 = (ushort *)*param_1;\n  while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }\n  return 1;\n}" (type_identifier "undefined4") (ERROR "__regparm3" (identifier "__regparm3")) (function_declarator "FUN_00233a70(int *param_1,undefined4 param_2,uint param_3,int param_4)" (identifier "FUN_00233a70") (parameter_list "(int *param_1,undefined4 param_2,uint param_3,int param_4)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) () ")"))) (compound_statement "{\n  char cVar1;\n  ushort *puVar2;\n  uint uVar3;\n  int iVar4;\n  \n  puVar2 = (ushort *)*param_1;\n  while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }\n  return 1;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "ushort *puVar2;" (type_identifier "ushort") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (expression_statement "puVar2 = (ushort *)*param_1;" (assignment_expression "puVar2 = (ushort *)*param_1" (identifier "puVar2") (= "=") (cast_expression "(ushort *)*param_1" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (while_statement "while( true ) {\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n    if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }\n    uVar3 = (uint)*puVar2;\n    if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }\n    if (param_3 < uVar3) {\n      return 2;\n    }\n    cVar1 = FUN_002337d0();\n    if (cVar1 == '\0') break;\n    puVar2 = (ushort *)(*param_1 + iVar4 * 2);\n    *param_1 = (int)puVar2;\n  }" ({ "{") (if_statement "if ((ushort *)param_1[1] == puVar2) {\n      return 0;\n    }" (if "if") (parenthesized_expression "((ushort *)param_1[1] == puVar2)" (( "(") (binary_expression "(ushort *)param_1[1] == puVar2" (cast_expression "(ushort *)param_1[1]" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]"))) (== "==") (identifier "puVar2")) () ")")) (compound_statement "{\n      return 0;\n    }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (expression_statement "uVar3 = (uint)*puVar2;" (assignment_expression "uVar3 = (uint)*puVar2" (identifier "uVar3") (= "=") (binary_expression "(uint)*puVar2" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "puVar2"))) (; ";")) (if_statement "if (uVar3 - 0xd800 < 0x400) {\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }\n    else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }" (if "if") (parenthesized_expression "(uVar3 - 0xd800 < 0x400)" (( "(") (binary_expression "uVar3 - 0xd800 < 0x400" (binary_expression "uVar3 - 0xd800" (identifier "uVar3") (- "-") (number_literal "0xd800")) (< "<") (number_literal "0x400")) () ")")) (compound_statement "{\n      if (param_4 == 1) {\n        return 2;\n      }\n      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }\n      if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }\n      iVar4 = 2;\n      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;\n    }" ({ "{") (if_statement "if (param_4 == 1) {\n        return 2;\n      }" (if "if") (parenthesized_expression "(param_4 == 1)" (( "(") (binary_expression "param_4 == 1" (identifier "param_4") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n        return 2;\n      }" ({ "{") (return_statement "return 2;" (return "return") (number_literal "2") (; ";")) (} "}"))) (if_statement "if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {\n        return 0;\n      }" (if "if") (parenthesized_expression "((uint)(param_1[1] - (int)puVar2 >> 1) < 2)" (( "(") (binary_expression "(uint)(param_1[1] - (int)puVar2 >> 1) < 2" (call_expression "(uint)(param_1[1] - (int)puVar2 >> 1)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_1[1] - (int)puVar2 >> 1)" (( "(") (binary_expression "param_1[1] - (int)puVar2 >> 1" (binary_expression "param_1[1] - (int)puVar2" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (- "-") (cast_expression "(int)puVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar2"))) (>> ">>") (number_literal "1")) () ")"))) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (if_statement "if (0x3ff < puVar2[1] - 0xdc00) {\n        return 2;\n      }" (if "if") (parenthesized_expression "(0x3ff < puVar2[1] - 0xdc00)" (( "(") (binary_expression "0x3ff < puVar2[1] - 0xdc00" (number_literal "0x3ff") (< "<") (binary_expression "puVar2[1] - 0xdc00" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (- "-") (number_literal "0xdc00"))) () ")")) (compound_statement "{\n        return 2;\n      }" ({ "{") (return_statement "return 2;" (return "return") (number_literal "2") (; ";")) (} "}"))) (expression_statement "iVar4 = 2;" (assignment_expression "iVar4 = 2" (identifier "iVar4") (= "=") (number_literal "2")) (; ";")) (expression_statement "uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;" (assignment_expression "uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400" (identifier "uVar3") (= "=") (binary_expression "puVar2[1] + 0xfca02400 + uVar3 * 0x400" (binary_expression "puVar2[1] + 0xfca02400" (subscript_expression "puVar2[1]" (identifier "puVar2") ([ "[") (number_literal "1") (] "]")) (+ "+") (number_literal "0xfca02400")) (+ "+") (binary_expression "uVar3 * 0x400" (identifier "uVar3") (* "*") (number_literal "0x400")))) (; ";")) (} "}")) (else_clause "else {\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }" (else "else") (compound_statement "{\n      if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }\n      iVar4 = 1;\n    }" ({ "{") (if_statement "if (uVar3 - 0xdc00 < 0x400) {\n        return 2;\n      }" (if "if") (parenthesized_expression "(uVar3 - 0xdc00 < 0x400)" (( "(") (binary_expression "uVar3 - 0xdc00 < 0x400" (binary_expression "uVar3 - 0xdc00" (identifier "uVar3") (- "-") (number_literal "0xdc00")) (< "<") (number_literal "0x400")) () ")")) (compound_statement "{\n        return 2;\n      }" ({ "{") (return_statement "return 2;" (return "return") (number_literal "2") (; ";")) (} "}"))) (expression_statement "iVar4 = 1;" (assignment_expression "iVar4 = 1" (identifier "iVar4") (= "=") (number_literal "1")) (; ";")) (} "}")))) (if_statement "if (param_3 < uVar3) {\n      return 2;\n    }" (if "if") (parenthesized_expression "(param_3 < uVar3)" (( "(") (binary_expression "param_3 < uVar3" (identifier "param_3") (< "<") (identifier "uVar3")) () ")")) (compound_statement "{\n      return 2;\n    }" ({ "{") (return_statement "return 2;" (return "return") (number_literal "2") (; ";")) (} "}"))) (expression_statement "cVar1 = FUN_002337d0();" (assignment_expression "cVar1 = FUN_002337d0()" (identifier "cVar1") (= "=") (call_expression "FUN_002337d0()" (identifier "FUN_002337d0") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (cVar1 == '\0') break;" (if "if") (parenthesized_expression "(cVar1 == '\0')" (( "(") (binary_expression "cVar1 == '\0'" (identifier "cVar1") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "puVar2 = (ushort *)(*param_1 + iVar4 * 2);" (assignment_expression "puVar2 = (ushort *)(*param_1 + iVar4 * 2)" (identifier "puVar2") (= "=") (cast_expression "(ushort *)(*param_1 + iVar4 * 2)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + iVar4 * 2)" (( "(") (binary_expression "*param_1 + iVar4 * 2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (binary_expression "iVar4 * 2" (identifier "iVar4") (* "*") (number_literal "2"))) () ")")))) (; ";")) (expression_statement "*param_1 = (int)puVar2;" (assignment_expression "*param_1 = (int)puVar2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (cast_expression "(int)puVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar2"))) (; ";")) (} "}"))) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}")))

/* std::codecvt_base::result std::(anonymous namespace)::utf16_out<char16_t>(std::(anonymous
   namespace)::range<char16_t const, true>&, std::(anonymous namespace)::range<char, true>&,
   unsigned long, std::codecvt_mode, std::(anonymous namespace)::surrogates) [clone .part.20] */

type_1 __regparm3
std::(anonymous_namespace)::var_1<var_2>
          (int *param_1,var_3 *var_4,type_3 param_3,int var_7)

{
  char var_9;
  type_2 *var_5;
  type_3 var_6;
  int var_10;
  
  var_5 = (type_2 *)*param_1;
  while( true ) {
    if ((type_2 *)param_1[1] == var_5) {
      return 0;
    }
    var_6 = (type_3)*var_5;
    if ((type_4)(var_6 + L'\xffff2800') < 0x400) {
      if (var_7 == 1) {
        return 2;
      }
      if ((type_4)(param_1[1] - (int)var_5 >> 1) < 2) {
        return 0;
      }
      if (0x3ff < var_5[1] - 0xdc00) {
        return 2;
      }
      var_10 = 2;
      var_6 = var_5[1] + 0xfca02400 + var_6 * 0x400;
    }
    else {
      if ((type_4)(var_6 + L'\xffff2400') < 0x400) {
        return 2;
      }
      var_10 = 1;
    }
    if ((type_4)param_3 < (type_4)var_6) {
      return 2;
    }
    var_9 = var_8(var_4,var_6);
    if (var_9 == '\0') break;
    var_5 = (type_2 *)(*param_1 + var_10 * 2);
    *param_1 = (int)var_5;
  }
  return 1;
}


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

undefined4 __regparm3 MASKED(int *param_1,undefined4 param_2,uint param_3,int param_4)

{
  char cVar1;
  ushort *puVar2;
  uint uVar3;
  int iVar4;
  
  puVar2 = (ushort *)*param_1;
  while( true ) {
    if ((ushort *)param_1[1] == puVar2) {
      return 0;
    }
    uVar3 = (uint)*puVar2;
    if (uVar3 - 0xd800 < 0x400) {
      if (param_4 == 1) {
        return 2;
      }
      if ((uint)(param_1[1] - (int)puVar2 >> 1) < 2) {
        return 0;
      }
      if (0x3ff < puVar2[1] - 0xdc00) {
        return 2;
      }
      iVar4 = 2;
      uVar3 = puVar2[1] + 0xfca02400 + uVar3 * 0x400;
    }
    else {
      if (uVar3 - 0xdc00 < 0x400) {
        return 2;
      }
      iVar4 = 1;
    }
    if (param_3 < uVar3) {
      return 2;
    }
    cVar1 = FUN_002337d0();
    if (cVar1 == '\0') break;
    puVar2 = (ushort *)(*param_1 + iVar4 * 2);
    *param_1 = (int)puVar2;
  }
  return 1;
}

