
/* std::__codecvt_utf8_utf16_base<char32_t>::do_out(__mbstate_t&, char32_t const*, char32_t const*,
   char32_t const*&, char*, char*, char*&) const */

undefined4 __thiscall
std::__codecvt_utf8_utf16_base<char32_t>::do_out
          (__codecvt_utf8_utf16_base<char32_t> *this,__mbstate_t *param_1,wchar32 *param_2,
          wchar32 *param_3,wchar32 **param_4,char *param_5,char *param_6,char **param_7)

{
  int iVar1;
  int iVar2;
  wchar32 wVar3;
  int iVar4;
  wchar32 wVar5;
  int iVar6;
  char *local_10;
  char *local_c;
  
  wVar5 = *(wchar32 *)(this + 8);
  local_10 = param_5;
  local_c = param_6;
  if ((*(uint *)(this + 0xc) & 2) != 0) {
    iVar1 = (anonymous_namespace)::write_utf8_bom(&local_10);
    if (iVar1 == 0) {
LAB_0035db44:
      *param_4 = param_2;
      *param_7 = local_10;
      return 1;
    }
  }
  iVar1 = (int)param_3 - (int)param_2;
  if (param_2 != param_3) {
    iVar6 = -0xd800;
    iVar4 = -0xdc00;
    do {
      wVar3 = *param_2;
      if ((uint)(wVar3 + iVar6) < 0x400) {
        if ((uint)(iVar1 >> 2) < 2) break;
        iVar1 = 2;
        if (0x3ff < (uint)(param_2[1] + iVar4)) goto LAB_0035db20;
        wVar3 = wVar3 * 0x400 + param_2[1] + L'\xfca02400';
      }
      else {
        iVar1 = 1;
        if ((uint)(wVar3 + iVar4) < 0x400) goto LAB_0035db20;
      }
      if ((uint)wVar5 < (uint)wVar3) {
LAB_0035db20:
        *param_4 = param_2;
        *param_7 = local_10;
        return 2;
      }
      iVar1 = iVar1 << 2;
      iVar2 = (anonymous_namespace)::write_utf8_code_point((range *)&local_10,wVar3);
      if (iVar2 == 0) goto LAB_0035db44;
      param_2 = (wchar32 *)((int)param_2 + iVar1);
      iVar1 = (int)param_3 - (int)param_2;
    } while (param_3 != param_2);
  }
  *param_4 = param_2;
  *param_7 = local_10;
  return 0;
}



undefined4
FUN_0035da24(int param_1,undefined4 param_2,uint *param_3,uint *param_4,undefined4 *param_5,
            undefined4 param_6,undefined4 param_7,undefined4 *param_8)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  int iVar6;
  undefined4 local_10;
  undefined4 local_c;
  
  uVar5 = *(uint *)(param_1 + 8);
  local_10 = param_6;
  local_c = param_7;
  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {
    iVar1 = FUN_0035cafc(&local_10);
    if (iVar1 == 0) {
LAB_0035db44:
      *param_5 = param_3;
      *param_8 = local_10;
      return 1;
    }
  }
  iVar1 = (int)param_4 - (int)param_3;
  if (param_3 != param_4) {
    iVar6 = -0xd800;
    iVar4 = -0xdc00;
    do {
      uVar3 = *param_3;
      if (uVar3 + iVar6 < 0x400) {
        if ((uint)(iVar1 >> 2) < 2) break;
        iVar1 = 2;
        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;
        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;
      }
      else {
        iVar1 = 1;
        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;
      }
      if (uVar5 < uVar3) {
LAB_0035db20:
        *param_5 = param_3;
        *param_8 = local_10;
        return 2;
      }
      iVar1 = iVar1 << 2;
      iVar2 = FUN_0035c99c(&local_10,uVar3);
      if (iVar2 == 0) goto LAB_0035db44;
      param_3 = (uint *)((int)param_3 + iVar1);
      iVar1 = (int)param_4 - (int)param_3;
    } while (param_4 != param_3);
  }
  *param_5 = param_3;
  *param_8 = local_10;
  return 0;
}


