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

undefined8 __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)

{
  char cVar1;
  undefined8 uVar2;
  wchar16 *local_28;
  wchar16 *local_20;
  char *local_18;
  char *local_10;
  
  local_10 = param_6;
  local_28 = param_2;
  local_20 = param_3;
  local_18 = param_5;
  if (((byte)this[0x18] & 2) != 0) {
    cVar1 = (anonymous_namespace)::write_utf8_bom(&local_18);
    if (cVar1 == '\0') {
      uVar2 = 1;
      goto LAB_003b8aa8;
    }
  }
  uVar2 = (anonymous_namespace)::utf16_out<char16_t>(&local_28);
LAB_003b8aa8:
  *param_4 = local_28;
  *param_7 = local_18;
  return uVar2;
}



undefined8
FUN_003b8a60(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)

{
  char cVar1;
  undefined8 uVar2;
  undefined8 local_28;
  undefined8 local_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_10 = param_7;
  local_28 = param_3;
  local_20 = param_4;
  local_18 = param_6;
  if ((*(byte *)(param_1 + 0x18) & 2) != 0) {
    cVar1 = FUN_003b7600(&local_18);
    if (cVar1 == '\0') {
      uVar2 = 1;
      goto LAB_003b8aa8;
    }
  }
  uVar2 = FUN_003b7640(&local_28);
LAB_003b8aa8:
  *param_5 = local_28;
  *param_8 = local_18;
  return uVar2;
}


