
/* std::wistream::TEMPNAMEPLACEHOLDERVALUE(std::wstreambuf*) */

wistream * __thiscall std::wistream::operator>>(wistream *this,wstreambuf *param_1)

{
  int iVar1;
  _Ios_Iostate _Var2;
  wios *this_00;
  char local_20 [4];
  sentry local_1c [16];
  
  sentry::sentry(local_1c,this,false);
  if (local_1c[0] == (sentry)0x0) {
    if (param_1 != (wstreambuf *)0x0) {
      return this;
    }
    _Var2 = _S_failbit;
    this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));
  }
  else {
    this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));
    if (param_1 == (wstreambuf *)0x0) {
      _Var2 = _S_failbit;
    }
    else {
                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */
      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)
                        (*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20);
      if (iVar1 == 0) {
        _Var2 = _S_failbit;
        if (local_20[0] != '\0') {
          _Var2 = _S_failbit|_S_eofbit;
        }
        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));
      }
      else {
        if (local_20[0] == '\0') {
          return this;
        }
        _Var2 = _S_eofbit;
        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));
      }
    }
  }
  wios::clear(this_00,_Var2 | *(_Ios_Iostate *)(this_00 + 0x14));
  return this;
}



wistream * FUN_00361ac8(wistream *param_1,int param_2)

{
  int iVar1;
  uint uVar2;
  wios *pwVar3;
  char local_20 [4];
  sentry local_1c [16];
  
  std::wistream::sentry::sentry(local_1c,param_1,false);
  if (local_1c[0] == (sentry)0x0) {
    if (param_2 != 0) {
      return param_1;
    }
    uVar2 = 4;
    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));
  }
  else {
    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));
    if (param_2 == 0) {
      uVar2 = 4;
    }
    else {
                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */
      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)
                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);
      if (iVar1 == 0) {
        uVar2 = 4;
        if (local_20[0] != '\0') {
          uVar2 = 6;
        }
        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));
      }
      else {
        if (local_20[0] == '\0') {
          return param_1;
        }
        uVar2 = 2;
        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));
      }
    }
  }
  std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));
  return param_1;
}


