
/* std::__codecvt_utf16_base<char16_t>::do_out(__mbstate_t&, char16_t const*, char16_t const*,
   char16_t const*&, char*, char*, char*&) const */

undefined4 __thiscall
std::__codecvt_utf16_base<char16_t>::do_out
          (__codecvt_utf16_base<char16_t> *this,__mbstate_t *param_1,wchar16 *param_2,
          wchar16 *param_3,wchar16 **param_4,char *param_5,char *param_6,char **param_7)

{
  uint uVar1;
  uint uVar2;
  bool bVar3;
  undefined4 uVar4;
  uint uVar5;
  ushort uVar6;
  ushort *local_18;
  char *local_14;
  
  uVar1 = *(uint *)(this + 0xc);
  uVar2 = *(uint *)(this + 8);
  local_18 = (ushort *)param_5;
  local_14 = param_6;
  bVar3 = (anonymous_namespace)::write_utf16_bom<false>(&local_18,uVar1);
  if (bVar3) {
    if (param_2 == param_3) {
LAB_0026e339:
      uVar4 = 0;
      goto LAB_0026e345;
    }
    if (1 < (uint)((int)local_14 - (int)local_18)) {
      uVar5 = (uint)(ushort)*param_2;
      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {
        do {
          param_2 = param_2 + 1;
          uVar6 = (ushort)uVar5;
          if ((uVar1 & 1) == 0) {
            uVar6 = uVar6 << 8 | uVar6 >> 8;
          }
          *local_18 = uVar6;
          local_18 = local_18 + 1;
          if (param_3 == param_2) goto LAB_0026e339;
          if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;
          uVar5 = (uint)(ushort)*param_2;
        } while ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2));
      }
      uVar4 = 2;
      goto LAB_0026e345;
    }
  }
LAB_0026e340:
  uVar4 = 1;
LAB_0026e345:
  *param_4 = param_2;
  *param_7 = (char *)local_18;
  return uVar4;
}



undefined4
FUN_0026e270(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,
            ushort *param_6,int param_7,int *param_8)

{
  uint uVar1;
  uint uVar2;
  char cVar3;
  undefined4 uVar4;
  uint uVar5;
  ushort uVar6;
  ushort *local_18;
  
  uVar1 = *(uint *)(param_1 + 0xc);
  uVar2 = *(uint *)(param_1 + 8);
  local_18 = param_6;
  cVar3 = FUN_0026e200();
  if (cVar3 != '\0') {
    if (param_3 == param_4) {
LAB_0026e339:
      uVar4 = 0;
      goto LAB_0026e345;
    }
    if (1 < (uint)(param_7 - (int)param_6)) {
      uVar5 = (uint)*param_3;
      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {
        do {
          param_3 = param_3 + 1;
          uVar6 = (ushort)uVar5;
          if ((uVar1 & 1) == 0) {
            uVar6 = uVar6 << 8 | uVar6 >> 8;
          }
          *local_18 = uVar6;
          param_6 = local_18 + 1;
          if (param_4 == param_3) goto LAB_0026e339;
          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;
          uVar5 = (uint)*param_3;
        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));
      }
      uVar4 = 2;
      goto LAB_0026e345;
    }
  }
LAB_0026e340:
  uVar4 = 1;
LAB_0026e345:
  *param_5 = param_3;
  *param_8 = (int)param_6;
  return uVar4;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
