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

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

{
  wchar32 wVar1;
  undefined4 uVar2;
  wchar16 *pwVar3;
  wchar32 wVar4;
  range *prVar5;
  wchar32 wVar6;
  char *local_18;
  char *local_14;
  undefined4 local_10 [3];
  
  local_10[0] = *(undefined4 *)(this + 0xc);
  prVar5 = (range *)&local_18;
  wVar4 = *(wchar32 *)(this + 8);
  local_18 = param_2;
  local_14 = param_3;
  (anonymous_namespace)::read_utf16_bom<false>(prVar5,(codecvt_mode *)local_10);
  if (0xfffe < (uint)wVar4) {
    wVar4 = L'\xffff';
  }
  if (1 < (uint)((int)local_14 - (int)local_18)) {
    if (param_5 != param_6) {
      wVar6 = L'\xfffffffe';
      pwVar3 = param_5;
      do {
        wVar1 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0]);
        if ((wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1)) {
          *param_4 = local_18;
          *param_7 = pwVar3;
          return 2;
        }
        param_5 = pwVar3 + 1;
        *pwVar3 = (wchar16)wVar1;
        if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_003d8640;
        pwVar3 = param_5;
      } while (param_6 != param_5);
    }
    *param_4 = local_18;
    *param_7 = param_5;
    return 1;
  }
LAB_003d8640:
  *param_4 = local_18;
  *param_7 = param_5;
  uVar2 = 2;
  if (param_3 == local_18) {
    uVar2 = 0;
  }
  return uVar2;
}



undefined4
FUN_003d8560(int param_1,undefined4 param_2,int param_3,int param_4,int *param_5,undefined2 *param_6
            ,undefined2 *param_7,undefined4 *param_8)

{
  uint uVar1;
  undefined4 uVar2;
  undefined2 *puVar3;
  uint uVar4;
  int *piVar5;
  uint uVar6;
  int local_18;
  int local_14;
  undefined4 local_10 [3];
  
  local_10[0] = *(undefined4 *)(param_1 + 0xc);
  piVar5 = &local_18;
  uVar4 = *(uint *)(param_1 + 8);
  local_18 = param_3;
  local_14 = param_4;
  FUN_003d8234(piVar5,local_10);
  if (0xfffe < uVar4) {
    uVar4 = 0xffff;
  }
  if (1 < (uint)(local_14 - local_18)) {
    if (param_6 != param_7) {
      uVar6 = 0xfffffffe;
      puVar3 = param_6;
      do {
        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);
        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {
          *param_5 = local_18;
          *param_8 = puVar3;
          return 2;
        }
        param_6 = puVar3 + 1;
        *puVar3 = (short)uVar1;
        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;
        puVar3 = param_6;
      } while (param_7 != param_6);
    }
    *param_5 = local_18;
    *param_8 = param_6;
    return 1;
  }
LAB_003d8640:
  *param_5 = local_18;
  *param_8 = param_6;
  uVar2 = 2;
  if (param_4 == local_18) {
    uVar2 = 0;
  }
  return uVar2;
}