lui gp,0x16
addiu gp,gp,0x7778
addu gp,gp,t9
addiu sp,sp,-0x38
lw t9,-0x40c4(gp)
or a2,zero,zero
sw s0,0x2c(sp)
or s0,a0,zero
addiu a0,sp,0x1c
sw gp,0x10(sp)
sw s1,0x30(sp)
or s1,a1,zero
sw ra,0x34(sp)
bal 0x00361358
_or a1,s0,zero
lbu v0,0x1c(sp)
beq v0,zero,0x00361b5c
_lw gp,0x10(sp)
lw v0,0x0(s0)
lw a0,-0xc(v0)
beq s1,zero,0x00361b78
_addu a0,s0,a0
lw a0,0x7c(a0)
addiu a2,sp,0x18
lw t9,-0x3f38(gp)
jalr t9
_or a1,s1,zero
lw gp,0x10(sp)
beq v0,zero,0x00361ba4
_lbu a1,0x18(sp)
beq a1,zero,0x00361b64
_lw ra,0x34(sp)
lw v1,0x0(s0)
li v0,0x2
lw a0,-0xc(v1)
b 0x00361b7c
_addu a0,s0,a0
beq s1,zero,0x00361bc0
_lw ra,0x34(sp)
or v0,s0,zero
lw s1,0x30(sp)
lw s0,0x2c(sp)
jr ra
_addiu sp,sp,0x38
li v0,0x4
lw a1,0x14(a0)
lw t9,-0x40c0(gp)
bal 0x003667f4
_or a1,v0,a1
or v0,s0,zero
lw ra,0x34(sp)
lw s1,0x30(sp)
lw s0,0x2c(sp)
jr ra
_addiu sp,sp,0x38
lw v1,0x0(s0)
li a0,0x6
li v0,0x4
movn v0,a0,a1
lw a0,-0xc(v1)
b 0x00361b7c
_addu a0,s0,a0
lw v1,0x0(s0)
li v0,0x4
lw a0,-0xc(v1)
b 0x00361b7c
_addu a0,s0,a0
(translation_unit "wistream * FUN_00361ac8(wistream *param_1,int param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  wios *pwVar3;\n  char local_20 [4];\n  sentry local_1c [16];\n  \n  std::wistream::sentry::sentry(local_1c,param_1,false);\n  if (local_1c[0] == (sentry)0x0) {\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }\n  else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }\n  std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));\n  return param_1;\n}\n\n" (function_definition "wistream * FUN_00361ac8(wistream *param_1,int param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  wios *pwVar3;\n  char local_20 [4];\n  sentry local_1c [16];\n  \n  std::wistream::sentry::sentry(local_1c,param_1,false);\n  if (local_1c[0] == (sentry)0x0) {\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }\n  else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }\n  std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));\n  return param_1;\n}" type_identifier (pointer_declarator "* FUN_00361ac8(wistream *param_1,int param_2)" * (function_declarator "FUN_00361ac8(wistream *param_1,int param_2)" identifier (parameter_list "(wistream *param_1,int param_2)" ( (parameter_declaration "wistream *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) )))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  wios *pwVar3;\n  char local_20 [4];\n  sentry local_1c [16];\n  \n  std::wistream::sentry::sentry(local_1c,param_1,false);\n  if (local_1c[0] == (sentry)0x0) {\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }\n  else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }\n  std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));\n  return param_1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "wios *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "char local_20 [4];" primitive_type (array_declarator "local_20 [4]" identifier [ number_literal ]) ;) (declaration "sentry local_1c [16];" type_identifier (array_declarator "local_1c [16]" identifier [ number_literal ]) ;) (labeled_statement "std::wistream::sentry::sentry(local_1c,param_1,false);" statement_identifier : (ERROR ":" :) (labeled_statement "wistream::sentry::sentry(local_1c,param_1,false);" statement_identifier : (ERROR ":" :) (labeled_statement "sentry::sentry(local_1c,param_1,false);" statement_identifier : (ERROR ":" :) (expression_statement "sentry(local_1c,param_1,false);" (call_expression "sentry(local_1c,param_1,false)" identifier (argument_list "(local_1c,param_1,false)" ( identifier , identifier , false ))) ;)))) (if_statement "if (local_1c[0] == (sentry)0x0) {\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }\n  else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }" if (parenthesized_expression "(local_1c[0] == (sentry)0x0)" ( (binary_expression "local_1c[0] == (sentry)0x0" (subscript_expression "local_1c[0]" identifier [ number_literal ]) == (cast_expression "(sentry)0x0" ( (type_descriptor "sentry" type_identifier) ) number_literal)) )) (compound_statement "{\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }" { (if_statement "if (param_2 != 0) {\n      return param_1;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      return param_1;\n    }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "uVar2 = 4;" (assignment_expression "uVar2 = 4" identifier = number_literal) ;) (expression_statement "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));" (assignment_expression "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" identifier = (cast_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (type_descriptor "wios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" * (cast_expression "(int *)(*(int *)param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) }) (else_clause "else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }" else (compound_statement "{\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }" { (expression_statement "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));" (assignment_expression "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" identifier = (cast_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (type_descriptor "wios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" * (cast_expression "(int *)(*(int *)param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) (if_statement "if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 4;\n    }" { (expression_statement "uVar2 = 4;" (assignment_expression "uVar2 = 4" identifier = number_literal) ;) }) (else_clause "else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }" else (compound_statement "{\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }" { comment (expression_statement "iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);" (assignment_expression "iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20)" identifier = (call_expression "(*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20)" (parenthesized_expression "(*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)" ( (comma_expression "*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308" (binary_expression "*(code *)PTR___copy_streambufs_eof<wchar_t" (pointer_expression "*(code *)PTR___copy_streambufs_eof" * (cast_expression "(code *)PTR___copy_streambufs_eof" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) < identifier) , (binary_expression "std_char_traits<wchar_t>>_004c5308" identifier < (binary_expression "wchar_t>>_004c5308" identifier >> identifier))) )) (argument_list "(*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20)" ( (pointer_expression "*(undefined4 *)((wistream *)pwVar3 + 0x7c)" * (cast_expression "(undefined4 *)((wistream *)pwVar3 + 0x7c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((wistream *)pwVar3 + 0x7c)" ( (binary_expression "(wistream *)pwVar3 + 0x7c" (cast_expression "(wistream *)pwVar3" ( (type_descriptor "wistream *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }" { (expression_statement "uVar2 = 4;" (assignment_expression "uVar2 = 4" identifier = number_literal) ;) (if_statement "if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }" if (parenthesized_expression "(local_20[0] != '\0')" ( (binary_expression "local_20[0] != '\0'" (subscript_expression "local_20[0]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          uVar2 = 6;\n        }" { (expression_statement "uVar2 = 6;" (assignment_expression "uVar2 = 6" identifier = number_literal) ;) })) (expression_statement "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));" (assignment_expression "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" identifier = (cast_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (type_descriptor "wios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" * (cast_expression "(int *)(*(int *)param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) }) (else_clause "else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }" else (compound_statement "{\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }" { (if_statement "if (local_20[0] == '\0') {\n          return param_1;\n        }" if (parenthesized_expression "(local_20[0] == '\0')" ( (binary_expression "local_20[0] == '\0'" (subscript_expression "local_20[0]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          return param_1;\n        }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" identifier = number_literal) ;) (expression_statement "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));" (assignment_expression "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" identifier = (cast_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (type_descriptor "wios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" * (cast_expression "(int *)(*(int *)param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) }))) }))) }))) (labeled_statement "std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));" statement_identifier : (ERROR ":" :) (labeled_statement "wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));" statement_identifier : (ERROR ":" :) (expression_statement "clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));" (call_expression "clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14))" identifier (argument_list "(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14))" ( identifier , (binary_expression "uVar2 | *(uint *)(pwVar3 + 0x14)" identifier | (pointer_expression "*(uint *)(pwVar3 + 0x14)" * (cast_expression "(uint *)(pwVar3 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar3 + 0x14)" ( (binary_expression "pwVar3 + 0x14" identifier + number_literal) ))))) ))) ;))) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* std::wistream::TEMPNAMEPLACEHOLDERVALUE(std::wstreambuf*) */\n\nwistream * __thiscall std::wistream::operator>>(wistream *this,wstreambuf *param_1)\n\n{\n  int iVar1;\n  _Ios_Iostate _Var2;\n  wios *this_00;\n  char local_20 [4];\n  sentry local_1c [16];\n  \n  sentry::sentry(local_1c,this,false);\n  if (local_1c[0] == (sentry)0x0) {\n    if (param_1 != (wstreambuf *)0x0) {\n      return this;\n    }\n    _Var2 = _S_failbit;\n    this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n  }\n  else {\n    this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n    if (param_1 == (wstreambuf *)0x0) {\n      _Var2 = _S_failbit;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20);\n      if (iVar1 == 0) {\n        _Var2 = _S_failbit;\n        if (local_20[0] != '\0') {\n          _Var2 = _S_failbit|_S_eofbit;\n        }\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return this;\n        }\n        _Var2 = _S_eofbit;\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n    }\n  }\n  wios::clear(this_00,_Var2 | *(_Ios_Iostate *)(this_00 + 0x14));\n  return this;\n}\n\n" comment (ERROR "wistream * __thiscall std::wistream::operator>>(wistream *this,wstreambuf *param_1)" (binary_expression "wistream * __thiscall std::wistream::operator>>(wistream *this,wstreambuf *param_1)" (binary_expression "wistream * __thiscall" identifier * identifier) (ERROR "std::wistream::operator" identifier : : identifier : : identifier) >> (parenthesized_expression "(wistream *this,wstreambuf *param_1)" ( (comma_expression "wistream *this,wstreambuf *param_1" (binary_expression "wistream *this" identifier * identifier) , (binary_expression "wstreambuf *param_1" identifier * identifier)) )))) (compound_statement "{\n  int iVar1;\n  _Ios_Iostate _Var2;\n  wios *this_00;\n  char local_20 [4];\n  sentry local_1c [16];\n  \n  sentry::sentry(local_1c,this,false);\n  if (local_1c[0] == (sentry)0x0) {\n    if (param_1 != (wstreambuf *)0x0) {\n      return this;\n    }\n    _Var2 = _S_failbit;\n    this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n  }\n  else {\n    this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n    if (param_1 == (wstreambuf *)0x0) {\n      _Var2 = _S_failbit;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20);\n      if (iVar1 == 0) {\n        _Var2 = _S_failbit;\n        if (local_20[0] != '\0') {\n          _Var2 = _S_failbit|_S_eofbit;\n        }\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return this;\n        }\n        _Var2 = _S_eofbit;\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n    }\n  }\n  wios::clear(this_00,_Var2 | *(_Ios_Iostate *)(this_00 + 0x14));\n  return this;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "_Ios_Iostate _Var2;" type_identifier identifier ;) (declaration "wios *this_00;" type_identifier (pointer_declarator "*this_00" * identifier) ;) (declaration "char local_20 [4];" primitive_type (array_declarator "local_20 [4]" identifier [ number_literal ]) ;) (declaration "sentry local_1c [16];" type_identifier (array_declarator "local_1c [16]" identifier [ number_literal ]) ;) (labeled_statement "sentry::sentry(local_1c,this,false);" statement_identifier : (ERROR ":" :) (expression_statement "sentry(local_1c,this,false);" (call_expression "sentry(local_1c,this,false)" identifier (argument_list "(local_1c,this,false)" ( identifier , identifier , false ))) ;)) (if_statement "if (local_1c[0] == (sentry)0x0) {\n    if (param_1 != (wstreambuf *)0x0) {\n      return this;\n    }\n    _Var2 = _S_failbit;\n    this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n  }\n  else {\n    this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n    if (param_1 == (wstreambuf *)0x0) {\n      _Var2 = _S_failbit;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20);\n      if (iVar1 == 0) {\n        _Var2 = _S_failbit;\n        if (local_20[0] != '\0') {\n          _Var2 = _S_failbit|_S_eofbit;\n        }\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return this;\n        }\n        _Var2 = _S_eofbit;\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n    }\n  }" if (parenthesized_expression "(local_1c[0] == (sentry)0x0)" ( (binary_expression "local_1c[0] == (sentry)0x0" (subscript_expression "local_1c[0]" identifier [ number_literal ]) == (cast_expression "(sentry)0x0" ( (type_descriptor "sentry" type_identifier) ) number_literal)) )) (compound_statement "{\n    if (param_1 != (wstreambuf *)0x0) {\n      return this;\n    }\n    _Var2 = _S_failbit;\n    this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n  }" { (if_statement "if (param_1 != (wstreambuf *)0x0) {\n      return this;\n    }" if (parenthesized_expression "(param_1 != (wstreambuf *)0x0)" ( (binary_expression "param_1 != (wstreambuf *)0x0" identifier != (cast_expression "(wstreambuf *)0x0" ( (type_descriptor "wstreambuf *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      return this;\n    }" { (return_statement "return this;" return identifier ;) })) (expression_statement "_Var2 = _S_failbit;" (assignment_expression "_Var2 = _S_failbit" identifier = identifier) ;) (expression_statement "this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));" (assignment_expression "this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc))" identifier = (cast_expression "(wios *)(this + *(int *)(*(int *)this + -0xc))" ( (type_descriptor "wios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + *(int *)(*(int *)this + -0xc))" ( (binary_expression "this + *(int *)(*(int *)this + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)this + -0xc)" * (cast_expression "(int *)(*(int *)this + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) }) (else_clause "else {\n    this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n    if (param_1 == (wstreambuf *)0x0) {\n      _Var2 = _S_failbit;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20);\n      if (iVar1 == 0) {\n        _Var2 = _S_failbit;\n        if (local_20[0] != '\0') {\n          _Var2 = _S_failbit|_S_eofbit;\n        }\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return this;\n        }\n        _Var2 = _S_eofbit;\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n    }\n  }" else (compound_statement "{\n    this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n    if (param_1 == (wstreambuf *)0x0) {\n      _Var2 = _S_failbit;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20);\n      if (iVar1 == 0) {\n        _Var2 = _S_failbit;\n        if (local_20[0] != '\0') {\n          _Var2 = _S_failbit|_S_eofbit;\n        }\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return this;\n        }\n        _Var2 = _S_eofbit;\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n    }\n  }" { (expression_statement "this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));" (assignment_expression "this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc))" identifier = (cast_expression "(wios *)(this + *(int *)(*(int *)this + -0xc))" ( (type_descriptor "wios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + *(int *)(*(int *)this + -0xc))" ( (binary_expression "this + *(int *)(*(int *)this + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)this + -0xc)" * (cast_expression "(int *)(*(int *)this + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) (if_statement "if (param_1 == (wstreambuf *)0x0) {\n      _Var2 = _S_failbit;\n    }\n    else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20);\n      if (iVar1 == 0) {\n        _Var2 = _S_failbit;\n        if (local_20[0] != '\0') {\n          _Var2 = _S_failbit|_S_eofbit;\n        }\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return this;\n        }\n        _Var2 = _S_eofbit;\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n    }" if (parenthesized_expression "(param_1 == (wstreambuf *)0x0)" ( (binary_expression "param_1 == (wstreambuf *)0x0" identifier == (cast_expression "(wstreambuf *)0x0" ( (type_descriptor "wstreambuf *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      _Var2 = _S_failbit;\n    }" { (expression_statement "_Var2 = _S_failbit;" (assignment_expression "_Var2 = _S_failbit" identifier = identifier) ;) }) (else_clause "else {\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20);\n      if (iVar1 == 0) {\n        _Var2 = _S_failbit;\n        if (local_20[0] != '\0') {\n          _Var2 = _S_failbit|_S_eofbit;\n        }\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return this;\n        }\n        _Var2 = _S_eofbit;\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n    }" else (compound_statement "{\n                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */\n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20);\n      if (iVar1 == 0) {\n        _Var2 = _S_failbit;\n        if (local_20[0] != '\0') {\n          _Var2 = _S_failbit|_S_eofbit;\n        }\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return this;\n        }\n        _Var2 = _S_eofbit;\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n    }" { comment (expression_statement "iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20);" (assignment_expression "iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20)" identifier = (call_expression "(*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20)" (parenthesized_expression "(*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)" ( (comma_expression "*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308" (binary_expression "*(code *)PTR___copy_streambufs_eof<wchar_t" (pointer_expression "*(code *)PTR___copy_streambufs_eof" * (cast_expression "(code *)PTR___copy_streambufs_eof" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) < identifier) , (binary_expression "std_char_traits<wchar_t>>_004c5308" identifier < (binary_expression "wchar_t>>_004c5308" identifier >> identifier))) )) (argument_list "(*(undefined4 *)((wistream *)this_00 + 0x7c),param_1,local_20)" ( (pointer_expression "*(undefined4 *)((wistream *)this_00 + 0x7c)" * (cast_expression "(undefined4 *)((wistream *)this_00 + 0x7c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((wistream *)this_00 + 0x7c)" ( (binary_expression "(wistream *)this_00 + 0x7c" (cast_expression "(wistream *)this_00" ( (type_descriptor "wistream *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n        _Var2 = _S_failbit;\n        if (local_20[0] != '\0') {\n          _Var2 = _S_failbit|_S_eofbit;\n        }\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return this;\n        }\n        _Var2 = _S_eofbit;\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        _Var2 = _S_failbit;\n        if (local_20[0] != '\0') {\n          _Var2 = _S_failbit|_S_eofbit;\n        }\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }" { (expression_statement "_Var2 = _S_failbit;" (assignment_expression "_Var2 = _S_failbit" identifier = identifier) ;) (if_statement "if (local_20[0] != '\0') {\n          _Var2 = _S_failbit|_S_eofbit;\n        }" if (parenthesized_expression "(local_20[0] != '\0')" ( (binary_expression "local_20[0] != '\0'" (subscript_expression "local_20[0]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          _Var2 = _S_failbit|_S_eofbit;\n        }" { (expression_statement "_Var2 = _S_failbit|_S_eofbit;" (assignment_expression "_Var2 = _S_failbit|_S_eofbit" identifier = (binary_expression "_S_failbit|_S_eofbit" identifier | identifier)) ;) })) (expression_statement "this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));" (assignment_expression "this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc))" identifier = (cast_expression "(wios *)(this + *(int *)(*(int *)this + -0xc))" ( (type_descriptor "wios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + *(int *)(*(int *)this + -0xc))" ( (binary_expression "this + *(int *)(*(int *)this + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)this + -0xc)" * (cast_expression "(int *)(*(int *)this + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) }) (else_clause "else {\n        if (local_20[0] == '\0') {\n          return this;\n        }\n        _Var2 = _S_eofbit;\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }" else (compound_statement "{\n        if (local_20[0] == '\0') {\n          return this;\n        }\n        _Var2 = _S_eofbit;\n        this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));\n      }" { (if_statement "if (local_20[0] == '\0') {\n          return this;\n        }" if (parenthesized_expression "(local_20[0] == '\0')" ( (binary_expression "local_20[0] == '\0'" (subscript_expression "local_20[0]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          return this;\n        }" { (return_statement "return this;" return identifier ;) })) (expression_statement "_Var2 = _S_eofbit;" (assignment_expression "_Var2 = _S_eofbit" identifier = identifier) ;) (expression_statement "this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc));" (assignment_expression "this_00 = (wios *)(this + *(int *)(*(int *)this + -0xc))" identifier = (cast_expression "(wios *)(this + *(int *)(*(int *)this + -0xc))" ( (type_descriptor "wios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + *(int *)(*(int *)this + -0xc))" ( (binary_expression "this + *(int *)(*(int *)this + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)this + -0xc)" * (cast_expression "(int *)(*(int *)this + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)this + -0xc)" ( (binary_expression "*(int *)this + -0xc" (pointer_expression "*(int *)this" * (cast_expression "(int *)this" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) }))) }))) }))) (labeled_statement "wios::clear(this_00,_Var2 | *(_Ios_Iostate *)(this_00 + 0x14));" statement_identifier : (ERROR ":" :) (expression_statement "clear(this_00,_Var2 | *(_Ios_Iostate *)(this_00 + 0x14));" (call_expression "clear(this_00,_Var2 | *(_Ios_Iostate *)(this_00 + 0x14))" identifier (argument_list "(this_00,_Var2 | *(_Ios_Iostate *)(this_00 + 0x14))" ( identifier , (binary_expression "_Var2 | *(_Ios_Iostate *)(this_00 + 0x14)" identifier | (pointer_expression "*(_Ios_Iostate *)(this_00 + 0x14)" * (cast_expression "(_Ios_Iostate *)(this_00 + 0x14)" ( (type_descriptor "_Ios_Iostate *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this_00 + 0x14)" ( (binary_expression "this_00 + 0x14" identifier + number_literal) ))))) ))) ;)) (return_statement "return this;" return identifier ;) }))
(translation_unit "wistream * FUN_00361ac8(wistream *param_1,int param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  wios *pwVar3;\n  char local_20 [4];\n  sentry local_1c [16];\n  \n  std::wistream::sentry::sentry(local_1c,param_1,false);\n  if (local_1c[0] == (sentry)0x0) {\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }\n  else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }\n  std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));\n  return param_1;\n}\n\n" (function_definition "wistream * FUN_00361ac8(wistream *param_1,int param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  wios *pwVar3;\n  char local_20 [4];\n  sentry local_1c [16];\n  \n  std::wistream::sentry::sentry(local_1c,param_1,false);\n  if (local_1c[0] == (sentry)0x0) {\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }\n  else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }\n  std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));\n  return param_1;\n}" type_identifier (pointer_declarator "* FUN_00361ac8(wistream *param_1,int param_2)" * (function_declarator "FUN_00361ac8(wistream *param_1,int param_2)" identifier (parameter_list "(wistream *param_1,int param_2)" ( (parameter_declaration "wistream *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "int param_2" primitive_type identifier) )))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  wios *pwVar3;\n  char local_20 [4];\n  sentry local_1c [16];\n  \n  std::wistream::sentry::sentry(local_1c,param_1,false);\n  if (local_1c[0] == (sentry)0x0) {\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }\n  else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }\n  std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));\n  return param_1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "wios *pwVar3;" type_identifier (pointer_declarator "*pwVar3" * identifier) ;) (declaration "char local_20 [4];" primitive_type (array_declarator "local_20 [4]" identifier [ number_literal ]) ;) (declaration "sentry local_1c [16];" type_identifier (array_declarator "local_1c [16]" identifier [ number_literal ]) ;) (labeled_statement "std::wistream::sentry::sentry(local_1c,param_1,false);" statement_identifier : (ERROR ":" :) (labeled_statement "wistream::sentry::sentry(local_1c,param_1,false);" statement_identifier : (ERROR ":" :) (labeled_statement "sentry::sentry(local_1c,param_1,false);" statement_identifier : (ERROR ":" :) (expression_statement "sentry(local_1c,param_1,false);" (call_expression "sentry(local_1c,param_1,false)" identifier (argument_list "(local_1c,param_1,false)" ( identifier , identifier , false ))) ;)))) (if_statement "if (local_1c[0] == (sentry)0x0) {\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }\n  else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }" if (parenthesized_expression "(local_1c[0] == (sentry)0x0)" ( (binary_expression "local_1c[0] == (sentry)0x0" (subscript_expression "local_1c[0]" identifier [ number_literal ]) == (cast_expression "(sentry)0x0" ( (type_descriptor "sentry" type_identifier) ) number_literal)) )) (compound_statement "{\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }" { (if_statement "if (param_2 != 0) {\n      return param_1;\n    }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n      return param_1;\n    }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "uVar2 = 4;" (assignment_expression "uVar2 = 4" identifier = number_literal) ;) (expression_statement "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));" (assignment_expression "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" identifier = (cast_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (type_descriptor "wios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" * (cast_expression "(int *)(*(int *)param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) }) (else_clause "else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }" else (compound_statement "{\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }" { (expression_statement "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));" (assignment_expression "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" identifier = (cast_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (type_descriptor "wios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" * (cast_expression "(int *)(*(int *)param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) (if_statement "if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 4;\n    }" { (expression_statement "uVar2 = 4;" (assignment_expression "uVar2 = 4" identifier = number_literal) ;) }) (else_clause "else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }" else (compound_statement "{\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }" { (expression_statement "iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);" (assignment_expression "iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20)" identifier = (call_expression "(*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20)" (parenthesized_expression "(*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)" ( (comma_expression "*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308" (binary_expression "*(code *)PTR___copy_streambufs_eof<wchar_t" (pointer_expression "*(code *)PTR___copy_streambufs_eof" * (cast_expression "(code *)PTR___copy_streambufs_eof" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) < identifier) , (binary_expression "std_char_traits<wchar_t>>_004c5308" identifier < (binary_expression "wchar_t>>_004c5308" identifier >> identifier))) )) (argument_list "(*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20)" ( (pointer_expression "*(undefined4 *)((wistream *)pwVar3 + 0x7c)" * (cast_expression "(undefined4 *)((wistream *)pwVar3 + 0x7c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((wistream *)pwVar3 + 0x7c)" ( (binary_expression "(wistream *)pwVar3 + 0x7c" (cast_expression "(wistream *)pwVar3" ( (type_descriptor "wistream *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) + number_literal) )))) , identifier , identifier )))) ;) (if_statement "if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }" { (expression_statement "uVar2 = 4;" (assignment_expression "uVar2 = 4" identifier = number_literal) ;) (if_statement "if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }" if (parenthesized_expression "(local_20[0] != '\0')" ( (binary_expression "local_20[0] != '\0'" (subscript_expression "local_20[0]" identifier [ number_literal ]) != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          uVar2 = 6;\n        }" { (expression_statement "uVar2 = 6;" (assignment_expression "uVar2 = 6" identifier = number_literal) ;) })) (expression_statement "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));" (assignment_expression "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" identifier = (cast_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (type_descriptor "wios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" * (cast_expression "(int *)(*(int *)param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) }) (else_clause "else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }" else (compound_statement "{\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }" { (if_statement "if (local_20[0] == '\0') {\n          return param_1;\n        }" if (parenthesized_expression "(local_20[0] == '\0')" ( (binary_expression "local_20[0] == '\0'" (subscript_expression "local_20[0]" identifier [ number_literal ]) == (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n          return param_1;\n        }" { (return_statement "return param_1;" return identifier ;) })) (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" identifier = number_literal) ;) (expression_statement "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));" (assignment_expression "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" identifier = (cast_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (type_descriptor "wios *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc))" ( (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc)" identifier + (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" * (cast_expression "(int *)(*(int *)param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*(int *)param_1 + -0xc)" ( (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" * (cast_expression "(int *)param_1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier)) + number_literal) ))))) )))) ;) }))) }))) }))) (labeled_statement "std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));" statement_identifier : (ERROR ":" :) (labeled_statement "wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));" statement_identifier : (ERROR ":" :) (expression_statement "clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));" (call_expression "clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14))" identifier (argument_list "(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14))" ( identifier , (binary_expression "uVar2 | *(uint *)(pwVar3 + 0x14)" identifier | (pointer_expression "*(uint *)(pwVar3 + 0x14)" * (cast_expression "(uint *)(pwVar3 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar3 + 0x14)" ( (binary_expression "pwVar3 + 0x14" identifier + number_literal) ))))) ))) ;))) (return_statement "return param_1;" return identifier ;) })))
(translation_unit (function_definition TYPE (pointer_declarator * (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) )))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (labeled_statement statement_identifier : (ERROR :) (labeled_statement statement_identifier : (ERROR :) (labeled_statement statement_identifier : (ERROR :) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , BOOL ))) ;)))) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (cast_expression ( (type_descriptor TYPE) ) LIT)) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) + LIT) ))))) )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) + LIT) ))))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (comma_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) < IDENT) , (binary_expression IDENT < (binary_expression IDENT >> IDENT))) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) + LIT) )))) , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) + LIT) ))))) )))) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) == (char_literal ' escape_sequence ')) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) + LIT) ))))) )))) ;) }))) }))) }))) (labeled_statement statement_identifier : (ERROR :) (labeled_statement statement_identifier : (ERROR :) (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT | (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) ;))) (return_statement return IDENT ;) })))
(function_definition "wistream * FUN_00361ac8(wistream *param_1,int param_2)\n\n{\n  int iVar1;\n  uint uVar2;\n  wios *pwVar3;\n  char local_20 [4];\n  sentry local_1c [16];\n  \n  std::wistream::sentry::sentry(local_1c,param_1,false);\n  if (local_1c[0] == (sentry)0x0) {\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }\n  else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }\n  std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));\n  return param_1;\n}" (type_identifier "wistream") (pointer_declarator "* FUN_00361ac8(wistream *param_1,int param_2)" (* "*") (function_declarator "FUN_00361ac8(wistream *param_1,int param_2)" (identifier "FUN_00361ac8") (parameter_list "(wistream *param_1,int param_2)" (( "(") (parameter_declaration "wistream *param_1" (type_identifier "wistream") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) () ")")))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  wios *pwVar3;\n  char local_20 [4];\n  sentry local_1c [16];\n  \n  std::wistream::sentry::sentry(local_1c,param_1,false);\n  if (local_1c[0] == (sentry)0x0) {\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }\n  else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }\n  std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));\n  return param_1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "wios *pwVar3;" (type_identifier "wios") (pointer_declarator "*pwVar3" (* "*") (identifier "pwVar3")) (; ";")) (declaration "char local_20 [4];" (primitive_type "char") (array_declarator "local_20 [4]" (identifier "local_20") ([ "[") (number_literal "4") (] "]")) (; ";")) (declaration "sentry local_1c [16];" (type_identifier "sentry") (array_declarator "local_1c [16]" (identifier "local_1c") ([ "[") (number_literal "16") (] "]")) (; ";")) (labeled_statement "std::wistream::sentry::sentry(local_1c,param_1,false);" (statement_identifier "std") (: ":") (ERROR ":" (: ":")) (labeled_statement "wistream::sentry::sentry(local_1c,param_1,false);" (statement_identifier "wistream") (: ":") (ERROR ":" (: ":")) (labeled_statement "sentry::sentry(local_1c,param_1,false);" (statement_identifier "sentry") (: ":") (ERROR ":" (: ":")) (expression_statement "sentry(local_1c,param_1,false);" (call_expression "sentry(local_1c,param_1,false)" (identifier "sentry") (argument_list "(local_1c,param_1,false)" (( "(") (identifier "local_1c") (, ",") (identifier "param_1") (, ",") (false "false") () ")"))) (; ";"))))) (if_statement "if (local_1c[0] == (sentry)0x0) {\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }\n  else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }" (if "if") (parenthesized_expression "(local_1c[0] == (sentry)0x0)" (( "(") (binary_expression "local_1c[0] == (sentry)0x0" (subscript_expression "local_1c[0]" (identifier "local_1c") ([ "[") (number_literal "0") (] "]")) (== "==") (cast_expression "(sentry)0x0" (( "(") (type_descriptor "sentry" (type_identifier "sentry")) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (param_2 != 0) {\n      return param_1;\n    }\n    uVar2 = 4;\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n  }" ({ "{") (if_statement "if (param_2 != 0) {\n      return param_1;\n    }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return param_1;\n    }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "uVar2 = 4;" (assignment_expression "uVar2 = 4" (identifier "uVar2") (= "=") (number_literal "4")) (; ";")) (expression_statement "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));" (assignment_expression "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" (identifier "pwVar3") (= "=") (cast_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" (( "(") (type_descriptor "wios *" (type_identifier "wios") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc))" (( "(") (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc)" (identifier "param_1") (+ "+") (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" (* "*") (cast_expression "(int *)(*(int *)param_1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)param_1 + -0xc)" (( "(") (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" (* "*") (cast_expression "(int *)param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1"))) (+ "+") (number_literal "-0xc")) () ")"))))) () ")")))) (; ";")) (} "}")) (else_clause "else {\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }" (else "else") (compound_statement "{\n    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n    if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }\n  }" ({ "{") (expression_statement "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));" (assignment_expression "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" (identifier "pwVar3") (= "=") (cast_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" (( "(") (type_descriptor "wios *" (type_identifier "wios") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc))" (( "(") (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc)" (identifier "param_1") (+ "+") (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" (* "*") (cast_expression "(int *)(*(int *)param_1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)param_1 + -0xc)" (( "(") (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" (* "*") (cast_expression "(int *)param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1"))) (+ "+") (number_literal "-0xc")) () ")"))))) () ")")))) (; ";")) (if_statement "if (param_2 == 0) {\n      uVar2 = 4;\n    }\n    else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n      uVar2 = 4;\n    }" ({ "{") (expression_statement "uVar2 = 4;" (assignment_expression "uVar2 = 4" (identifier "uVar2") (= "=") (number_literal "4")) (; ";")) (} "}")) (else_clause "else {\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }" (else "else") (compound_statement "{\n                    \n      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);\n      if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n    }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);" (assignment_expression "iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)\n                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20)" (parenthesized_expression "(*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)" (( "(") (comma_expression "*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308" (binary_expression "*(code *)PTR___copy_streambufs_eof<wchar_t" (pointer_expression "*(code *)PTR___copy_streambufs_eof" (* "*") (cast_expression "(code *)PTR___copy_streambufs_eof" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___copy_streambufs_eof"))) (< "<") (identifier "wchar_t")) (, ",") (binary_expression "std_char_traits<wchar_t>>_004c5308" (identifier "std_char_traits") (< "<") (binary_expression "wchar_t>>_004c5308" (identifier "wchar_t") (>> ">>") (identifier "_004c5308")))) () ")")) (argument_list "(*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20)" (( "(") (pointer_expression "*(undefined4 *)((wistream *)pwVar3 + 0x7c)" (* "*") (cast_expression "(undefined4 *)((wistream *)pwVar3 + 0x7c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((wistream *)pwVar3 + 0x7c)" (( "(") (binary_expression "(wistream *)pwVar3 + 0x7c" (cast_expression "(wistream *)pwVar3" (( "(") (type_descriptor "wistream *" (type_identifier "wistream") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "pwVar3")) (+ "+") (number_literal "0x7c")) () ")")))) (, ",") (identifier "param_2") (, ",") (identifier "local_20") () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }\n      else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar2 = 4;\n        if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }" ({ "{") (expression_statement "uVar2 = 4;" (assignment_expression "uVar2 = 4" (identifier "uVar2") (= "=") (number_literal "4")) (; ";")) (if_statement "if (local_20[0] != '\0') {\n          uVar2 = 6;\n        }" (if "if") (parenthesized_expression "(local_20[0] != '\0')" (( "(") (binary_expression "local_20[0] != '\0'" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n          uVar2 = 6;\n        }" ({ "{") (expression_statement "uVar2 = 6;" (assignment_expression "uVar2 = 6" (identifier "uVar2") (= "=") (number_literal "6")) (; ";")) (} "}"))) (expression_statement "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));" (assignment_expression "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" (identifier "pwVar3") (= "=") (cast_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" (( "(") (type_descriptor "wios *" (type_identifier "wios") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc))" (( "(") (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc)" (identifier "param_1") (+ "+") (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" (* "*") (cast_expression "(int *)(*(int *)param_1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)param_1 + -0xc)" (( "(") (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" (* "*") (cast_expression "(int *)param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1"))) (+ "+") (number_literal "-0xc")) () ")"))))) () ")")))) (; ";")) (} "}")) (else_clause "else {\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }" (else "else") (compound_statement "{\n        if (local_20[0] == '\0') {\n          return param_1;\n        }\n        uVar2 = 2;\n        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));\n      }" ({ "{") (if_statement "if (local_20[0] == '\0') {\n          return param_1;\n        }" (if "if") (parenthesized_expression "(local_20[0] == '\0')" (( "(") (binary_expression "local_20[0] == '\0'" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n          return param_1;\n        }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (expression_statement "uVar2 = 2;" (assignment_expression "uVar2 = 2" (identifier "uVar2") (= "=") (number_literal "2")) (; ";")) (expression_statement "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));" (assignment_expression "pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" (identifier "pwVar3") (= "=") (cast_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc))" (( "(") (type_descriptor "wios *" (type_identifier "wios") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc))" (( "(") (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc)" (identifier "param_1") (+ "+") (pointer_expression "*(int *)(*(int *)param_1 + -0xc)" (* "*") (cast_expression "(int *)(*(int *)param_1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*(int *)param_1 + -0xc)" (( "(") (binary_expression "*(int *)param_1 + -0xc" (pointer_expression "*(int *)param_1" (* "*") (cast_expression "(int *)param_1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "param_1"))) (+ "+") (number_literal "-0xc")) () ")"))))) () ")")))) (; ";")) (} "}")))) (} "}")))) (} "}")))) (labeled_statement "std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));" (statement_identifier "std") (: ":") (ERROR ":" (: ":")) (labeled_statement "wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));" (statement_identifier "wios") (: ":") (ERROR ":" (: ":")) (expression_statement "clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));" (call_expression "clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14))" (identifier "clear") (argument_list "(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14))" (( "(") (identifier "pwVar3") (, ",") (binary_expression "uVar2 | *(uint *)(pwVar3 + 0x14)" (identifier "uVar2") (| "|") (pointer_expression "*(uint *)(pwVar3 + 0x14)" (* "*") (cast_expression "(uint *)(pwVar3 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(pwVar3 + 0x14)" (( "(") (binary_expression "pwVar3 + 0x14" (identifier "pwVar3") (+ "+") (number_literal "0x14")) () ")"))))) () ")"))) (; ";")))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* std::wistream::TEMPNAMEPLACEHOLDERVALUE(std::wstreambuf*) */