SUB ESP,0x14
MOV EAX,dword ptr [ESP + 0x28]
MOV EDX,dword ptr [ESP + 0x3c]
MOV EBX,dword ptr [ESP + 0x30]
MOV EDI,dword ptr [EAX + 0xc]
MOV ESI,dword ptr [EAX + 0x8]
MOV dword ptr [ESP + 0xc],EDX
LEA EAX,[ESP + 0xc]
MOV EDX,dword ptr [ESP + 0x40]
MOV dword ptr [ESP + 0x10],EDX
MOV EDX,EDI
CALL 0x0026e200
MOV EDX,dword ptr [ESP + 0xc]
TEST AL,AL
JZ 0x0026e340
CMP EBX,dword ptr [ESP + 0x34]
JZ 0x0026e339
MOV EAX,dword ptr [ESP + 0x10]
SUB EAX,EDX
CMP EAX,0x1
JBE 0x0026e340
MOVZX ECX,word ptr [EBX]
LEA EBP,[ECX + 0xffff2800]
MOV EAX,ECX
CMP EBP,0x3ff
JBE 0x0026e360
CMP ESI,ECX
JC 0x0026e360
AND EDI,0x1
LEA ECX,[EBX + 0x2]
MOV dword ptr [ESP],EDI
JMP 0x0026e315
MOV EAX,dword ptr [ESP + 0x10]
SUB EAX,EDX
CMP EAX,0x1
JBE 0x0026e340
MOVZX EDI,word ptr [ECX]
ADD ECX,0x2
LEA EBP,[EDI + 0xffff2800]
MOV EAX,EDI
CMP EBP,0x3ff
JBE 0x0026e360
CMP ESI,EDI
JC 0x0026e360
MOV EDI,dword ptr [ESP]
MOV EBX,EAX
ROL BX,0x8
TEST EDI,EDI
CMOVZ EAX,EBX
MOV EBX,ECX
MOV word ptr [EDX],AX
MOV EAX,dword ptr [ESP + 0xc]
LEA EDX,[EAX + 0x2]
MOV dword ptr [ESP + 0xc],EDX
CMP dword ptr [ESP + 0x34],ECX
JNZ 0x0026e2f0
XOR EAX,EAX
JMP 0x0026e345
MOV EAX,0x1
MOV ECX,dword ptr [ESP + 0x38]
MOV dword ptr [ECX],EBX
MOV ECX,dword ptr [ESP + 0x44]
MOV dword ptr [ECX],EDX
ADD ESP,0x14
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EAX,0x2
JMP 0x0026e345
(translation_unit "undefined4\nFUN_0026e270(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,\n            ushort *param_6,int param_7,int *param_8)\n\n{\n  uint uVar1;\n  uint uVar2;\n  char cVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  ushort uVar6;\n  ushort *local_18;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  uVar2 = *(uint *)(param_1 + 8);\n  local_18 = param_6;\n  cVar3 = FUN_0026e200();\n  if (cVar3 != '\0') {\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }\nLAB_0026e340:\n  uVar4 = 1;\nLAB_0026e345:\n  *param_5 = param_3;\n  *param_8 = (int)param_6;\n  return uVar4;\n}\n\n" (function_definition "undefined4\nFUN_0026e270(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,\n            ushort *param_6,int param_7,int *param_8)\n\n{\n  uint uVar1;\n  uint uVar2;\n  char cVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  ushort uVar6;\n  ushort *local_18;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  uVar2 = *(uint *)(param_1 + 8);\n  local_18 = param_6;\n  cVar3 = FUN_0026e200();\n  if (cVar3 != '\0') {\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }\nLAB_0026e340:\n  uVar4 = 1;\nLAB_0026e345:\n  *param_5 = param_3;\n  *param_8 = (int)param_6;\n  return uVar4;\n}" type_identifier (function_declarator "FUN_0026e270(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,\n            ushort *param_6,int param_7,int *param_8)" identifier (parameter_list "(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,\n            ushort *param_6,int param_7,int *param_8)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "ushort *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "ushort *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined4 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "ushort *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "int param_7" primitive_type identifier) , (parameter_declaration "int *param_8" primitive_type (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  char cVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  ushort uVar6;\n  ushort *local_18;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  uVar2 = *(uint *)(param_1 + 8);\n  local_18 = param_6;\n  cVar3 = FUN_0026e200();\n  if (cVar3 != '\0') {\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }\nLAB_0026e340:\n  uVar4 = 1;\nLAB_0026e345:\n  *param_5 = param_3;\n  *param_8 = (int)param_6;\n  return uVar4;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "ushort uVar6;" type_identifier identifier ;) (declaration "ushort *local_18;" type_identifier (pointer_declarator "*local_18" * identifier) ;) (expression_statement "uVar1 = *(uint *)(param_1 + 0xc);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0xc)" identifier = (pointer_expression "*(uint *)(param_1 + 0xc)" * (cast_expression "(uint *)(param_1 + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(param_1 + 8);" (assignment_expression "uVar2 = *(uint *)(param_1 + 8)" identifier = (pointer_expression "*(uint *)(param_1 + 8)" * (cast_expression "(uint *)(param_1 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "local_18 = param_6;" (assignment_expression "local_18 = param_6" identifier = identifier) ;) (expression_statement "cVar3 = FUN_0026e200();" (assignment_expression "cVar3 = FUN_0026e200()" identifier = (call_expression "FUN_0026e200()" identifier (argument_list "()" ( )))) ;) (if_statement "if (cVar3 != '\0') {\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }" if (parenthesized_expression "(cVar3 != '\0')" ( (binary_expression "cVar3 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }" { (if_statement "if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }" if (parenthesized_expression "(param_3 == param_4)" ( (binary_expression "param_3 == param_4" identifier == identifier) )) (compound_statement "{\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }" { (labeled_statement "LAB_0026e339:\n      uVar4 = 0;" statement_identifier : (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;)) (goto_statement "goto LAB_0026e345;" goto statement_identifier ;) })) (if_statement "if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }" if (parenthesized_expression "(1 < (uint)(param_7 - (int)param_6))" ( (binary_expression "1 < (uint)(param_7 - (int)param_6)" number_literal < (call_expression "(uint)(param_7 - (int)param_6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_7 - (int)param_6)" ( (binary_expression "param_7 - (int)param_6" identifier - (cast_expression "(int)param_6" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }" { (expression_statement "uVar5 = (uint)*param_3;" (assignment_expression "uVar5 = (uint)*param_3" identifier = (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }" if (parenthesized_expression "((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2))" ( (binary_expression "(0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)" (parenthesized_expression "(0x3ff < uVar5 - 0xd800)" ( (binary_expression "0x3ff < uVar5 - 0xd800" number_literal < (binary_expression "uVar5 - 0xd800" identifier - number_literal)) )) && (parenthesized_expression "(uVar5 <= uVar2)" ( (binary_expression "uVar5 <= uVar2" identifier <= identifier) ))) )) (compound_statement "{\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }" { (do_statement "do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));" do (compound_statement "{\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        }" { (expression_statement "param_3 = param_3 + 1;" (assignment_expression "param_3 = param_3 + 1" identifier = (binary_expression "param_3 + 1" identifier + number_literal)) ;) (expression_statement "uVar6 = (ushort)uVar5;" (assignment_expression "uVar6 = (ushort)uVar5" identifier = (cast_expression "(ushort)uVar5" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (if_statement "if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }" if (parenthesized_expression "((uVar1 & 1) == 0)" ( (binary_expression "(uVar1 & 1) == 0" (parenthesized_expression "(uVar1 & 1)" ( (binary_expression "uVar1 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }" { (expression_statement "uVar6 = uVar6 << 8 | uVar6 >> 8;" (assignment_expression "uVar6 = uVar6 << 8 | uVar6 >> 8" identifier = (binary_expression "uVar6 << 8 | uVar6 >> 8" (binary_expression "uVar6 << 8" identifier << number_literal) | (binary_expression "uVar6 >> 8" identifier >> number_literal))) ;) })) (expression_statement "*local_18 = uVar6;" (assignment_expression "*local_18 = uVar6" (pointer_expression "*local_18" * identifier) = identifier) ;) (expression_statement "param_6 = local_18 + 1;" (assignment_expression "param_6 = local_18 + 1" identifier = (binary_expression "local_18 + 1" identifier + number_literal)) ;) (if_statement "if (param_4 == param_3) goto LAB_0026e339;" if (parenthesized_expression "(param_4 == param_3)" ( (binary_expression "param_4 == param_3" identifier == identifier) )) (goto_statement "goto LAB_0026e339;" goto statement_identifier ;)) (if_statement "if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;" if (parenthesized_expression "((uint)(param_7 - (int)param_6) < 2)" ( (binary_expression "(uint)(param_7 - (int)param_6) < 2" (call_expression "(uint)(param_7 - (int)param_6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_7 - (int)param_6)" ( (binary_expression "param_7 - (int)param_6" identifier - (cast_expression "(int)param_6" ( (type_descriptor "int" primitive_type) ) identifier)) ))) < number_literal) )) (goto_statement "goto LAB_0026e340;" goto statement_identifier ;)) (expression_statement "uVar5 = (uint)*param_3;" (assignment_expression "uVar5 = (uint)*param_3" identifier = (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) }) while (parenthesized_expression "((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2))" ( (binary_expression "(0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2)" (parenthesized_expression "(0x3ff < uVar5 - 0xd800)" ( (binary_expression "0x3ff < uVar5 - 0xd800" number_literal < (binary_expression "uVar5 - 0xd800" identifier - number_literal)) )) && (parenthesized_expression "(local_18 = param_6, uVar5 <= uVar2)" ( (comma_expression "local_18 = param_6, uVar5 <= uVar2" (assignment_expression "local_18 = param_6" identifier = identifier) , (binary_expression "uVar5 <= uVar2" identifier <= identifier)) ))) )) ;) })) (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) (goto_statement "goto LAB_0026e345;" goto statement_identifier ;) })) })) (labeled_statement "LAB_0026e340:\n  uVar4 = 1;" statement_identifier : (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;)) (labeled_statement "LAB_0026e345:\n  *param_5 = param_3;" statement_identifier : (expression_statement "*param_5 = param_3;" (assignment_expression "*param_5 = param_3" (pointer_expression "*param_5" * identifier) = identifier) ;)) (expression_statement "*param_8 = (int)param_6;" (assignment_expression "*param_8 = (int)param_6" (pointer_expression "*param_8" * identifier) = (cast_expression "(int)param_6" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "/* std::__codecvt_utf16_base<char16_t>::do_out(__mbstate_t&, char16_t const*, char16_t const*,\n   char16_t const*&, char*, char*, char*&) const */\n\nundefined4 __thiscall\nstd::__codecvt_utf16_base<char16_t>::do_out\n          (__codecvt_utf16_base<char16_t> *this,__mbstate_t *param_1,wchar16 *param_2,\n          wchar16 *param_3,wchar16 **param_4,char *param_5,char *param_6,char **param_7)\n\n{\n  uint uVar1;\n  uint uVar2;\n  bool bVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  ushort uVar6;\n  ushort *local_18;\n  char *local_14;\n  \n  uVar1 = *(uint *)(this + 0xc);\n  uVar2 = *(uint *)(this + 8);\n  local_18 = (ushort *)param_5;\n  local_14 = param_6;\n  bVar3 = (anonymous_namespace)::write_utf16_bom<false>(&local_18,uVar1);\n  if (bVar3) {\n    if (param_2 == param_3) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)((int)local_14 - (int)local_18)) {\n      uVar5 = (uint)(ushort)*param_2;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_2 = param_2 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          local_18 = local_18 + 1;\n          if (param_3 == param_2) goto LAB_0026e339;\n          if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;\n          uVar5 = (uint)(ushort)*param_2;\n        } while ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }\nLAB_0026e340:\n  uVar4 = 1;\nLAB_0026e345:\n  *param_4 = param_2;\n  *param_7 = (char *)local_18;\n  return uVar4;\n}\n\n" comment (function_definition "undefined4 __thiscall\nstd::__codecvt_utf16_base<char16_t>::do_out\n          (__codecvt_utf16_base<char16_t> *this,__mbstate_t *param_1,wchar16 *param_2,\n          wchar16 *param_3,wchar16 **param_4,char *param_5,char *param_6,char **param_7)\n\n{\n  uint uVar1;\n  uint uVar2;\n  bool bVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  ushort uVar6;\n  ushort *local_18;\n  char *local_14;\n  \n  uVar1 = *(uint *)(this + 0xc);\n  uVar2 = *(uint *)(this + 8);\n  local_18 = (ushort *)param_5;\n  local_14 = param_6;\n  bVar3 = (anonymous_namespace)::write_utf16_bom<false>(&local_18,uVar1);\n  if (bVar3) {\n    if (param_2 == param_3) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)((int)local_14 - (int)local_18)) {\n      uVar5 = (uint)(ushort)*param_2;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_2 = param_2 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          local_18 = local_18 + 1;\n          if (param_3 == param_2) goto LAB_0026e339;\n          if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;\n          uVar5 = (uint)(ushort)*param_2;\n        } while ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }\nLAB_0026e340:\n  uVar4 = 1;\nLAB_0026e345:\n  *param_4 = param_2;\n  *param_7 = (char *)local_18;\n  return uVar4;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::__codecvt_utf16_base<char16_t>::" identifier : : identifier < primitive_type > : :) (function_declarator "do_out\n          (__codecvt_utf16_base<char16_t> *this,__mbstate_t *param_1,wchar16 *param_2,\n          wchar16 *param_3,wchar16 **param_4,char *param_5,char *param_6,char **param_7)" identifier (parameter_list "(__codecvt_utf16_base<char16_t> *this,__mbstate_t *param_1,wchar16 *param_2,\n          wchar16 *param_3,wchar16 **param_4,char *param_5,char *param_6,char **param_7)" ( (parameter_declaration "__codecvt_utf16_base<char16_t> *this" type_identifier (ERROR "<char16_t>" < primitive_type >) (pointer_declarator "*this" * identifier)) , (parameter_declaration "__mbstate_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar16 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "wchar16 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "wchar16 **param_4" type_identifier (pointer_declarator "**param_4" * (pointer_declarator "*param_4" * identifier))) , (parameter_declaration "char *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "char *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "char **param_7" primitive_type (pointer_declarator "**param_7" * (pointer_declarator "*param_7" * identifier))) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  bool bVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  ushort uVar6;\n  ushort *local_18;\n  char *local_14;\n  \n  uVar1 = *(uint *)(this + 0xc);\n  uVar2 = *(uint *)(this + 8);\n  local_18 = (ushort *)param_5;\n  local_14 = param_6;\n  bVar3 = (anonymous_namespace)::write_utf16_bom<false>(&local_18,uVar1);\n  if (bVar3) {\n    if (param_2 == param_3) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)((int)local_14 - (int)local_18)) {\n      uVar5 = (uint)(ushort)*param_2;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_2 = param_2 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          local_18 = local_18 + 1;\n          if (param_3 == param_2) goto LAB_0026e339;\n          if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;\n          uVar5 = (uint)(ushort)*param_2;\n        } while ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }\nLAB_0026e340:\n  uVar4 = 1;\nLAB_0026e345:\n  *param_4 = param_2;\n  *param_7 = (char *)local_18;\n  return uVar4;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "bool bVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "ushort uVar6;" type_identifier identifier ;) (declaration "ushort *local_18;" type_identifier (pointer_declarator "*local_18" * identifier) ;) (declaration "char *local_14;" primitive_type (pointer_declarator "*local_14" * identifier) ;) (expression_statement "uVar1 = *(uint *)(this + 0xc);" (assignment_expression "uVar1 = *(uint *)(this + 0xc)" identifier = (pointer_expression "*(uint *)(this + 0xc)" * (cast_expression "(uint *)(this + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(this + 8);" (assignment_expression "uVar2 = *(uint *)(this + 8)" identifier = (pointer_expression "*(uint *)(this + 8)" * (cast_expression "(uint *)(this + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) (expression_statement "local_18 = (ushort *)param_5;" (assignment_expression "local_18 = (ushort *)param_5" identifier = (cast_expression "(ushort *)param_5" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "local_14 = param_6;" (assignment_expression "local_14 = param_6" identifier = identifier) ;) (expression_statement "bVar3 = (anonymous_namespace)::write_utf16_bom<false>(&local_18,uVar1);" (binary_expression "bVar3 = (anonymous_namespace)::write_utf16_bom<false>(&local_18,uVar1)" (binary_expression "bVar3 = (anonymous_namespace)::write_utf16_bom<false" (assignment_expression "bVar3 = (anonymous_namespace)" identifier = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) (ERROR "::write_utf16_bom" : : identifier) < false) > (parenthesized_expression "(&local_18,uVar1)" ( (comma_expression "&local_18,uVar1" (pointer_expression "&local_18" & identifier) , identifier) ))) ;) (if_statement "if (bVar3) {\n    if (param_2 == param_3) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)((int)local_14 - (int)local_18)) {\n      uVar5 = (uint)(ushort)*param_2;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_2 = param_2 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          local_18 = local_18 + 1;\n          if (param_3 == param_2) goto LAB_0026e339;\n          if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;\n          uVar5 = (uint)(ushort)*param_2;\n        } while ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }" if (parenthesized_expression "(bVar3)" ( identifier )) (compound_statement "{\n    if (param_2 == param_3) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)((int)local_14 - (int)local_18)) {\n      uVar5 = (uint)(ushort)*param_2;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_2 = param_2 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          local_18 = local_18 + 1;\n          if (param_3 == param_2) goto LAB_0026e339;\n          if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;\n          uVar5 = (uint)(ushort)*param_2;\n        } while ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }" { (if_statement "if (param_2 == param_3) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }" if (parenthesized_expression "(param_2 == param_3)" ( (binary_expression "param_2 == param_3" identifier == identifier) )) (compound_statement "{\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }" { (labeled_statement "LAB_0026e339:\n      uVar4 = 0;" statement_identifier : (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;)) (goto_statement "goto LAB_0026e345;" goto statement_identifier ;) })) (if_statement "if (1 < (uint)((int)local_14 - (int)local_18)) {\n      uVar5 = (uint)(ushort)*param_2;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_2 = param_2 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          local_18 = local_18 + 1;\n          if (param_3 == param_2) goto LAB_0026e339;\n          if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;\n          uVar5 = (uint)(ushort)*param_2;\n        } while ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }" if (parenthesized_expression "(1 < (uint)((int)local_14 - (int)local_18))" ( (binary_expression "1 < (uint)((int)local_14 - (int)local_18)" number_literal < (call_expression "(uint)((int)local_14 - (int)local_18)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)local_14 - (int)local_18)" ( (binary_expression "(int)local_14 - (int)local_18" (cast_expression "(int)local_14" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)local_18" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n      uVar5 = (uint)(ushort)*param_2;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_2 = param_2 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          local_18 = local_18 + 1;\n          if (param_3 == param_2) goto LAB_0026e339;\n          if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;\n          uVar5 = (uint)(ushort)*param_2;\n        } while ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }" { (expression_statement "uVar5 = (uint)(ushort)*param_2;" (assignment_expression "uVar5 = (uint)(ushort)*param_2" identifier = (binary_expression "(uint)(ushort)*param_2" (call_expression "(uint)(ushort)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(ushort)" ( identifier ))) * identifier)) ;) (if_statement "if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_2 = param_2 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          local_18 = local_18 + 1;\n          if (param_3 == param_2) goto LAB_0026e339;\n          if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;\n          uVar5 = (uint)(ushort)*param_2;\n        } while ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2));\n      }" if (parenthesized_expression "((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2))" ( (binary_expression "(0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)" (parenthesized_expression "(0x3ff < uVar5 - 0xd800)" ( (binary_expression "0x3ff < uVar5 - 0xd800" number_literal < (binary_expression "uVar5 - 0xd800" identifier - number_literal)) )) && (parenthesized_expression "(uVar5 <= uVar2)" ( (binary_expression "uVar5 <= uVar2" identifier <= identifier) ))) )) (compound_statement "{\n        do {\n          param_2 = param_2 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          local_18 = local_18 + 1;\n          if (param_3 == param_2) goto LAB_0026e339;\n          if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;\n          uVar5 = (uint)(ushort)*param_2;\n        } while ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2));\n      }" { (do_statement "do {\n          param_2 = param_2 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          local_18 = local_18 + 1;\n          if (param_3 == param_2) goto LAB_0026e339;\n          if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;\n          uVar5 = (uint)(ushort)*param_2;\n        } while ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2));" do (compound_statement "{\n          param_2 = param_2 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          local_18 = local_18 + 1;\n          if (param_3 == param_2) goto LAB_0026e339;\n          if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;\n          uVar5 = (uint)(ushort)*param_2;\n        }" { (expression_statement "param_2 = param_2 + 1;" (assignment_expression "param_2 = param_2 + 1" identifier = (binary_expression "param_2 + 1" identifier + number_literal)) ;) (expression_statement "uVar6 = (ushort)uVar5;" (assignment_expression "uVar6 = (ushort)uVar5" identifier = (cast_expression "(ushort)uVar5" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (if_statement "if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }" if (parenthesized_expression "((uVar1 & 1) == 0)" ( (binary_expression "(uVar1 & 1) == 0" (parenthesized_expression "(uVar1 & 1)" ( (binary_expression "uVar1 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }" { (expression_statement "uVar6 = uVar6 << 8 | uVar6 >> 8;" (assignment_expression "uVar6 = uVar6 << 8 | uVar6 >> 8" identifier = (binary_expression "uVar6 << 8 | uVar6 >> 8" (binary_expression "uVar6 << 8" identifier << number_literal) | (binary_expression "uVar6 >> 8" identifier >> number_literal))) ;) })) (expression_statement "*local_18 = uVar6;" (assignment_expression "*local_18 = uVar6" (pointer_expression "*local_18" * identifier) = identifier) ;) (expression_statement "local_18 = local_18 + 1;" (assignment_expression "local_18 = local_18 + 1" identifier = (binary_expression "local_18 + 1" identifier + number_literal)) ;) (if_statement "if (param_3 == param_2) goto LAB_0026e339;" if (parenthesized_expression "(param_3 == param_2)" ( (binary_expression "param_3 == param_2" identifier == identifier) )) (goto_statement "goto LAB_0026e339;" goto statement_identifier ;)) (if_statement "if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_0026e340;" if (parenthesized_expression "((uint)((int)local_14 - (int)local_18) < 2)" ( (binary_expression "(uint)((int)local_14 - (int)local_18) < 2" (call_expression "(uint)((int)local_14 - (int)local_18)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)local_14 - (int)local_18)" ( (binary_expression "(int)local_14 - (int)local_18" (cast_expression "(int)local_14" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)local_18" ( (type_descriptor "int" primitive_type) ) identifier)) ))) < number_literal) )) (goto_statement "goto LAB_0026e340;" goto statement_identifier ;)) (expression_statement "uVar5 = (uint)(ushort)*param_2;" (assignment_expression "uVar5 = (uint)(ushort)*param_2" identifier = (binary_expression "(uint)(ushort)*param_2" (call_expression "(uint)(ushort)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(ushort)" ( identifier ))) * identifier)) ;) }) while (parenthesized_expression "((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2))" ( (binary_expression "(0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)" (parenthesized_expression "(0x3ff < uVar5 - 0xd800)" ( (binary_expression "0x3ff < uVar5 - 0xd800" number_literal < (binary_expression "uVar5 - 0xd800" identifier - number_literal)) )) && (parenthesized_expression "(uVar5 <= uVar2)" ( (binary_expression "uVar5 <= uVar2" identifier <= identifier) ))) )) ;) })) (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) (goto_statement "goto LAB_0026e345;" goto statement_identifier ;) })) })) (labeled_statement "LAB_0026e340:\n  uVar4 = 1;" statement_identifier : (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;)) (labeled_statement "LAB_0026e345:\n  *param_4 = param_2;" statement_identifier : (expression_statement "*param_4 = param_2;" (assignment_expression "*param_4 = param_2" (pointer_expression "*param_4" * identifier) = identifier) ;)) (expression_statement "*param_7 = (char *)local_18;" (assignment_expression "*param_7 = (char *)local_18" (pointer_expression "*param_7" * identifier) = (cast_expression "(char *)local_18" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "undefined4\nFUN_0026e270(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,\n            ushort *param_6,int param_7,int *param_8)\n\n{\n  uint uVar1;\n  uint uVar2;\n  char cVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  ushort uVar6;\n  ushort *local_18;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  uVar2 = *(uint *)(param_1 + 8);\n  local_18 = param_6;\n  cVar3 = FUN_0026e200();\n  if (cVar3 != '\0') {\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }\nLAB_0026e340:\n  uVar4 = 1;\nLAB_0026e345:\n  *param_5 = param_3;\n  *param_8 = (int)param_6;\n  return uVar4;\n}\n\n" (function_definition "undefined4\nFUN_0026e270(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,\n            ushort *param_6,int param_7,int *param_8)\n\n{\n  uint uVar1;\n  uint uVar2;\n  char cVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  ushort uVar6;\n  ushort *local_18;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  uVar2 = *(uint *)(param_1 + 8);\n  local_18 = param_6;\n  cVar3 = FUN_0026e200();\n  if (cVar3 != '\0') {\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }\nLAB_0026e340:\n  uVar4 = 1;\nLAB_0026e345:\n  *param_5 = param_3;\n  *param_8 = (int)param_6;\n  return uVar4;\n}" type_identifier (function_declarator "FUN_0026e270(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,\n            ushort *param_6,int param_7,int *param_8)" identifier (parameter_list "(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,\n            ushort *param_6,int param_7,int *param_8)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "ushort *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "ushort *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined4 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "ushort *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "int param_7" primitive_type identifier) , (parameter_declaration "int *param_8" primitive_type (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  char cVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  ushort uVar6;\n  ushort *local_18;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  uVar2 = *(uint *)(param_1 + 8);\n  local_18 = param_6;\n  cVar3 = FUN_0026e200();\n  if (cVar3 != '\0') {\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }\nLAB_0026e340:\n  uVar4 = 1;\nLAB_0026e345:\n  *param_5 = param_3;\n  *param_8 = (int)param_6;\n  return uVar4;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "char cVar3;" primitive_type identifier ;) (declaration "undefined4 uVar4;" type_identifier identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "ushort uVar6;" type_identifier identifier ;) (declaration "ushort *local_18;" type_identifier (pointer_declarator "*local_18" * identifier) ;) (expression_statement "uVar1 = *(uint *)(param_1 + 0xc);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0xc)" identifier = (pointer_expression "*(uint *)(param_1 + 0xc)" * (cast_expression "(uint *)(param_1 + 0xc)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = *(uint *)(param_1 + 8);" (assignment_expression "uVar2 = *(uint *)(param_1 + 8)" identifier = (pointer_expression "*(uint *)(param_1 + 8)" * (cast_expression "(uint *)(param_1 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "local_18 = param_6;" (assignment_expression "local_18 = param_6" identifier = identifier) ;) (expression_statement "cVar3 = FUN_0026e200();" (assignment_expression "cVar3 = FUN_0026e200()" identifier = (call_expression "FUN_0026e200()" identifier (argument_list "()" ( )))) ;) (if_statement "if (cVar3 != '\0') {\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }" if (parenthesized_expression "(cVar3 != '\0')" ( (binary_expression "cVar3 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }" { (if_statement "if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }" if (parenthesized_expression "(param_3 == param_4)" ( (binary_expression "param_3 == param_4" identifier == identifier) )) (compound_statement "{\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }" { (labeled_statement "LAB_0026e339:\n      uVar4 = 0;" statement_identifier : (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" identifier = number_literal) ;)) (goto_statement "goto LAB_0026e345;" goto statement_identifier ;) })) (if_statement "if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }" if (parenthesized_expression "(1 < (uint)(param_7 - (int)param_6))" ( (binary_expression "1 < (uint)(param_7 - (int)param_6)" number_literal < (call_expression "(uint)(param_7 - (int)param_6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_7 - (int)param_6)" ( (binary_expression "param_7 - (int)param_6" identifier - (cast_expression "(int)param_6" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }" { (expression_statement "uVar5 = (uint)*param_3;" (assignment_expression "uVar5 = (uint)*param_3" identifier = (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }" if (parenthesized_expression "((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2))" ( (binary_expression "(0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)" (parenthesized_expression "(0x3ff < uVar5 - 0xd800)" ( (binary_expression "0x3ff < uVar5 - 0xd800" number_literal < (binary_expression "uVar5 - 0xd800" identifier - number_literal)) )) && (parenthesized_expression "(uVar5 <= uVar2)" ( (binary_expression "uVar5 <= uVar2" identifier <= identifier) ))) )) (compound_statement "{\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }" { (do_statement "do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));" do (compound_statement "{\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        }" { (expression_statement "param_3 = param_3 + 1;" (assignment_expression "param_3 = param_3 + 1" identifier = (binary_expression "param_3 + 1" identifier + number_literal)) ;) (expression_statement "uVar6 = (ushort)uVar5;" (assignment_expression "uVar6 = (ushort)uVar5" identifier = (cast_expression "(ushort)uVar5" ( (type_descriptor "ushort" type_identifier) ) identifier)) ;) (if_statement "if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }" if (parenthesized_expression "((uVar1 & 1) == 0)" ( (binary_expression "(uVar1 & 1) == 0" (parenthesized_expression "(uVar1 & 1)" ( (binary_expression "uVar1 & 1" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }" { (expression_statement "uVar6 = uVar6 << 8 | uVar6 >> 8;" (assignment_expression "uVar6 = uVar6 << 8 | uVar6 >> 8" identifier = (binary_expression "uVar6 << 8 | uVar6 >> 8" (binary_expression "uVar6 << 8" identifier << number_literal) | (binary_expression "uVar6 >> 8" identifier >> number_literal))) ;) })) (expression_statement "*local_18 = uVar6;" (assignment_expression "*local_18 = uVar6" (pointer_expression "*local_18" * identifier) = identifier) ;) (expression_statement "param_6 = local_18 + 1;" (assignment_expression "param_6 = local_18 + 1" identifier = (binary_expression "local_18 + 1" identifier + number_literal)) ;) (if_statement "if (param_4 == param_3) goto LAB_0026e339;" if (parenthesized_expression "(param_4 == param_3)" ( (binary_expression "param_4 == param_3" identifier == identifier) )) (goto_statement "goto LAB_0026e339;" goto statement_identifier ;)) (if_statement "if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;" if (parenthesized_expression "((uint)(param_7 - (int)param_6) < 2)" ( (binary_expression "(uint)(param_7 - (int)param_6) < 2" (call_expression "(uint)(param_7 - (int)param_6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_7 - (int)param_6)" ( (binary_expression "param_7 - (int)param_6" identifier - (cast_expression "(int)param_6" ( (type_descriptor "int" primitive_type) ) identifier)) ))) < number_literal) )) (goto_statement "goto LAB_0026e340;" goto statement_identifier ;)) (expression_statement "uVar5 = (uint)*param_3;" (assignment_expression "uVar5 = (uint)*param_3" identifier = (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) }) while (parenthesized_expression "((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2))" ( (binary_expression "(0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2)" (parenthesized_expression "(0x3ff < uVar5 - 0xd800)" ( (binary_expression "0x3ff < uVar5 - 0xd800" number_literal < (binary_expression "uVar5 - 0xd800" identifier - number_literal)) )) && (parenthesized_expression "(local_18 = param_6, uVar5 <= uVar2)" ( (comma_expression "local_18 = param_6, uVar5 <= uVar2" (assignment_expression "local_18 = param_6" identifier = identifier) , (binary_expression "uVar5 <= uVar2" identifier <= identifier)) ))) )) ;) })) (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) (goto_statement "goto LAB_0026e345;" goto statement_identifier ;) })) })) (labeled_statement "LAB_0026e340:\n  uVar4 = 1;" statement_identifier : (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" identifier = number_literal) ;)) (labeled_statement "LAB_0026e345:\n  *param_5 = param_3;" statement_identifier : (expression_statement "*param_5 = param_3;" (assignment_expression "*param_5 = param_3" (pointer_expression "*param_5" * identifier) = identifier) ;)) (expression_statement "*param_8 = (int)param_6;" (assignment_expression "*param_8 = (int)param_6" (pointer_expression "*param_8" * identifier) = (cast_expression "(int)param_6" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (goto_statement goto statement_identifier ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) && (parenthesized_expression ( (binary_expression IDENT <= IDENT) ))) )) (compound_statement { (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (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) = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (goto_statement goto statement_identifier ;)) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) < LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * IDENT)) ;) }) while (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = IDENT) , (binary_expression IDENT <= IDENT)) ))) )) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = LIT) ;)) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4\nFUN_0026e270(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,\n            ushort *param_6,int param_7,int *param_8)\n\n{\n  uint uVar1;\n  uint uVar2;\n  char cVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  ushort uVar6;\n  ushort *local_18;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  uVar2 = *(uint *)(param_1 + 8);\n  local_18 = param_6;\n  cVar3 = FUN_0026e200();\n  if (cVar3 != '\0') {\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }\nLAB_0026e340:\n  uVar4 = 1;\nLAB_0026e345:\n  *param_5 = param_3;\n  *param_8 = (int)param_6;\n  return uVar4;\n}" (type_identifier "undefined4") (function_declarator "FUN_0026e270(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,\n            ushort *param_6,int param_7,int *param_8)" (identifier "FUN_0026e270") (parameter_list "(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,\n            ushort *param_6,int param_7,int *param_8)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "ushort *param_3" (type_identifier "ushort") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "ushort *param_4" (type_identifier "ushort") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "undefined4 *param_5" (type_identifier "undefined4") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) (, ",") (parameter_declaration "ushort *param_6" (type_identifier "ushort") (pointer_declarator "*param_6" (* "*") (identifier "param_6"))) (, ",") (parameter_declaration "int param_7" (primitive_type "int") (identifier "param_7")) (, ",") (parameter_declaration "int *param_8" (primitive_type "int") (pointer_declarator "*param_8" (* "*") (identifier "param_8"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  uint uVar2;\n  char cVar3;\n  undefined4 uVar4;\n  uint uVar5;\n  ushort uVar6;\n  ushort *local_18;\n  \n  uVar1 = *(uint *)(param_1 + 0xc);\n  uVar2 = *(uint *)(param_1 + 8);\n  local_18 = param_6;\n  cVar3 = FUN_0026e200();\n  if (cVar3 != '\0') {\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }\nLAB_0026e340:\n  uVar4 = 1;\nLAB_0026e345:\n  *param_5 = param_3;\n  *param_8 = (int)param_6;\n  return uVar4;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "char cVar3;" (primitive_type "char") (identifier "cVar3") (; ";")) (declaration "undefined4 uVar4;" (type_identifier "undefined4") (identifier "uVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "ushort uVar6;" (type_identifier "ushort") (identifier "uVar6") (; ";")) (declaration "ushort *local_18;" (type_identifier "ushort") (pointer_declarator "*local_18" (* "*") (identifier "local_18")) (; ";")) (expression_statement "uVar1 = *(uint *)(param_1 + 0xc);" (assignment_expression "uVar1 = *(uint *)(param_1 + 0xc)" (identifier "uVar1") (= "=") (pointer_expression "*(uint *)(param_1 + 0xc)" (* "*") (cast_expression "(uint *)(param_1 + 0xc)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "uVar2 = *(uint *)(param_1 + 8);" (assignment_expression "uVar2 = *(uint *)(param_1 + 8)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(param_1 + 8)" (* "*") (cast_expression "(uint *)(param_1 + 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "local_18 = param_6;" (assignment_expression "local_18 = param_6" (identifier "local_18") (= "=") (identifier "param_6")) (; ";")) (expression_statement "cVar3 = FUN_0026e200();" (assignment_expression "cVar3 = FUN_0026e200()" (identifier "cVar3") (= "=") (call_expression "FUN_0026e200()" (identifier "FUN_0026e200") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (cVar3 != '\0') {\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }" (if "if") (parenthesized_expression "(cVar3 != '\0')" (( "(") (binary_expression "cVar3 != '\0'" (identifier "cVar3") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }\n    if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }\n  }" ({ "{") (if_statement "if (param_3 == param_4) {\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }" (if "if") (parenthesized_expression "(param_3 == param_4)" (( "(") (binary_expression "param_3 == param_4" (identifier "param_3") (== "==") (identifier "param_4")) () ")")) (compound_statement "{\nLAB_0026e339:\n      uVar4 = 0;\n      goto LAB_0026e345;\n    }" ({ "{") (labeled_statement "LAB_0026e339:\n      uVar4 = 0;" (statement_identifier "LAB_0026e339") (: ":") (expression_statement "uVar4 = 0;" (assignment_expression "uVar4 = 0" (identifier "uVar4") (= "=") (number_literal "0")) (; ";"))) (goto_statement "goto LAB_0026e345;" (goto "goto") (statement_identifier "LAB_0026e345") (; ";")) (} "}"))) (if_statement "if (1 < (uint)(param_7 - (int)param_6)) {\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }" (if "if") (parenthesized_expression "(1 < (uint)(param_7 - (int)param_6))" (( "(") (binary_expression "1 < (uint)(param_7 - (int)param_6)" (number_literal "1") (< "<") (call_expression "(uint)(param_7 - (int)param_6)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_7 - (int)param_6)" (( "(") (binary_expression "param_7 - (int)param_6" (identifier "param_7") (- "-") (cast_expression "(int)param_6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_6"))) () ")")))) () ")")) (compound_statement "{\n      uVar5 = (uint)*param_3;\n      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }\n      uVar4 = 2;\n      goto LAB_0026e345;\n    }" ({ "{") (expression_statement "uVar5 = (uint)*param_3;" (assignment_expression "uVar5 = (uint)*param_3" (identifier "uVar5") (= "=") (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_3"))) (; ";")) (if_statement "if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }" (if "if") (parenthesized_expression "((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2))" (( "(") (binary_expression "(0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)" (parenthesized_expression "(0x3ff < uVar5 - 0xd800)" (( "(") (binary_expression "0x3ff < uVar5 - 0xd800" (number_literal "0x3ff") (< "<") (binary_expression "uVar5 - 0xd800" (identifier "uVar5") (- "-") (number_literal "0xd800"))) () ")")) (&& "&&") (parenthesized_expression "(uVar5 <= uVar2)" (( "(") (binary_expression "uVar5 <= uVar2" (identifier "uVar5") (<= "<=") (identifier "uVar2")) () ")"))) () ")")) (compound_statement "{\n        do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));\n      }" ({ "{") (do_statement "do {\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));" (do "do") (compound_statement "{\n          param_3 = param_3 + 1;\n          uVar6 = (ushort)uVar5;\n          if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }\n          *local_18 = uVar6;\n          param_6 = local_18 + 1;\n          if (param_4 == param_3) goto LAB_0026e339;\n          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;\n          uVar5 = (uint)*param_3;\n        }" ({ "{") (expression_statement "param_3 = param_3 + 1;" (assignment_expression "param_3 = param_3 + 1" (identifier "param_3") (= "=") (binary_expression "param_3 + 1" (identifier "param_3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "uVar6 = (ushort)uVar5;" (assignment_expression "uVar6 = (ushort)uVar5" (identifier "uVar6") (= "=") (cast_expression "(ushort)uVar5" (( "(") (type_descriptor "ushort" (type_identifier "ushort")) () ")") (identifier "uVar5"))) (; ";")) (if_statement "if ((uVar1 & 1) == 0) {\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }" (if "if") (parenthesized_expression "((uVar1 & 1) == 0)" (( "(") (binary_expression "(uVar1 & 1) == 0" (parenthesized_expression "(uVar1 & 1)" (( "(") (binary_expression "uVar1 & 1" (identifier "uVar1") (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n            uVar6 = uVar6 << 8 | uVar6 >> 8;\n          }" ({ "{") (expression_statement "uVar6 = uVar6 << 8 | uVar6 >> 8;" (assignment_expression "uVar6 = uVar6 << 8 | uVar6 >> 8" (identifier "uVar6") (= "=") (binary_expression "uVar6 << 8 | uVar6 >> 8" (binary_expression "uVar6 << 8" (identifier "uVar6") (<< "<<") (number_literal "8")) (| "|") (binary_expression "uVar6 >> 8" (identifier "uVar6") (>> ">>") (number_literal "8")))) (; ";")) (} "}"))) (expression_statement "*local_18 = uVar6;" (assignment_expression "*local_18 = uVar6" (pointer_expression "*local_18" (* "*") (identifier "local_18")) (= "=") (identifier "uVar6")) (; ";")) (expression_statement "param_6 = local_18 + 1;" (assignment_expression "param_6 = local_18 + 1" (identifier "param_6") (= "=") (binary_expression "local_18 + 1" (identifier "local_18") (+ "+") (number_literal "1"))) (; ";")) (if_statement "if (param_4 == param_3) goto LAB_0026e339;" (if "if") (parenthesized_expression "(param_4 == param_3)" (( "(") (binary_expression "param_4 == param_3" (identifier "param_4") (== "==") (identifier "param_3")) () ")")) (goto_statement "goto LAB_0026e339;" (goto "goto") (statement_identifier "LAB_0026e339") (; ";"))) (if_statement "if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;" (if "if") (parenthesized_expression "((uint)(param_7 - (int)param_6) < 2)" (( "(") (binary_expression "(uint)(param_7 - (int)param_6) < 2" (call_expression "(uint)(param_7 - (int)param_6)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_7 - (int)param_6)" (( "(") (binary_expression "param_7 - (int)param_6" (identifier "param_7") (- "-") (cast_expression "(int)param_6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_6"))) () ")"))) (< "<") (number_literal "2")) () ")")) (goto_statement "goto LAB_0026e340;" (goto "goto") (statement_identifier "LAB_0026e340") (; ";"))) (expression_statement "uVar5 = (uint)*param_3;" (assignment_expression "uVar5 = (uint)*param_3" (identifier "uVar5") (= "=") (binary_expression "(uint)*param_3" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "param_3"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2))" (( "(") (binary_expression "(0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2)" (parenthesized_expression "(0x3ff < uVar5 - 0xd800)" (( "(") (binary_expression "0x3ff < uVar5 - 0xd800" (number_literal "0x3ff") (< "<") (binary_expression "uVar5 - 0xd800" (identifier "uVar5") (- "-") (number_literal "0xd800"))) () ")")) (&& "&&") (parenthesized_expression "(local_18 = param_6, uVar5 <= uVar2)" (( "(") (comma_expression "local_18 = param_6, uVar5 <= uVar2" (assignment_expression "local_18 = param_6" (identifier "local_18") (= "=") (identifier "param_6")) (, ",") (binary_expression "uVar5 <= uVar2" (identifier "uVar5") (<= "<=") (identifier "uVar2"))) () ")"))) () ")")) (; ";")) (} "}"))) (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" (identifier "uVar4") (= "=") (number_literal "2")) (; ";")) (goto_statement "goto LAB_0026e345;" (goto "goto") (statement_identifier "LAB_0026e345") (; ";")) (} "}"))) (} "}"))) (labeled_statement "LAB_0026e340:\n  uVar4 = 1;" (statement_identifier "LAB_0026e340") (: ":") (expression_statement "uVar4 = 1;" (assignment_expression "uVar4 = 1" (identifier "uVar4") (= "=") (number_literal "1")) (; ";"))) (labeled_statement "LAB_0026e345:\n  *param_5 = param_3;" (statement_identifier "LAB_0026e345") (: ":") (expression_statement "*param_5 = param_3;" (assignment_expression "*param_5 = param_3" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "param_3")) (; ";"))) (expression_statement "*param_8 = (int)param_6;" (assignment_expression "*param_8 = (int)param_6" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (cast_expression "(int)param_6" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_6"))) (; ";")) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

/* std::__codecvt_utf16_base<char16_t>::do_out(__mbstate_t&, char16_t const*, char16_t const*,
   char16_t const*&, char*, char*, char*&) const */

type_1 __thiscall
std::type_2<char16_t>::function_1
          (type_2<char16_t> *var_1,type_3 *param_1,type_4 *var_2,
          type_4 *var_3,type_4 **param_4,char *param_5,char *param_6,char **param_7)

{
  type_5 var_6;
  type_5 var_5;
  bool bVar3;
  type_1 uVar4;
  type_5 var_4;
  type_6 var_7;
  type_6 *var_8;
  char *local_14;
  
  var_6 = *(type_5 *)(var_1 + 0xc);
  var_5 = *(type_5 *)(var_1 + 8);
  var_8 = (type_6 *)param_5;
  local_14 = param_6;
  bVar3 = (anonymous_namespace)::write_utf16_bom<false>(&var_8,var_6);
  if (bVar3) {
    if (var_2 == var_3) {
LAB_0026e339:
      uVar4 = 0;
      goto LAB_0026e345;
    }
    if (1 < (type_5)((int)local_14 - (int)var_8)) {
      var_4 = (type_5)(type_6)*var_2;
      if ((0x3ff < var_4 - 0xd800) && (var_4 <= var_5)) {
        do {
          var_2 = var_2 + 1;
          var_7 = (type_6)var_4;
          if ((var_6 & 1) == 0) {
            var_7 = var_7 << 8 | var_7 >> 8;
          }
          *var_8 = var_7;
          var_8 = var_8 + 1;
          if (var_3 == var_2) goto LAB_0026e339;
          if ((type_5)((int)local_14 - (int)var_8) < 2) goto LAB_0026e340;
          var_4 = (type_5)(type_6)*var_2;
        } while ((0x3ff < var_4 - 0xd800) && (var_4 <= var_5));
      }
      uVar4 = 2;
      goto LAB_0026e345;
    }
  }
LAB_0026e340:
  uVar4 = 1;
LAB_0026e345:
  *param_4 = var_2;
  *param_7 = (char *)var_8;
  return uVar4;
}


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

undefined4
MASKED(int param_1,undefined4 param_2,ushort *param_3,ushort *param_4,undefined4 *param_5,
            ushort *param_6,int param_7,int *param_8)

{
  uint uVar1;
  uint uVar2;
  char cVar3;
  undefined4 uVar4;
  uint uVar5;
  ushort uVar6;
  ushort *local_18;
  
  uVar1 = *(uint *)(param_1 + 0xc);
  uVar2 = *(uint *)(param_1 + 8);
  local_18 = param_6;
  cVar3 = FUN_0026e200();
  if (cVar3 != '\0') {
    if (param_3 == param_4) {
LAB_0026e339:
      uVar4 = 0;
      goto LAB_0026e345;
    }
    if (1 < (uint)(param_7 - (int)param_6)) {
      uVar5 = (uint)*param_3;
      if ((0x3ff < uVar5 - 0xd800) && (uVar5 <= uVar2)) {
        do {
          param_3 = param_3 + 1;
          uVar6 = (ushort)uVar5;
          if ((uVar1 & 1) == 0) {
            uVar6 = uVar6 << 8 | uVar6 >> 8;
          }
          *local_18 = uVar6;
          param_6 = local_18 + 1;
          if (param_4 == param_3) goto LAB_0026e339;
          if ((uint)(param_7 - (int)param_6) < 2) goto LAB_0026e340;
          uVar5 = (uint)*param_3;
        } while ((0x3ff < uVar5 - 0xd800) && (local_18 = param_6, uVar5 <= uVar2));
      }
      uVar4 = 2;
      goto LAB_0026e345;
    }
  }
LAB_0026e340:
  uVar4 = 1;
LAB_0026e345:
  *param_5 = param_3;
  *param_8 = (int)param_6;
  return uVar4;
}