lui gp,0xe
addiu gp,gp,-0x3854
addu gp,gp,t9
addiu sp,sp,-0x28
lw v0,0xc(a0)
or t0,a2,zero
lw t4,0x8(a0)
or t3,a3,zero
lw v1,0x3c(sp)
andi v0,v0,0x2
sw gp,0x10(sp)
sw ra,0x24(sp)
sw v1,0x18(sp)
lw v1,0x40(sp)
beq v0,zero,0x0035da7c
_sw v1,0x1c(sp)
lw t9,-0x3d1c(gp)
addiu t9,t9,-0x3504
bal 0x0035cafc
_addiu a0,sp,0x18
beq v0,zero,0x0035db44
_lw gp,0x10(sp)
subu v1,t3,t0
beq t0,t3,0x0035db68
_sra v1,v1,0x2
lw t9,-0x3d1c(gp)
lui t1,0xffff
addiu t5,t1,0x2800
addiu t9,t9,-0x3664
b 0x0035daf8
_addiu t1,t1,0x2400
bne v1,zero,0x0035db68
_lui a0,0xfca0
lw v0,0x4(t0)
li t2,0x2
addiu a0,a0,0x2400
addu v1,v0,t1
sltiu v1,v1,0x400
beq v1,zero,0x0035db20
_addu v0,v0,a0
addu v0,a2,v0
or a1,v0,zero
sltu v0,t4,v0
bne v0,zero,0x0035db20
_addiu a0,sp,0x18
bal 0x0035c99c
_sll t2,t2,0x2
beq v0,zero,0x0035db44
_nop
addu t0,t0,t2
subu v1,t3,t0
beq t3,t0,0x0035db68
_sra v1,v1,0x2
lw v0,0x0(t0)
sltiu v1,v1,0x2
addu a1,v0,t5
addu a0,v0,t1
sltiu a1,a1,0x400
sll a2,v0,0xa
bne a1,zero,0x0035daa0
_sltiu a0,a0,0x400
beq a0,zero,0x0035dac8
_li t2,0x1
lw v1,0x38(sp)
li v0,0x2
lw a0,0x18(sp)
lw ra,0x24(sp)
sw t0,0x0(v1)
lw v1,0x44(sp)
sw a0,0x0(v1)
jr ra
_addiu sp,sp,0x28
lw v1,0x38(sp)
li v0,0x1
lw a0,0x18(sp)
lw ra,0x24(sp)
sw t0,0x0(v1)
lw v1,0x44(sp)
sw a0,0x0(v1)
jr ra
_addiu sp,sp,0x28
lw v1,0x38(sp)
or v0,zero,zero
lw a0,0x18(sp)
lw ra,0x24(sp)
sw t0,0x0(v1)
lw v1,0x44(sp)
sw a0,0x0(v1)
jr ra
_addiu sp,sp,0x28
(translation_unit "undefined4\nFUN_0035da24(int param_1,undefined4 param_2,uint *param_3,uint *param_4,undefined4 *param_5,\n            undefined4 param_6,undefined4 param_7,undefined4 *param_8)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar5 = *(uint *)(param_1 + 8);\n  local_10 = param_6;\n  local_c = param_7;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }\n  iVar1 = (int)param_4 - (int)param_3;\n  if (param_3 != param_4) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }\n  *param_5 = param_3;\n  *param_8 = local_10;\n  return 0;\n}\n\n" (function_definition "undefined4\nFUN_0035da24(int param_1,undefined4 param_2,uint *param_3,uint *param_4,undefined4 *param_5,\n            undefined4 param_6,undefined4 param_7,undefined4 *param_8)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar5 = *(uint *)(param_1 + 8);\n  local_10 = param_6;\n  local_c = param_7;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }\n  iVar1 = (int)param_4 - (int)param_3;\n  if (param_3 != param_4) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }\n  *param_5 = param_3;\n  *param_8 = local_10;\n  return 0;\n}" type_identifier (function_declarator "FUN_0035da24(int param_1,undefined4 param_2,uint *param_3,uint *param_4,undefined4 *param_5,\n            undefined4 param_6,undefined4 param_7,undefined4 *param_8)" identifier (parameter_list "(int param_1,undefined4 param_2,uint *param_3,uint *param_4,undefined4 *param_5,\n            undefined4 param_6,undefined4 param_7,undefined4 *param_8)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uint *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined4 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "undefined4 param_6" type_identifier identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) , (parameter_declaration "undefined4 *param_8" type_identifier (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar5 = *(uint *)(param_1 + 8);\n  local_10 = param_6;\n  local_c = param_7;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }\n  iVar1 = (int)param_4 - (int)param_3;\n  if (param_3 != param_4) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }\n  *param_5 = param_3;\n  *param_8 = local_10;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 local_10;" type_identifier identifier ;) (declaration "undefined4 local_c;" type_identifier identifier ;) (expression_statement "uVar5 = *(uint *)(param_1 + 8);" (assignment_expression "uVar5 = *(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_10 = param_6;" (assignment_expression "local_10 = param_6" identifier = identifier) ;) (expression_statement "local_c = param_7;" (assignment_expression "local_c = param_7" identifier = identifier) ;) (if_statement "if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }" if (parenthesized_expression "((*(uint *)(param_1 + 0xc) & 2) != 0)" ( (binary_expression "(*(uint *)(param_1 + 0xc) & 2) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0xc) & 2)" ( (binary_expression "*(uint *)(param_1 + 0xc) & 2" (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) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }" { (expression_statement "iVar1 = FUN_0035cafc(&local_10);" (assignment_expression "iVar1 = FUN_0035cafc(&local_10)" identifier = (call_expression "FUN_0035cafc(&local_10)" identifier (argument_list "(&local_10)" ( (pointer_expression "&local_10" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }" { (labeled_statement "LAB_0035db44:\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 = local_10;" (assignment_expression "*param_8 = local_10" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) })) (expression_statement "iVar1 = (int)param_4 - (int)param_3;" (assignment_expression "iVar1 = (int)param_4 - (int)param_3" identifier = (binary_expression "(int)param_4 - (int)param_3" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (param_3 != param_4) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }" if (parenthesized_expression "(param_3 != param_4)" ( (binary_expression "param_3 != param_4" identifier != identifier) )) (compound_statement "{\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }" { (expression_statement "iVar6 = -0xd800;" (assignment_expression "iVar6 = -0xd800" identifier = number_literal) ;) (expression_statement "iVar4 = -0xdc00;" (assignment_expression "iVar4 = -0xdc00" identifier = number_literal) ;) (do_statement "do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);" do (compound_statement "{\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    }" { (expression_statement "uVar3 = *param_3;" (assignment_expression "uVar3 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (if_statement "if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }" if (parenthesized_expression "(uVar3 + iVar6 < 0x400)" ( (binary_expression "uVar3 + iVar6 < 0x400" (binary_expression "uVar3 + iVar6" identifier + identifier) < number_literal) )) (compound_statement "{\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }" { (if_statement "if ((uint)(iVar1 >> 2) < 2) break;" if (parenthesized_expression "((uint)(iVar1 >> 2) < 2)" ( (binary_expression "(uint)(iVar1 >> 2) < 2" (call_expression "(uint)(iVar1 >> 2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 >> 2)" ( (binary_expression "iVar1 >> 2" identifier >> number_literal) ))) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = 2;" (assignment_expression "iVar1 = 2" identifier = number_literal) ;) (if_statement "if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;" if (parenthesized_expression "(0x3ff < param_3[1] + iVar4)" ( (binary_expression "0x3ff < param_3[1] + iVar4" number_literal < (binary_expression "param_3[1] + iVar4" (subscript_expression "param_3[1]" identifier [ number_literal ]) + identifier)) )) (goto_statement "goto LAB_0035db20;" goto statement_identifier ;)) (expression_statement "uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;" (assignment_expression "uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400" identifier = (binary_expression "uVar3 * 0x400 + param_3[1] + 0xfca02400" (binary_expression "uVar3 * 0x400 + param_3[1]" (binary_expression "uVar3 * 0x400" identifier * number_literal) + (subscript_expression "param_3[1]" identifier [ number_literal ])) + number_literal)) ;) }) (else_clause "else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }" else (compound_statement "{\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }" { (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;" if (parenthesized_expression "(uVar3 + iVar4 < 0x400)" ( (binary_expression "uVar3 + iVar4 < 0x400" (binary_expression "uVar3 + iVar4" identifier + identifier) < number_literal) )) (goto_statement "goto LAB_0035db20;" goto statement_identifier ;)) }))) (if_statement "if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }" if (parenthesized_expression "(uVar5 < uVar3)" ( (binary_expression "uVar5 < uVar3" identifier < identifier) )) (compound_statement "{\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }" { (labeled_statement "LAB_0035db20:\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 = local_10;" (assignment_expression "*param_8 = local_10" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return 2;" return number_literal ;) })) (expression_statement "iVar1 = iVar1 << 2;" (assignment_expression "iVar1 = iVar1 << 2" identifier = (binary_expression "iVar1 << 2" identifier << number_literal)) ;) (expression_statement "iVar2 = FUN_0035c99c(&local_10,uVar3);" (assignment_expression "iVar2 = FUN_0035c99c(&local_10,uVar3)" identifier = (call_expression "FUN_0035c99c(&local_10,uVar3)" identifier (argument_list "(&local_10,uVar3)" ( (pointer_expression "&local_10" & identifier) , identifier )))) ;) (if_statement "if (iVar2 == 0) goto LAB_0035db44;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0035db44;" goto statement_identifier ;)) (expression_statement "param_3 = (uint *)((int)param_3 + iVar1);" (assignment_expression "param_3 = (uint *)((int)param_3 + iVar1)" identifier = (cast_expression "(uint *)((int)param_3 + iVar1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_3 + iVar1)" ( (binary_expression "(int)param_3 + iVar1" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "iVar1 = (int)param_4 - (int)param_3;" (assignment_expression "iVar1 = (int)param_4 - (int)param_3" identifier = (binary_expression "(int)param_4 - (int)param_3" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }) while (parenthesized_expression "(param_4 != param_3)" ( (binary_expression "param_4 != param_3" identifier != identifier) )) ;) })) (expression_statement "*param_5 = param_3;" (assignment_expression "*param_5 = param_3" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = local_10;" (assignment_expression "*param_8 = local_10" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "/* std::__codecvt_utf8_utf16_base<char32_t>::do_out(__mbstate_t&, char32_t const*, char32_t const*,\n   char32_t const*&, char*, char*, char*&) const */\n\nundefined4 __thiscall\nstd::__codecvt_utf8_utf16_base<char32_t>::do_out\n          (__codecvt_utf8_utf16_base<char32_t> *this,__mbstate_t *param_1,wchar32 *param_2,\n          wchar32 *param_3,wchar32 **param_4,char *param_5,char *param_6,char **param_7)\n\n{\n  int iVar1;\n  int iVar2;\n  wchar32 wVar3;\n  int iVar4;\n  wchar32 wVar5;\n  int iVar6;\n  char *local_10;\n  char *local_c;\n  \n  wVar5 = *(wchar32 *)(this + 8);\n  local_10 = param_5;\n  local_c = param_6;\n  if ((*(uint *)(this + 0xc) & 2) != 0) {\n    iVar1 = (anonymous_namespace)::write_utf8_bom(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_4 = param_2;\n      *param_7 = local_10;\n      return 1;\n    }\n  }\n  iVar1 = (int)param_3 - (int)param_2;\n  if (param_2 != param_3) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      wVar3 = *param_2;\n      if ((uint)(wVar3 + iVar6) < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < (uint)(param_2[1] + iVar4)) goto LAB_0035db20;\n        wVar3 = wVar3 * 0x400 + param_2[1] + L'\xfca02400';\n      }\n      else {\n        iVar1 = 1;\n        if ((uint)(wVar3 + iVar4) < 0x400) goto LAB_0035db20;\n      }\n      if ((uint)wVar5 < (uint)wVar3) {\nLAB_0035db20:\n        *param_4 = param_2;\n        *param_7 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = (anonymous_namespace)::write_utf8_code_point((range *)&local_10,wVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_2 = (wchar32 *)((int)param_2 + iVar1);\n      iVar1 = (int)param_3 - (int)param_2;\n    } while (param_3 != param_2);\n  }\n  *param_4 = param_2;\n  *param_7 = local_10;\n  return 0;\n}\n\n" comment (function_definition "undefined4 __thiscall\nstd::__codecvt_utf8_utf16_base<char32_t>::do_out\n          (__codecvt_utf8_utf16_base<char32_t> *this,__mbstate_t *param_1,wchar32 *param_2,\n          wchar32 *param_3,wchar32 **param_4,char *param_5,char *param_6,char **param_7)\n\n{\n  int iVar1;\n  int iVar2;\n  wchar32 wVar3;\n  int iVar4;\n  wchar32 wVar5;\n  int iVar6;\n  char *local_10;\n  char *local_c;\n  \n  wVar5 = *(wchar32 *)(this + 8);\n  local_10 = param_5;\n  local_c = param_6;\n  if ((*(uint *)(this + 0xc) & 2) != 0) {\n    iVar1 = (anonymous_namespace)::write_utf8_bom(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_4 = param_2;\n      *param_7 = local_10;\n      return 1;\n    }\n  }\n  iVar1 = (int)param_3 - (int)param_2;\n  if (param_2 != param_3) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      wVar3 = *param_2;\n      if ((uint)(wVar3 + iVar6) < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < (uint)(param_2[1] + iVar4)) goto LAB_0035db20;\n        wVar3 = wVar3 * 0x400 + param_2[1] + L'\xfca02400';\n      }\n      else {\n        iVar1 = 1;\n        if ((uint)(wVar3 + iVar4) < 0x400) goto LAB_0035db20;\n      }\n      if ((uint)wVar5 < (uint)wVar3) {\nLAB_0035db20:\n        *param_4 = param_2;\n        *param_7 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = (anonymous_namespace)::write_utf8_code_point((range *)&local_10,wVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_2 = (wchar32 *)((int)param_2 + iVar1);\n      iVar1 = (int)param_3 - (int)param_2;\n    } while (param_3 != param_2);\n  }\n  *param_4 = param_2;\n  *param_7 = local_10;\n  return 0;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::__codecvt_utf8_utf16_base<char32_t>::" identifier : : identifier < primitive_type > : :) (function_declarator "do_out\n          (__codecvt_utf8_utf16_base<char32_t> *this,__mbstate_t *param_1,wchar32 *param_2,\n          wchar32 *param_3,wchar32 **param_4,char *param_5,char *param_6,char **param_7)" identifier (parameter_list "(__codecvt_utf8_utf16_base<char32_t> *this,__mbstate_t *param_1,wchar32 *param_2,\n          wchar32 *param_3,wchar32 **param_4,char *param_5,char *param_6,char **param_7)" ( (parameter_declaration "__codecvt_utf8_utf16_base<char32_t> *this" type_identifier (ERROR "<char32_t>" < primitive_type >) (pointer_declarator "*this" * identifier)) , (parameter_declaration "__mbstate_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar32 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "wchar32 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "wchar32 **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  int iVar1;\n  int iVar2;\n  wchar32 wVar3;\n  int iVar4;\n  wchar32 wVar5;\n  int iVar6;\n  char *local_10;\n  char *local_c;\n  \n  wVar5 = *(wchar32 *)(this + 8);\n  local_10 = param_5;\n  local_c = param_6;\n  if ((*(uint *)(this + 0xc) & 2) != 0) {\n    iVar1 = (anonymous_namespace)::write_utf8_bom(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_4 = param_2;\n      *param_7 = local_10;\n      return 1;\n    }\n  }\n  iVar1 = (int)param_3 - (int)param_2;\n  if (param_2 != param_3) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      wVar3 = *param_2;\n      if ((uint)(wVar3 + iVar6) < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < (uint)(param_2[1] + iVar4)) goto LAB_0035db20;\n        wVar3 = wVar3 * 0x400 + param_2[1] + L'\xfca02400';\n      }\n      else {\n        iVar1 = 1;\n        if ((uint)(wVar3 + iVar4) < 0x400) goto LAB_0035db20;\n      }\n      if ((uint)wVar5 < (uint)wVar3) {\nLAB_0035db20:\n        *param_4 = param_2;\n        *param_7 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = (anonymous_namespace)::write_utf8_code_point((range *)&local_10,wVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_2 = (wchar32 *)((int)param_2 + iVar1);\n      iVar1 = (int)param_3 - (int)param_2;\n    } while (param_3 != param_2);\n  }\n  *param_4 = param_2;\n  *param_7 = local_10;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "wchar32 wVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "wchar32 wVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "char *local_10;" primitive_type (pointer_declarator "*local_10" * identifier) ;) (declaration "char *local_c;" primitive_type (pointer_declarator "*local_c" * identifier) ;) (expression_statement "wVar5 = *(wchar32 *)(this + 8);" (assignment_expression "wVar5 = *(wchar32 *)(this + 8)" identifier = (pointer_expression "*(wchar32 *)(this + 8)" * (cast_expression "(wchar32 *)(this + 8)" ( (type_descriptor "wchar32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) (expression_statement "local_10 = param_5;" (assignment_expression "local_10 = param_5" identifier = identifier) ;) (expression_statement "local_c = param_6;" (assignment_expression "local_c = param_6" identifier = identifier) ;) (if_statement "if ((*(uint *)(this + 0xc) & 2) != 0) {\n    iVar1 = (anonymous_namespace)::write_utf8_bom(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_4 = param_2;\n      *param_7 = local_10;\n      return 1;\n    }\n  }" if (parenthesized_expression "((*(uint *)(this + 0xc) & 2) != 0)" ( (binary_expression "(*(uint *)(this + 0xc) & 2) != 0" (parenthesized_expression "(*(uint *)(this + 0xc) & 2)" ( (binary_expression "*(uint *)(this + 0xc) & 2" (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) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    iVar1 = (anonymous_namespace)::write_utf8_bom(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_4 = param_2;\n      *param_7 = local_10;\n      return 1;\n    }\n  }" { (ERROR "iVar1 = (anonymous_namespace)::" (assignment_expression "iVar1 = (anonymous_namespace)" identifier = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) : :) (expression_statement "write_utf8_bom(&local_10);" (call_expression "write_utf8_bom(&local_10)" identifier (argument_list "(&local_10)" ( (pointer_expression "&local_10" & identifier) ))) ;) (if_statement "if (iVar1 == 0) {\nLAB_0035db44:\n      *param_4 = param_2;\n      *param_7 = local_10;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0035db44:\n      *param_4 = param_2;\n      *param_7 = local_10;\n      return 1;\n    }" { (labeled_statement "LAB_0035db44:\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 = local_10;" (assignment_expression "*param_7 = local_10" (pointer_expression "*param_7" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) })) (expression_statement "iVar1 = (int)param_3 - (int)param_2;" (assignment_expression "iVar1 = (int)param_3 - (int)param_2" identifier = (binary_expression "(int)param_3 - (int)param_2" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (param_2 != param_3) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      wVar3 = *param_2;\n      if ((uint)(wVar3 + iVar6) < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < (uint)(param_2[1] + iVar4)) goto LAB_0035db20;\n        wVar3 = wVar3 * 0x400 + param_2[1] + L'\xfca02400';\n      }\n      else {\n        iVar1 = 1;\n        if ((uint)(wVar3 + iVar4) < 0x400) goto LAB_0035db20;\n      }\n      if ((uint)wVar5 < (uint)wVar3) {\nLAB_0035db20:\n        *param_4 = param_2;\n        *param_7 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = (anonymous_namespace)::write_utf8_code_point((range *)&local_10,wVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_2 = (wchar32 *)((int)param_2 + iVar1);\n      iVar1 = (int)param_3 - (int)param_2;\n    } while (param_3 != param_2);\n  }" if (parenthesized_expression "(param_2 != param_3)" ( (binary_expression "param_2 != param_3" identifier != identifier) )) (compound_statement "{\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      wVar3 = *param_2;\n      if ((uint)(wVar3 + iVar6) < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < (uint)(param_2[1] + iVar4)) goto LAB_0035db20;\n        wVar3 = wVar3 * 0x400 + param_2[1] + L'\xfca02400';\n      }\n      else {\n        iVar1 = 1;\n        if ((uint)(wVar3 + iVar4) < 0x400) goto LAB_0035db20;\n      }\n      if ((uint)wVar5 < (uint)wVar3) {\nLAB_0035db20:\n        *param_4 = param_2;\n        *param_7 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = (anonymous_namespace)::write_utf8_code_point((range *)&local_10,wVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_2 = (wchar32 *)((int)param_2 + iVar1);\n      iVar1 = (int)param_3 - (int)param_2;\n    } while (param_3 != param_2);\n  }" { (expression_statement "iVar6 = -0xd800;" (assignment_expression "iVar6 = -0xd800" identifier = number_literal) ;) (expression_statement "iVar4 = -0xdc00;" (assignment_expression "iVar4 = -0xdc00" identifier = number_literal) ;) (do_statement "do {\n      wVar3 = *param_2;\n      if ((uint)(wVar3 + iVar6) < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < (uint)(param_2[1] + iVar4)) goto LAB_0035db20;\n        wVar3 = wVar3 * 0x400 + param_2[1] + L'\xfca02400';\n      }\n      else {\n        iVar1 = 1;\n        if ((uint)(wVar3 + iVar4) < 0x400) goto LAB_0035db20;\n      }\n      if ((uint)wVar5 < (uint)wVar3) {\nLAB_0035db20:\n        *param_4 = param_2;\n        *param_7 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = (anonymous_namespace)::write_utf8_code_point((range *)&local_10,wVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_2 = (wchar32 *)((int)param_2 + iVar1);\n      iVar1 = (int)param_3 - (int)param_2;\n    } while (param_3 != param_2);" do (compound_statement "{\n      wVar3 = *param_2;\n      if ((uint)(wVar3 + iVar6) < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < (uint)(param_2[1] + iVar4)) goto LAB_0035db20;\n        wVar3 = wVar3 * 0x400 + param_2[1] + L'\xfca02400';\n      }\n      else {\n        iVar1 = 1;\n        if ((uint)(wVar3 + iVar4) < 0x400) goto LAB_0035db20;\n      }\n      if ((uint)wVar5 < (uint)wVar3) {\nLAB_0035db20:\n        *param_4 = param_2;\n        *param_7 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = (anonymous_namespace)::write_utf8_code_point((range *)&local_10,wVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_2 = (wchar32 *)((int)param_2 + iVar1);\n      iVar1 = (int)param_3 - (int)param_2;\n    }" { (expression_statement "wVar3 = *param_2;" (assignment_expression "wVar3 = *param_2" identifier = (pointer_expression "*param_2" * identifier)) ;) (if_statement "if ((uint)(wVar3 + iVar6) < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < (uint)(param_2[1] + iVar4)) goto LAB_0035db20;\n        wVar3 = wVar3 * 0x400 + param_2[1] + L'\xfca02400';\n      }\n      else {\n        iVar1 = 1;\n        if ((uint)(wVar3 + iVar4) < 0x400) goto LAB_0035db20;\n      }" if (parenthesized_expression "((uint)(wVar3 + iVar6) < 0x400)" ( (binary_expression "(uint)(wVar3 + iVar6) < 0x400" (call_expression "(uint)(wVar3 + iVar6)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(wVar3 + iVar6)" ( (binary_expression "wVar3 + iVar6" identifier + identifier) ))) < number_literal) )) (compound_statement "{\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < (uint)(param_2[1] + iVar4)) goto LAB_0035db20;\n        wVar3 = wVar3 * 0x400 + param_2[1] + L'\xfca02400';\n      }" { (if_statement "if ((uint)(iVar1 >> 2) < 2) break;" if (parenthesized_expression "((uint)(iVar1 >> 2) < 2)" ( (binary_expression "(uint)(iVar1 >> 2) < 2" (call_expression "(uint)(iVar1 >> 2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 >> 2)" ( (binary_expression "iVar1 >> 2" identifier >> number_literal) ))) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = 2;" (assignment_expression "iVar1 = 2" identifier = number_literal) ;) (if_statement "if (0x3ff < (uint)(param_2[1] + iVar4)) goto LAB_0035db20;" if (parenthesized_expression "(0x3ff < (uint)(param_2[1] + iVar4))" ( (binary_expression "0x3ff < (uint)(param_2[1] + iVar4)" number_literal < (call_expression "(uint)(param_2[1] + iVar4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(param_2[1] + iVar4)" ( (binary_expression "param_2[1] + iVar4" (subscript_expression "param_2[1]" identifier [ number_literal ]) + identifier) )))) )) (goto_statement "goto LAB_0035db20;" goto statement_identifier ;)) (expression_statement "wVar3 = wVar3 * 0x400 + param_2[1] + L'\xfca02400';" (assignment_expression "wVar3 = wVar3 * 0x400 + param_2[1] + L'\xfca02400'" identifier = (binary_expression "wVar3 * 0x400 + param_2[1] + L'\xfca02400'" (binary_expression "wVar3 * 0x400 + param_2[1]" (binary_expression "wVar3 * 0x400" identifier * number_literal) + (subscript_expression "param_2[1]" identifier [ number_literal ])) + (char_literal "L'\xfca02400'" L' escape_sequence character character character character '))) ;) }) (else_clause "else {\n        iVar1 = 1;\n        if ((uint)(wVar3 + iVar4) < 0x400) goto LAB_0035db20;\n      }" else (compound_statement "{\n        iVar1 = 1;\n        if ((uint)(wVar3 + iVar4) < 0x400) goto LAB_0035db20;\n      }" { (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if ((uint)(wVar3 + iVar4) < 0x400) goto LAB_0035db20;" if (parenthesized_expression "((uint)(wVar3 + iVar4) < 0x400)" ( (binary_expression "(uint)(wVar3 + iVar4) < 0x400" (call_expression "(uint)(wVar3 + iVar4)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(wVar3 + iVar4)" ( (binary_expression "wVar3 + iVar4" identifier + identifier) ))) < number_literal) )) (goto_statement "goto LAB_0035db20;" goto statement_identifier ;)) }))) (if_statement "if ((uint)wVar5 < (uint)wVar3) {\nLAB_0035db20:\n        *param_4 = param_2;\n        *param_7 = local_10;\n        return 2;\n      }" if (parenthesized_expression "((uint)wVar5 < (uint)wVar3)" ( (binary_expression "(uint)wVar5 < (uint)wVar3" (cast_expression "(uint)wVar5" ( (type_descriptor "uint" type_identifier) ) identifier) < (cast_expression "(uint)wVar3" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\nLAB_0035db20:\n        *param_4 = param_2;\n        *param_7 = local_10;\n        return 2;\n      }" { (labeled_statement "LAB_0035db20:\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 = local_10;" (assignment_expression "*param_7 = local_10" (pointer_expression "*param_7" * identifier) = identifier) ;) (return_statement "return 2;" return number_literal ;) })) (expression_statement "iVar1 = iVar1 << 2;" (assignment_expression "iVar1 = iVar1 << 2" identifier = (binary_expression "iVar1 << 2" identifier << number_literal)) ;) (ERROR "iVar2 = (anonymous_namespace)::" (assignment_expression "iVar2 = (anonymous_namespace)" identifier = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) : :) (expression_statement "write_utf8_code_point((range *)&local_10,wVar3);" (call_expression "write_utf8_code_point((range *)&local_10,wVar3)" identifier (argument_list "((range *)&local_10,wVar3)" ( (cast_expression "(range *)&local_10" ( (type_descriptor "range *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&local_10" & identifier)) , identifier ))) ;) (if_statement "if (iVar2 == 0) goto LAB_0035db44;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0035db44;" goto statement_identifier ;)) (expression_statement "param_2 = (wchar32 *)((int)param_2 + iVar1);" (assignment_expression "param_2 = (wchar32 *)((int)param_2 + iVar1)" identifier = (cast_expression "(wchar32 *)((int)param_2 + iVar1)" ( (type_descriptor "wchar32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_2 + iVar1)" ( (binary_expression "(int)param_2 + iVar1" (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "iVar1 = (int)param_3 - (int)param_2;" (assignment_expression "iVar1 = (int)param_3 - (int)param_2" identifier = (binary_expression "(int)param_3 - (int)param_2" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_2" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }) while (parenthesized_expression "(param_3 != param_2)" ( (binary_expression "param_3 != param_2" identifier != identifier) )) ;) })) (expression_statement "*param_4 = param_2;" (assignment_expression "*param_4 = param_2" (pointer_expression "*param_4" * identifier) = identifier) ;) (expression_statement "*param_7 = local_10;" (assignment_expression "*param_7 = local_10" (pointer_expression "*param_7" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined4\nFUN_0035da24(int param_1,undefined4 param_2,uint *param_3,uint *param_4,undefined4 *param_5,\n            undefined4 param_6,undefined4 param_7,undefined4 *param_8)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar5 = *(uint *)(param_1 + 8);\n  local_10 = param_6;\n  local_c = param_7;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }\n  iVar1 = (int)param_4 - (int)param_3;\n  if (param_3 != param_4) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }\n  *param_5 = param_3;\n  *param_8 = local_10;\n  return 0;\n}\n\n" (function_definition "undefined4\nFUN_0035da24(int param_1,undefined4 param_2,uint *param_3,uint *param_4,undefined4 *param_5,\n            undefined4 param_6,undefined4 param_7,undefined4 *param_8)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar5 = *(uint *)(param_1 + 8);\n  local_10 = param_6;\n  local_c = param_7;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }\n  iVar1 = (int)param_4 - (int)param_3;\n  if (param_3 != param_4) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }\n  *param_5 = param_3;\n  *param_8 = local_10;\n  return 0;\n}" type_identifier (function_declarator "FUN_0035da24(int param_1,undefined4 param_2,uint *param_3,uint *param_4,undefined4 *param_5,\n            undefined4 param_6,undefined4 param_7,undefined4 *param_8)" identifier (parameter_list "(int param_1,undefined4 param_2,uint *param_3,uint *param_4,undefined4 *param_5,\n            undefined4 param_6,undefined4 param_7,undefined4 *param_8)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "uint *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uint *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "undefined4 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "undefined4 param_6" type_identifier identifier) , (parameter_declaration "undefined4 param_7" type_identifier identifier) , (parameter_declaration "undefined4 *param_8" type_identifier (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar5 = *(uint *)(param_1 + 8);\n  local_10 = param_6;\n  local_c = param_7;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }\n  iVar1 = (int)param_4 - (int)param_3;\n  if (param_3 != param_4) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }\n  *param_5 = param_3;\n  *param_8 = local_10;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "int iVar4;" primitive_type identifier ;) (declaration "uint uVar5;" type_identifier identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (declaration "undefined4 local_10;" type_identifier identifier ;) (declaration "undefined4 local_c;" type_identifier identifier ;) (expression_statement "uVar5 = *(uint *)(param_1 + 8);" (assignment_expression "uVar5 = *(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_10 = param_6;" (assignment_expression "local_10 = param_6" identifier = identifier) ;) (expression_statement "local_c = param_7;" (assignment_expression "local_c = param_7" identifier = identifier) ;) (if_statement "if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }" if (parenthesized_expression "((*(uint *)(param_1 + 0xc) & 2) != 0)" ( (binary_expression "(*(uint *)(param_1 + 0xc) & 2) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0xc) & 2)" ( (binary_expression "*(uint *)(param_1 + 0xc) & 2" (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) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }" { (expression_statement "iVar1 = FUN_0035cafc(&local_10);" (assignment_expression "iVar1 = FUN_0035cafc(&local_10)" identifier = (call_expression "FUN_0035cafc(&local_10)" identifier (argument_list "(&local_10)" ( (pointer_expression "&local_10" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }" { (labeled_statement "LAB_0035db44:\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 = local_10;" (assignment_expression "*param_8 = local_10" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) })) (expression_statement "iVar1 = (int)param_4 - (int)param_3;" (assignment_expression "iVar1 = (int)param_4 - (int)param_3" identifier = (binary_expression "(int)param_4 - (int)param_3" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (if_statement "if (param_3 != param_4) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }" if (parenthesized_expression "(param_3 != param_4)" ( (binary_expression "param_3 != param_4" identifier != identifier) )) (compound_statement "{\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }" { (expression_statement "iVar6 = -0xd800;" (assignment_expression "iVar6 = -0xd800" identifier = number_literal) ;) (expression_statement "iVar4 = -0xdc00;" (assignment_expression "iVar4 = -0xdc00" identifier = number_literal) ;) (do_statement "do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);" do (compound_statement "{\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    }" { (expression_statement "uVar3 = *param_3;" (assignment_expression "uVar3 = *param_3" identifier = (pointer_expression "*param_3" * identifier)) ;) (if_statement "if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }" if (parenthesized_expression "(uVar3 + iVar6 < 0x400)" ( (binary_expression "uVar3 + iVar6 < 0x400" (binary_expression "uVar3 + iVar6" identifier + identifier) < number_literal) )) (compound_statement "{\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }" { (if_statement "if ((uint)(iVar1 >> 2) < 2) break;" if (parenthesized_expression "((uint)(iVar1 >> 2) < 2)" ( (binary_expression "(uint)(iVar1 >> 2) < 2" (call_expression "(uint)(iVar1 >> 2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar1 >> 2)" ( (binary_expression "iVar1 >> 2" identifier >> number_literal) ))) < number_literal) )) (break_statement "break;" break ;)) (expression_statement "iVar1 = 2;" (assignment_expression "iVar1 = 2" identifier = number_literal) ;) (if_statement "if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;" if (parenthesized_expression "(0x3ff < param_3[1] + iVar4)" ( (binary_expression "0x3ff < param_3[1] + iVar4" number_literal < (binary_expression "param_3[1] + iVar4" (subscript_expression "param_3[1]" identifier [ number_literal ]) + identifier)) )) (goto_statement "goto LAB_0035db20;" goto statement_identifier ;)) (expression_statement "uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;" (assignment_expression "uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400" identifier = (binary_expression "uVar3 * 0x400 + param_3[1] + 0xfca02400" (binary_expression "uVar3 * 0x400 + param_3[1]" (binary_expression "uVar3 * 0x400" identifier * number_literal) + (subscript_expression "param_3[1]" identifier [ number_literal ])) + number_literal)) ;) }) (else_clause "else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }" else (compound_statement "{\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }" { (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" identifier = number_literal) ;) (if_statement "if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;" if (parenthesized_expression "(uVar3 + iVar4 < 0x400)" ( (binary_expression "uVar3 + iVar4 < 0x400" (binary_expression "uVar3 + iVar4" identifier + identifier) < number_literal) )) (goto_statement "goto LAB_0035db20;" goto statement_identifier ;)) }))) (if_statement "if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }" if (parenthesized_expression "(uVar5 < uVar3)" ( (binary_expression "uVar5 < uVar3" identifier < identifier) )) (compound_statement "{\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }" { (labeled_statement "LAB_0035db20:\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 = local_10;" (assignment_expression "*param_8 = local_10" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return 2;" return number_literal ;) })) (expression_statement "iVar1 = iVar1 << 2;" (assignment_expression "iVar1 = iVar1 << 2" identifier = (binary_expression "iVar1 << 2" identifier << number_literal)) ;) (expression_statement "iVar2 = FUN_0035c99c(&local_10,uVar3);" (assignment_expression "iVar2 = FUN_0035c99c(&local_10,uVar3)" identifier = (call_expression "FUN_0035c99c(&local_10,uVar3)" identifier (argument_list "(&local_10,uVar3)" ( (pointer_expression "&local_10" & identifier) , identifier )))) ;) (if_statement "if (iVar2 == 0) goto LAB_0035db44;" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (goto_statement "goto LAB_0035db44;" goto statement_identifier ;)) (expression_statement "param_3 = (uint *)((int)param_3 + iVar1);" (assignment_expression "param_3 = (uint *)((int)param_3 + iVar1)" identifier = (cast_expression "(uint *)((int)param_3 + iVar1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)param_3 + iVar1)" ( (binary_expression "(int)param_3 + iVar1" (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier) + identifier) )))) ;) (expression_statement "iVar1 = (int)param_4 - (int)param_3;" (assignment_expression "iVar1 = (int)param_4 - (int)param_3" identifier = (binary_expression "(int)param_4 - (int)param_3" (cast_expression "(int)param_4" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)param_3" ( (type_descriptor "int" primitive_type) ) identifier))) ;) }) while (parenthesized_expression "(param_4 != param_3)" ( (binary_expression "param_4 != param_3" identifier != identifier) )) ;) })) (expression_statement "*param_5 = param_3;" (assignment_expression "*param_5 = param_3" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = local_10;" (assignment_expression "*param_8 = local_10" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(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 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 IDENT ;) (declaration TYPE 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 = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })) })) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) < LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) ))) < LIT) )) (break_statement break ;)) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < (binary_expression (subscript_expression IDENT [ LIT ]) + IDENT)) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (binary_expression IDENT * LIT) + (subscript_expression IDENT [ LIT ])) + LIT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) < LIT) )) (goto_statement goto statement_identifier ;)) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = (binary_expression IDENT << LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + IDENT) )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) }) while (parenthesized_expression ( (binary_expression IDENT != IDENT) )) ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return LIT ;) })))
(function_definition "undefined4\nFUN_0035da24(int param_1,undefined4 param_2,uint *param_3,uint *param_4,undefined4 *param_5,\n            undefined4 param_6,undefined4 param_7,undefined4 *param_8)\n\n{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar5 = *(uint *)(param_1 + 8);\n  local_10 = param_6;\n  local_c = param_7;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }\n  iVar1 = (int)param_4 - (int)param_3;\n  if (param_3 != param_4) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }\n  *param_5 = param_3;\n  *param_8 = local_10;\n  return 0;\n}" (type_identifier "undefined4") (function_declarator "FUN_0035da24(int param_1,undefined4 param_2,uint *param_3,uint *param_4,undefined4 *param_5,\n            undefined4 param_6,undefined4 param_7,undefined4 *param_8)" (identifier "FUN_0035da24") (parameter_list "(int param_1,undefined4 param_2,uint *param_3,uint *param_4,undefined4 *param_5,\n            undefined4 param_6,undefined4 param_7,undefined4 *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 "uint *param_3" (type_identifier "uint") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "uint *param_4" (type_identifier "uint") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "undefined4 *param_5" (type_identifier "undefined4") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) (, ",") (parameter_declaration "undefined4 param_6" (type_identifier "undefined4") (identifier "param_6")) (, ",") (parameter_declaration "undefined4 param_7" (type_identifier "undefined4") (identifier "param_7")) (, ",") (parameter_declaration "undefined4 *param_8" (type_identifier "undefined4") (pointer_declarator "*param_8" (* "*") (identifier "param_8"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uint uVar3;\n  int iVar4;\n  uint uVar5;\n  int iVar6;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar5 = *(uint *)(param_1 + 8);\n  local_10 = param_6;\n  local_c = param_7;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }\n  iVar1 = (int)param_4 - (int)param_3;\n  if (param_3 != param_4) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }\n  *param_5 = param_3;\n  *param_8 = local_10;\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "int iVar4;" (primitive_type "int") (identifier "iVar4") (; ";")) (declaration "uint uVar5;" (type_identifier "uint") (identifier "uVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (declaration "undefined4 local_10;" (type_identifier "undefined4") (identifier "local_10") (; ";")) (declaration "undefined4 local_c;" (type_identifier "undefined4") (identifier "local_c") (; ";")) (expression_statement "uVar5 = *(uint *)(param_1 + 8);" (assignment_expression "uVar5 = *(uint *)(param_1 + 8)" (identifier "uVar5") (= "=") (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_10 = param_6;" (assignment_expression "local_10 = param_6" (identifier "local_10") (= "=") (identifier "param_6")) (; ";")) (expression_statement "local_c = param_7;" (assignment_expression "local_c = param_7" (identifier "local_c") (= "=") (identifier "param_7")) (; ";")) (if_statement "if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }" (if "if") (parenthesized_expression "((*(uint *)(param_1 + 0xc) & 2) != 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0xc) & 2) != 0" (parenthesized_expression "(*(uint *)(param_1 + 0xc) & 2)" (( "(") (binary_expression "*(uint *)(param_1 + 0xc) & 2" (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")) () ")")))) (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    iVar1 = FUN_0035cafc(&local_10);\n    if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }\n  }" ({ "{") (expression_statement "iVar1 = FUN_0035cafc(&local_10);" (assignment_expression "iVar1 = FUN_0035cafc(&local_10)" (identifier "iVar1") (= "=") (call_expression "FUN_0035cafc(&local_10)" (identifier "FUN_0035cafc") (argument_list "(&local_10)" (( "(") (pointer_expression "&local_10" (& "&") (identifier "local_10")) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\nLAB_0035db44:\n      *param_5 = param_3;\n      *param_8 = local_10;\n      return 1;\n    }" ({ "{") (labeled_statement "LAB_0035db44:\n      *param_5 = param_3;" (statement_identifier "LAB_0035db44") (: ":") (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 = local_10;" (assignment_expression "*param_8 = local_10" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (identifier "local_10")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar1 = (int)param_4 - (int)param_3;" (assignment_expression "iVar1 = (int)param_4 - (int)param_3" (identifier "iVar1") (= "=") (binary_expression "(int)param_4 - (int)param_3" (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")) (- "-") (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")))) (; ";")) (if_statement "if (param_3 != param_4) {\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }" (if "if") (parenthesized_expression "(param_3 != param_4)" (( "(") (binary_expression "param_3 != param_4" (identifier "param_3") (!= "!=") (identifier "param_4")) () ")")) (compound_statement "{\n    iVar6 = -0xd800;\n    iVar4 = -0xdc00;\n    do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);\n  }" ({ "{") (expression_statement "iVar6 = -0xd800;" (assignment_expression "iVar6 = -0xd800" (identifier "iVar6") (= "=") (number_literal "-0xd800")) (; ";")) (expression_statement "iVar4 = -0xdc00;" (assignment_expression "iVar4 = -0xdc00" (identifier "iVar4") (= "=") (number_literal "-0xdc00")) (; ";")) (do_statement "do {\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    } while (param_4 != param_3);" (do "do") (compound_statement "{\n      uVar3 = *param_3;\n      if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }\n      if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }\n      iVar1 = iVar1 << 2;\n      iVar2 = FUN_0035c99c(&local_10,uVar3);\n      if (iVar2 == 0) goto LAB_0035db44;\n      param_3 = (uint *)((int)param_3 + iVar1);\n      iVar1 = (int)param_4 - (int)param_3;\n    }" ({ "{") (expression_statement "uVar3 = *param_3;" (assignment_expression "uVar3 = *param_3" (identifier "uVar3") (= "=") (pointer_expression "*param_3" (* "*") (identifier "param_3"))) (; ";")) (if_statement "if (uVar3 + iVar6 < 0x400) {\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }\n      else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }" (if "if") (parenthesized_expression "(uVar3 + iVar6 < 0x400)" (( "(") (binary_expression "uVar3 + iVar6 < 0x400" (binary_expression "uVar3 + iVar6" (identifier "uVar3") (+ "+") (identifier "iVar6")) (< "<") (number_literal "0x400")) () ")")) (compound_statement "{\n        if ((uint)(iVar1 >> 2) < 2) break;\n        iVar1 = 2;\n        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;\n        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;\n      }" ({ "{") (if_statement "if ((uint)(iVar1 >> 2) < 2) break;" (if "if") (parenthesized_expression "((uint)(iVar1 >> 2) < 2)" (( "(") (binary_expression "(uint)(iVar1 >> 2) < 2" (call_expression "(uint)(iVar1 >> 2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar1 >> 2)" (( "(") (binary_expression "iVar1 >> 2" (identifier "iVar1") (>> ">>") (number_literal "2")) () ")"))) (< "<") (number_literal "2")) () ")")) (break_statement "break;" (break "break") (; ";"))) (expression_statement "iVar1 = 2;" (assignment_expression "iVar1 = 2" (identifier "iVar1") (= "=") (number_literal "2")) (; ";")) (if_statement "if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;" (if "if") (parenthesized_expression "(0x3ff < param_3[1] + iVar4)" (( "(") (binary_expression "0x3ff < param_3[1] + iVar4" (number_literal "0x3ff") (< "<") (binary_expression "param_3[1] + iVar4" (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]")) (+ "+") (identifier "iVar4"))) () ")")) (goto_statement "goto LAB_0035db20;" (goto "goto") (statement_identifier "LAB_0035db20") (; ";"))) (expression_statement "uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;" (assignment_expression "uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400" (identifier "uVar3") (= "=") (binary_expression "uVar3 * 0x400 + param_3[1] + 0xfca02400" (binary_expression "uVar3 * 0x400 + param_3[1]" (binary_expression "uVar3 * 0x400" (identifier "uVar3") (* "*") (number_literal "0x400")) (+ "+") (subscript_expression "param_3[1]" (identifier "param_3") ([ "[") (number_literal "1") (] "]"))) (+ "+") (number_literal "0xfca02400"))) (; ";")) (} "}")) (else_clause "else {\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }" (else "else") (compound_statement "{\n        iVar1 = 1;\n        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;\n      }" ({ "{") (expression_statement "iVar1 = 1;" (assignment_expression "iVar1 = 1" (identifier "iVar1") (= "=") (number_literal "1")) (; ";")) (if_statement "if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;" (if "if") (parenthesized_expression "(uVar3 + iVar4 < 0x400)" (( "(") (binary_expression "uVar3 + iVar4 < 0x400" (binary_expression "uVar3 + iVar4" (identifier "uVar3") (+ "+") (identifier "iVar4")) (< "<") (number_literal "0x400")) () ")")) (goto_statement "goto LAB_0035db20;" (goto "goto") (statement_identifier "LAB_0035db20") (; ";"))) (} "}")))) (if_statement "if (uVar5 < uVar3) {\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }" (if "if") (parenthesized_expression "(uVar5 < uVar3)" (( "(") (binary_expression "uVar5 < uVar3" (identifier "uVar5") (< "<") (identifier "uVar3")) () ")")) (compound_statement "{\nLAB_0035db20:\n        *param_5 = param_3;\n        *param_8 = local_10;\n        return 2;\n      }" ({ "{") (labeled_statement "LAB_0035db20:\n        *param_5 = param_3;" (statement_identifier "LAB_0035db20") (: ":") (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 = local_10;" (assignment_expression "*param_8 = local_10" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (identifier "local_10")) (; ";")) (return_statement "return 2;" (return "return") (number_literal "2") (; ";")) (} "}"))) (expression_statement "iVar1 = iVar1 << 2;" (assignment_expression "iVar1 = iVar1 << 2" (identifier "iVar1") (= "=") (binary_expression "iVar1 << 2" (identifier "iVar1") (<< "<<") (number_literal "2"))) (; ";")) (expression_statement "iVar2 = FUN_0035c99c(&local_10,uVar3);" (assignment_expression "iVar2 = FUN_0035c99c(&local_10,uVar3)" (identifier "iVar2") (= "=") (call_expression "FUN_0035c99c(&local_10,uVar3)" (identifier "FUN_0035c99c") (argument_list "(&local_10,uVar3)" (( "(") (pointer_expression "&local_10" (& "&") (identifier "local_10")) (, ",") (identifier "uVar3") () ")")))) (; ";")) (if_statement "if (iVar2 == 0) goto LAB_0035db44;" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (goto_statement "goto LAB_0035db44;" (goto "goto") (statement_identifier "LAB_0035db44") (; ";"))) (expression_statement "param_3 = (uint *)((int)param_3 + iVar1);" (assignment_expression "param_3 = (uint *)((int)param_3 + iVar1)" (identifier "param_3") (= "=") (cast_expression "(uint *)((int)param_3 + iVar1)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((int)param_3 + iVar1)" (( "(") (binary_expression "(int)param_3 + iVar1" (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")) (+ "+") (identifier "iVar1")) () ")")))) (; ";")) (expression_statement "iVar1 = (int)param_4 - (int)param_3;" (assignment_expression "iVar1 = (int)param_4 - (int)param_3" (identifier "iVar1") (= "=") (binary_expression "(int)param_4 - (int)param_3" (cast_expression "(int)param_4" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_4")) (- "-") (cast_expression "(int)param_3" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_3")))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_4 != param_3)" (( "(") (binary_expression "param_4 != param_3" (identifier "param_4") (!= "!=") (identifier "param_3")) () ")")) (; ";")) (} "}"))) (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 = local_10;" (assignment_expression "*param_8 = local_10" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (identifier "local_10")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

/* std::__codecvt_utf8_utf16_base<char32_t>::do_out(__mbstate_t&, char32_t const*, char32_t const*,
   char32_t const*&, char*, char*, char*&) const */

type_1 __thiscall
std::type_2<char32_t>::function_1
          (type_2<char32_t> *var_1,type_3 *param_1,type_4 *var_4,
          type_4 *var_5,type_4 **param_4,char *param_5,char *param_6,char **param_7)

{
  int var_3;
  int var_10;
  type_4 var_6;
  int var_8;
  type_4 wVar5;
  int var_7;
  char *local_10;
  char *local_c;
  
  wVar5 = *(type_4 *)(var_1 + 8);
  local_10 = param_5;
  local_c = param_6;
  if ((*(type_5 *)(var_1 + 0xc) & 2) != 0) {
    var_3 = (anonymous_namespace)::var_2(&local_10);
    if (var_3 == 0) {
LAB_0035db44:
      *param_4 = var_4;
      *param_7 = local_10;
      return 1;
    }
  }
  var_3 = (int)var_5 - (int)var_4;
  if (var_4 != var_5) {
    var_7 = -0xd800;
    var_8 = -0xdc00;
    do {
      var_6 = *var_4;
      if ((type_5)(var_6 + var_7) < 0x400) {
        if ((type_5)(var_3 >> 2) < 2) break;
        var_3 = 2;
        if (0x3ff < (type_5)(var_4[1] + var_8)) goto LAB_0035db20;
        var_6 = var_6 * 0x400 + var_4[1] + L'\xfca02400';
      }
      else {
        var_3 = 1;
        if ((type_5)(var_6 + var_8) < 0x400) goto LAB_0035db20;
      }
      if ((type_5)wVar5 < (type_5)var_6) {
LAB_0035db20:
        *param_4 = var_4;
        *param_7 = local_10;
        return 2;
      }
      var_3 = var_3 << 2;
      var_10 = (anonymous_namespace)::var_9((type_6 *)&local_10,var_6);
      if (var_10 == 0) goto LAB_0035db44;
      var_4 = (type_4 *)((int)var_4 + var_3);
      var_3 = (int)var_5 - (int)var_4;
    } while (var_5 != var_4);
  }
  *param_4 = var_4;
  *param_7 = local_10;
  return 0;
}


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

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

{
  int iVar1;
  int iVar2;
  uint uVar3;
  int iVar4;
  uint uVar5;
  int iVar6;
  undefined4 local_10;
  undefined4 local_c;
  
  uVar5 = *(uint *)(param_1 + 8);
  local_10 = param_6;
  local_c = param_7;
  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {
    iVar1 = FUN_0035cafc(&local_10);
    if (iVar1 == 0) {
LAB_0035db44:
      *param_5 = param_3;
      *param_8 = local_10;
      return 1;
    }
  }
  iVar1 = (int)param_4 - (int)param_3;
  if (param_3 != param_4) {
    iVar6 = -0xd800;
    iVar4 = -0xdc00;
    do {
      uVar3 = *param_3;
      if (uVar3 + iVar6 < 0x400) {
        if ((uint)(iVar1 >> 2) < 2) break;
        iVar1 = 2;
        if (0x3ff < param_3[1] + iVar4) goto LAB_0035db20;
        uVar3 = uVar3 * 0x400 + param_3[1] + 0xfca02400;
      }
      else {
        iVar1 = 1;
        if (uVar3 + iVar4 < 0x400) goto LAB_0035db20;
      }
      if (uVar5 < uVar3) {
LAB_0035db20:
        *param_5 = param_3;
        *param_8 = local_10;
        return 2;
      }
      iVar1 = iVar1 << 2;
      iVar2 = FUN_0035c99c(&local_10,uVar3);
      if (iVar2 == 0) goto LAB_0035db44;
      param_3 = (uint *)((int)param_3 + iVar1);
      iVar1 = (int)param_4 - (int)param_3;
    } while (param_4 != param_3);
  }
  *param_5 = param_3;
  *param_8 = local_10;
  return 0;
}

