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

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

{
  int iVar1;
  char **ppcVar2;
  undefined4 uVar3;
  char *local_18;
  char *local_14;
  wchar16 *local_10;
  wchar16 *local_c;
  
  uVar3 = *(undefined4 *)(this + 8);
  ppcVar2 = &local_18;
  local_18 = param_5;
  local_14 = param_6;
  local_10 = param_2;
  local_c = param_3;
  if ((*(uint *)(this + 0xc) & 2) != 0) {
    iVar1 = (anonymous_namespace)::write_utf8_bom(ppcVar2);
    if (iVar1 == 0) {
      *param_4 = local_10;
      *param_7 = local_18;
      return 1;
    }
  }
  uVar3 = (anonymous_namespace)::utf16_out<char16_t>(&local_10,ppcVar2,uVar3,0);
  *param_4 = local_10;
  *param_7 = local_18;
  return uVar3;
}



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

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  undefined4 local_18;
  undefined4 local_14;
  undefined4 local_10;
  undefined4 local_c;
  
  uVar3 = *(undefined4 *)(param_1 + 8);
  puVar2 = &local_18;
  local_18 = param_6;
  local_14 = param_7;
  local_10 = param_3;
  local_c = param_4;
  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {
    iVar1 = FUN_0035cafc(puVar2);
    if (iVar1 == 0) {
      *param_5 = local_10;
      *param_8 = local_18;
      return 1;
    }
  }
  uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);
  *param_5 = local_10;
  *param_8 = local_18;
  return uVar3;
}


