
/* char32_t std::(anonymous namespace)::read_utf16_code_point<false>(std::(anonymous
   namespace)::range<char16_t const, false>&, unsigned long, std::codecvt_mode) */

wchar32 std::(anonymous_namespace)::read_utf16_code_point<false>
                  (undefined4 *param_1,wchar32 param_2,uint param_3)

{
  uint uVar1;
  int iVar2;
  ushort *puVar3;
  wchar32 wVar4;
  
  puVar3 = (ushort *)*param_1;
  if ((uint)(param_1[1] - (int)puVar3) < 2) {
    return L'\xfffffffe';
  }
  wVar4 = (wchar32)*puVar3;
  if ((param_3 & 1) != 0) {
    wVar4 = (wVar4 & 0xffU) << 8 | (uint)(*puVar3 >> 8);
  }
  if ((uint)(wVar4 + L'\xffff2800') < 0x400) {
    if ((uint)(param_1[1] - (int)puVar3) < 4) {
      return L'\xfffffffe';
    }
    uVar1 = (uint)puVar3[1];
    if ((param_3 & 1) != 0) {
      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);
    }
    if (0x3ff < uVar1 - 0xdc00) {
      return L'\xffffffff';
    }
    iVar2 = 2;
    wVar4 = wVar4 * 0x400 + -0x35fdc00 + uVar1;
  }
  else {
    iVar2 = 1;
    if ((uint)(wVar4 + L'\xffff2400') < 0x400) {
      return L'\xffffffff';
    }
  }
  if ((uint)wVar4 <= (uint)param_2) {
    *param_1 = puVar3 + iVar2;
  }
  return wVar4;
}



uint FUN_0035c770(undefined4 *param_1,uint param_2,uint param_3)

{
  uint uVar1;
  int iVar2;
  ushort *puVar3;
  uint uVar4;
  
  puVar3 = (ushort *)*param_1;
  if ((uint)(param_1[1] - (int)puVar3) < 2) {
    return 0xfffffffe;
  }
  uVar4 = (uint)*puVar3;
  if ((param_3 & 1) != 0) {
    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);
  }
  if (uVar4 - 0xd800 < 0x400) {
    if ((uint)(param_1[1] - (int)puVar3) < 4) {
      return 0xfffffffe;
    }
    uVar1 = (uint)puVar3[1];
    if ((param_3 & 1) != 0) {
      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);
    }
    if (0x3ff < uVar1 - 0xdc00) {
      return 0xffffffff;
    }
    iVar2 = 2;
    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;
  }
  else {
    iVar2 = 1;
    if (uVar4 - 0xdc00 < 0x400) {
      return 0xffffffff;
    }
  }
  if (uVar4 <= param_2) {
    *param_1 = puVar3 + iVar2;
  }
  return uVar4;
}


