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

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

{
  ulong uVar1;
  char *local_38;
  char *local_30;
  wchar_t *local_28;
  wchar_t *local_20;
  
  local_20 = param_6;
  local_38 = param_2;
  local_30 = param_3;
  local_28 = param_5;
  uVar1 = (anonymous_namespace)::ucs4_in
                    (&local_38,&local_28,*(undefined8 *)(this + 0x18),*(undefined4 *)(this + 0x20));
  *param_4 = local_38;
  *param_7 = local_28;
  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_3)) {
    uVar1 = 2;
  }
  return uVar1;
}



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

{
  ulong uVar1;
  long local_38;
  long local_30;
  undefined8 local_28;
  undefined8 local_20;
  
  local_20 = param_7;
  local_38 = param_3;
  local_30 = param_4;
  local_28 = param_6;
  uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),
                       *(undefined4 *)(param_1 + 0x20));
  *param_5 = local_38;
  *param_8 = local_28;
  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {
    uVar1 = 2;
  }
  return uVar1;
}


PUSH RBP
MOV RBP,R8
PUSH RBX
MOV RBX,RCX
SUB RSP,0x28
MOV qword ptr [RSP],RDX
MOV RAX,qword ptr [RSP + 0x40]
LEA RSI,[RSP + 0x10]
MOV RDX,qword ptr [RDI + 0x18]
MOV qword ptr [RSP + 0x8],RCX
MOV ECX,dword ptr [RDI + 0x20]
MOV RDI,RSP
MOV qword ptr [RSP + 0x10],R9
MOV qword ptr [RSP + 0x18],RAX
CALL 0x002f5c40
MOV RDX,qword ptr [RSP]
MOV RCX,qword ptr [RSP + 0x48]
MOV RSI,qword ptr [RSP + 0x10]
MOV qword ptr [RBP],RDX
MOV qword ptr [RCX],RSI
TEST EAX,EAX
JNZ 0x002f5dac
CMP RDX,RBX
MOV EDX,0x2
CMOVNZ EAX,EDX
ADD RSP,0x28
POP RBX
POP RBP
RET
(translation_unit "ulong FUN_002f5d50(long param_1,undefined8 param_2,long param_3,long param_4,long *param_5,\n                  undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  ulong uVar1;\n  long local_38;\n  long local_30;\n  undefined8 local_28;\n  undefined8 local_20;\n  \n  local_20 = param_7;\n  local_38 = param_3;\n  local_30 = param_4;\n  local_28 = param_6;\n  uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20));\n  *param_5 = local_38;\n  *param_8 = local_28;\n  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {\n    uVar1 = 2;\n  }\n  return uVar1;\n}\n\n" (function_definition "ulong FUN_002f5d50(long param_1,undefined8 param_2,long param_3,long param_4,long *param_5,\n                  undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  ulong uVar1;\n  long local_38;\n  long local_30;\n  undefined8 local_28;\n  undefined8 local_20;\n  \n  local_20 = param_7;\n  local_38 = param_3;\n  local_30 = param_4;\n  local_28 = param_6;\n  uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20));\n  *param_5 = local_38;\n  *param_8 = local_28;\n  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {\n    uVar1 = 2;\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_002f5d50(long param_1,undefined8 param_2,long param_3,long param_4,long *param_5,\n                  undefined8 param_6,undefined8 param_7,undefined8 *param_8)" identifier (parameter_list "(long param_1,undefined8 param_2,long param_3,long param_4,long *param_5,\n                  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 "long param_3" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_4" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long *param_5" (sized_type_specifier "long" long) (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  ulong uVar1;\n  long local_38;\n  long local_30;\n  undefined8 local_28;\n  undefined8 local_20;\n  \n  local_20 = param_7;\n  local_38 = param_3;\n  local_30 = param_4;\n  local_28 = param_6;\n  uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20));\n  *param_5 = local_38;\n  *param_8 = local_28;\n  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {\n    uVar1 = 2;\n  }\n  return uVar1;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "long local_38;" (sized_type_specifier "long" long) identifier ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 local_28;" type_identifier identifier ;) (declaration "undefined8 local_20;" type_identifier identifier ;) (expression_statement "local_20 = param_7;" (assignment_expression "local_20 = param_7" identifier = identifier) ;) (expression_statement "local_38 = param_3;" (assignment_expression "local_38 = param_3" identifier = identifier) ;) (expression_statement "local_30 = param_4;" (assignment_expression "local_30 = param_4" identifier = identifier) ;) (expression_statement "local_28 = param_6;" (assignment_expression "local_28 = param_6" identifier = identifier) ;) (expression_statement "uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20));" (assignment_expression "uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20))" identifier = (call_expression "FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20))" identifier (argument_list "(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20))" ( (pointer_expression "&local_38" & identifier) , (pointer_expression "&local_28" & identifier) , (pointer_expression "*(undefined8 *)(param_1 + 0x18)" * (cast_expression "(undefined8 *)(param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) )))) ;) (expression_statement "*param_5 = local_38;" (assignment_expression "*param_5 = local_38" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = local_28;" (assignment_expression "*param_8 = local_28" (pointer_expression "*param_8" * identifier) = identifier) ;) (if_statement "if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {\n    uVar1 = 2;\n  }" if (parenthesized_expression "(((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4))" ( (binary_expression "((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)" (parenthesized_expression "((int)uVar1 == 0)" ( (binary_expression "(int)uVar1 == 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) && (parenthesized_expression "(uVar1 = uVar1 & 0xffffffff, local_38 != param_4)" ( (comma_expression "uVar1 = uVar1 & 0xffffffff, local_38 != param_4" (assignment_expression "uVar1 = uVar1 & 0xffffffff" identifier = (binary_expression "uVar1 & 0xffffffff" identifier & number_literal)) , (binary_expression "local_38 != param_4" identifier != identifier)) ))) )) (compound_statement "{\n    uVar1 = 2;\n  }" { (expression_statement "uVar1 = 2;" (assignment_expression "uVar1 = 2" identifier = number_literal) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "/* std::__codecvt_utf16_base<wchar_t>::do_in(__mbstate_t&, char const*, char const*, char const*&,\n   wchar_t*, wchar_t*, wchar_t*&) const */\n\nulong __thiscall\nstd::__codecvt_utf16_base<wchar_t>::do_in\n          (__codecvt_utf16_base<wchar_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          char **param_4,wchar_t *param_5,wchar_t *param_6,wchar_t **param_7)\n\n{\n  ulong uVar1;\n  char *local_38;\n  char *local_30;\n  wchar_t *local_28;\n  wchar_t *local_20;\n  \n  local_20 = param_6;\n  local_38 = param_2;\n  local_30 = param_3;\n  local_28 = param_5;\n  uVar1 = (anonymous_namespace)::ucs4_in\n                    (&local_38,&local_28,*(undefined8 *)(this + 0x18),*(undefined4 *)(this + 0x20));\n  *param_4 = local_38;\n  *param_7 = local_28;\n  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_3)) {\n    uVar1 = 2;\n  }\n  return uVar1;\n}\n\n" comment (function_definition "ulong __thiscall\nstd::__codecvt_utf16_base<wchar_t>::do_in\n          (__codecvt_utf16_base<wchar_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          char **param_4,wchar_t *param_5,wchar_t *param_6,wchar_t **param_7)\n\n{\n  ulong uVar1;\n  char *local_38;\n  char *local_30;\n  wchar_t *local_28;\n  wchar_t *local_20;\n  \n  local_20 = param_6;\n  local_38 = param_2;\n  local_30 = param_3;\n  local_28 = param_5;\n  uVar1 = (anonymous_namespace)::ucs4_in\n                    (&local_38,&local_28,*(undefined8 *)(this + 0x18),*(undefined4 *)(this + 0x20));\n  *param_4 = local_38;\n  *param_7 = local_28;\n  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_3)) {\n    uVar1 = 2;\n  }\n  return uVar1;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::__codecvt_utf16_base<wchar_t>::" identifier : : identifier < identifier > : :) (function_declarator "do_in\n          (__codecvt_utf16_base<wchar_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          char **param_4,wchar_t *param_5,wchar_t *param_6,wchar_t **param_7)" identifier (parameter_list "(__codecvt_utf16_base<wchar_t> *this,__mbstate_t *param_1,char *param_2,char *param_3,\n          char **param_4,wchar_t *param_5,wchar_t *param_6,wchar_t **param_7)" ( (parameter_declaration "__codecvt_utf16_base<wchar_t> *this" type_identifier (ERROR "<wchar_t>" < identifier >) (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 "wchar_t *param_5" type_identifier (pointer_declarator "*param_5" * identifier)) , (parameter_declaration "wchar_t *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) , (parameter_declaration "wchar_t **param_7" type_identifier (pointer_declarator "**param_7" * (pointer_declarator "*param_7" * identifier))) ))) (compound_statement "{\n  ulong uVar1;\n  char *local_38;\n  char *local_30;\n  wchar_t *local_28;\n  wchar_t *local_20;\n  \n  local_20 = param_6;\n  local_38 = param_2;\n  local_30 = param_3;\n  local_28 = param_5;\n  uVar1 = (anonymous_namespace)::ucs4_in\n                    (&local_38,&local_28,*(undefined8 *)(this + 0x18),*(undefined4 *)(this + 0x20));\n  *param_4 = local_38;\n  *param_7 = local_28;\n  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_3)) {\n    uVar1 = 2;\n  }\n  return uVar1;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "char *local_38;" primitive_type (pointer_declarator "*local_38" * identifier) ;) (declaration "char *local_30;" primitive_type (pointer_declarator "*local_30" * identifier) ;) (declaration "wchar_t *local_28;" type_identifier (pointer_declarator "*local_28" * identifier) ;) (declaration "wchar_t *local_20;" type_identifier (pointer_declarator "*local_20" * identifier) ;) (expression_statement "local_20 = param_6;" (assignment_expression "local_20 = param_6" identifier = identifier) ;) (expression_statement "local_38 = param_2;" (assignment_expression "local_38 = param_2" identifier = identifier) ;) (expression_statement "local_30 = param_3;" (assignment_expression "local_30 = param_3" identifier = identifier) ;) (expression_statement "local_28 = param_5;" (assignment_expression "local_28 = param_5" identifier = identifier) ;) (ERROR "uVar1 = (anonymous_namespace)::" (assignment_expression "uVar1 = (anonymous_namespace)" identifier = (parenthesized_expression "(anonymous_namespace)" ( identifier ))) : :) (expression_statement "ucs4_in\n                    (&local_38,&local_28,*(undefined8 *)(this + 0x18),*(undefined4 *)(this + 0x20));" (call_expression "ucs4_in\n                    (&local_38,&local_28,*(undefined8 *)(this + 0x18),*(undefined4 *)(this + 0x20))" identifier (argument_list "(&local_38,&local_28,*(undefined8 *)(this + 0x18),*(undefined4 *)(this + 0x20))" ( (pointer_expression "&local_38" & identifier) , (pointer_expression "&local_28" & identifier) , (pointer_expression "*(undefined8 *)(this + 0x18)" * (cast_expression "(undefined8 *)(this + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(this + 0x20)" * (cast_expression "(undefined4 *)(this + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x20)" ( (binary_expression "this + 0x20" identifier + number_literal) )))) ))) ;) (expression_statement "*param_4 = local_38;" (assignment_expression "*param_4 = local_38" (pointer_expression "*param_4" * identifier) = identifier) ;) (expression_statement "*param_7 = local_28;" (assignment_expression "*param_7 = local_28" (pointer_expression "*param_7" * identifier) = identifier) ;) (if_statement "if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_3)) {\n    uVar1 = 2;\n  }" if (parenthesized_expression "(((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_3))" ( (binary_expression "((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_3)" (parenthesized_expression "((int)uVar1 == 0)" ( (binary_expression "(int)uVar1 == 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) && (parenthesized_expression "(uVar1 = uVar1 & 0xffffffff, local_38 != param_3)" ( (comma_expression "uVar1 = uVar1 & 0xffffffff, local_38 != param_3" (assignment_expression "uVar1 = uVar1 & 0xffffffff" identifier = (binary_expression "uVar1 & 0xffffffff" identifier & number_literal)) , (binary_expression "local_38 != param_3" identifier != identifier)) ))) )) (compound_statement "{\n    uVar1 = 2;\n  }" { (expression_statement "uVar1 = 2;" (assignment_expression "uVar1 = 2" identifier = number_literal) ;) })) (return_statement "return uVar1;" return identifier ;) })))
(translation_unit "ulong FUN_002f5d50(long param_1,undefined8 param_2,long param_3,long param_4,long *param_5,\n                  undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  ulong uVar1;\n  long local_38;\n  long local_30;\n  undefined8 local_28;\n  undefined8 local_20;\n  \n  local_20 = param_7;\n  local_38 = param_3;\n  local_30 = param_4;\n  local_28 = param_6;\n  uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20));\n  *param_5 = local_38;\n  *param_8 = local_28;\n  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {\n    uVar1 = 2;\n  }\n  return uVar1;\n}\n\n" (function_definition "ulong FUN_002f5d50(long param_1,undefined8 param_2,long param_3,long param_4,long *param_5,\n                  undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  ulong uVar1;\n  long local_38;\n  long local_30;\n  undefined8 local_28;\n  undefined8 local_20;\n  \n  local_20 = param_7;\n  local_38 = param_3;\n  local_30 = param_4;\n  local_28 = param_6;\n  uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20));\n  *param_5 = local_38;\n  *param_8 = local_28;\n  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {\n    uVar1 = 2;\n  }\n  return uVar1;\n}" type_identifier (function_declarator "FUN_002f5d50(long param_1,undefined8 param_2,long param_3,long param_4,long *param_5,\n                  undefined8 param_6,undefined8 param_7,undefined8 *param_8)" identifier (parameter_list "(long param_1,undefined8 param_2,long param_3,long param_4,long *param_5,\n                  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 "long param_3" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long param_4" (sized_type_specifier "long" long) identifier) , (parameter_declaration "long *param_5" (sized_type_specifier "long" long) (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  ulong uVar1;\n  long local_38;\n  long local_30;\n  undefined8 local_28;\n  undefined8 local_20;\n  \n  local_20 = param_7;\n  local_38 = param_3;\n  local_30 = param_4;\n  local_28 = param_6;\n  uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20));\n  *param_5 = local_38;\n  *param_8 = local_28;\n  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {\n    uVar1 = 2;\n  }\n  return uVar1;\n}" { (declaration "ulong uVar1;" type_identifier identifier ;) (declaration "long local_38;" (sized_type_specifier "long" long) identifier ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 local_28;" type_identifier identifier ;) (declaration "undefined8 local_20;" type_identifier identifier ;) (expression_statement "local_20 = param_7;" (assignment_expression "local_20 = param_7" identifier = identifier) ;) (expression_statement "local_38 = param_3;" (assignment_expression "local_38 = param_3" identifier = identifier) ;) (expression_statement "local_30 = param_4;" (assignment_expression "local_30 = param_4" identifier = identifier) ;) (expression_statement "local_28 = param_6;" (assignment_expression "local_28 = param_6" identifier = identifier) ;) (expression_statement "uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20));" (assignment_expression "uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20))" identifier = (call_expression "FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20))" identifier (argument_list "(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20))" ( (pointer_expression "&local_38" & identifier) , (pointer_expression "&local_28" & identifier) , (pointer_expression "*(undefined8 *)(param_1 + 0x18)" * (cast_expression "(undefined8 *)(param_1 + 0x18)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) , (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) )))) ;) (expression_statement "*param_5 = local_38;" (assignment_expression "*param_5 = local_38" (pointer_expression "*param_5" * identifier) = identifier) ;) (expression_statement "*param_8 = local_28;" (assignment_expression "*param_8 = local_28" (pointer_expression "*param_8" * identifier) = identifier) ;) (if_statement "if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {\n    uVar1 = 2;\n  }" if (parenthesized_expression "(((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4))" ( (binary_expression "((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)" (parenthesized_expression "((int)uVar1 == 0)" ( (binary_expression "(int)uVar1 == 0" (cast_expression "(int)uVar1" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) && (parenthesized_expression "(uVar1 = uVar1 & 0xffffffff, local_38 != param_4)" ( (comma_expression "uVar1 = uVar1 & 0xffffffff, local_38 != param_4" (assignment_expression "uVar1 = uVar1 & 0xffffffff" identifier = (binary_expression "uVar1 & 0xffffffff" identifier & number_literal)) , (binary_expression "local_38 != param_4" identifier != identifier)) ))) )) (compound_statement "{\n    uVar1 = 2;\n  }" { (expression_statement "uVar1 = 2;" (assignment_expression "uVar1 = 2" identifier = number_literal) ;) })) (return_statement "return uVar1;" 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 (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration (sized_type_specifier long) (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) 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) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , (pointer_expression & IDENT) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) == LIT) )) && (parenthesized_expression ( (comma_expression (assignment_expression IDENT = (binary_expression IDENT & LIT)) , (binary_expression IDENT != IDENT)) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "ulong FUN_002f5d50(long param_1,undefined8 param_2,long param_3,long param_4,long *param_5,\n                  undefined8 param_6,undefined8 param_7,undefined8 *param_8)\n\n{\n  ulong uVar1;\n  long local_38;\n  long local_30;\n  undefined8 local_28;\n  undefined8 local_20;\n  \n  local_20 = param_7;\n  local_38 = param_3;\n  local_30 = param_4;\n  local_28 = param_6;\n  uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20));\n  *param_5 = local_38;\n  *param_8 = local_28;\n  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {\n    uVar1 = 2;\n  }\n  return uVar1;\n}" (type_identifier "ulong") (function_declarator "FUN_002f5d50(long param_1,undefined8 param_2,long param_3,long param_4,long *param_5,\n                  undefined8 param_6,undefined8 param_7,undefined8 *param_8)" (identifier "FUN_002f5d50") (parameter_list "(long param_1,undefined8 param_2,long param_3,long param_4,long *param_5,\n                  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 "long param_3" (sized_type_specifier "long" (long "long")) (identifier "param_3")) (, ",") (parameter_declaration "long param_4" (sized_type_specifier "long" (long "long")) (identifier "param_4")) (, ",") (parameter_declaration "long *param_5" (sized_type_specifier "long" (long "long")) (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  ulong uVar1;\n  long local_38;\n  long local_30;\n  undefined8 local_28;\n  undefined8 local_20;\n  \n  local_20 = param_7;\n  local_38 = param_3;\n  local_30 = param_4;\n  local_28 = param_6;\n  uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20));\n  *param_5 = local_38;\n  *param_8 = local_28;\n  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {\n    uVar1 = 2;\n  }\n  return uVar1;\n}" ({ "{") (declaration "ulong uVar1;" (type_identifier "ulong") (identifier "uVar1") (; ";")) (declaration "long local_38;" (sized_type_specifier "long" (long "long")) (identifier "local_38") (; ";")) (declaration "long local_30;" (sized_type_specifier "long" (long "long")) (identifier "local_30") (; ";")) (declaration "undefined8 local_28;" (type_identifier "undefined8") (identifier "local_28") (; ";")) (declaration "undefined8 local_20;" (type_identifier "undefined8") (identifier "local_20") (; ";")) (expression_statement "local_20 = param_7;" (assignment_expression "local_20 = param_7" (identifier "local_20") (= "=") (identifier "param_7")) (; ";")) (expression_statement "local_38 = param_3;" (assignment_expression "local_38 = param_3" (identifier "local_38") (= "=") (identifier "param_3")) (; ";")) (expression_statement "local_30 = param_4;" (assignment_expression "local_30 = param_4" (identifier "local_30") (= "=") (identifier "param_4")) (; ";")) (expression_statement "local_28 = param_6;" (assignment_expression "local_28 = param_6" (identifier "local_28") (= "=") (identifier "param_6")) (; ";")) (expression_statement "uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20));" (assignment_expression "uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20))" (identifier "uVar1") (= "=") (call_expression "FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20))" (identifier "FUN_002f5c40") (argument_list "(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),\n                       *(undefined4 *)(param_1 + 0x20))" (( "(") (pointer_expression "&local_38" (& "&") (identifier "local_38")) (, ",") (pointer_expression "&local_28" (& "&") (identifier "local_28")) (, ",") (pointer_expression "*(undefined8 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (, ",") (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) () ")")))) (; ";")) (expression_statement "*param_5 = local_38;" (assignment_expression "*param_5 = local_38" (pointer_expression "*param_5" (* "*") (identifier "param_5")) (= "=") (identifier "local_38")) (; ";")) (expression_statement "*param_8 = local_28;" (assignment_expression "*param_8 = local_28" (pointer_expression "*param_8" (* "*") (identifier "param_8")) (= "=") (identifier "local_28")) (; ";")) (if_statement "if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {\n    uVar1 = 2;\n  }" (if "if") (parenthesized_expression "(((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4))" (( "(") (binary_expression "((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)" (parenthesized_expression "((int)uVar1 == 0)" (( "(") (binary_expression "(int)uVar1 == 0" (cast_expression "(int)uVar1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar1")) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "(uVar1 = uVar1 & 0xffffffff, local_38 != param_4)" (( "(") (comma_expression "uVar1 = uVar1 & 0xffffffff, local_38 != param_4" (assignment_expression "uVar1 = uVar1 & 0xffffffff" (identifier "uVar1") (= "=") (binary_expression "uVar1 & 0xffffffff" (identifier "uVar1") (& "&") (number_literal "0xffffffff"))) (, ",") (binary_expression "local_38 != param_4" (identifier "local_38") (!= "!=") (identifier "param_4"))) () ")"))) () ")")) (compound_statement "{\n    uVar1 = 2;\n  }" ({ "{") (expression_statement "uVar1 = 2;" (assignment_expression "uVar1 = 2" (identifier "uVar1") (= "=") (number_literal "2")) (; ";")) (} "}"))) (return_statement "return uVar1;" (return "return") (identifier "uVar1") (; ";")) (} "}")))

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

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