type_7 * __thiscall std::type_7::operator>>(type_7 *var_2,type_4 *var_1)

{
  int var_6;
  type_1 var_10;
  type_2 *var_11;
  char local_20 [4];
  type_3 local_1c [16];
  
  sentry::type_3(local_1c,var_2,false);
  if (local_1c[0] == (type_3)0x0) {
    if (var_1 != (type_4 *)0x0) {
      return var_2;
    }
    var_10 = var_7;
    var_11 = (type_2 *)(var_2 + *(int *)(*(int *)var_2 + -0xc));
  }
  else {
    var_11 = (type_2 *)(var_2 + *(int *)(*(int *)var_2 + -0xc));
    if (var_1 == (type_4 *)0x0) {
      var_10 = var_7;
    }
    else {
                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */
      var_6 = (*(type_5 *)PTR___copy_streambufs_eof<var_3,var_4<var_3>>var_5)
                        (*(type_6 *)((type_7 *)var_11 + 0x7c),var_1,local_20);
      if (var_6 == 0) {
        var_10 = var_7;
        if (local_20[0] != '\0') {
          var_10 = var_7|var_8;
        }
        var_11 = (type_2 *)(var_2 + *(int *)(*(int *)var_2 + -0xc));
      }
      else {
        if (local_20[0] == '\0') {
          return var_2;
        }
        var_10 = var_8;
        var_11 = (type_2 *)(var_2 + *(int *)(*(int *)var_2 + -0xc));
      }
    }
  }
  wios::var_9(var_11,var_10 | *(type_1 *)(var_11 + 0x14));
  return var_2;
}