lw a3,0x0(a0)
lw v1,0x4(a0)
subu v1,v1,a3
sltiu v0,v1,0x2
bne v0,zero,0x0035c868
_andi a2,a2,0x1
addiu sp,sp,-0x10
lbu t0,0x0(a3)
lbu v0,0x1(a3)
sb t0,0x8(sp)
sb v0,0x9(sp)
beq a2,zero,0x0035c7ac
_lhu t0,0x8(sp)
wsbh t0,t0
andi t0,t0,0xffff
lui t2,0xffff
addiu t1,t2,0x2800
addu t1,t0,t1
sltiu t1,t1,0x400
bne t1,zero,0x0035c7f4
_or v0,t0,zero
addiu t2,t2,0x2400
addu t2,t0,t2
sltiu t2,t2,0x400
bne t2,zero,0x0035c85c
_li v1,0x1
sltu a1,a1,v0
bne a1,zero,0x0035c7ec
_sll v1,v1,0x1
addu a3,a3,v1
sw a3,0x0(a0)
jr ra
_addiu sp,sp,0x10
sltiu v1,v1,0x4
bne v1,zero,0x0035c850
_nop
lbu v0,0x3(a3)
lbu v1,0x2(a3)
sb v0,0x9(sp)
sb v1,0x8(sp)
beq a2,zero,0x0035c820
_lhu v0,0x8(sp)
wsbh v0,v0
andi v0,v0,0xffff
lui v1,0xffff
addiu v1,v1,0x2400
addu v1,v0,v1
sltiu v1,v1,0x400
beq v1,zero,0x0035c85c
_lui a2,0xfca0
sll t0,t0,0xa
addiu a2,a2,0x2400
li v1,0x2
addu t0,t0,a2
b 0x0035c7d8
_addu v0,t0,v0
li v0,-0x2
jr ra
_addiu sp,sp,0x10
li v0,-0x1
jr ra
_addiu sp,sp,0x10
jr ra
_li v0,-0x2
(translation_unit "uint FUN_0035c770(undefined4 *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  ushort *puVar3;\n  uint uVar4;\n  \n  puVar3 = (ushort *)*param_1;\n  if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return 0xfffffffe;\n  }\n  uVar4 = (uint)*puVar3;\n  if ((param_3 & 1) != 0) {\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }\n  if (uVar4 - 0xd800 < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }\n  if (uVar4 <= param_2) {\n    *param_1 = puVar3 + iVar2;\n  }\n  return uVar4;\n}\n\n" (function_definition "uint FUN_0035c770(undefined4 *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  ushort *puVar3;\n  uint uVar4;\n  \n  puVar3 = (ushort *)*param_1;\n  if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return 0xfffffffe;\n  }\n  uVar4 = (uint)*puVar3;\n  if ((param_3 & 1) != 0) {\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }\n  if (uVar4 - 0xd800 < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }\n  if (uVar4 <= param_2) {\n    *param_1 = puVar3 + iVar2;\n  }\n  return uVar4;\n}" type_identifier (function_declarator "FUN_0035c770(undefined4 *param_1,uint param_2,uint param_3)" identifier (parameter_list "(undefined4 *param_1,uint param_2,uint param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  ushort *puVar3;\n  uint uVar4;\n  \n  puVar3 = (ushort *)*param_1;\n  if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return 0xfffffffe;\n  }\n  uVar4 = (uint)*puVar3;\n  if ((param_3 & 1) != 0) {\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }\n  if (uVar4 - 0xd800 < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }\n  if (uVar4 <= param_2) {\n    *param_1 = puVar3 + iVar2;\n  }\n  return uVar4;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "ushort *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "puVar3 = (ushort *)*param_1;" (assignment_expression "puVar3 = (ushort *)*param_1" identifier = (cast_expression "(ushort *)*param_1" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return 0xfffffffe;\n  }" if (parenthesized_expression "((uint)(param_1[1] - (int)puVar3) < 2)" ( (binary_expression "(uint)(param_1[1] - (int)puVar3) < 2" (call_expression "(uint)(param_1[1] - (int)puVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar3)" ( (binary_expression "param_1[1] - (int)puVar3" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) < number_literal) )) (compound_statement "{\n    return 0xfffffffe;\n  }" { (return_statement "return 0xfffffffe;" return number_literal ;) })) (expression_statement "uVar4 = (uint)*puVar3;" (assignment_expression "uVar4 = (uint)*puVar3" identifier = (binary_expression "(uint)*puVar3" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if ((param_3 & 1) != 0) {\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }" if (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }" { (expression_statement "uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);" (assignment_expression "uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8)" identifier = (binary_expression "(uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8)" (binary_expression "(uVar4 & 0xff) << 8" (parenthesized_expression "(uVar4 & 0xff)" ( (binary_expression "uVar4 & 0xff" identifier & number_literal) )) << number_literal) | (call_expression "(uint)(*puVar3 >> 8)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*puVar3 >> 8)" ( (binary_expression "*puVar3 >> 8" (pointer_expression "*puVar3" * identifier) >> number_literal) ))))) ;) })) (if_statement "if (uVar4 - 0xd800 < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }" if (parenthesized_expression "(uVar4 - 0xd800 < 0x400)" ( (binary_expression "uVar4 - 0xd800 < 0x400" (binary_expression "uVar4 - 0xd800" identifier - number_literal) < number_literal) )) (compound_statement "{\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }" { (if_statement "if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }" if (parenthesized_expression "((uint)(param_1[1] - (int)puVar3) < 4)" ( (binary_expression "(uint)(param_1[1] - (int)puVar3) < 4" (call_expression "(uint)(param_1[1] - (int)puVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar3)" ( (binary_expression "param_1[1] - (int)puVar3" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) < number_literal) )) (compound_statement "{\n      return 0xfffffffe;\n    }" { (return_statement "return 0xfffffffe;" return number_literal ;) })) (expression_statement "uVar1 = (uint)puVar3[1];" (assignment_expression "uVar1 = (uint)puVar3[1]" identifier = (cast_expression "(uint)puVar3[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "puVar3[1]" identifier [ number_literal ]))) ;) (if_statement "if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }" if (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }" { (expression_statement "uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);" (assignment_expression "uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8)" identifier = (binary_expression "(uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8)" (binary_expression "(uVar1 & 0xff) << 8" (parenthesized_expression "(uVar1 & 0xff)" ( (binary_expression "uVar1 & 0xff" identifier & number_literal) )) << number_literal) | (call_expression "(uint)(puVar3[1] >> 8)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar3[1] >> 8)" ( (binary_expression "puVar3[1] >> 8" (subscript_expression "puVar3[1]" identifier [ number_literal ]) >> number_literal) ))))) ;) })) (if_statement "if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(0x3ff < uVar1 - 0xdc00)" ( (binary_expression "0x3ff < uVar1 - 0xdc00" number_literal < (binary_expression "uVar1 - 0xdc00" identifier - number_literal)) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" identifier = number_literal) ;) (expression_statement "uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;" (assignment_expression "uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1" identifier = (binary_expression "uVar4 * 0x400 + -0x35fdc00 + uVar1" (binary_expression "uVar4 * 0x400 + -0x35fdc00" (binary_expression "uVar4 * 0x400" identifier * number_literal) + number_literal) + identifier)) ;) }) (else_clause "else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }" else (compound_statement "{\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (if_statement "if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(uVar4 - 0xdc00 < 0x400)" ( (binary_expression "uVar4 - 0xdc00 < 0x400" (binary_expression "uVar4 - 0xdc00" identifier - number_literal) < number_literal) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) }))) (if_statement "if (uVar4 <= param_2) {\n    *param_1 = puVar3 + iVar2;\n  }" if (parenthesized_expression "(uVar4 <= param_2)" ( (binary_expression "uVar4 <= param_2" identifier <= identifier) )) (compound_statement "{\n    *param_1 = puVar3 + iVar2;\n  }" { (expression_statement "*param_1 = puVar3 + iVar2;" (assignment_expression "*param_1 = puVar3 + iVar2" (pointer_expression "*param_1" * identifier) = (binary_expression "puVar3 + iVar2" identifier + identifier)) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit "/* char32_t std::(anonymous namespace)::read_utf16_code_point<false>(std::(anonymous\n   namespace)::range<char16_t const, false>&, unsigned long, std::codecvt_mode) */\n\nwchar32 std::(anonymous_namespace)::read_utf16_code_point<false>\n                  (undefined4 *param_1,wchar32 param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  ushort *puVar3;\n  wchar32 wVar4;\n  \n  puVar3 = (ushort *)*param_1;\n  if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return L'\xfffffffe';\n  }\n  wVar4 = (wchar32)*puVar3;\n  if ((param_3 & 1) != 0) {\n    wVar4 = (wVar4 & 0xffU) << 8 | (uint)(*puVar3 >> 8);\n  }\n  if ((uint)(wVar4 + L'\xffff2800') < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return L'\xfffffffe';\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return L'\xffffffff';\n    }\n    iVar2 = 2;\n    wVar4 = wVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if ((uint)(wVar4 + L'\xffff2400') < 0x400) {\n      return L'\xffffffff';\n    }\n  }\n  if ((uint)wVar4 <= (uint)param_2) {\n    *param_1 = puVar3 + iVar2;\n  }\n  return wVar4;\n}\n\n" comment (function_definition "wchar32 std::(anonymous_namespace)::read_utf16_code_point<false>\n                  (undefined4 *param_1,wchar32 param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  ushort *puVar3;\n  wchar32 wVar4;\n  \n  puVar3 = (ushort *)*param_1;\n  if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return L'\xfffffffe';\n  }\n  wVar4 = (wchar32)*puVar3;\n  if ((param_3 & 1) != 0) {\n    wVar4 = (wVar4 & 0xffU) << 8 | (uint)(*puVar3 >> 8);\n  }\n  if ((uint)(wVar4 + L'\xffff2800') < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return L'\xfffffffe';\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return L'\xffffffff';\n    }\n    iVar2 = 2;\n    wVar4 = wVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if ((uint)(wVar4 + L'\xffff2400') < 0x400) {\n      return L'\xffffffff';\n    }\n  }\n  if ((uint)wVar4 <= (uint)param_2) {\n    *param_1 = puVar3 + iVar2;\n  }\n  return wVar4;\n}" type_identifier (ERROR "std::(anonymous_namespace)::" identifier : : ( identifier ) : :) (function_declarator "read_utf16_code_point<false>\n                  (undefined4 *param_1,wchar32 param_2,uint param_3)" identifier (ERROR "<false>" < false >) (parameter_list "(undefined4 *param_1,wchar32 param_2,uint param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar32 param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  ushort *puVar3;\n  wchar32 wVar4;\n  \n  puVar3 = (ushort *)*param_1;\n  if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return L'\xfffffffe';\n  }\n  wVar4 = (wchar32)*puVar3;\n  if ((param_3 & 1) != 0) {\n    wVar4 = (wVar4 & 0xffU) << 8 | (uint)(*puVar3 >> 8);\n  }\n  if ((uint)(wVar4 + L'\xffff2800') < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return L'\xfffffffe';\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return L'\xffffffff';\n    }\n    iVar2 = 2;\n    wVar4 = wVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if ((uint)(wVar4 + L'\xffff2400') < 0x400) {\n      return L'\xffffffff';\n    }\n  }\n  if ((uint)wVar4 <= (uint)param_2) {\n    *param_1 = puVar3 + iVar2;\n  }\n  return wVar4;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "ushort *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "wchar32 wVar4;" type_identifier identifier ;) (expression_statement "puVar3 = (ushort *)*param_1;" (assignment_expression "puVar3 = (ushort *)*param_1" identifier = (cast_expression "(ushort *)*param_1" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return L'\xfffffffe';\n  }" if (parenthesized_expression "((uint)(param_1[1] - (int)puVar3) < 2)" ( (binary_expression "(uint)(param_1[1] - (int)puVar3) < 2" (call_expression "(uint)(param_1[1] - (int)puVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar3)" ( (binary_expression "param_1[1] - (int)puVar3" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) < number_literal) )) (compound_statement "{\n    return L'\xfffffffe';\n  }" { (return_statement "return L'\xfffffffe';" return (char_literal "L'\xfffffffe'" L' escape_sequence character character character character ') ;) })) (expression_statement "wVar4 = (wchar32)*puVar3;" (assignment_expression "wVar4 = (wchar32)*puVar3" identifier = (binary_expression "(wchar32)*puVar3" (parenthesized_expression "(wchar32)" ( identifier )) * identifier)) ;) (if_statement "if ((param_3 & 1) != 0) {\n    wVar4 = (wVar4 & 0xffU) << 8 | (uint)(*puVar3 >> 8);\n  }" if (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    wVar4 = (wVar4 & 0xffU) << 8 | (uint)(*puVar3 >> 8);\n  }" { (expression_statement "wVar4 = (wVar4 & 0xffU) << 8 | (uint)(*puVar3 >> 8);" (assignment_expression "wVar4 = (wVar4 & 0xffU) << 8 | (uint)(*puVar3 >> 8)" identifier = (binary_expression "(wVar4 & 0xffU) << 8 | (uint)(*puVar3 >> 8)" (binary_expression "(wVar4 & 0xffU) << 8" (parenthesized_expression "(wVar4 & 0xffU)" ( (binary_expression "wVar4 & 0xffU" identifier & number_literal) )) << number_literal) | (call_expression "(uint)(*puVar3 >> 8)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*puVar3 >> 8)" ( (binary_expression "*puVar3 >> 8" (pointer_expression "*puVar3" * identifier) >> number_literal) ))))) ;) })) (if_statement "if ((uint)(wVar4 + L'\xffff2800') < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return L'\xfffffffe';\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return L'\xffffffff';\n    }\n    iVar2 = 2;\n    wVar4 = wVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if ((uint)(wVar4 + L'\xffff2400') < 0x400) {\n      return L'\xffffffff';\n    }\n  }" if (parenthesized_expression "((uint)(wVar4 + L'\xffff2800') < 0x400)" ( (binary_expression "(uint)(wVar4 + L'\xffff2800') < 0x400" (call_expression "(uint)(wVar4 + L'\xffff2800')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(wVar4 + L'\xffff2800')" ( (binary_expression "wVar4 + L'\xffff2800'" identifier + (char_literal "L'\xffff2800'" L' escape_sequence character character character character ')) ))) < number_literal) )) (compound_statement "{\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return L'\xfffffffe';\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return L'\xffffffff';\n    }\n    iVar2 = 2;\n    wVar4 = wVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }" { (if_statement "if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return L'\xfffffffe';\n    }" if (parenthesized_expression "((uint)(param_1[1] - (int)puVar3) < 4)" ( (binary_expression "(uint)(param_1[1] - (int)puVar3) < 4" (call_expression "(uint)(param_1[1] - (int)puVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar3)" ( (binary_expression "param_1[1] - (int)puVar3" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) < number_literal) )) (compound_statement "{\n      return L'\xfffffffe';\n    }" { (return_statement "return L'\xfffffffe';" return (char_literal "L'\xfffffffe'" L' escape_sequence character character character character ') ;) })) (expression_statement "uVar1 = (uint)puVar3[1];" (assignment_expression "uVar1 = (uint)puVar3[1]" identifier = (cast_expression "(uint)puVar3[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "puVar3[1]" identifier [ number_literal ]))) ;) (if_statement "if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }" if (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }" { (expression_statement "uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);" (assignment_expression "uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8)" identifier = (binary_expression "(uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8)" (binary_expression "(uVar1 & 0xff) << 8" (parenthesized_expression "(uVar1 & 0xff)" ( (binary_expression "uVar1 & 0xff" identifier & number_literal) )) << number_literal) | (call_expression "(uint)(puVar3[1] >> 8)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar3[1] >> 8)" ( (binary_expression "puVar3[1] >> 8" (subscript_expression "puVar3[1]" identifier [ number_literal ]) >> number_literal) ))))) ;) })) (if_statement "if (0x3ff < uVar1 - 0xdc00) {\n      return L'\xffffffff';\n    }" if (parenthesized_expression "(0x3ff < uVar1 - 0xdc00)" ( (binary_expression "0x3ff < uVar1 - 0xdc00" number_literal < (binary_expression "uVar1 - 0xdc00" identifier - number_literal)) )) (compound_statement "{\n      return L'\xffffffff';\n    }" { (return_statement "return L'\xffffffff';" return (char_literal "L'\xffffffff'" L' escape_sequence character character character character ') ;) })) (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" identifier = number_literal) ;) (expression_statement "wVar4 = wVar4 * 0x400 + -0x35fdc00 + uVar1;" (assignment_expression "wVar4 = wVar4 * 0x400 + -0x35fdc00 + uVar1" identifier = (binary_expression "wVar4 * 0x400 + -0x35fdc00 + uVar1" (binary_expression "wVar4 * 0x400 + -0x35fdc00" (binary_expression "wVar4 * 0x400" identifier * number_literal) + number_literal) + identifier)) ;) }) (else_clause "else {\n    iVar2 = 1;\n    if ((uint)(wVar4 + L'\xffff2400') < 0x400) {\n      return L'\xffffffff';\n    }\n  }" else (compound_statement "{\n    iVar2 = 1;\n    if ((uint)(wVar4 + L'\xffff2400') < 0x400) {\n      return L'\xffffffff';\n    }\n  }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (if_statement "if ((uint)(wVar4 + L'\xffff2400') < 0x400) {\n      return L'\xffffffff';\n    }" if (parenthesized_expression "((uint)(wVar4 + L'\xffff2400') < 0x400)" ( (binary_expression "(uint)(wVar4 + L'\xffff2400') < 0x400" (call_expression "(uint)(wVar4 + L'\xffff2400')" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(wVar4 + L'\xffff2400')" ( (binary_expression "wVar4 + L'\xffff2400'" identifier + (char_literal "L'\xffff2400'" L' escape_sequence character character character character ')) ))) < number_literal) )) (compound_statement "{\n      return L'\xffffffff';\n    }" { (return_statement "return L'\xffffffff';" return (char_literal "L'\xffffffff'" L' escape_sequence character character character character ') ;) })) }))) (if_statement "if ((uint)wVar4 <= (uint)param_2) {\n    *param_1 = puVar3 + iVar2;\n  }" if (parenthesized_expression "((uint)wVar4 <= (uint)param_2)" ( (binary_expression "(uint)wVar4 <= (uint)param_2" (cast_expression "(uint)wVar4" ( (type_descriptor "uint" type_identifier) ) identifier) <= (cast_expression "(uint)param_2" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\n    *param_1 = puVar3 + iVar2;\n  }" { (expression_statement "*param_1 = puVar3 + iVar2;" (assignment_expression "*param_1 = puVar3 + iVar2" (pointer_expression "*param_1" * identifier) = (binary_expression "puVar3 + iVar2" identifier + identifier)) ;) })) (return_statement "return wVar4;" return identifier ;) })))
(translation_unit "uint FUN_0035c770(undefined4 *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  ushort *puVar3;\n  uint uVar4;\n  \n  puVar3 = (ushort *)*param_1;\n  if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return 0xfffffffe;\n  }\n  uVar4 = (uint)*puVar3;\n  if ((param_3 & 1) != 0) {\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }\n  if (uVar4 - 0xd800 < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }\n  if (uVar4 <= param_2) {\n    *param_1 = puVar3 + iVar2;\n  }\n  return uVar4;\n}\n\n" (function_definition "uint FUN_0035c770(undefined4 *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  ushort *puVar3;\n  uint uVar4;\n  \n  puVar3 = (ushort *)*param_1;\n  if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return 0xfffffffe;\n  }\n  uVar4 = (uint)*puVar3;\n  if ((param_3 & 1) != 0) {\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }\n  if (uVar4 - 0xd800 < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }\n  if (uVar4 <= param_2) {\n    *param_1 = puVar3 + iVar2;\n  }\n  return uVar4;\n}" type_identifier (function_declarator "FUN_0035c770(undefined4 *param_1,uint param_2,uint param_3)" identifier (parameter_list "(undefined4 *param_1,uint param_2,uint param_3)" ( (parameter_declaration "undefined4 *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  ushort *puVar3;\n  uint uVar4;\n  \n  puVar3 = (ushort *)*param_1;\n  if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return 0xfffffffe;\n  }\n  uVar4 = (uint)*puVar3;\n  if ((param_3 & 1) != 0) {\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }\n  if (uVar4 - 0xd800 < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }\n  if (uVar4 <= param_2) {\n    *param_1 = puVar3 + iVar2;\n  }\n  return uVar4;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "ushort *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "puVar3 = (ushort *)*param_1;" (assignment_expression "puVar3 = (ushort *)*param_1" identifier = (cast_expression "(ushort *)*param_1" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_1" * identifier))) ;) (if_statement "if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return 0xfffffffe;\n  }" if (parenthesized_expression "((uint)(param_1[1] - (int)puVar3) < 2)" ( (binary_expression "(uint)(param_1[1] - (int)puVar3) < 2" (call_expression "(uint)(param_1[1] - (int)puVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar3)" ( (binary_expression "param_1[1] - (int)puVar3" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) < number_literal) )) (compound_statement "{\n    return 0xfffffffe;\n  }" { (return_statement "return 0xfffffffe;" return number_literal ;) })) (expression_statement "uVar4 = (uint)*puVar3;" (assignment_expression "uVar4 = (uint)*puVar3" identifier = (binary_expression "(uint)*puVar3" (parenthesized_expression "(uint)" ( identifier )) * identifier)) ;) (if_statement "if ((param_3 & 1) != 0) {\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }" if (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }" { (expression_statement "uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);" (assignment_expression "uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8)" identifier = (binary_expression "(uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8)" (binary_expression "(uVar4 & 0xff) << 8" (parenthesized_expression "(uVar4 & 0xff)" ( (binary_expression "uVar4 & 0xff" identifier & number_literal) )) << number_literal) | (call_expression "(uint)(*puVar3 >> 8)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(*puVar3 >> 8)" ( (binary_expression "*puVar3 >> 8" (pointer_expression "*puVar3" * identifier) >> number_literal) ))))) ;) })) (if_statement "if (uVar4 - 0xd800 < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }" if (parenthesized_expression "(uVar4 - 0xd800 < 0x400)" ( (binary_expression "uVar4 - 0xd800 < 0x400" (binary_expression "uVar4 - 0xd800" identifier - number_literal) < number_literal) )) (compound_statement "{\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }" { (if_statement "if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }" if (parenthesized_expression "((uint)(param_1[1] - (int)puVar3) < 4)" ( (binary_expression "(uint)(param_1[1] - (int)puVar3) < 4" (call_expression "(uint)(param_1[1] - (int)puVar3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_1[1] - (int)puVar3)" ( (binary_expression "param_1[1] - (int)puVar3" (subscript_expression "param_1[1]" identifier [ number_literal ]) - (cast_expression "(int)puVar3" ( (type_descriptor "int" primitive_type) ) identifier)) ))) < number_literal) )) (compound_statement "{\n      return 0xfffffffe;\n    }" { (return_statement "return 0xfffffffe;" return number_literal ;) })) (expression_statement "uVar1 = (uint)puVar3[1];" (assignment_expression "uVar1 = (uint)puVar3[1]" identifier = (cast_expression "(uint)puVar3[1]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "puVar3[1]" identifier [ number_literal ]))) ;) (if_statement "if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }" if (parenthesized_expression "((param_3 & 1) != 0)" ( (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" ( (binary_expression "param_3 & 1" identifier & number_literal) )) != number_literal) )) (compound_statement "{\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }" { (expression_statement "uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);" (assignment_expression "uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8)" identifier = (binary_expression "(uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8)" (binary_expression "(uVar1 & 0xff) << 8" (parenthesized_expression "(uVar1 & 0xff)" ( (binary_expression "uVar1 & 0xff" identifier & number_literal) )) << number_literal) | (call_expression "(uint)(puVar3[1] >> 8)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(puVar3[1] >> 8)" ( (binary_expression "puVar3[1] >> 8" (subscript_expression "puVar3[1]" identifier [ number_literal ]) >> number_literal) ))))) ;) })) (if_statement "if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(0x3ff < uVar1 - 0xdc00)" ( (binary_expression "0x3ff < uVar1 - 0xdc00" number_literal < (binary_expression "uVar1 - 0xdc00" identifier - number_literal)) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" identifier = number_literal) ;) (expression_statement "uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;" (assignment_expression "uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1" identifier = (binary_expression "uVar4 * 0x400 + -0x35fdc00 + uVar1" (binary_expression "uVar4 * 0x400 + -0x35fdc00" (binary_expression "uVar4 * 0x400" identifier * number_literal) + number_literal) + identifier)) ;) }) (else_clause "else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }" else (compound_statement "{\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }" { (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" identifier = number_literal) ;) (if_statement "if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }" if (parenthesized_expression "(uVar4 - 0xdc00 < 0x400)" ( (binary_expression "uVar4 - 0xdc00 < 0x400" (binary_expression "uVar4 - 0xdc00" identifier - number_literal) < number_literal) )) (compound_statement "{\n      return 0xffffffff;\n    }" { (return_statement "return 0xffffffff;" return number_literal ;) })) }))) (if_statement "if (uVar4 <= param_2) {\n    *param_1 = puVar3 + iVar2;\n  }" if (parenthesized_expression "(uVar4 <= param_2)" ( (binary_expression "uVar4 <= param_2" identifier <= identifier) )) (compound_statement "{\n    *param_1 = puVar3 + iVar2;\n  }" { (expression_statement "*param_1 = puVar3 + iVar2;" (assignment_expression "*param_1 = puVar3 + iVar2" (pointer_expression "*param_1" * identifier) = (binary_expression "puVar3 + iVar2" identifier + identifier)) ;) })) (return_statement "return uVar4;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_expression * IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( IDENT )) * 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 (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT) | (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (pointer_expression * IDENT) >> LIT) ))))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) < LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) << LIT) | (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (subscript_expression IDENT [ LIT ]) >> LIT) ))))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression IDENT - LIT)) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression IDENT * LIT) + LIT) + IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT - LIT) < LIT) )) (compound_statement { (return_statement return LIT ;) })) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression IDENT + IDENT)) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint FUN_0035c770(undefined4 *param_1,uint param_2,uint param_3)\n\n{\n  uint uVar1;\n  int iVar2;\n  ushort *puVar3;\n  uint uVar4;\n  \n  puVar3 = (ushort *)*param_1;\n  if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return 0xfffffffe;\n  }\n  uVar4 = (uint)*puVar3;\n  if ((param_3 & 1) != 0) {\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }\n  if (uVar4 - 0xd800 < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }\n  if (uVar4 <= param_2) {\n    *param_1 = puVar3 + iVar2;\n  }\n  return uVar4;\n}" (type_identifier "uint") (function_declarator "FUN_0035c770(undefined4 *param_1,uint param_2,uint param_3)" (identifier "FUN_0035c770") (parameter_list "(undefined4 *param_1,uint param_2,uint param_3)" (( "(") (parameter_declaration "undefined4 *param_1" (type_identifier "undefined4") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) () ")"))) (compound_statement "{\n  uint uVar1;\n  int iVar2;\n  ushort *puVar3;\n  uint uVar4;\n  \n  puVar3 = (ushort *)*param_1;\n  if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return 0xfffffffe;\n  }\n  uVar4 = (uint)*puVar3;\n  if ((param_3 & 1) != 0) {\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }\n  if (uVar4 - 0xd800 < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }\n  if (uVar4 <= param_2) {\n    *param_1 = puVar3 + iVar2;\n  }\n  return uVar4;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "ushort *puVar3;" (type_identifier "ushort") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (expression_statement "puVar3 = (ushort *)*param_1;" (assignment_expression "puVar3 = (ushort *)*param_1" (identifier "puVar3") (= "=") (cast_expression "(ushort *)*param_1" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_1" (* "*") (identifier "param_1")))) (; ";")) (if_statement "if ((uint)(param_1[1] - (int)puVar3) < 2) {\n    return 0xfffffffe;\n  }" (if "if") (parenthesized_expression "((uint)(param_1[1] - (int)puVar3) < 2)" (( "(") (binary_expression "(uint)(param_1[1] - (int)puVar3) < 2" (call_expression "(uint)(param_1[1] - (int)puVar3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_1[1] - (int)puVar3)" (( "(") (binary_expression "param_1[1] - (int)puVar3" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (- "-") (cast_expression "(int)puVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar3"))) () ")"))) (< "<") (number_literal "2")) () ")")) (compound_statement "{\n    return 0xfffffffe;\n  }" ({ "{") (return_statement "return 0xfffffffe;" (return "return") (number_literal "0xfffffffe") (; ";")) (} "}"))) (expression_statement "uVar4 = (uint)*puVar3;" (assignment_expression "uVar4 = (uint)*puVar3" (identifier "uVar4") (= "=") (binary_expression "(uint)*puVar3" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (* "*") (identifier "puVar3"))) (; ";")) (if_statement "if ((param_3 & 1) != 0) {\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }" (if "if") (parenthesized_expression "((param_3 & 1) != 0)" (( "(") (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" (( "(") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);\n  }" ({ "{") (expression_statement "uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);" (assignment_expression "uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8)" (identifier "uVar4") (= "=") (binary_expression "(uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8)" (binary_expression "(uVar4 & 0xff) << 8" (parenthesized_expression "(uVar4 & 0xff)" (( "(") (binary_expression "uVar4 & 0xff" (identifier "uVar4") (& "&") (number_literal "0xff")) () ")")) (<< "<<") (number_literal "8")) (| "|") (call_expression "(uint)(*puVar3 >> 8)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(*puVar3 >> 8)" (( "(") (binary_expression "*puVar3 >> 8" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (>> ">>") (number_literal "8")) () ")"))))) (; ";")) (} "}"))) (if_statement "if (uVar4 - 0xd800 < 0x400) {\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }\n  else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }" (if "if") (parenthesized_expression "(uVar4 - 0xd800 < 0x400)" (( "(") (binary_expression "uVar4 - 0xd800 < 0x400" (binary_expression "uVar4 - 0xd800" (identifier "uVar4") (- "-") (number_literal "0xd800")) (< "<") (number_literal "0x400")) () ")")) (compound_statement "{\n    if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }\n    uVar1 = (uint)puVar3[1];\n    if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }\n    if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }\n    iVar2 = 2;\n    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;\n  }" ({ "{") (if_statement "if ((uint)(param_1[1] - (int)puVar3) < 4) {\n      return 0xfffffffe;\n    }" (if "if") (parenthesized_expression "((uint)(param_1[1] - (int)puVar3) < 4)" (( "(") (binary_expression "(uint)(param_1[1] - (int)puVar3) < 4" (call_expression "(uint)(param_1[1] - (int)puVar3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(param_1[1] - (int)puVar3)" (( "(") (binary_expression "param_1[1] - (int)puVar3" (subscript_expression "param_1[1]" (identifier "param_1") ([ "[") (number_literal "1") (] "]")) (- "-") (cast_expression "(int)puVar3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "puVar3"))) () ")"))) (< "<") (number_literal "4")) () ")")) (compound_statement "{\n      return 0xfffffffe;\n    }" ({ "{") (return_statement "return 0xfffffffe;" (return "return") (number_literal "0xfffffffe") (; ";")) (} "}"))) (expression_statement "uVar1 = (uint)puVar3[1];" (assignment_expression "uVar1 = (uint)puVar3[1]" (identifier "uVar1") (= "=") (cast_expression "(uint)puVar3[1]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")))) (; ";")) (if_statement "if ((param_3 & 1) != 0) {\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }" (if "if") (parenthesized_expression "((param_3 & 1) != 0)" (( "(") (binary_expression "(param_3 & 1) != 0" (parenthesized_expression "(param_3 & 1)" (( "(") (binary_expression "param_3 & 1" (identifier "param_3") (& "&") (number_literal "1")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);\n    }" ({ "{") (expression_statement "uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);" (assignment_expression "uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8)" (identifier "uVar1") (= "=") (binary_expression "(uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8)" (binary_expression "(uVar1 & 0xff) << 8" (parenthesized_expression "(uVar1 & 0xff)" (( "(") (binary_expression "uVar1 & 0xff" (identifier "uVar1") (& "&") (number_literal "0xff")) () ")")) (<< "<<") (number_literal "8")) (| "|") (call_expression "(uint)(puVar3[1] >> 8)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(puVar3[1] >> 8)" (( "(") (binary_expression "puVar3[1] >> 8" (subscript_expression "puVar3[1]" (identifier "puVar3") ([ "[") (number_literal "1") (] "]")) (>> ">>") (number_literal "8")) () ")"))))) (; ";")) (} "}"))) (if_statement "if (0x3ff < uVar1 - 0xdc00) {\n      return 0xffffffff;\n    }" (if "if") (parenthesized_expression "(0x3ff < uVar1 - 0xdc00)" (( "(") (binary_expression "0x3ff < uVar1 - 0xdc00" (number_literal "0x3ff") (< "<") (binary_expression "uVar1 - 0xdc00" (identifier "uVar1") (- "-") (number_literal "0xdc00"))) () ")")) (compound_statement "{\n      return 0xffffffff;\n    }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (expression_statement "iVar2 = 2;" (assignment_expression "iVar2 = 2" (identifier "iVar2") (= "=") (number_literal "2")) (; ";")) (expression_statement "uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;" (assignment_expression "uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1" (identifier "uVar4") (= "=") (binary_expression "uVar4 * 0x400 + -0x35fdc00 + uVar1" (binary_expression "uVar4 * 0x400 + -0x35fdc00" (binary_expression "uVar4 * 0x400" (identifier "uVar4") (* "*") (number_literal "0x400")) (+ "+") (number_literal "-0x35fdc00")) (+ "+") (identifier "uVar1"))) (; ";")) (} "}")) (else_clause "else {\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }" (else "else") (compound_statement "{\n    iVar2 = 1;\n    if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }\n  }" ({ "{") (expression_statement "iVar2 = 1;" (assignment_expression "iVar2 = 1" (identifier "iVar2") (= "=") (number_literal "1")) (; ";")) (if_statement "if (uVar4 - 0xdc00 < 0x400) {\n      return 0xffffffff;\n    }" (if "if") (parenthesized_expression "(uVar4 - 0xdc00 < 0x400)" (( "(") (binary_expression "uVar4 - 0xdc00 < 0x400" (binary_expression "uVar4 - 0xdc00" (identifier "uVar4") (- "-") (number_literal "0xdc00")) (< "<") (number_literal "0x400")) () ")")) (compound_statement "{\n      return 0xffffffff;\n    }" ({ "{") (return_statement "return 0xffffffff;" (return "return") (number_literal "0xffffffff") (; ";")) (} "}"))) (} "}")))) (if_statement "if (uVar4 <= param_2) {\n    *param_1 = puVar3 + iVar2;\n  }" (if "if") (parenthesized_expression "(uVar4 <= param_2)" (( "(") (binary_expression "uVar4 <= param_2" (identifier "uVar4") (<= "<=") (identifier "param_2")) () ")")) (compound_statement "{\n    *param_1 = puVar3 + iVar2;\n  }" ({ "{") (expression_statement "*param_1 = puVar3 + iVar2;" (assignment_expression "*param_1 = puVar3 + iVar2" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (= "=") (binary_expression "puVar3 + iVar2" (identifier "puVar3") (+ "+") (identifier "iVar2"))) (; ";")) (} "}"))) (return_statement "return uVar4;" (return "return") (identifier "uVar4") (; ";")) (} "}")))

/* char32_t std::(anonymous namespace)::read_utf16_code_point<false>(std::(anonymous
   namespace)::range<char16_t const, false>&, unsigned long, std::codecvt_mode) */

type_1 std::(anonymous_namespace)::function_1<false>
                  (type_2 *param_1,type_1 param_2,type_3 var_2)

{
  type_3 var_4;
  int var_5;
  type_4 *var_1;
  type_1 var_3;
  
  var_1 = (type_4 *)*param_1;
  if ((type_3)(param_1[1] - (int)var_1) < 2) {
    return L'\xfffffffe';
  }
  var_3 = (type_1)*var_1;
  if ((var_2 & 1) != 0) {
    var_3 = (var_3 & 0xffU) << 8 | (type_3)(*var_1 >> 8);
  }
  if ((type_3)(var_3 + L'\xffff2800') < 0x400) {
    if ((type_3)(param_1[1] - (int)var_1) < 4) {
      return L'\xfffffffe';
    }
    var_4 = (type_3)var_1[1];
    if ((var_2 & 1) != 0) {
      var_4 = (var_4 & 0xff) << 8 | (type_3)(var_1[1] >> 8);
    }
    if (0x3ff < var_4 - 0xdc00) {
      return L'\xffffffff';
    }
    var_5 = 2;
    var_3 = var_3 * 0x400 + -0x35fdc00 + var_4;
  }
  else {
    var_5 = 1;
    if ((type_3)(var_3 + L'\xffff2400') < 0x400) {
      return L'\xffffffff';
    }
  }
  if ((type_3)var_3 <= (type_3)param_2) {
    *param_1 = var_1 + var_5;
  }
  return var_3;
}


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

uint MASKED(undefined4 *param_1,uint param_2,uint param_3)

{
  uint uVar1;
  int iVar2;
  ushort *puVar3;
  uint uVar4;
  
  puVar3 = (ushort *)*param_1;
  if ((uint)(param_1[1] - (int)puVar3) < 2) {
    return 0xfffffffe;
  }
  uVar4 = (uint)*puVar3;
  if ((param_3 & 1) != 0) {
    uVar4 = (uVar4 & 0xff) << 8 | (uint)(*puVar3 >> 8);
  }
  if (uVar4 - 0xd800 < 0x400) {
    if ((uint)(param_1[1] - (int)puVar3) < 4) {
      return 0xfffffffe;
    }
    uVar1 = (uint)puVar3[1];
    if ((param_3 & 1) != 0) {
      uVar1 = (uVar1 & 0xff) << 8 | (uint)(puVar3[1] >> 8);
    }
    if (0x3ff < uVar1 - 0xdc00) {
      return 0xffffffff;
    }
    iVar2 = 2;
    uVar4 = uVar4 * 0x400 + -0x35fdc00 + uVar1;
  }
  else {
    iVar2 = 1;
    if (uVar4 - 0xdc00 < 0x400) {
      return 0xffffffff;
    }
  }
  if (uVar4 <= param_2) {
    *param_1 = puVar3 + iVar2;
  }
  return uVar4;
}