lui gp,0xf
addiu gp,gp,0xce0
addu gp,gp,t9
addiu sp,sp,-0x30
lw t9,-0x398c(gp)
lw v0,0xc(a0)
or t5,a3,zero
addiu t6,sp,0x18
lw t4,0x8(a0)
addiu a1,sp,0x20
lw t3,0x44(sp)
addiu t9,t9,-0x7dcc
lw t7,0x48(sp)
sw gp,0x10(sp)
or a0,t6,zero
sw v0,0x20(sp)
sw ra,0x2c(sp)
sw a2,0x18(sp)
bal 0x003d8234
_sw a3,0x1c(sp)
ori v0,zero,0xffff
lw a0,0x18(sp)
sltu v1,t4,v0
movz t4,v0,v1
lw v1,0x1c(sp)
subu v1,v1,a0
sltiu v1,v1,0x2
bne v1,zero,0x003d8640
_lw gp,0x10(sp)
beq t3,t7,0x003d8668
_lw t9,-0x5ef4(gp)
li t8,-0x2
b 0x003d860c
_addiu t9,t9,0x7810
bne v1,zero,0x003d8628
_lw v1,0x1c(sp)
addiu t3,t3,0x2
subu v1,v1,a0
sltiu v1,v1,0x2
bne v1,zero,0x003d8640
_sh v0,-0x2(t3)
beq t7,t3,0x003d866c
_lw v1,0x40(sp)
lw a2,0x20(sp)
or a0,t6,zero
bal 0x003d7810
_or a1,t4,zero
sltu v1,t4,v0
bne v0,t8,0x003d85e8
_lw a0,0x18(sp)
lw v0,0x40(sp)
lw v1,0x4c(sp)
sw a0,0x0(v0)
li v0,0x2
b 0x003d865c
_sw t3,0x0(v1)
lw v0,0x40(sp)
sw a0,0x0(v0)
xor a0,t5,a0
lw v0,0x4c(sp)
sw t3,0x0(v0)
li v0,0x2
movz v0,zero,a0
lw ra,0x2c(sp)
jr ra
_addiu sp,sp,0x30
lw v1,0x40(sp)
li v0,0x1
lw ra,0x2c(sp)
sw a0,0x0(v1)
lw v1,0x4c(sp)
sw t3,0x0(v1)
jr ra
_addiu sp,sp,0x30
(translation_unit "undefined4\nFUN_003d8560(int param_1,undefined4 param_2,int param_3,int param_4,int *param_5,undefined2 *param_6\n            ,undefined2 *param_7,undefined4 *param_8)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  undefined2 *puVar3;\n  uint uVar4;\n  int *piVar5;\n  uint uVar6;\n  int local_18;\n  int local_14;\n  undefined4 local_10 [3];\n  \n  local_10[0] = *(undefined4 *)(param_1 + 0xc);\n  piVar5 = &local_18;\n  uVar4 = *(uint *)(param_1 + 8);\n  local_18 = param_3;\n  local_14 = param_4;\n  FUN_003d8234(piVar5,local_10);\n  if (0xfffe < uVar4) {\n    uVar4 = 0xffff;\n  }\n  if (1 < (uint)(local_14 - local_18)) {\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }\nLAB_003d8640:\n  *param_5 = local_18;\n  *param_8 = param_6;\n  uVar2 = 2;\n  if (param_4 == local_18) {\n    uVar2 = 0;\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4\nFUN_003d8560(int param_1,undefined4 param_2,int param_3,int param_4,int *param_5,undefined2 *param_6\n            ,undefined2 *param_7,undefined4 *param_8)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  undefined2 *puVar3;\n  uint uVar4;\n  int *piVar5;\n  uint uVar6;\n  int local_18;\n  int local_14;\n  undefined4 local_10 [3];\n  \n  local_10[0] = *(undefined4 *)(param_1 + 0xc);\n  piVar5 = &local_18;\n  uVar4 = *(uint *)(param_1 + 8);\n  local_18 = param_3;\n  local_14 = param_4;\n  FUN_003d8234(piVar5,local_10);\n  if (0xfffe < uVar4) {\n    uVar4 = 0xffff;\n  }\n  if (1 < (uint)(local_14 - local_18)) {\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }\nLAB_003d8640:\n  *param_5 = local_18;\n  *param_8 = param_6;\n  uVar2 = 2;\n  if (param_4 == local_18) {\n    uVar2 = 0;\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_003d8560(int param_1,undefined4 param_2,int param_3,int param_4,int *param_5,undefined2 *param_6\n            ,undefined2 *param_7,undefined4 *param_8)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3,int param_4,int *param_5,undefined2 *param_6\n            ,undefined2 *param_7,undefined4 *param_8)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "undefined2 *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "undefined2 *param_7" type_identifier (pointer_declarator "*param_7" * identifier)) , (parameter_declaration "undefined4 *param_8" type_identifier (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  undefined2 *puVar3;\n  uint uVar4;\n  int *piVar5;\n  uint uVar6;\n  int local_18;\n  int local_14;\n  undefined4 local_10 [3];\n  \n  local_10[0] = *(undefined4 *)(param_1 + 0xc);\n  piVar5 = &local_18;\n  uVar4 = *(uint *)(param_1 + 8);\n  local_18 = param_3;\n  local_14 = param_4;\n  FUN_003d8234(piVar5,local_10);\n  if (0xfffe < uVar4) {\n    uVar4 = 0xffff;\n  }\n  if (1 < (uint)(local_14 - local_18)) {\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }\nLAB_003d8640:\n  *param_5 = local_18;\n  *param_8 = param_6;\n  uVar2 = 2;\n  if (param_4 == local_18) {\n    uVar2 = 0;\n  }\n  return uVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined2 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int local_18;" primitive_type identifier ;) (declaration "int local_14;" primitive_type identifier ;) (declaration "undefined4 local_10 [3];" type_identifier (array_declarator "local_10 [3]" identifier [ number_literal ]) ;) (expression_statement "local_10[0] = *(undefined4 *)(param_1 + 0xc);" (assignment_expression "local_10[0] = *(undefined4 *)(param_1 + 0xc)" (subscript_expression "local_10[0]" identifier [ number_literal ]) = (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "piVar5 = &local_18;" (assignment_expression "piVar5 = &local_18" identifier = (pointer_expression "&local_18" & identifier)) ;) (expression_statement "uVar4 = *(uint *)(param_1 + 8);" (assignment_expression "uVar4 = *(uint *)(param_1 + 8)" identifier = (pointer_expression "*(uint *)(param_1 + 8)" * (cast_expression "(uint *)(param_1 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "local_18 = param_3;" (assignment_expression "local_18 = param_3" identifier = identifier) ;) (expression_statement "local_14 = param_4;" (assignment_expression "local_14 = param_4" identifier = identifier) ;) (expression_statement "FUN_003d8234(piVar5,local_10);" (call_expression "FUN_003d8234(piVar5,local_10)" identifier (argument_list "(piVar5,local_10)" ( identifier , identifier ))) ;) (if_statement "if (0xfffe < uVar4) {\n    uVar4 = 0xffff;\n  }" if (parenthesized_expression "(0xfffe < uVar4)" ( (binary_expression "0xfffe < uVar4" number_literal < identifier) )) (compound_statement "{\n    uVar4 = 0xffff;\n  }" { (expression_statement "uVar4 = 0xffff;" (assignment_expression "uVar4 = 0xffff" identifier = number_literal) ;) })) (if_statement "if (1 < (uint)(local_14 - local_18)) {\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }" if (parenthesized_expression "(1 < (uint)(local_14 - local_18))" ( (binary_expression "1 < (uint)(local_14 - local_18)" number_literal < (call_expression "(uint)(local_14 - local_18)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(local_14 - local_18)" ( (binary_expression "local_14 - local_18" identifier - identifier) )))) )) (compound_statement "{\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }" { (if_statement "if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }" if (parenthesized_expression "(param_6 != param_7)" ( (binary_expression "param_6 != param_7" identifier != identifier) )) (compound_statement "{\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }" { (expression_statement "uVar6 = 0xfffffffe;" (assignment_expression "uVar6 = 0xfffffffe" identifier = number_literal) ;) (expression_statement "puVar3 = param_6;" (assignment_expression "puVar3 = param_6" identifier = identifier) ;) (do_statement "do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);" do (compound_statement "{\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      }" { (expression_statement "uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);" (assignment_expression "uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0])" identifier = (call_expression "FUN_003d7810(piVar5,uVar4,local_10[0])" identifier (argument_list "(piVar5,uVar4,local_10[0])" ( identifier , identifier , (subscript_expression "local_10[0]" identifier [ number_literal ]) )))) ;) (if_statement "if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }" if (parenthesized_expression "((uVar1 == uVar6) || (uVar4 < uVar1))" ( (binary_expression "(uVar1 == uVar6) || (uVar4 < uVar1)" (parenthesized_expression "(uVar1 == uVar6)" ( (binary_expression "uVar1 == uVar6" identifier == identifier) )) || (parenthesized_expression "(uVar4 < uVar1)" ( (binary_expression "uVar4 < uVar1" identifier < identifier) ))) )) (compound_statement "{\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }" { (expression_statement "*param_5 = local_18;" (assignment_expression "*param_5 = local_18" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = puVar3;" (assignment_expression "*param_8 = puVar3" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return 2;" return number_literal ;) })) (expression_statement "param_6 = puVar3 + 1;" (assignment_expression "param_6 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) (expression_statement "*puVar3 = (short)uVar1;" (assignment_expression "*puVar3 = (short)uVar1" (pointer_expression "*puVar3" * identifier) = (cast_expression "(short)uVar1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (if_statement "if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;" if (parenthesized_expression "((uint)(local_14 - local_18) < 2)" ( (binary_expression "(uint)(local_14 - local_18) < 2" (call_expression "(uint)(local_14 - local_18)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(local_14 - local_18)" ( (binary_expression "local_14 - local_18" identifier - identifier) ))) < number_literal) )) (goto_statement "goto LAB_003d8640;" goto statement_identifier ;)) (expression_statement "puVar3 = param_6;" (assignment_expression "puVar3 = param_6" identifier = identifier) ;) }) while (parenthesized_expression "(param_7 != param_6)" ( (binary_expression "param_7 != param_6" identifier != identifier) )) ;) })) (expression_statement "*param_5 = local_18;" (assignment_expression "*param_5 = local_18" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = param_6;" (assignment_expression "*param_8 = param_6" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (labeled_statement "LAB_003d8640:\n  *param_5 = local_18;" statement_identifier : (expression_statement "*param_5 = local_18;" (assignment_expression "*param_5 = local_18" (pointer_expression "*param_5" * identifier) = identifier) ;)) (expression_statement "*param_8 = param_6;" (assignment_expression "*param_8 = param_6" (pointer_expression "*param_8" * identifier) = identifier) ;) (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" identifier = number_literal) ;) (if_statement "if (param_4 == local_18) {\n    uVar2 = 0;\n  }" if (parenthesized_expression "(param_4 == local_18)" ( (binary_expression "param_4 == local_18" identifier == identifier) )) (compound_statement "{\n    uVar2 = 0;\n  }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "/* std::__codecvt_utf16_base<char16_t>::do_in(__mbstate_t&, char const*, char const*, char const*&,\n   char16_t*, char16_t*, char16_t*&) const */\n\nundefined4 __thiscall\nstd::__codecvt_utf16_base<char16_t>::do_in\n          (__codecvt_utf16_base<char16_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          char **param_4,wchar16 *param_5,wchar16 *param_6,wchar16 **param_7)\n\n{\n  wchar32 wVar1;\n  undefined4 uVar2;\n  wchar16 *pwVar3;\n  wchar32 wVar4;\n  range *prVar5;\n  wchar32 wVar6;\n  char *local_18;\n  char *local_14;\n  undefined4 local_10 [3];\n  \n  local_10[0] = *(undefined4 *)(this + 0xc);\n  prVar5 = (range *)&local_18;\n  wVar4 = *(wchar32 *)(this + 8);\n  local_18 = param_2;\n  local_14 = param_3;\n  (anonymous_namespace)::read_utf16_bom<false>(prVar5,(codecvt_mode *)local_10);\n  if (0xfffe < (uint)wVar4) {\n    wVar4 = L'\xffff';\n  }\n  if (1 < (uint)((int)local_14 - (int)local_18)) {\n    if (param_5 != param_6) {\n      wVar6 = L'\xfffffffe';\n      pwVar3 = param_5;\n      do {\n        wVar1 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0]);\n        if ((wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1)) {\n          *param_4 = local_18;\n          *param_7 = pwVar3;\n          return 2;\n        }\n        param_5 = pwVar3 + 1;\n        *pwVar3 = (wchar16)wVar1;\n        if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_003d8640;\n        pwVar3 = param_5;\n      } while (param_6 != param_5);\n    }\n    *param_4 = local_18;\n    *param_7 = param_5;\n    return 1;\n  }\nLAB_003d8640:\n  *param_4 = local_18;\n  *param_7 = param_5;\n  uVar2 = 2;\n  if (param_3 == local_18) {\n    uVar2 = 0;\n  }\n  return uVar2;\n}\n\n" comment (function_definition "undefined4 __thiscall\nstd::__codecvt_utf16_base<char16_t>::do_in\n          (__codecvt_utf16_base<char16_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          char **param_4,wchar16 *param_5,wchar16 *param_6,wchar16 **param_7)\n\n{\n  wchar32 wVar1;\n  undefined4 uVar2;\n  wchar16 *pwVar3;\n  wchar32 wVar4;\n  range *prVar5;\n  wchar32 wVar6;\n  char *local_18;\n  char *local_14;\n  undefined4 local_10 [3];\n  \n  local_10[0] = *(undefined4 *)(this + 0xc);\n  prVar5 = (range *)&local_18;\n  wVar4 = *(wchar32 *)(this + 8);\n  local_18 = param_2;\n  local_14 = param_3;\n  (anonymous_namespace)::read_utf16_bom<false>(prVar5,(codecvt_mode *)local_10);\n  if (0xfffe < (uint)wVar4) {\n    wVar4 = L'\xffff';\n  }\n  if (1 < (uint)((int)local_14 - (int)local_18)) {\n    if (param_5 != param_6) {\n      wVar6 = L'\xfffffffe';\n      pwVar3 = param_5;\n      do {\n        wVar1 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0]);\n        if ((wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1)) {\n          *param_4 = local_18;\n          *param_7 = pwVar3;\n          return 2;\n        }\n        param_5 = pwVar3 + 1;\n        *pwVar3 = (wchar16)wVar1;\n        if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_003d8640;\n        pwVar3 = param_5;\n      } while (param_6 != param_5);\n    }\n    *param_4 = local_18;\n    *param_7 = param_5;\n    return 1;\n  }\nLAB_003d8640:\n  *param_4 = local_18;\n  *param_7 = param_5;\n  uVar2 = 2;\n  if (param_3 == local_18) {\n    uVar2 = 0;\n  }\n  return uVar2;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::__codecvt_utf16_base<char16_t>::" identifier : : identifier < primitive_type > : :) (function_declarator "do_in\n          (__codecvt_utf16_base<char16_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          char **param_4,wchar16 *param_5,wchar16 *param_6,wchar16 **param_7)" identifier (parameter_list "(__codecvt_utf16_base<char16_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          char **param_4,wchar16 *param_5,wchar16 *param_6,wchar16 **param_7)" ( (parameter_declaration "__codecvt_utf16_base<char16_t> *this" type_identifier (ERROR "<char16_t>" < primitive_type >) (pointer_declarator "*this" * identifier)) , (parameter_declaration "__mbstate_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "char *param_2" primitive_type (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "char *param_3" primitive_type (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "char **param_4" primitive_type (pointer_declarator "**param_4" * (pointer_declarator "*param_4" * identifier))) , (parameter_declaration "wchar16 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "wchar16 *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "wchar16 **param_7" type_identifier (pointer_declarator "**param_7" * (pointer_declarator "*param_7" * identifier))) ))) (compound_statement "{\n  wchar32 wVar1;\n  undefined4 uVar2;\n  wchar16 *pwVar3;\n  wchar32 wVar4;\n  range *prVar5;\n  wchar32 wVar6;\n  char *local_18;\n  char *local_14;\n  undefined4 local_10 [3];\n  \n  local_10[0] = *(undefined4 *)(this + 0xc);\n  prVar5 = (range *)&local_18;\n  wVar4 = *(wchar32 *)(this + 8);\n  local_18 = param_2;\n  local_14 = param_3;\n  (anonymous_namespace)::read_utf16_bom<false>(prVar5,(codecvt_mode *)local_10);\n  if (0xfffe < (uint)wVar4) {\n    wVar4 = L'\xffff';\n  }\n  if (1 < (uint)((int)local_14 - (int)local_18)) {\n    if (param_5 != param_6) {\n      wVar6 = L'\xfffffffe';\n      pwVar3 = param_5;\n      do {\n        wVar1 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0]);\n        if ((wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1)) {\n          *param_4 = local_18;\n          *param_7 = pwVar3;\n          return 2;\n        }\n        param_5 = pwVar3 + 1;\n        *pwVar3 = (wchar16)wVar1;\n        if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_003d8640;\n        pwVar3 = param_5;\n      } while (param_6 != param_5);\n    }\n    *param_4 = local_18;\n    *param_7 = param_5;\n    return 1;\n  }\nLAB_003d8640:\n  *param_4 = local_18;\n  *param_7 = param_5;\n  uVar2 = 2;\n  if (param_3 == local_18) {\n    uVar2 = 0;\n  }\n  return uVar2;\n}" { (declaration "wchar32 wVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "wchar16 *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "wchar32 wVar4;" type_identifier identifier ;) (declaration "range *prVar5;" type_identifier (pointer_declarator "*prVar5" * identifier) ;) (declaration "wchar32 wVar6;" type_identifier identifier ;) (declaration "char *local_18;" primitive_type (pointer_declarator "*local_18" * identifier) ;) (declaration "char *local_14;" primitive_type (pointer_declarator "*local_14" * identifier) ;) (declaration "undefined4 local_10 [3];" type_identifier (array_declarator "local_10 [3]" identifier [ number_literal ]) ;) (expression_statement "local_10[0] = *(undefined4 *)(this + 0xc);" (assignment_expression "local_10[0] = *(undefined4 *)(this + 0xc)" (subscript_expression "local_10[0]" identifier [ number_literal ]) = (pointer_expression "*(undefined4 *)(this + 0xc)" * (cast_expression "(undefined4 *)(this + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) ))))) ;) (expression_statement "prVar5 = (range *)&local_18;" (assignment_expression "prVar5 = (range *)&local_18" identifier = (cast_expression "(range *)&local_18" ( (type_descriptor "range *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&local_18" & identifier))) ;) (expression_statement "wVar4 = *(wchar32 *)(this + 8);" (assignment_expression "wVar4 = *(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_18 = param_2;" (assignment_expression "local_18 = param_2" identifier = identifier) ;) (expression_statement "local_14 = param_3;" (assignment_expression "local_14 = param_3" identifier = identifier) ;) (expression_statement "(anonymous_namespace)::read_utf16_bom<false>(prVar5,(codecvt_mode *)local_10);" (binary_expression "(anonymous_namespace)::read_utf16_bom<false>(prVar5,(codecvt_mode *)local_10)" (binary_expression "(anonymous_namespace)::read_utf16_bom<false" (parenthesized_expression "(anonymous_namespace)" ( identifier )) (ERROR "::read_utf16_bom" : : identifier) < false) > (parenthesized_expression "(prVar5,(codecvt_mode *)local_10)" ( (comma_expression "prVar5,(codecvt_mode *)local_10" identifier , (cast_expression "(codecvt_mode *)local_10" ( (type_descriptor "codecvt_mode *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ))) ;) (if_statement "if (0xfffe < (uint)wVar4) {\n    wVar4 = L'\xffff';\n  }" if (parenthesized_expression "(0xfffe < (uint)wVar4)" ( (binary_expression "0xfffe < (uint)wVar4" number_literal < (cast_expression "(uint)wVar4" ( (type_descriptor "uint" type_identifier) ) identifier)) )) (compound_statement "{\n    wVar4 = L'\xffff';\n  }" { (expression_statement "wVar4 = L'\xffff';" (assignment_expression "wVar4 = L'\xffff'" identifier = (char_literal "L'\xffff'" L' escape_sequence ')) ;) })) (if_statement "if (1 < (uint)((int)local_14 - (int)local_18)) {\n    if (param_5 != param_6) {\n      wVar6 = L'\xfffffffe';\n      pwVar3 = param_5;\n      do {\n        wVar1 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0]);\n        if ((wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1)) {\n          *param_4 = local_18;\n          *param_7 = pwVar3;\n          return 2;\n        }\n        param_5 = pwVar3 + 1;\n        *pwVar3 = (wchar16)wVar1;\n        if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_003d8640;\n        pwVar3 = param_5;\n      } while (param_6 != param_5);\n    }\n    *param_4 = local_18;\n    *param_7 = param_5;\n    return 1;\n  }" if (parenthesized_expression "(1 < (uint)((int)local_14 - (int)local_18))" ( (binary_expression "1 < (uint)((int)local_14 - (int)local_18)" number_literal < (call_expression "(uint)((int)local_14 - (int)local_18)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)local_14 - (int)local_18)" ( (binary_expression "(int)local_14 - (int)local_18" (cast_expression "(int)local_14" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)local_18" ( (type_descriptor "int" primitive_type) ) identifier)) )))) )) (compound_statement "{\n    if (param_5 != param_6) {\n      wVar6 = L'\xfffffffe';\n      pwVar3 = param_5;\n      do {\n        wVar1 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0]);\n        if ((wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1)) {\n          *param_4 = local_18;\n          *param_7 = pwVar3;\n          return 2;\n        }\n        param_5 = pwVar3 + 1;\n        *pwVar3 = (wchar16)wVar1;\n        if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_003d8640;\n        pwVar3 = param_5;\n      } while (param_6 != param_5);\n    }\n    *param_4 = local_18;\n    *param_7 = param_5;\n    return 1;\n  }" { (if_statement "if (param_5 != param_6) {\n      wVar6 = L'\xfffffffe';\n      pwVar3 = param_5;\n      do {\n        wVar1 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0]);\n        if ((wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1)) {\n          *param_4 = local_18;\n          *param_7 = pwVar3;\n          return 2;\n        }\n        param_5 = pwVar3 + 1;\n        *pwVar3 = (wchar16)wVar1;\n        if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_003d8640;\n        pwVar3 = param_5;\n      } while (param_6 != param_5);\n    }" if (parenthesized_expression "(param_5 != param_6)" ( (binary_expression "param_5 != param_6" identifier != identifier) )) (compound_statement "{\n      wVar6 = L'\xfffffffe';\n      pwVar3 = param_5;\n      do {\n        wVar1 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0]);\n        if ((wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1)) {\n          *param_4 = local_18;\n          *param_7 = pwVar3;\n          return 2;\n        }\n        param_5 = pwVar3 + 1;\n        *pwVar3 = (wchar16)wVar1;\n        if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_003d8640;\n        pwVar3 = param_5;\n      } while (param_6 != param_5);\n    }" { (expression_statement "wVar6 = L'\xfffffffe';" (assignment_expression "wVar6 = L'\xfffffffe'" identifier = (char_literal "L'\xfffffffe'" L' escape_sequence character character character character ')) ;) (expression_statement "pwVar3 = param_5;" (assignment_expression "pwVar3 = param_5" identifier = identifier) ;) (do_statement "do {\n        wVar1 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0]);\n        if ((wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1)) {\n          *param_4 = local_18;\n          *param_7 = pwVar3;\n          return 2;\n        }\n        param_5 = pwVar3 + 1;\n        *pwVar3 = (wchar16)wVar1;\n        if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_003d8640;\n        pwVar3 = param_5;\n      } while (param_6 != param_5);" do (compound_statement "{\n        wVar1 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0]);\n        if ((wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1)) {\n          *param_4 = local_18;\n          *param_7 = pwVar3;\n          return 2;\n        }\n        param_5 = pwVar3 + 1;\n        *pwVar3 = (wchar16)wVar1;\n        if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_003d8640;\n        pwVar3 = param_5;\n      }" { (expression_statement "wVar1 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0]);" (binary_expression "wVar1 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0])" (binary_expression "wVar1 = (anonymous_namespace)::read_utf16_code_point<false" (assignment_expression "wVar1 = (anonymous_namespace)" identifier = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) (ERROR "::read_utf16_code_point" : : identifier) < false) > (parenthesized_expression "(prVar5,wVar4,local_10[0])" ( (comma_expression "prVar5,wVar4,local_10[0]" identifier , (comma_expression "wVar4,local_10[0]" identifier , (subscript_expression "local_10[0]" identifier [ number_literal ]))) ))) ;) (if_statement "if ((wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1)) {\n          *param_4 = local_18;\n          *param_7 = pwVar3;\n          return 2;\n        }" if (parenthesized_expression "((wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1))" ( (binary_expression "(wVar1 == wVar6) || ((uint)wVar4 < (uint)wVar1)" (parenthesized_expression "(wVar1 == wVar6)" ( (binary_expression "wVar1 == wVar6" identifier == identifier) )) || (parenthesized_expression "((uint)wVar4 < (uint)wVar1)" ( (binary_expression "(uint)wVar4 < (uint)wVar1" (cast_expression "(uint)wVar4" ( (type_descriptor "uint" type_identifier) ) identifier) < (cast_expression "(uint)wVar1" ( (type_descriptor "uint" type_identifier) ) identifier)) ))) )) (compound_statement "{\n          *param_4 = local_18;\n          *param_7 = pwVar3;\n          return 2;\n        }" { (expression_statement "*param_4 = local_18;" (assignment_expression "*param_4 = local_18" (pointer_expression "*param_4" * identifier) = identifier) ;) (expression_statement "*param_7 = pwVar3;" (assignment_expression "*param_7 = pwVar3" (pointer_expression "*param_7" * identifier) = identifier) ;) (return_statement "return 2;" return number_literal ;) })) (expression_statement "param_5 = pwVar3 + 1;" (assignment_expression "param_5 = pwVar3 + 1" identifier = (binary_expression "pwVar3 + 1" identifier + number_literal)) ;) (expression_statement "*pwVar3 = (wchar16)wVar1;" (assignment_expression "*pwVar3 = (wchar16)wVar1" (pointer_expression "*pwVar3" * identifier) = (cast_expression "(wchar16)wVar1" ( (type_descriptor "wchar16" type_identifier) ) identifier)) ;) (if_statement "if ((uint)((int)local_14 - (int)local_18) < 2) goto LAB_003d8640;" if (parenthesized_expression "((uint)((int)local_14 - (int)local_18) < 2)" ( (binary_expression "(uint)((int)local_14 - (int)local_18) < 2" (call_expression "(uint)((int)local_14 - (int)local_18)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((int)local_14 - (int)local_18)" ( (binary_expression "(int)local_14 - (int)local_18" (cast_expression "(int)local_14" ( (type_descriptor "int" primitive_type) ) identifier) - (cast_expression "(int)local_18" ( (type_descriptor "int" primitive_type) ) identifier)) ))) < number_literal) )) (goto_statement "goto LAB_003d8640;" goto statement_identifier ;)) (expression_statement "pwVar3 = param_5;" (assignment_expression "pwVar3 = param_5" identifier = identifier) ;) }) while (parenthesized_expression "(param_6 != param_5)" ( (binary_expression "param_6 != param_5" identifier != identifier) )) ;) })) (expression_statement "*param_4 = local_18;" (assignment_expression "*param_4 = local_18" (pointer_expression "*param_4" * identifier) = identifier) ;) (expression_statement "*param_7 = param_5;" (assignment_expression "*param_7 = param_5" (pointer_expression "*param_7" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (labeled_statement "LAB_003d8640:\n  *param_4 = local_18;" statement_identifier : (expression_statement "*param_4 = local_18;" (assignment_expression "*param_4 = local_18" (pointer_expression "*param_4" * identifier) = identifier) ;)) (expression_statement "*param_7 = param_5;" (assignment_expression "*param_7 = param_5" (pointer_expression "*param_7" * identifier) = identifier) ;) (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" identifier = number_literal) ;) (if_statement "if (param_3 == local_18) {\n    uVar2 = 0;\n  }" if (parenthesized_expression "(param_3 == local_18)" ( (binary_expression "param_3 == local_18" identifier == identifier) )) (compound_statement "{\n    uVar2 = 0;\n  }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit "undefined4\nFUN_003d8560(int param_1,undefined4 param_2,int param_3,int param_4,int *param_5,undefined2 *param_6\n            ,undefined2 *param_7,undefined4 *param_8)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  undefined2 *puVar3;\n  uint uVar4;\n  int *piVar5;\n  uint uVar6;\n  int local_18;\n  int local_14;\n  undefined4 local_10 [3];\n  \n  local_10[0] = *(undefined4 *)(param_1 + 0xc);\n  piVar5 = &local_18;\n  uVar4 = *(uint *)(param_1 + 8);\n  local_18 = param_3;\n  local_14 = param_4;\n  FUN_003d8234(piVar5,local_10);\n  if (0xfffe < uVar4) {\n    uVar4 = 0xffff;\n  }\n  if (1 < (uint)(local_14 - local_18)) {\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }\nLAB_003d8640:\n  *param_5 = local_18;\n  *param_8 = param_6;\n  uVar2 = 2;\n  if (param_4 == local_18) {\n    uVar2 = 0;\n  }\n  return uVar2;\n}\n\n" (function_definition "undefined4\nFUN_003d8560(int param_1,undefined4 param_2,int param_3,int param_4,int *param_5,undefined2 *param_6\n            ,undefined2 *param_7,undefined4 *param_8)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  undefined2 *puVar3;\n  uint uVar4;\n  int *piVar5;\n  uint uVar6;\n  int local_18;\n  int local_14;\n  undefined4 local_10 [3];\n  \n  local_10[0] = *(undefined4 *)(param_1 + 0xc);\n  piVar5 = &local_18;\n  uVar4 = *(uint *)(param_1 + 8);\n  local_18 = param_3;\n  local_14 = param_4;\n  FUN_003d8234(piVar5,local_10);\n  if (0xfffe < uVar4) {\n    uVar4 = 0xffff;\n  }\n  if (1 < (uint)(local_14 - local_18)) {\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }\nLAB_003d8640:\n  *param_5 = local_18;\n  *param_8 = param_6;\n  uVar2 = 2;\n  if (param_4 == local_18) {\n    uVar2 = 0;\n  }\n  return uVar2;\n}" type_identifier (function_declarator "FUN_003d8560(int param_1,undefined4 param_2,int param_3,int param_4,int *param_5,undefined2 *param_6\n            ,undefined2 *param_7,undefined4 *param_8)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3,int param_4,int *param_5,undefined2 *param_6\n            ,undefined2 *param_7,undefined4 *param_8)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) , (parameter_declaration "int param_4" primitive_type identifier) , (parameter_declaration "int *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "undefined2 *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "undefined2 *param_7" type_identifier (pointer_declarator "*param_7" * identifier)) , (parameter_declaration "undefined4 *param_8" type_identifier (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  undefined2 *puVar3;\n  uint uVar4;\n  int *piVar5;\n  uint uVar6;\n  int local_18;\n  int local_14;\n  undefined4 local_10 [3];\n  \n  local_10[0] = *(undefined4 *)(param_1 + 0xc);\n  piVar5 = &local_18;\n  uVar4 = *(uint *)(param_1 + 8);\n  local_18 = param_3;\n  local_14 = param_4;\n  FUN_003d8234(piVar5,local_10);\n  if (0xfffe < uVar4) {\n    uVar4 = 0xffff;\n  }\n  if (1 < (uint)(local_14 - local_18)) {\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }\nLAB_003d8640:\n  *param_5 = local_18;\n  *param_8 = param_6;\n  uVar2 = 2;\n  if (param_4 == local_18) {\n    uVar2 = 0;\n  }\n  return uVar2;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "undefined4 uVar2;" type_identifier identifier ;) (declaration "undefined2 *puVar3;" type_identifier (pointer_declarator "*puVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "int *piVar5;" primitive_type (pointer_declarator "*piVar5" * identifier) ;) (declaration "uint uVar6;" type_identifier identifier ;) (declaration "int local_18;" primitive_type identifier ;) (declaration "int local_14;" primitive_type identifier ;) (declaration "undefined4 local_10 [3];" type_identifier (array_declarator "local_10 [3]" identifier [ number_literal ]) ;) (expression_statement "local_10[0] = *(undefined4 *)(param_1 + 0xc);" (assignment_expression "local_10[0] = *(undefined4 *)(param_1 + 0xc)" (subscript_expression "local_10[0]" identifier [ number_literal ]) = (pointer_expression "*(undefined4 *)(param_1 + 0xc)" * (cast_expression "(undefined4 *)(param_1 + 0xc)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) ))))) ;) (expression_statement "piVar5 = &local_18;" (assignment_expression "piVar5 = &local_18" identifier = (pointer_expression "&local_18" & identifier)) ;) (expression_statement "uVar4 = *(uint *)(param_1 + 8);" (assignment_expression "uVar4 = *(uint *)(param_1 + 8)" identifier = (pointer_expression "*(uint *)(param_1 + 8)" * (cast_expression "(uint *)(param_1 + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "local_18 = param_3;" (assignment_expression "local_18 = param_3" identifier = identifier) ;) (expression_statement "local_14 = param_4;" (assignment_expression "local_14 = param_4" identifier = identifier) ;) (expression_statement "FUN_003d8234(piVar5,local_10);" (call_expression "FUN_003d8234(piVar5,local_10)" identifier (argument_list "(piVar5,local_10)" ( identifier , identifier ))) ;) (if_statement "if (0xfffe < uVar4) {\n    uVar4 = 0xffff;\n  }" if (parenthesized_expression "(0xfffe < uVar4)" ( (binary_expression "0xfffe < uVar4" number_literal < identifier) )) (compound_statement "{\n    uVar4 = 0xffff;\n  }" { (expression_statement "uVar4 = 0xffff;" (assignment_expression "uVar4 = 0xffff" identifier = number_literal) ;) })) (if_statement "if (1 < (uint)(local_14 - local_18)) {\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }" if (parenthesized_expression "(1 < (uint)(local_14 - local_18))" ( (binary_expression "1 < (uint)(local_14 - local_18)" number_literal < (call_expression "(uint)(local_14 - local_18)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(local_14 - local_18)" ( (binary_expression "local_14 - local_18" identifier - identifier) )))) )) (compound_statement "{\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }" { (if_statement "if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }" if (parenthesized_expression "(param_6 != param_7)" ( (binary_expression "param_6 != param_7" identifier != identifier) )) (compound_statement "{\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }" { (expression_statement "uVar6 = 0xfffffffe;" (assignment_expression "uVar6 = 0xfffffffe" identifier = number_literal) ;) (expression_statement "puVar3 = param_6;" (assignment_expression "puVar3 = param_6" identifier = identifier) ;) (do_statement "do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);" do (compound_statement "{\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      }" { (expression_statement "uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);" (assignment_expression "uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0])" identifier = (call_expression "FUN_003d7810(piVar5,uVar4,local_10[0])" identifier (argument_list "(piVar5,uVar4,local_10[0])" ( identifier , identifier , (subscript_expression "local_10[0]" identifier [ number_literal ]) )))) ;) (if_statement "if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }" if (parenthesized_expression "((uVar1 == uVar6) || (uVar4 < uVar1))" ( (binary_expression "(uVar1 == uVar6) || (uVar4 < uVar1)" (parenthesized_expression "(uVar1 == uVar6)" ( (binary_expression "uVar1 == uVar6" identifier == identifier) )) || (parenthesized_expression "(uVar4 < uVar1)" ( (binary_expression "uVar4 < uVar1" identifier < identifier) ))) )) (compound_statement "{\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }" { (expression_statement "*param_5 = local_18;" (assignment_expression "*param_5 = local_18" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = puVar3;" (assignment_expression "*param_8 = puVar3" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return 2;" return number_literal ;) })) (expression_statement "param_6 = puVar3 + 1;" (assignment_expression "param_6 = puVar3 + 1" identifier = (binary_expression "puVar3 + 1" identifier + number_literal)) ;) (expression_statement "*puVar3 = (short)uVar1;" (assignment_expression "*puVar3 = (short)uVar1" (pointer_expression "*puVar3" * identifier) = (cast_expression "(short)uVar1" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) identifier)) ;) (if_statement "if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;" if (parenthesized_expression "((uint)(local_14 - local_18) < 2)" ( (binary_expression "(uint)(local_14 - local_18) < 2" (call_expression "(uint)(local_14 - local_18)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(local_14 - local_18)" ( (binary_expression "local_14 - local_18" identifier - identifier) ))) < number_literal) )) (goto_statement "goto LAB_003d8640;" goto statement_identifier ;)) (expression_statement "puVar3 = param_6;" (assignment_expression "puVar3 = param_6" identifier = identifier) ;) }) while (parenthesized_expression "(param_7 != param_6)" ( (binary_expression "param_7 != param_6" identifier != identifier) )) ;) })) (expression_statement "*param_5 = local_18;" (assignment_expression "*param_5 = local_18" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = param_6;" (assignment_expression "*param_8 = param_6" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) (labeled_statement "LAB_003d8640:\n  *param_5 = local_18;" statement_identifier : (expression_statement "*param_5 = local_18;" (assignment_expression "*param_5 = local_18" (pointer_expression "*param_5" * identifier) = identifier) ;)) (expression_statement "*param_8 = param_6;" (assignment_expression "*param_8 = param_6" (pointer_expression "*param_8" * identifier) = identifier) ;) (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" identifier = number_literal) ;) (if_statement "if (param_4 == local_18) {\n    uVar2 = 0;\n  }" if (parenthesized_expression "(param_4 == local_18)" ( (binary_expression "param_4 == local_18" identifier == identifier) )) (compound_statement "{\n    uVar2 = 0;\n  }" { (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) })) (return_statement "return uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression & 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) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - IDENT) )))) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , (subscript_expression IDENT [ LIT ]) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == IDENT) )) || (parenthesized_expression ( (binary_expression IDENT < IDENT) ))) )) (compound_statement { (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 (pointer_expression * IDENT) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) IDENT)) ;) (if_statement if (parenthesized_expression ( (binary_expression (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT - IDENT) ))) < LIT) )) (goto_statement goto statement_identifier ;)) (expression_statement (assignment_expression IDENT = 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 ;) })) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "undefined4\nFUN_003d8560(int param_1,undefined4 param_2,int param_3,int param_4,int *param_5,undefined2 *param_6\n            ,undefined2 *param_7,undefined4 *param_8)\n\n{\n  uint uVar1;\n  undefined4 uVar2;\n  undefined2 *puVar3;\n  uint uVar4;\n  int *piVar5;\n  uint uVar6;\n  int local_18;\n  int local_14;\n  undefined4 local_10 [3];\n  \n  local_10[0] = *(undefined4 *)(param_1 + 0xc);\n  piVar5 = &local_18;\n  uVar4 = *(uint *)(param_1 + 8);\n  local_18 = param_3;\n  local_14 = param_4;\n  FUN_003d8234(piVar5,local_10);\n  if (0xfffe < uVar4) {\n    uVar4 = 0xffff;\n  }\n  if (1 < (uint)(local_14 - local_18)) {\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }\nLAB_003d8640:\n  *param_5 = local_18;\n  *param_8 = param_6;\n  uVar2 = 2;\n  if (param_4 == local_18) {\n    uVar2 = 0;\n  }\n  return uVar2;\n}" (type_identifier "undefined4") (function_declarator "FUN_003d8560(int param_1,undefined4 param_2,int param_3,int param_4,int *param_5,undefined2 *param_6\n            ,undefined2 *param_7,undefined4 *param_8)" (identifier "FUN_003d8560") (parameter_list "(int param_1,undefined4 param_2,int param_3,int param_4,int *param_5,undefined2 *param_6\n            ,undefined2 *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 "int param_3" (primitive_type "int") (identifier "param_3")) (, ",") (parameter_declaration "int param_4" (primitive_type "int") (identifier "param_4")) (, ",") (parameter_declaration "int *param_5" (primitive_type "int") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) (, ",") (parameter_declaration "undefined2 *param_6" (type_identifier "undefined2") (pointer_declarator "*param_6" (* "*") (identifier "param_6"))) (, ",") (parameter_declaration "undefined2 *param_7" (type_identifier "undefined2") (pointer_declarator "*param_7" (* "*") (identifier "param_7"))) (, ",") (parameter_declaration "undefined4 *param_8" (type_identifier "undefined4") (pointer_declarator "*param_8" (* "*") (identifier "param_8"))) () ")"))) (compound_statement "{\n  uint uVar1;\n  undefined4 uVar2;\n  undefined2 *puVar3;\n  uint uVar4;\n  int *piVar5;\n  uint uVar6;\n  int local_18;\n  int local_14;\n  undefined4 local_10 [3];\n  \n  local_10[0] = *(undefined4 *)(param_1 + 0xc);\n  piVar5 = &local_18;\n  uVar4 = *(uint *)(param_1 + 8);\n  local_18 = param_3;\n  local_14 = param_4;\n  FUN_003d8234(piVar5,local_10);\n  if (0xfffe < uVar4) {\n    uVar4 = 0xffff;\n  }\n  if (1 < (uint)(local_14 - local_18)) {\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }\nLAB_003d8640:\n  *param_5 = local_18;\n  *param_8 = param_6;\n  uVar2 = 2;\n  if (param_4 == local_18) {\n    uVar2 = 0;\n  }\n  return uVar2;\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "undefined4 uVar2;" (type_identifier "undefined4") (identifier "uVar2") (; ";")) (declaration "undefined2 *puVar3;" (type_identifier "undefined2") (pointer_declarator "*puVar3" (* "*") (identifier "puVar3")) (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "int *piVar5;" (primitive_type "int") (pointer_declarator "*piVar5" (* "*") (identifier "piVar5")) (; ";")) (declaration "uint uVar6;" (type_identifier "uint") (identifier "uVar6") (; ";")) (declaration "int local_18;" (primitive_type "int") (identifier "local_18") (; ";")) (declaration "int local_14;" (primitive_type "int") (identifier "local_14") (; ";")) (declaration "undefined4 local_10 [3];" (type_identifier "undefined4") (array_declarator "local_10 [3]" (identifier "local_10") ([ "[") (number_literal "3") (] "]")) (; ";")) (expression_statement "local_10[0] = *(undefined4 *)(param_1 + 0xc);" (assignment_expression "local_10[0] = *(undefined4 *)(param_1 + 0xc)" (subscript_expression "local_10[0]" (identifier "local_10") ([ "[") (number_literal "0") (] "]")) (= "=") (pointer_expression "*(undefined4 *)(param_1 + 0xc)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0xc)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")"))))) (; ";")) (expression_statement "piVar5 = &local_18;" (assignment_expression "piVar5 = &local_18" (identifier "piVar5") (= "=") (pointer_expression "&local_18" (& "&") (identifier "local_18"))) (; ";")) (expression_statement "uVar4 = *(uint *)(param_1 + 8);" (assignment_expression "uVar4 = *(uint *)(param_1 + 8)" (identifier "uVar4") (= "=") (pointer_expression "*(uint *)(param_1 + 8)" (* "*") (cast_expression "(uint *)(param_1 + 8)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "local_18 = param_3;" (assignment_expression "local_18 = param_3" (identifier "local_18") (= "=") (identifier "param_3")) (; ";")) (expression_statement "local_14 = param_4;" (assignment_expression "local_14 = param_4" (identifier "local_14") (= "=") (identifier "param_4")) (; ";")) (expression_statement "FUN_003d8234(piVar5,local_10);" (call_expression "FUN_003d8234(piVar5,local_10)" (identifier "FUN_003d8234") (argument_list "(piVar5,local_10)" (( "(") (identifier "piVar5") (, ",") (identifier "local_10") () ")"))) (; ";")) (if_statement "if (0xfffe < uVar4) {\n    uVar4 = 0xffff;\n  }" (if "if") (parenthesized_expression "(0xfffe < uVar4)" (( "(") (binary_expression "0xfffe < uVar4" (number_literal "0xfffe") (< "<") (identifier "uVar4")) () ")")) (compound_statement "{\n    uVar4 = 0xffff;\n  }" ({ "{") (expression_statement "uVar4 = 0xffff;" (assignment_expression "uVar4 = 0xffff" (identifier "uVar4") (= "=") (number_literal "0xffff")) (; ";")) (} "}"))) (if_statement "if (1 < (uint)(local_14 - local_18)) {\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }" (if "if") (parenthesized_expression "(1 < (uint)(local_14 - local_18))" (( "(") (binary_expression "1 < (uint)(local_14 - local_18)" (number_literal "1") (< "<") (call_expression "(uint)(local_14 - local_18)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(local_14 - local_18)" (( "(") (binary_expression "local_14 - local_18" (identifier "local_14") (- "-") (identifier "local_18")) () ")")))) () ")")) (compound_statement "{\n    if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }\n    *param_5 = local_18;\n    *param_8 = param_6;\n    return 1;\n  }" ({ "{") (if_statement "if (param_6 != param_7) {\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }" (if "if") (parenthesized_expression "(param_6 != param_7)" (( "(") (binary_expression "param_6 != param_7" (identifier "param_6") (!= "!=") (identifier "param_7")) () ")")) (compound_statement "{\n      uVar6 = 0xfffffffe;\n      puVar3 = param_6;\n      do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);\n    }" ({ "{") (expression_statement "uVar6 = 0xfffffffe;" (assignment_expression "uVar6 = 0xfffffffe" (identifier "uVar6") (= "=") (number_literal "0xfffffffe")) (; ";")) (expression_statement "puVar3 = param_6;" (assignment_expression "puVar3 = param_6" (identifier "puVar3") (= "=") (identifier "param_6")) (; ";")) (do_statement "do {\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      } while (param_7 != param_6);" (do "do") (compound_statement "{\n        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);\n        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }\n        param_6 = puVar3 + 1;\n        *puVar3 = (short)uVar1;\n        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;\n        puVar3 = param_6;\n      }" ({ "{") (expression_statement "uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);" (assignment_expression "uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0])" (identifier "uVar1") (= "=") (call_expression "FUN_003d7810(piVar5,uVar4,local_10[0])" (identifier "FUN_003d7810") (argument_list "(piVar5,uVar4,local_10[0])" (( "(") (identifier "piVar5") (, ",") (identifier "uVar4") (, ",") (subscript_expression "local_10[0]" (identifier "local_10") ([ "[") (number_literal "0") (] "]")) () ")")))) (; ";")) (if_statement "if ((uVar1 == uVar6) || (uVar4 < uVar1)) {\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }" (if "if") (parenthesized_expression "((uVar1 == uVar6) || (uVar4 < uVar1))" (( "(") (binary_expression "(uVar1 == uVar6) || (uVar4 < uVar1)" (parenthesized_expression "(uVar1 == uVar6)" (( "(") (binary_expression "uVar1 == uVar6" (identifier "uVar1") (== "==") (identifier "uVar6")) () ")")) (|| "||") (parenthesized_expression "(uVar4 < uVar1)" (( "(") (binary_expression "uVar4 < uVar1" (identifier "uVar4") (< "<") (identifier "uVar1")) () ")"))) () ")")) (compound_statement "{\n          *param_5 = local_18;\n          *param_8 = puVar3;\n          return 2;\n        }" ({ "{") (expression_statement "*param_5 = local_18;" (assignment_expression "*param_5 = local_18" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "local_18")) (; ";")) (expression_statement "*param_8 = puVar3;" (assignment_expression "*param_8 = puVar3" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (identifier "puVar3")) (; ";")) (return_statement "return 2;" (return "return") (number_literal "2") (; ";")) (} "}"))) (expression_statement "param_6 = puVar3 + 1;" (assignment_expression "param_6 = puVar3 + 1" (identifier "param_6") (= "=") (binary_expression "puVar3 + 1" (identifier "puVar3") (+ "+") (number_literal "1"))) (; ";")) (expression_statement "*puVar3 = (short)uVar1;" (assignment_expression "*puVar3 = (short)uVar1" (pointer_expression "*puVar3" (* "*") (identifier "puVar3")) (= "=") (cast_expression "(short)uVar1" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (identifier "uVar1"))) (; ";")) (if_statement "if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;" (if "if") (parenthesized_expression "((uint)(local_14 - local_18) < 2)" (( "(") (binary_expression "(uint)(local_14 - local_18) < 2" (call_expression "(uint)(local_14 - local_18)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(local_14 - local_18)" (( "(") (binary_expression "local_14 - local_18" (identifier "local_14") (- "-") (identifier "local_18")) () ")"))) (< "<") (number_literal "2")) () ")")) (goto_statement "goto LAB_003d8640;" (goto "goto") (statement_identifier "LAB_003d8640") (; ";"))) (expression_statement "puVar3 = param_6;" (assignment_expression "puVar3 = param_6" (identifier "puVar3") (= "=") (identifier "param_6")) (; ";")) (} "}")) (while "while") (parenthesized_expression "(param_7 != param_6)" (( "(") (binary_expression "param_7 != param_6" (identifier "param_7") (!= "!=") (identifier "param_6")) () ")")) (; ";")) (} "}"))) (expression_statement "*param_5 = local_18;" (assignment_expression "*param_5 = local_18" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "local_18")) (; ";")) (expression_statement "*param_8 = param_6;" (assignment_expression "*param_8 = param_6" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (identifier "param_6")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (labeled_statement "LAB_003d8640:\n  *param_5 = local_18;" (statement_identifier "LAB_003d8640") (: ":") (expression_statement "*param_5 = local_18;" (assignment_expression "*param_5 = local_18" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "local_18")) (; ";"))) (expression_statement "*param_8 = param_6;" (assignment_expression "*param_8 = param_6" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (identifier "param_6")) (; ";")) (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" (identifier "uVar2") (= "=") (number_literal "2")) (; ";")) (if_statement "if (param_4 == local_18) {\n    uVar2 = 0;\n  }" (if "if") (parenthesized_expression "(param_4 == local_18)" (( "(") (binary_expression "param_4 == local_18" (identifier "param_4") (== "==") (identifier "local_18")) () ")")) (compound_statement "{\n    uVar2 = 0;\n  }" ({ "{") (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

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

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

{
  type_5 var_4;
  type_1 uVar2;
  type_4 *var_6;
  type_5 wVar4;
  type_6 *prVar5;
  type_5 var_5;
  char *var_8;
  char *local_14;
  type_1 local_10 [3];
  
  local_10[0] = *(type_1 *)(var_1 + 0xc);
  prVar5 = (type_6 *)&var_8;
  wVar4 = *(type_5 *)(var_1 + 8);
  var_8 = param_2;
  local_14 = var_7;
  (anonymous_namespace)::read_utf16_bom<false>(prVar5,(type_7 *)local_10);
  if (0xfffe < (type_8)wVar4) {
    wVar4 = L'\xffff';
  }
  if (1 < (type_8)((int)local_14 - (int)var_8)) {
    if (var_2 != var_3) {
      var_5 = L'\xfffffffe';
      var_6 = var_2;
      do {
        var_4 = (anonymous_namespace)::read_utf16_code_point<false>(prVar5,wVar4,local_10[0]);
        if ((var_4 == var_5) || ((type_8)wVar4 < (type_8)var_4)) {
          *param_4 = var_8;
          *param_7 = var_6;
          return 2;
        }
        var_2 = var_6 + 1;
        *var_6 = (type_4)var_4;
        if ((type_8)((int)local_14 - (int)var_8) < 2) goto LAB_003d8640;
        var_6 = var_2;
      } while (var_3 != var_2);
    }
    *param_4 = var_8;
    *param_7 = var_2;
    return 1;
  }
LAB_003d8640:
  *param_4 = var_8;
  *param_7 = var_2;
  uVar2 = 2;
  if (var_7 == var_8) {
    uVar2 = 0;
  }
  return uVar2;
}


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

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

{
  uint uVar1;
  undefined4 uVar2;
  undefined2 *puVar3;
  uint uVar4;
  int *piVar5;
  uint uVar6;
  int local_18;
  int local_14;
  undefined4 local_10 [3];
  
  local_10[0] = *(undefined4 *)(param_1 + 0xc);
  piVar5 = &local_18;
  uVar4 = *(uint *)(param_1 + 8);
  local_18 = param_3;
  local_14 = param_4;
  FUN_003d8234(piVar5,local_10);
  if (0xfffe < uVar4) {
    uVar4 = 0xffff;
  }
  if (1 < (uint)(local_14 - local_18)) {
    if (param_6 != param_7) {
      uVar6 = 0xfffffffe;
      puVar3 = param_6;
      do {
        uVar1 = FUN_003d7810(piVar5,uVar4,local_10[0]);
        if ((uVar1 == uVar6) || (uVar4 < uVar1)) {
          *param_5 = local_18;
          *param_8 = puVar3;
          return 2;
        }
        param_6 = puVar3 + 1;
        *puVar3 = (short)uVar1;
        if ((uint)(local_14 - local_18) < 2) goto LAB_003d8640;
        puVar3 = param_6;
      } while (param_7 != param_6);
    }
    *param_5 = local_18;
    *param_8 = param_6;
    return 1;
  }
LAB_003d8640:
  *param_5 = local_18;
  *param_8 = param_6;
  uVar2 = 2;
  if (param_4 == local_18) {
    uVar2 = 0;
  }
  return uVar2;
}