(translation_unit (function_definition type: (type_identifier) declarator: (pointer_declarator declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (primitive_type) declarator: (identifier))))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (labeled_statement label: (statement_identifier) (ERROR) (labeled_statement label: (statement_identifier) (ERROR) (labeled_statement label: (statement_identifier) (ERROR) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (false))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (number_literal)))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal))))))))))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal)))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (comma_expression left: (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (identifier)) right: (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)) right: (number_literal))))) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal))))))))))) alternative: (else_clause (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (char_literal (escape_sequence)))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier))) right: (number_literal))))))))))))))))))) (labeled_statement label: (statement_identifier) (ERROR) (labeled_statement label: (statement_identifier) (ERROR) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (binary_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))))))))))) (return_statement (identifier)))))

wistream * MASKED(wistream *param_1,int param_2)

{
  int iVar1;
  uint uVar2;
  wios *pwVar3;
  char local_20 [4];
  sentry local_1c [16];
  
  std::wistream::sentry::sentry(local_1c,param_1,false);
  if (local_1c[0] == (sentry)0x0) {
    if (param_2 != 0) {
      return param_1;
    }
    uVar2 = 4;
    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));
  }
  else {
    pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));
    if (param_2 == 0) {
      uVar2 = 4;
    }
    else {
                    /* try { // try from 00361b2c to 00361b33 has its CatchHandler @ 00361bd4 */
      iVar1 = (*(code *)PTR___copy_streambufs_eof<wchar_t,std_char_traits<wchar_t>>_004c5308)
                        (*(undefined4 *)((wistream *)pwVar3 + 0x7c),param_2,local_20);
      if (iVar1 == 0) {
        uVar2 = 4;
        if (local_20[0] != '\0') {
          uVar2 = 6;
        }
        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));
      }
      else {
        if (local_20[0] == '\0') {
          return param_1;
        }
        uVar2 = 2;
        pwVar3 = (wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc));
      }
    }
  }
  std::wios::clear(pwVar3,uVar2 | *(uint *)(pwVar3 + 0x14));
  return param_1;
}