lui gp,0xe
addiu gp,gp,-0x47ac
addu gp,gp,t9
addiu sp,sp,-0x30
lw v0,0xc(a0)
lw t1,0x8(a0)
addiu t0,sp,0x18
lw v1,0x44(sp)
andi v0,v0,0x2
sw gp,0x10(sp)
sw ra,0x2c(sp)
sw v1,0x18(sp)
sw a2,0x20(sp)
sw a3,0x24(sp)
lw v1,0x48(sp)
beq v0,zero,0x0035e9d8
_sw v1,0x1c(sp)
lw t9,-0x3d1c(gp)
addiu t9,t9,-0x3504
bal 0x0035cafc
_or a0,t0,zero
beq v0,zero,0x0035ea18
_lw gp,0x10(sp)
lw t9,-0x3d1c(gp)
addiu a0,sp,0x20
or a3,zero,zero
or a2,t1,zero
addiu t9,t9,-0x34a8
bal 0x0035cb58
_or a1,t0,zero
lw v1,0x40(sp)
lw a0,0x20(sp)
lw ra,0x2c(sp)
sw a0,0x0(v1)
lw v1,0x4c(sp)
lw a0,0x18(sp)
sw a0,0x0(v1)
jr ra
_addiu sp,sp,0x30
lw v1,0x40(sp)
li v0,0x1
lw a0,0x20(sp)
lw ra,0x2c(sp)
sw a0,0x0(v1)
lw v1,0x4c(sp)
lw a0,0x18(sp)
sw a0,0x0(v1)
jr ra
_addiu sp,sp,0x30
(translation_unit "undefined4\nFUN_0035e97c(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 *param_5,undefined4 param_6,undefined4 param_7,undefined4 *param_8)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  undefined4 local_18;\n  undefined4 local_14;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar3 = *(undefined4 *)(param_1 + 8);\n  puVar2 = &local_18;\n  local_18 = param_6;\n  local_14 = param_7;\n  local_10 = param_3;\n  local_c = param_4;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }\n  }\n  uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);\n  *param_5 = local_10;\n  *param_8 = local_18;\n  return uVar3;\n}\n\n" (function_definition "undefined4\nFUN_0035e97c(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 *param_5,undefined4 param_6,undefined4 param_7,undefined4 *param_8)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  undefined4 local_18;\n  undefined4 local_14;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar3 = *(undefined4 *)(param_1 + 8);\n  puVar2 = &local_18;\n  local_18 = param_6;\n  local_14 = param_7;\n  local_10 = param_3;\n  local_c = param_4;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }\n  }\n  uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);\n  *param_5 = local_10;\n  *param_8 = local_18;\n  return uVar3;\n}" type_identifier (function_declarator "FUN_0035e97c(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 *param_5,undefined4 param_6,undefined4 param_7,undefined4 *param_8)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 *param_5,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 "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier 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  undefined4 *puVar2;\n  undefined4 uVar3;\n  undefined4 local_18;\n  undefined4 local_14;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar3 = *(undefined4 *)(param_1 + 8);\n  puVar2 = &local_18;\n  local_18 = param_6;\n  local_14 = param_7;\n  local_10 = param_3;\n  local_c = param_4;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }\n  }\n  uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);\n  *param_5 = local_10;\n  *param_8 = local_18;\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 local_18;" type_identifier identifier ;) (declaration "undefined4 local_14;" type_identifier identifier ;) (declaration "undefined4 local_10;" type_identifier identifier ;) (declaration "undefined4 local_c;" type_identifier identifier ;) (expression_statement "uVar3 = *(undefined4 *)(param_1 + 8);" (assignment_expression "uVar3 = *(undefined4 *)(param_1 + 8)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "puVar2 = &local_18;" (assignment_expression "puVar2 = &local_18" identifier = (pointer_expression "&local_18" & identifier)) ;) (expression_statement "local_18 = param_6;" (assignment_expression "local_18 = param_6" identifier = identifier) ;) (expression_statement "local_14 = param_7;" (assignment_expression "local_14 = param_7" identifier = identifier) ;) (expression_statement "local_10 = param_3;" (assignment_expression "local_10 = param_3" identifier = identifier) ;) (expression_statement "local_c = param_4;" (assignment_expression "local_c = param_4" identifier = identifier) ;) (if_statement "if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\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(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }\n  }" { (expression_statement "iVar1 = FUN_0035cafc(puVar2);" (assignment_expression "iVar1 = FUN_0035cafc(puVar2)" identifier = (call_expression "FUN_0035cafc(puVar2)" identifier (argument_list "(puVar2)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }" { (expression_statement "*param_5 = local_10;" (assignment_expression "*param_5 = local_10" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = local_18;" (assignment_expression "*param_8 = local_18" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) })) (expression_statement "uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);" (assignment_expression "uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0)" identifier = (call_expression "FUN_0035cb58(&local_10,puVar2,uVar3,0)" identifier (argument_list "(&local_10,puVar2,uVar3,0)" ( (pointer_expression "&local_10" & identifier) , identifier , identifier , number_literal )))) ;) (expression_statement "*param_5 = local_10;" (assignment_expression "*param_5 = local_10" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = local_18;" (assignment_expression "*param_8 = local_18" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "/* std::__codecvt_utf8_utf16_base<char16_t>::do_out(__mbstate_t&, char16_t const*, char16_t const*,\n   char16_t const*&, char*, char*, char*&) const */\n\nundefined4 __thiscall\nstd::__codecvt_utf8_utf16_base<char16_t>::do_out\n          (__codecvt_utf8_utf16_base<char16_t> *this,__mbstate_t *param_1,wchar16 *param_2,\n          wchar16 *param_3,wchar16 **param_4,char *param_5,char *param_6,char **param_7)\n\n{\n  int iVar1;\n  char **ppcVar2;\n  undefined4 uVar3;\n  char *local_18;\n  char *local_14;\n  wchar16 *local_10;\n  wchar16 *local_c;\n  \n  uVar3 = *(undefined4 *)(this + 8);\n  ppcVar2 = &local_18;\n  local_18 = param_5;\n  local_14 = param_6;\n  local_10 = param_2;\n  local_c = param_3;\n  if ((*(uint *)(this + 0xc) & 2) != 0) {\n    iVar1 = (anonymous_namespace)::write_utf8_bom(ppcVar2);\n    if (iVar1 == 0) {\n      *param_4 = local_10;\n      *param_7 = local_18;\n      return 1;\n    }\n  }\n  uVar3 = (anonymous_namespace)::utf16_out<char16_t>(&local_10,ppcVar2,uVar3,0);\n  *param_4 = local_10;\n  *param_7 = local_18;\n  return uVar3;\n}\n\n" comment (function_definition "undefined4 __thiscall\nstd::__codecvt_utf8_utf16_base<char16_t>::do_out\n          (__codecvt_utf8_utf16_base<char16_t> *this,__mbstate_t *param_1,wchar16 *param_2,\n          wchar16 *param_3,wchar16 **param_4,char *param_5,char *param_6,char **param_7)\n\n{\n  int iVar1;\n  char **ppcVar2;\n  undefined4 uVar3;\n  char *local_18;\n  char *local_14;\n  wchar16 *local_10;\n  wchar16 *local_c;\n  \n  uVar3 = *(undefined4 *)(this + 8);\n  ppcVar2 = &local_18;\n  local_18 = param_5;\n  local_14 = param_6;\n  local_10 = param_2;\n  local_c = param_3;\n  if ((*(uint *)(this + 0xc) & 2) != 0) {\n    iVar1 = (anonymous_namespace)::write_utf8_bom(ppcVar2);\n    if (iVar1 == 0) {\n      *param_4 = local_10;\n      *param_7 = local_18;\n      return 1;\n    }\n  }\n  uVar3 = (anonymous_namespace)::utf16_out<char16_t>(&local_10,ppcVar2,uVar3,0);\n  *param_4 = local_10;\n  *param_7 = local_18;\n  return uVar3;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::__codecvt_utf8_utf16_base<char16_t>::" identifier : : identifier < primitive_type > : :) (function_declarator "do_out\n          (__codecvt_utf8_utf16_base<char16_t> *this,__mbstate_t *param_1,wchar16 *param_2,\n          wchar16 *param_3,wchar16 **param_4,char *param_5,char *param_6,char **param_7)" identifier (parameter_list "(__codecvt_utf8_utf16_base<char16_t> *this,__mbstate_t *param_1,wchar16 *param_2,\n          wchar16 *param_3,wchar16 **param_4,char *param_5,char *param_6,char **param_7)" ( (parameter_declaration "__codecvt_utf8_utf16_base<char16_t> *this" type_identifier (ERROR "<char16_t>" < primitive_type >) (pointer_declarator "*this" * identifier)) , (parameter_declaration "__mbstate_t *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "wchar16 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "wchar16 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "wchar16 **param_4" type_identifier (pointer_declarator "**param_4" * (pointer_declarator "*param_4" * identifier))) , (parameter_declaration "char *param_5" primitive_type (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "char *param_6" primitive_type (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "char **param_7" primitive_type (pointer_declarator "**param_7" * (pointer_declarator "*param_7" * identifier))) ))) (compound_statement "{\n  int iVar1;\n  char **ppcVar2;\n  undefined4 uVar3;\n  char *local_18;\n  char *local_14;\n  wchar16 *local_10;\n  wchar16 *local_c;\n  \n  uVar3 = *(undefined4 *)(this + 8);\n  ppcVar2 = &local_18;\n  local_18 = param_5;\n  local_14 = param_6;\n  local_10 = param_2;\n  local_c = param_3;\n  if ((*(uint *)(this + 0xc) & 2) != 0) {\n    iVar1 = (anonymous_namespace)::write_utf8_bom(ppcVar2);\n    if (iVar1 == 0) {\n      *param_4 = local_10;\n      *param_7 = local_18;\n      return 1;\n    }\n  }\n  uVar3 = (anonymous_namespace)::utf16_out<char16_t>(&local_10,ppcVar2,uVar3,0);\n  *param_4 = local_10;\n  *param_7 = local_18;\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "char **ppcVar2;" primitive_type (pointer_declarator "**ppcVar2" * (pointer_declarator "*ppcVar2" * identifier)) ;) (declaration "undefined4 uVar3;" 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 "wchar16 *local_10;" type_identifier (pointer_declarator "*local_10" * identifier) ;) (declaration "wchar16 *local_c;" type_identifier (pointer_declarator "*local_c" * identifier) ;) (expression_statement "uVar3 = *(undefined4 *)(this + 8);" (assignment_expression "uVar3 = *(undefined4 *)(this + 8)" identifier = (pointer_expression "*(undefined4 *)(this + 8)" * (cast_expression "(undefined4 *)(this + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) ))))) ;) (expression_statement "ppcVar2 = &local_18;" (assignment_expression "ppcVar2 = &local_18" identifier = (pointer_expression "&local_18" & identifier)) ;) (expression_statement "local_18 = param_5;" (assignment_expression "local_18 = param_5" identifier = identifier) ;) (expression_statement "local_14 = param_6;" (assignment_expression "local_14 = param_6" identifier = identifier) ;) (expression_statement "local_10 = param_2;" (assignment_expression "local_10 = param_2" identifier = identifier) ;) (expression_statement "local_c = param_3;" (assignment_expression "local_c = param_3" identifier = identifier) ;) (if_statement "if ((*(uint *)(this + 0xc) & 2) != 0) {\n    iVar1 = (anonymous_namespace)::write_utf8_bom(ppcVar2);\n    if (iVar1 == 0) {\n      *param_4 = local_10;\n      *param_7 = local_18;\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(ppcVar2);\n    if (iVar1 == 0) {\n      *param_4 = local_10;\n      *param_7 = local_18;\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(ppcVar2);" (call_expression "write_utf8_bom(ppcVar2)" identifier (argument_list "(ppcVar2)" ( identifier ))) ;) (if_statement "if (iVar1 == 0) {\n      *param_4 = local_10;\n      *param_7 = local_18;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *param_4 = local_10;\n      *param_7 = local_18;\n      return 1;\n    }" { (expression_statement "*param_4 = local_10;" (assignment_expression "*param_4 = local_10" (pointer_expression "*param_4" * identifier) = identifier) ;) (expression_statement "*param_7 = local_18;" (assignment_expression "*param_7 = local_18" (pointer_expression "*param_7" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) })) (expression_statement "uVar3 = (anonymous_namespace)::utf16_out<char16_t>(&local_10,ppcVar2,uVar3,0);" (binary_expression "uVar3 = (anonymous_namespace)::utf16_out<char16_t>(&local_10,ppcVar2,uVar3,0)" (binary_expression "uVar3 = (anonymous_namespace)::utf16_out<char16_t" (assignment_expression "uVar3 = (anonymous_namespace)" identifier = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) (ERROR "::utf16_out" : : identifier) < identifier) > (parenthesized_expression "(&local_10,ppcVar2,uVar3,0)" ( (comma_expression "&local_10,ppcVar2,uVar3,0" (pointer_expression "&local_10" & identifier) , (comma_expression "ppcVar2,uVar3,0" identifier , (comma_expression "uVar3,0" identifier , number_literal))) ))) ;) (expression_statement "*param_4 = local_10;" (assignment_expression "*param_4 = local_10" (pointer_expression "*param_4" * identifier) = identifier) ;) (expression_statement "*param_7 = local_18;" (assignment_expression "*param_7 = local_18" (pointer_expression "*param_7" * identifier) = identifier) ;) (return_statement "return uVar3;" return identifier ;) })))
(translation_unit "undefined4\nFUN_0035e97c(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 *param_5,undefined4 param_6,undefined4 param_7,undefined4 *param_8)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  undefined4 local_18;\n  undefined4 local_14;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar3 = *(undefined4 *)(param_1 + 8);\n  puVar2 = &local_18;\n  local_18 = param_6;\n  local_14 = param_7;\n  local_10 = param_3;\n  local_c = param_4;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }\n  }\n  uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);\n  *param_5 = local_10;\n  *param_8 = local_18;\n  return uVar3;\n}\n\n" (function_definition "undefined4\nFUN_0035e97c(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 *param_5,undefined4 param_6,undefined4 param_7,undefined4 *param_8)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  undefined4 local_18;\n  undefined4 local_14;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar3 = *(undefined4 *)(param_1 + 8);\n  puVar2 = &local_18;\n  local_18 = param_6;\n  local_14 = param_7;\n  local_10 = param_3;\n  local_c = param_4;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }\n  }\n  uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);\n  *param_5 = local_10;\n  *param_8 = local_18;\n  return uVar3;\n}" type_identifier (function_declarator "FUN_0035e97c(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 *param_5,undefined4 param_6,undefined4 param_7,undefined4 *param_8)" identifier (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 *param_5,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 "undefined4 param_3" type_identifier identifier) , (parameter_declaration "undefined4 param_4" type_identifier 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  undefined4 *puVar2;\n  undefined4 uVar3;\n  undefined4 local_18;\n  undefined4 local_14;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar3 = *(undefined4 *)(param_1 + 8);\n  puVar2 = &local_18;\n  local_18 = param_6;\n  local_14 = param_7;\n  local_10 = param_3;\n  local_c = param_4;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }\n  }\n  uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);\n  *param_5 = local_10;\n  *param_8 = local_18;\n  return uVar3;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "undefined4 *puVar2;" type_identifier (pointer_declarator "*puVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "undefined4 local_18;" type_identifier identifier ;) (declaration "undefined4 local_14;" type_identifier identifier ;) (declaration "undefined4 local_10;" type_identifier identifier ;) (declaration "undefined4 local_c;" type_identifier identifier ;) (expression_statement "uVar3 = *(undefined4 *)(param_1 + 8);" (assignment_expression "uVar3 = *(undefined4 *)(param_1 + 8)" identifier = (pointer_expression "*(undefined4 *)(param_1 + 8)" * (cast_expression "(undefined4 *)(param_1 + 8)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) ))))) ;) (expression_statement "puVar2 = &local_18;" (assignment_expression "puVar2 = &local_18" identifier = (pointer_expression "&local_18" & identifier)) ;) (expression_statement "local_18 = param_6;" (assignment_expression "local_18 = param_6" identifier = identifier) ;) (expression_statement "local_14 = param_7;" (assignment_expression "local_14 = param_7" identifier = identifier) ;) (expression_statement "local_10 = param_3;" (assignment_expression "local_10 = param_3" identifier = identifier) ;) (expression_statement "local_c = param_4;" (assignment_expression "local_c = param_4" identifier = identifier) ;) (if_statement "if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\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(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }\n  }" { (expression_statement "iVar1 = FUN_0035cafc(puVar2);" (assignment_expression "iVar1 = FUN_0035cafc(puVar2)" identifier = (call_expression "FUN_0035cafc(puVar2)" identifier (argument_list "(puVar2)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }" { (expression_statement "*param_5 = local_10;" (assignment_expression "*param_5 = local_10" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = local_18;" (assignment_expression "*param_8 = local_18" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return 1;" return number_literal ;) })) })) (expression_statement "uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);" (assignment_expression "uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0)" identifier = (call_expression "FUN_0035cb58(&local_10,puVar2,uVar3,0)" identifier (argument_list "(&local_10,puVar2,uVar3,0)" ( (pointer_expression "&local_10" & identifier) , identifier , identifier , number_literal )))) ;) (expression_statement "*param_5 = local_10;" (assignment_expression "*param_5 = local_10" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = local_18;" (assignment_expression "*param_8 = local_18" (pointer_expression "*param_8" * identifier) = identifier) ;) (return_statement "return uVar3;" 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 IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * 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 = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (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 ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (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 = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT , IDENT , LIT )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return IDENT ;) })))
(function_definition "undefined4\nFUN_0035e97c(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 *param_5,undefined4 param_6,undefined4 param_7,undefined4 *param_8)\n\n{\n  int iVar1;\n  undefined4 *puVar2;\n  undefined4 uVar3;\n  undefined4 local_18;\n  undefined4 local_14;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar3 = *(undefined4 *)(param_1 + 8);\n  puVar2 = &local_18;\n  local_18 = param_6;\n  local_14 = param_7;\n  local_10 = param_3;\n  local_c = param_4;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }\n  }\n  uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);\n  *param_5 = local_10;\n  *param_8 = local_18;\n  return uVar3;\n}" (type_identifier "undefined4") (function_declarator "FUN_0035e97c(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 *param_5,undefined4 param_6,undefined4 param_7,undefined4 *param_8)" (identifier "FUN_0035e97c") (parameter_list "(int param_1,undefined4 param_2,undefined4 param_3,undefined4 param_4,\n            undefined4 *param_5,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 "undefined4 param_3" (type_identifier "undefined4") (identifier "param_3")) (, ",") (parameter_declaration "undefined4 param_4" (type_identifier "undefined4") (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  undefined4 *puVar2;\n  undefined4 uVar3;\n  undefined4 local_18;\n  undefined4 local_14;\n  undefined4 local_10;\n  undefined4 local_c;\n  \n  uVar3 = *(undefined4 *)(param_1 + 8);\n  puVar2 = &local_18;\n  local_18 = param_6;\n  local_14 = param_7;\n  local_10 = param_3;\n  local_c = param_4;\n  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }\n  }\n  uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);\n  *param_5 = local_10;\n  *param_8 = local_18;\n  return uVar3;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "undefined4 *puVar2;" (type_identifier "undefined4") (pointer_declarator "*puVar2" (* "*") (identifier "puVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "undefined4 local_18;" (type_identifier "undefined4") (identifier "local_18") (; ";")) (declaration "undefined4 local_14;" (type_identifier "undefined4") (identifier "local_14") (; ";")) (declaration "undefined4 local_10;" (type_identifier "undefined4") (identifier "local_10") (; ";")) (declaration "undefined4 local_c;" (type_identifier "undefined4") (identifier "local_c") (; ";")) (expression_statement "uVar3 = *(undefined4 *)(param_1 + 8);" (assignment_expression "uVar3 = *(undefined4 *)(param_1 + 8)" (identifier "uVar3") (= "=") (pointer_expression "*(undefined4 *)(param_1 + 8)" (* "*") (cast_expression "(undefined4 *)(param_1 + 8)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")"))))) (; ";")) (expression_statement "puVar2 = &local_18;" (assignment_expression "puVar2 = &local_18" (identifier "puVar2") (= "=") (pointer_expression "&local_18" (& "&") (identifier "local_18"))) (; ";")) (expression_statement "local_18 = param_6;" (assignment_expression "local_18 = param_6" (identifier "local_18") (= "=") (identifier "param_6")) (; ";")) (expression_statement "local_14 = param_7;" (assignment_expression "local_14 = param_7" (identifier "local_14") (= "=") (identifier "param_7")) (; ";")) (expression_statement "local_10 = param_3;" (assignment_expression "local_10 = param_3" (identifier "local_10") (= "=") (identifier "param_3")) (; ";")) (expression_statement "local_c = param_4;" (assignment_expression "local_c = param_4" (identifier "local_c") (= "=") (identifier "param_4")) (; ";")) (if_statement "if ((*(uint *)(param_1 + 0xc) & 2) != 0) {\n    iVar1 = FUN_0035cafc(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\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(puVar2);\n    if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }\n  }" ({ "{") (expression_statement "iVar1 = FUN_0035cafc(puVar2);" (assignment_expression "iVar1 = FUN_0035cafc(puVar2)" (identifier "iVar1") (= "=") (call_expression "FUN_0035cafc(puVar2)" (identifier "FUN_0035cafc") (argument_list "(puVar2)" (( "(") (identifier "puVar2") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      *param_5 = local_10;\n      *param_8 = local_18;\n      return 1;\n    }" ({ "{") (expression_statement "*param_5 = local_10;" (assignment_expression "*param_5 = local_10" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "local_10")) (; ";")) (expression_statement "*param_8 = local_18;" (assignment_expression "*param_8 = local_18" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (identifier "local_18")) (; ";")) (return_statement "return 1;" (return "return") (number_literal "1") (; ";")) (} "}"))) (} "}"))) (expression_statement "uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);" (assignment_expression "uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0)" (identifier "uVar3") (= "=") (call_expression "FUN_0035cb58(&local_10,puVar2,uVar3,0)" (identifier "FUN_0035cb58") (argument_list "(&local_10,puVar2,uVar3,0)" (( "(") (pointer_expression "&local_10" (& "&") (identifier "local_10")) (, ",") (identifier "puVar2") (, ",") (identifier "uVar3") (, ",") (number_literal "0") () ")")))) (; ";")) (expression_statement "*param_5 = local_10;" (assignment_expression "*param_5 = local_10" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "local_10")) (; ";")) (expression_statement "*param_8 = local_18;" (assignment_expression "*param_8 = local_18" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (identifier "local_18")) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}")))

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

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

{
  int var_3;
  char **ppcVar2;
  type_1 uVar3;
  char *local_18;
  char *local_14;
  type_4 *local_10;
  type_4 *local_c;
  
  uVar3 = *(type_1 *)(var_1 + 8);
  ppcVar2 = &local_18;
  local_18 = param_5;
  local_14 = param_6;
  local_10 = param_2;
  local_c = param_3;
  if ((*(type_5 *)(var_1 + 0xc) & 2) != 0) {
    var_3 = (anonymous_namespace)::var_2(ppcVar2);
    if (var_3 == 0) {
      *param_4 = local_10;
      *param_7 = local_18;
      return 1;
    }
  }
  uVar3 = (anonymous_namespace)::utf16_out<var_4>(&local_10,ppcVar2,uVar3,0);
  *param_4 = local_10;
  *param_7 = local_18;
  return uVar3;
}


(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: (identifier)) (parameter_declaration type: (type_identifier) 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: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (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: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (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 (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) 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: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (identifier) (identifier) (number_literal))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (return_statement (identifier)))))

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

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 uVar3;
  undefined4 local_18;
  undefined4 local_14;
  undefined4 local_10;
  undefined4 local_c;
  
  uVar3 = *(undefined4 *)(param_1 + 8);
  puVar2 = &local_18;
  local_18 = param_6;
  local_14 = param_7;
  local_10 = param_3;
  local_c = param_4;
  if ((*(uint *)(param_1 + 0xc) & 2) != 0) {
    iVar1 = FUN_0035cafc(puVar2);
    if (iVar1 == 0) {
      *param_5 = local_10;
      *param_8 = local_18;
      return 1;
    }
  }
  uVar3 = FUN_0035cb58(&local_10,puVar2,uVar3,0);
  *param_5 = local_10;
  *param_8 = local_18;
  return uVar3;
}