{
  type_1 var_3;
  char *var_4;
  char *local_30;
  type_4 *local_28;
  type_4 *local_20;
  
  local_20 = param_6;
  var_4 = param_2;
  local_30 = var_5;
  local_28 = param_5;
  var_3 = (anonymous_namespace)::var_1
                    (&var_4,&local_28,*(type_5 *)(var_2 + 0x18),*(type_6 *)(var_2 + 0x20));
  *param_4 = var_4;
  *param_7 = local_28;
  if (((int)var_3 == 0) && (var_3 = var_3 & 0xffffffff, var_4 != var_5)) {
    var_3 = 2;
  }
  return var_3;
}


(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: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) declarator: (identifier)) (parameter_declaration type: (sized_type_specifier) 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: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (sized_type_specifier) 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))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (pointer_expression argument: (identifier)) (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))))) (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: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) right: (parenthesized_expression (comma_expression left: (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))) right: (binary_expression left: (identifier) right: (identifier)))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (return_statement (identifier)))))

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

{
  ulong uVar1;
  long local_38;
  long local_30;
  undefined8 local_28;
  undefined8 local_20;
  
  local_20 = param_7;
  local_38 = param_3;
  local_30 = param_4;
  local_28 = param_6;
  uVar1 = FUN_002f5c40(&local_38,&local_28,*(undefined8 *)(param_1 + 0x18),
                       *(undefined4 *)(param_1 + 0x20));
  *param_5 = local_38;
  *param_8 = local_28;
  if (((int)uVar1 == 0) && (uVar1 = uVar1 & 0xffffffff, local_38 != param_4)) {
    uVar1 = 2;
  }
  return uVar1;
}