PUSH RBX
MOV RBX,R8
SUB RSP,0x20
MOV R8,qword ptr [RDI + 0x10]
MOV RAX,qword ptr [RSP + 0x30]
MOV qword ptr [RSP],RDX
LEA RSI,[RSP + 0x10]
MOV qword ptr [RSP + 0x8],RCX
MOV qword ptr [RSP + 0x10],R9
MOV qword ptr [RSP + 0x18],RAX
TEST byte ptr [RDI + 0x18],0x2
JZ 0x003b8a9b
MOV RDI,RSI
CALL 0x003b7600
TEST AL,AL
JZ 0x003b8ac8
MOV RDI,RSP
XOR ECX,ECX
MOV RDX,R8
CALL 0x003b7640
MOV RDX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x10]
MOV qword ptr [RBX],RDX
MOV RDX,qword ptr [RSP + 0x38]
MOV qword ptr [RDX],RCX
ADD RSP,0x20
POP RBX
RET
MOV EAX,0x1
JMP 0x003b8aa8
(translation_unit "undefined8\nFUN_003b8a60(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  char cVar1;\n  undefined8 uVar2;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  if ((*(byte *)(param_1 + 0x18) & 2) != 0) {\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }\n  uVar2 = FUN_003b7640(&local_28);\nLAB_003b8aa8:\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}\n\n" (function_definition "undefined8\nFUN_003b8a60(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  char cVar1;\n  undefined8 uVar2;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  if ((*(byte *)(param_1 + 0x18) & 2) != 0) {\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }\n  uVar2 = FUN_003b7640(&local_28);\nLAB_003b8aa8:\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}" type_identifier (function_declarator "FUN_003b8a60(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)" identifier (parameter_list "(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "undefined8 param_6" type_identifier identifier) , (parameter_declaration "undefined8 param_7" type_identifier identifier) , (parameter_declaration "undefined8 *param_8" type_identifier (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  undefined8 uVar2;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  if ((*(byte *)(param_1 + 0x18) & 2) != 0) {\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }\n  uVar2 = FUN_003b7640(&local_28);\nLAB_003b8aa8:\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "undefined8 local_28;" type_identifier identifier ;) (declaration "undefined8 local_20;" type_identifier identifier ;) (declaration "undefined8 local_18;" type_identifier identifier ;) (declaration "undefined8 local_10;" type_identifier identifier ;) (expression_statement "local_10 = param_7;" (assignment_expression "local_10 = param_7" identifier = identifier) ;) (expression_statement "local_28 = param_3;" (assignment_expression "local_28 = param_3" identifier = identifier) ;) (expression_statement "local_20 = param_4;" (assignment_expression "local_20 = param_4" identifier = identifier) ;) (expression_statement "local_18 = param_6;" (assignment_expression "local_18 = param_6" identifier = identifier) ;) (if_statement "if ((*(byte *)(param_1 + 0x18) & 2) != 0) {\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }" if (parenthesized_expression "((*(byte *)(param_1 + 0x18) & 2) != 0)" ( (binary_expression "(*(byte *)(param_1 + 0x18) & 2) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x18) & 2)" ( (binary_expression "*(byte *)(param_1 + 0x18) & 2" (pointer_expression "*(byte *)(param_1 + 0x18)" * (cast_expression "(byte *)(param_1 + 0x18)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }" { (expression_statement "cVar1 = FUN_003b7600(&local_18);" (assignment_expression "cVar1 = FUN_003b7600(&local_18)" identifier = (call_expression "FUN_003b7600(&local_18)" identifier (argument_list "(&local_18)" ( (pointer_expression "&local_18" & identifier) )))) ;) (if_statement "if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }" { (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_003b8aa8;" goto statement_identifier ;) })) })) (expression_statement "uVar2 = FUN_003b7640(&local_28);" (assignment_expression "uVar2 = FUN_003b7640(&local_28)" identifier = (call_expression "FUN_003b7640(&local_28)" identifier (argument_list "(&local_28)" ( (pointer_expression "&local_28" & identifier) )))) ;) (labeled_statement "LAB_003b8aa8:\n  *param_5 = local_28;" statement_identifier : (expression_statement "*param_5 = local_28;" (assignment_expression "*param_5 = local_28" (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 uVar2;" 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\nundefined8 __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  char cVar1;\n  undefined8 uVar2;\n  wchar16 *local_28;\n  wchar16 *local_20;\n  char *local_18;\n  char *local_10;\n  \n  local_10 = param_6;\n  local_28 = param_2;\n  local_20 = param_3;\n  local_18 = param_5;\n  if (((byte)this[0x18] & 2) != 0) {\n    cVar1 = (anonymous_namespace)::write_utf8_bom(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }\n  uVar2 = (anonymous_namespace)::utf16_out<char16_t>(&local_28);\nLAB_003b8aa8:\n  *param_4 = local_28;\n  *param_7 = local_18;\n  return uVar2;\n}\n\n" comment (function_definition "undefined8 __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  char cVar1;\n  undefined8 uVar2;\n  wchar16 *local_28;\n  wchar16 *local_20;\n  char *local_18;\n  char *local_10;\n  \n  local_10 = param_6;\n  local_28 = param_2;\n  local_20 = param_3;\n  local_18 = param_5;\n  if (((byte)this[0x18] & 2) != 0) {\n    cVar1 = (anonymous_namespace)::write_utf8_bom(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }\n  uVar2 = (anonymous_namespace)::utf16_out<char16_t>(&local_28);\nLAB_003b8aa8:\n  *param_4 = local_28;\n  *param_7 = local_18;\n  return uVar2;\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  char cVar1;\n  undefined8 uVar2;\n  wchar16 *local_28;\n  wchar16 *local_20;\n  char *local_18;\n  char *local_10;\n  \n  local_10 = param_6;\n  local_28 = param_2;\n  local_20 = param_3;\n  local_18 = param_5;\n  if (((byte)this[0x18] & 2) != 0) {\n    cVar1 = (anonymous_namespace)::write_utf8_bom(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }\n  uVar2 = (anonymous_namespace)::utf16_out<char16_t>(&local_28);\nLAB_003b8aa8:\n  *param_4 = local_28;\n  *param_7 = local_18;\n  return uVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "wchar16 *local_28;" type_identifier (pointer_declarator "*local_28" * identifier) ;) (declaration "wchar16 *local_20;" type_identifier (pointer_declarator "*local_20" * identifier) ;) (declaration "char *local_18;" primitive_type (pointer_declarator "*local_18" * identifier) ;) (declaration "char *local_10;" primitive_type (pointer_declarator "*local_10" * identifier) ;) (expression_statement "local_10 = param_6;" (assignment_expression "local_10 = param_6" identifier = identifier) ;) (expression_statement "local_28 = param_2;" (assignment_expression "local_28 = param_2" identifier = identifier) ;) (expression_statement "local_20 = param_3;" (assignment_expression "local_20 = param_3" identifier = identifier) ;) (expression_statement "local_18 = param_5;" (assignment_expression "local_18 = param_5" identifier = identifier) ;) (if_statement "if (((byte)this[0x18] & 2) != 0) {\n    cVar1 = (anonymous_namespace)::write_utf8_bom(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }" if (parenthesized_expression "(((byte)this[0x18] & 2) != 0)" ( (binary_expression "((byte)this[0x18] & 2) != 0" (parenthesized_expression "((byte)this[0x18] & 2)" ( (binary_expression "(byte)this[0x18] & 2" (cast_expression "(byte)this[0x18]" ( (type_descriptor "byte" type_identifier) ) (subscript_expression "this[0x18]" identifier [ number_literal ])) & number_literal) )) != number_literal) )) (compound_statement "{\n    cVar1 = (anonymous_namespace)::write_utf8_bom(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }" { (ERROR "cVar1 = (anonymous_namespace)::" (assignment_expression "cVar1 = (anonymous_namespace)" identifier = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) : :) (expression_statement "write_utf8_bom(&local_18);" (call_expression "write_utf8_bom(&local_18)" identifier (argument_list "(&local_18)" ( (pointer_expression "&local_18" & identifier) ))) ;) (if_statement "if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }" { (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_003b8aa8;" goto statement_identifier ;) })) })) (expression_statement "uVar2 = (anonymous_namespace)::utf16_out<char16_t>(&local_28);" (binary_expression "uVar2 = (anonymous_namespace)::utf16_out<char16_t>(&local_28)" (binary_expression "uVar2 = (anonymous_namespace)::utf16_out<char16_t" (assignment_expression "uVar2 = (anonymous_namespace)" identifier = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) (ERROR "::utf16_out" : : identifier) < identifier) > (parenthesized_expression "(&local_28)" ( (pointer_expression "&local_28" & identifier) ))) ;) (labeled_statement "LAB_003b8aa8:\n  *param_4 = local_28;" statement_identifier : (expression_statement "*param_4 = local_28;" (assignment_expression "*param_4 = local_28" (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 uVar2;" return identifier ;) })))
(translation_unit "undefined8\nFUN_003b8a60(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  char cVar1;\n  undefined8 uVar2;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  if ((*(byte *)(param_1 + 0x18) & 2) != 0) {\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }\n  uVar2 = FUN_003b7640(&local_28);\nLAB_003b8aa8:\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}\n\n" (function_definition "undefined8\nFUN_003b8a60(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  char cVar1;\n  undefined8 uVar2;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  if ((*(byte *)(param_1 + 0x18) & 2) != 0) {\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }\n  uVar2 = FUN_003b7640(&local_28);\nLAB_003b8aa8:\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}" type_identifier (function_declarator "FUN_003b8a60(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)" identifier (parameter_list "(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "undefined8 param_6" type_identifier identifier) , (parameter_declaration "undefined8 param_7" type_identifier identifier) , (parameter_declaration "undefined8 *param_8" type_identifier (pointer_declarator "*param_8" * identifier)) ))) (compound_statement "{\n  char cVar1;\n  undefined8 uVar2;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  if ((*(byte *)(param_1 + 0x18) & 2) != 0) {\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }\n  uVar2 = FUN_003b7640(&local_28);\nLAB_003b8aa8:\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}" { (declaration "char cVar1;" primitive_type identifier ;) (declaration "undefined8 uVar2;" type_identifier identifier ;) (declaration "undefined8 local_28;" type_identifier identifier ;) (declaration "undefined8 local_20;" type_identifier identifier ;) (declaration "undefined8 local_18;" type_identifier identifier ;) (declaration "undefined8 local_10;" type_identifier identifier ;) (expression_statement "local_10 = param_7;" (assignment_expression "local_10 = param_7" identifier = identifier) ;) (expression_statement "local_28 = param_3;" (assignment_expression "local_28 = param_3" identifier = identifier) ;) (expression_statement "local_20 = param_4;" (assignment_expression "local_20 = param_4" identifier = identifier) ;) (expression_statement "local_18 = param_6;" (assignment_expression "local_18 = param_6" identifier = identifier) ;) (if_statement "if ((*(byte *)(param_1 + 0x18) & 2) != 0) {\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }" if (parenthesized_expression "((*(byte *)(param_1 + 0x18) & 2) != 0)" ( (binary_expression "(*(byte *)(param_1 + 0x18) & 2) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x18) & 2)" ( (binary_expression "*(byte *)(param_1 + 0x18) & 2" (pointer_expression "*(byte *)(param_1 + 0x18)" * (cast_expression "(byte *)(param_1 + 0x18)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }" { (expression_statement "cVar1 = FUN_003b7600(&local_18);" (assignment_expression "cVar1 = FUN_003b7600(&local_18)" identifier = (call_expression "FUN_003b7600(&local_18)" identifier (argument_list "(&local_18)" ( (pointer_expression "&local_18" & identifier) )))) ;) (if_statement "if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }" if (parenthesized_expression "(cVar1 == '\0')" ( (binary_expression "cVar1 == '\0'" identifier == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }" { (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" identifier = number_literal) ;) (goto_statement "goto LAB_003b8aa8;" goto statement_identifier ;) })) })) (expression_statement "uVar2 = FUN_003b7640(&local_28);" (assignment_expression "uVar2 = FUN_003b7640(&local_28)" identifier = (call_expression "FUN_003b7640(&local_28)" identifier (argument_list "(&local_28)" ( (pointer_expression "&local_28" & identifier) )))) ;) (labeled_statement "LAB_003b8aa8:\n  *param_5 = local_28;" statement_identifier : (expression_statement "*param_5 = local_28;" (assignment_expression "*param_5 = local_28" (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 uVar2;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) 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 IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE 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 ( (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) )))) ;) (labeled_statement statement_identifier : (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;)) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (return_statement return IDENT ;) })))
(function_definition "undefined8\nFUN_003b8a60(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  char cVar1;\n  undefined8 uVar2;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  if ((*(byte *)(param_1 + 0x18) & 2) != 0) {\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }\n  uVar2 = FUN_003b7640(&local_28);\nLAB_003b8aa8:\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}" (type_identifier "undefined8") (function_declarator "FUN_003b8a60(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)" (identifier "FUN_003b8a60") (parameter_list "(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,\n            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) (, ",") (parameter_declaration "undefined8 param_3" (type_identifier "undefined8") (identifier "param_3")) (, ",") (parameter_declaration "undefined8 param_4" (type_identifier "undefined8") (identifier "param_4")) (, ",") (parameter_declaration "undefined8 *param_5" (type_identifier "undefined8") (pointer_declarator "*param_5" (* "*") (identifier "param_5"))) (, ",") (parameter_declaration "undefined8 param_6" (type_identifier "undefined8") (identifier "param_6")) (, ",") (parameter_declaration "undefined8 param_7" (type_identifier "undefined8") (identifier "param_7")) (, ",") (parameter_declaration "undefined8 *param_8" (type_identifier "undefined8") (pointer_declarator "*param_8" (* "*") (identifier "param_8"))) () ")"))) (compound_statement "{\n  char cVar1;\n  undefined8 uVar2;\n  undefined8 local_28;\n  undefined8 local_20;\n  undefined8 local_18;\n  undefined8 local_10;\n  \n  local_10 = param_7;\n  local_28 = param_3;\n  local_20 = param_4;\n  local_18 = param_6;\n  if ((*(byte *)(param_1 + 0x18) & 2) != 0) {\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }\n  uVar2 = FUN_003b7640(&local_28);\nLAB_003b8aa8:\n  *param_5 = local_28;\n  *param_8 = local_18;\n  return uVar2;\n}" ({ "{") (declaration "char cVar1;" (primitive_type "char") (identifier "cVar1") (; ";")) (declaration "undefined8 uVar2;" (type_identifier "undefined8") (identifier "uVar2") (; ";")) (declaration "undefined8 local_28;" (type_identifier "undefined8") (identifier "local_28") (; ";")) (declaration "undefined8 local_20;" (type_identifier "undefined8") (identifier "local_20") (; ";")) (declaration "undefined8 local_18;" (type_identifier "undefined8") (identifier "local_18") (; ";")) (declaration "undefined8 local_10;" (type_identifier "undefined8") (identifier "local_10") (; ";")) (expression_statement "local_10 = param_7;" (assignment_expression "local_10 = param_7" (identifier "local_10") (= "=") (identifier "param_7")) (; ";")) (expression_statement "local_28 = param_3;" (assignment_expression "local_28 = param_3" (identifier "local_28") (= "=") (identifier "param_3")) (; ";")) (expression_statement "local_20 = param_4;" (assignment_expression "local_20 = param_4" (identifier "local_20") (= "=") (identifier "param_4")) (; ";")) (expression_statement "local_18 = param_6;" (assignment_expression "local_18 = param_6" (identifier "local_18") (= "=") (identifier "param_6")) (; ";")) (if_statement "if ((*(byte *)(param_1 + 0x18) & 2) != 0) {\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }" (if "if") (parenthesized_expression "((*(byte *)(param_1 + 0x18) & 2) != 0)" (( "(") (binary_expression "(*(byte *)(param_1 + 0x18) & 2) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x18) & 2)" (( "(") (binary_expression "*(byte *)(param_1 + 0x18) & 2" (pointer_expression "*(byte *)(param_1 + 0x18)" (* "*") (cast_expression "(byte *)(param_1 + 0x18)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (& "&") (number_literal "2")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    cVar1 = FUN_003b7600(&local_18);\n    if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }\n  }" ({ "{") (expression_statement "cVar1 = FUN_003b7600(&local_18);" (assignment_expression "cVar1 = FUN_003b7600(&local_18)" (identifier "cVar1") (= "=") (call_expression "FUN_003b7600(&local_18)" (identifier "FUN_003b7600") (argument_list "(&local_18)" (( "(") (pointer_expression "&local_18" (& "&") (identifier "local_18")) () ")")))) (; ";")) (if_statement "if (cVar1 == '\0') {\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }" (if "if") (parenthesized_expression "(cVar1 == '\0')" (( "(") (binary_expression "cVar1 == '\0'" (identifier "cVar1") (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n      uVar2 = 1;\n      goto LAB_003b8aa8;\n    }" ({ "{") (expression_statement "uVar2 = 1;" (assignment_expression "uVar2 = 1" (identifier "uVar2") (= "=") (number_literal "1")) (; ";")) (goto_statement "goto LAB_003b8aa8;" (goto "goto") (statement_identifier "LAB_003b8aa8") (; ";")) (} "}"))) (} "}"))) (expression_statement "uVar2 = FUN_003b7640(&local_28);" (assignment_expression "uVar2 = FUN_003b7640(&local_28)" (identifier "uVar2") (= "=") (call_expression "FUN_003b7640(&local_28)" (identifier "FUN_003b7640") (argument_list "(&local_28)" (( "(") (pointer_expression "&local_28" (& "&") (identifier "local_28")) () ")")))) (; ";")) (labeled_statement "LAB_003b8aa8:\n  *param_5 = local_28;" (statement_identifier "LAB_003b8aa8") (: ":") (expression_statement "*param_5 = local_28;" (assignment_expression "*param_5 = local_28" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "local_28")) (; ";"))) (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 uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))

/* 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> *this,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)

{
  char var_2;
  type_1 uVar2;
  type_4 *local_28;
  type_4 *local_20;
  char *local_18;
  char *local_10;
  
  local_10 = param_6;
  local_28 = param_2;
  local_20 = param_3;
  local_18 = param_5;
  if (((type_5)this[0x18] & 2) != 0) {
    var_2 = (anonymous_namespace)::var_1(&local_18);
    if (var_2 == '\0') {
      uVar2 = 1;
      goto LAB_003b8aa8;
    }
  }
  uVar2 = (anonymous_namespace)::utf16_out<var_3>(&local_28);
LAB_003b8aa8:
  *param_4 = local_28;
  *param_7 = local_18;
  return uVar2;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) 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: (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: (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 (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (goto_statement label: (statement_identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)))))) (labeled_statement label: (statement_identifier) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier)))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (return_statement (identifier)))))

undefined8
MASKED(long param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,
            undefined8 *param_5,undefined8 param_6,undefined8 param_7,undefined8 *param_8)

{
  char cVar1;
  undefined8 uVar2;
  undefined8 local_28;
  undefined8 local_20;
  undefined8 local_18;
  undefined8 local_10;
  
  local_10 = param_7;
  local_28 = param_3;
  local_20 = param_4;
  local_18 = param_6;
  if ((*(byte *)(param_1 + 0x18) & 2) != 0) {
    cVar1 = FUN_003b7600(&local_18);
    if (cVar1 == '\0') {
      uVar2 = 1;
      goto LAB_003b8aa8;
    }
  }
  uVar2 = FUN_003b7640(&local_28);
LAB_003b8aa8:
  *param_5 = local_28;
  *param_8 = local_18;
  return uVar2;
}

