
/* std::wistream::get() */

int __thiscall std::wistream::get(wistream *this)

{
  int iVar1;
  int *piVar2;
  int *piVar3;
  _Ios_Iostate _Var4;
  sentry local_18 [16];
  
  *(undefined4 *)(this + 4) = 0;
  sentry::sentry(local_18,this,true);
  if (local_18[0] == (sentry)0x0) {
    if (*(int *)(this + 4) != 0) {
      return -1;
    }
    _Var4 = _S_failbit;
  }
  else {
    piVar3 = *(int **)(this + *(int *)(*(int *)this + -0xc) + 0x7c);
    piVar2 = (int *)piVar3[2];
    if (piVar2 < (int *)piVar3[3]) {
      iVar1 = *piVar2;
      piVar3[2] = (int)(piVar2 + 1);
    }
    else {
                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */
      iVar1 = (**(code **)(*piVar3 + 0x28))();
    }
    if (iVar1 != -1) {
      *(undefined4 *)(this + 4) = 1;
      return iVar1;
    }
    _Var4 = _S_failbit|_S_eofbit;
    if (*(int *)(this + 4) != 0) {
      _Var4 = _S_eofbit;
    }
  }
  wios::clear((wios *)(this + *(int *)(*(int *)this + -0xc)),
              _Var4 | *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14));
  return -1;
}



int FUN_002e6c18(wistream *param_1)

{
  int iVar1;
  int *piVar2;
  int *piVar3;
  uint uVar4;
  sentry local_18 [16];
  
  *(undefined4 *)(param_1 + 4) = 0;
  std::wistream::sentry::sentry(local_18,param_1,true);
  if (local_18[0] == (sentry)0x0) {
    if (*(int *)(param_1 + 4) != 0) {
      return -1;
    }
    uVar4 = 4;
  }
  else {
    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);
    piVar2 = (int *)piVar3[2];
    if (piVar2 < (int *)piVar3[3]) {
      iVar1 = *piVar2;
      piVar3[2] = (int)(piVar2 + 1);
    }
    else {
                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */
      iVar1 = (**(code **)(*piVar3 + 0x28))();
    }
    if (iVar1 != -1) {
      *(undefined4 *)(param_1 + 4) = 1;
      return iVar1;
    }
    uVar4 = 6;
    if (*(int *)(param_1 + 4) != 0) {
      uVar4 = 2;
    }
  }
  std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),
                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));
  return -1;
}


lui gp,0x15
addiu gp,gp,0x35b8
addu gp,gp,t9
addiu sp,sp,-0x30
lw t9,-0x4454(gp)
li a2,0x1
sw s0,0x28(sp)
or s0,a0,zero
sw gp,0x10(sp)
addiu a0,sp,0x18
sw ra,0x2c(sp)
or a1,s0,zero
bal 0x002e62b8
_sw zero,0x4(s0)
lbu v0,0x18(sp)
beq v0,zero,0x002e6d40
_lw gp,0x10(sp)
lw v0,0x0(s0)
lw v0,-0xc(v0)
addu v0,s0,v0
lw a0,0x7c(v0)
lw v1,0x8(a0)
lw v0,0xc(a0)
sltu v0,v1,v0
beq v0,zero,0x002e6d54
_addiu a1,v1,0x4
lw v0,0x0(v1)
sw a1,0x8(a0)
li v1,-0x1
beq v0,v1,0x002e6ca8
_lw ra,0x2c(sp)
li v1,0x1
sw v1,0x4(s0)
lw s0,0x28(sp)
jr ra
_addiu sp,sp,0x30
lw v1,0x4(s0)
li v0,0x2
li a1,0x6
movn a1,v0,v1
or v1,a1,zero
lw v0,0x0(s0)
lw t9,-0x4450(gp)
lw v0,-0xc(v0)
addu s0,s0,v0
or a0,s0,zero
lw a1,0x14(s0)
bal 0x002eb754
_or a1,v1,a1
lw ra,0x2c(sp)
li v0,-0x1
lw s0,0x28(sp)
jr ra
_addiu sp,sp,0x30
lw v0,0x4(s0)
bne v0,zero,0x002e6ce0
_lw ra,0x2c(sp)
b 0x002e6cbc
_li v1,0x4
lw v0,0x0(a0)
lw t9,0x28(v0)
jalr t9
_nop
b 0x002e6c88
_lw gp,0x10(sp)
(translation_unit "int FUN_002e6c18(wistream *param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  uint uVar4;\n  sentry local_18 [16];\n  \n  *(undefined4 *)(param_1 + 4) = 0;\n  std::wistream::sentry::sentry(local_18,param_1,true);\n  if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }\n  else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }\n  std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));\n  return -1;\n}\n\n" (function_definition "int FUN_002e6c18(wistream *param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  uint uVar4;\n  sentry local_18 [16];\n  \n  *(undefined4 *)(param_1 + 4) = 0;\n  std::wistream::sentry::sentry(local_18,param_1,true);\n  if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }\n  else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }\n  std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));\n  return -1;\n}" primitive_type (function_declarator "FUN_002e6c18(wistream *param_1)" identifier (parameter_list "(wistream *param_1)" ( (parameter_declaration "wistream *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  uint uVar4;\n  sentry local_18 [16];\n  \n  *(undefined4 *)(param_1 + 4) = 0;\n  std::wistream::sentry::sentry(local_18,param_1,true);\n  if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }\n  else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }\n  std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "sentry local_18 [16];" type_identifier (array_declarator "local_18 [16]" identifier [ number_literal ]) ;) (expression_statement "*(undefined4 *)(param_1 + 4) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 4) = 0" (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = number_literal) ;) (labeled_statement "std::wistream::sentry::sentry(local_18,param_1,true);" statement_identifier : (ERROR ":" :) (labeled_statement "wistream::sentry::sentry(local_18,param_1,true);" statement_identifier : (ERROR ":" :) (labeled_statement "sentry::sentry(local_18,param_1,true);" statement_identifier : (ERROR ":" :) (expression_statement "sentry(local_18,param_1,true);" (call_expression "sentry(local_18,param_1,true)" identifier (argument_list "(local_18,param_1,true)" ( identifier , identifier , true ))) ;)))) (if_statement "if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }\n  else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }" if (parenthesized_expression "(local_18[0] == (sentry)0x0)" ( (binary_expression "local_18[0] == (sentry)0x0" (subscript_expression "local_18[0]" identifier [ number_literal ]) == (cast_expression "(sentry)0x0" ( (type_descriptor "sentry" type_identifier) ) number_literal)) )) (compound_statement "{\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }" { (if_statement "if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 4) != 0)" ( (binary_expression "*(int *)(param_1 + 4) != 0" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "uVar4 = 4;" (assignment_expression "uVar4 = 4" identifier = number_literal) ;) }) (else_clause "else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }" else (compound_statement "{\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }" { (expression_statement "piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);" (assignment_expression "piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c)" identifier = (pointer_expression "*(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c)" * (cast_expression "(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c)" ( (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c" (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) ))))) + number_literal) ))))) ;) (expression_statement "piVar2 = (int *)piVar3[2];" (assignment_expression "piVar2 = (int *)piVar3[2]" identifier = (cast_expression "(int *)piVar3[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar3[2]" identifier [ number_literal ]))) ;) (if_statement "if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }" if (parenthesized_expression "(piVar2 < (int *)piVar3[3])" ( (binary_expression "piVar2 < (int *)piVar3[3]" identifier < (cast_expression "(int *)piVar3[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar3[3]" identifier [ number_literal ]))) )) (compound_statement "{\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }" { (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "piVar3[2] = (int)(piVar2 + 1);" (assignment_expression "piVar3[2] = (int)(piVar2 + 1)" (subscript_expression "piVar3[2]" identifier [ number_literal ]) = (cast_expression "(int)(piVar2 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(piVar2 + 1)" ( (binary_expression "piVar2 + 1" identifier + number_literal) )))) ;) }) (else_clause "else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }" else (compound_statement "{\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }" { comment (expression_statement "iVar1 = (**(code **)(*piVar3 + 0x28))();" (assignment_expression "iVar1 = (**(code **)(*piVar3 + 0x28))()" identifier = (call_expression "(**(code **)(*piVar3 + 0x28))()" (parenthesized_expression "(**(code **)(*piVar3 + 0x28))" ( (pointer_expression "**(code **)(*piVar3 + 0x28)" * (pointer_expression "*(code **)(*piVar3 + 0x28)" * (cast_expression "(code **)(*piVar3 + 0x28)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 0x28)" ( (binary_expression "*piVar3 + 0x28" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }" if (parenthesized_expression "(iVar1 != -1)" ( (binary_expression "iVar1 != -1" identifier != number_literal) )) (compound_statement "{\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }" { (expression_statement "*(undefined4 *)(param_1 + 4) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 4) = 1" (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = number_literal) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "uVar4 = 6;" (assignment_expression "uVar4 = 6" identifier = number_literal) ;) (if_statement "if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 4) != 0)" ( (binary_expression "*(int *)(param_1 + 4) != 0" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      uVar4 = 2;\n    }" { (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) })) }))) (labeled_statement "std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));" statement_identifier : (ERROR ":" :) (labeled_statement "wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));" statement_identifier : (ERROR ":" :) (expression_statement "clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));" (call_expression "clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14))" identifier (argument_list "((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14))" ( (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) ))))) ))) , (binary_expression "uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14)" identifier | (pointer_expression "*(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14)" * (cast_expression "(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14)" ( (binary_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14" (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) ))))) ))) + number_literal) ))))) ))) ;))) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "/* std::wistream::get() */\n\nint __thiscall std::wistream::get(wistream *this)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  _Ios_Iostate _Var4;\n  sentry local_18 [16];\n  \n  *(undefined4 *)(this + 4) = 0;\n  sentry::sentry(local_18,this,true);\n  if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(this + 4) != 0) {\n      return -1;\n    }\n    _Var4 = _S_failbit;\n  }\n  else {\n    piVar3 = *(int **)(this + *(int *)(*(int *)this + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(this + 4) = 1;\n      return iVar1;\n    }\n    _Var4 = _S_failbit|_S_eofbit;\n    if (*(int *)(this + 4) != 0) {\n      _Var4 = _S_eofbit;\n    }\n  }\n  wios::clear((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              _Var4 | *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14));\n  return -1;\n}\n\n" comment (function_definition "int __thiscall std::wistream::get(wistream *this)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  _Ios_Iostate _Var4;\n  sentry local_18 [16];\n  \n  *(undefined4 *)(this + 4) = 0;\n  sentry::sentry(local_18,this,true);\n  if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(this + 4) != 0) {\n      return -1;\n    }\n    _Var4 = _S_failbit;\n  }\n  else {\n    piVar3 = *(int **)(this + *(int *)(*(int *)this + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(this + 4) = 1;\n      return iVar1;\n    }\n    _Var4 = _S_failbit|_S_eofbit;\n    if (*(int *)(this + 4) != 0) {\n      _Var4 = _S_eofbit;\n    }\n  }\n  wios::clear((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              _Var4 | *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14));\n  return -1;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::wistream::" identifier : : identifier : :) (function_declarator "get(wistream *this)" identifier (parameter_list "(wistream *this)" ( (parameter_declaration "wistream *this" type_identifier (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  _Ios_Iostate _Var4;\n  sentry local_18 [16];\n  \n  *(undefined4 *)(this + 4) = 0;\n  sentry::sentry(local_18,this,true);\n  if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(this + 4) != 0) {\n      return -1;\n    }\n    _Var4 = _S_failbit;\n  }\n  else {\n    piVar3 = *(int **)(this + *(int *)(*(int *)this + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(this + 4) = 1;\n      return iVar1;\n    }\n    _Var4 = _S_failbit|_S_eofbit;\n    if (*(int *)(this + 4) != 0) {\n      _Var4 = _S_eofbit;\n    }\n  }\n  wios::clear((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              _Var4 | *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14));\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "_Ios_Iostate _Var4;" type_identifier identifier ;) (declaration "sentry local_18 [16];" type_identifier (array_declarator "local_18 [16]" identifier [ number_literal ]) ;) (expression_statement "*(undefined4 *)(this + 4) = 0;" (assignment_expression "*(undefined4 *)(this + 4) = 0" (pointer_expression "*(undefined4 *)(this + 4)" * (cast_expression "(undefined4 *)(this + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = number_literal) ;) (labeled_statement "sentry::sentry(local_18,this,true);" statement_identifier : (ERROR ":" :) (expression_statement "sentry(local_18,this,true);" (call_expression "sentry(local_18,this,true)" identifier (argument_list "(local_18,this,true)" ( identifier , identifier , true ))) ;)) (if_statement "if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(this + 4) != 0) {\n      return -1;\n    }\n    _Var4 = _S_failbit;\n  }\n  else {\n    piVar3 = *(int **)(this + *(int *)(*(int *)this + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(this + 4) = 1;\n      return iVar1;\n    }\n    _Var4 = _S_failbit|_S_eofbit;\n    if (*(int *)(this + 4) != 0) {\n      _Var4 = _S_eofbit;\n    }\n  }" if (parenthesized_expression "(local_18[0] == (sentry)0x0)" ( (binary_expression "local_18[0] == (sentry)0x0" (subscript_expression "local_18[0]" identifier [ number_literal ]) == (cast_expression "(sentry)0x0" ( (type_descriptor "sentry" type_identifier) ) number_literal)) )) (compound_statement "{\n    if (*(int *)(this + 4) != 0) {\n      return -1;\n    }\n    _Var4 = _S_failbit;\n  }" { (if_statement "if (*(int *)(this + 4) != 0) {\n      return -1;\n    }" if (parenthesized_expression "(*(int *)(this + 4) != 0)" ( (binary_expression "*(int *)(this + 4) != 0" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "_Var4 = _S_failbit;" (assignment_expression "_Var4 = _S_failbit" identifier = identifier) ;) }) (else_clause "else {\n    piVar3 = *(int **)(this + *(int *)(*(int *)this + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(this + 4) = 1;\n      return iVar1;\n    }\n    _Var4 = _S_failbit|_S_eofbit;\n    if (*(int *)(this + 4) != 0) {\n      _Var4 = _S_eofbit;\n    }\n  }" else (compound_statement "{\n    piVar3 = *(int **)(this + *(int *)(*(int *)this + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(this + 4) = 1;\n      return iVar1;\n    }\n    _Var4 = _S_failbit|_S_eofbit;\n    if (*(int *)(this + 4) != 0) {\n      _Var4 = _S_eofbit;\n    }\n  }" { (expression_statement "piVar3 = *(int **)(this + *(int *)(*(int *)this + -0xc) + 0x7c);" (assignment_expression "piVar3 = *(int **)(this + *(int *)(*(int *)this + -0xc) + 0x7c)" identifier = (pointer_expression "*(int **)(this + *(int *)(*(int *)this + -0xc) + 0x7c)" * (cast_expression "(int **)(this + *(int *)(*(int *)this + -0xc) + 0x7c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + *(int *)(*(int *)this + -0xc) + 0x7c)" ( (binary_expression "this + *(int *)(*(int *)this + -0xc) + 0x7c" (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) ))))) + number_literal) ))))) ;) (expression_statement "piVar2 = (int *)piVar3[2];" (assignment_expression "piVar2 = (int *)piVar3[2]" identifier = (cast_expression "(int *)piVar3[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar3[2]" identifier [ number_literal ]))) ;) (if_statement "if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }" if (parenthesized_expression "(piVar2 < (int *)piVar3[3])" ( (binary_expression "piVar2 < (int *)piVar3[3]" identifier < (cast_expression "(int *)piVar3[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar3[3]" identifier [ number_literal ]))) )) (compound_statement "{\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }" { (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "piVar3[2] = (int)(piVar2 + 1);" (assignment_expression "piVar3[2] = (int)(piVar2 + 1)" (subscript_expression "piVar3[2]" identifier [ number_literal ]) = (cast_expression "(int)(piVar2 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(piVar2 + 1)" ( (binary_expression "piVar2 + 1" identifier + number_literal) )))) ;) }) (else_clause "else {\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }" else (compound_statement "{\n                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */\n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }" { comment (expression_statement "iVar1 = (**(code **)(*piVar3 + 0x28))();" (assignment_expression "iVar1 = (**(code **)(*piVar3 + 0x28))()" identifier = (call_expression "(**(code **)(*piVar3 + 0x28))()" (parenthesized_expression "(**(code **)(*piVar3 + 0x28))" ( (pointer_expression "**(code **)(*piVar3 + 0x28)" * (pointer_expression "*(code **)(*piVar3 + 0x28)" * (cast_expression "(code **)(*piVar3 + 0x28)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 0x28)" ( (binary_expression "*piVar3 + 0x28" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar1 != -1) {\n      *(undefined4 *)(this + 4) = 1;\n      return iVar1;\n    }" if (parenthesized_expression "(iVar1 != -1)" ( (binary_expression "iVar1 != -1" identifier != number_literal) )) (compound_statement "{\n      *(undefined4 *)(this + 4) = 1;\n      return iVar1;\n    }" { (expression_statement "*(undefined4 *)(this + 4) = 1;" (assignment_expression "*(undefined4 *)(this + 4) = 1" (pointer_expression "*(undefined4 *)(this + 4)" * (cast_expression "(undefined4 *)(this + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = number_literal) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "_Var4 = _S_failbit|_S_eofbit;" (assignment_expression "_Var4 = _S_failbit|_S_eofbit" identifier = (binary_expression "_S_failbit|_S_eofbit" identifier | identifier)) ;) (if_statement "if (*(int *)(this + 4) != 0) {\n      _Var4 = _S_eofbit;\n    }" if (parenthesized_expression "(*(int *)(this + 4) != 0)" ( (binary_expression "*(int *)(this + 4) != 0" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      _Var4 = _S_eofbit;\n    }" { (expression_statement "_Var4 = _S_eofbit;" (assignment_expression "_Var4 = _S_eofbit" identifier = identifier) ;) })) }))) (labeled_statement "wios::clear((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              _Var4 | *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14));" statement_identifier : (ERROR ":" :) (expression_statement "clear((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              _Var4 | *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14));" (call_expression "clear((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              _Var4 | *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14))" identifier (argument_list "((wios *)(this + *(int *)(*(int *)this + -0xc)),\n              _Var4 | *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14))" ( (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) ))))) ))) , (binary_expression "_Var4 | *(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14)" identifier | (pointer_expression "*(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14)" * (cast_expression "(_Ios_Iostate *)((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14)" ( (type_descriptor "_Ios_Iostate *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14)" ( (binary_expression "(wios *)(this + *(int *)(*(int *)this + -0xc)) + 0x14" (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) ))))) ))) + number_literal) ))))) ))) ;)) (return_statement "return -1;" return number_literal ;) })))
(translation_unit "int FUN_002e6c18(wistream *param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  uint uVar4;\n  sentry local_18 [16];\n  \n  *(undefined4 *)(param_1 + 4) = 0;\n  std::wistream::sentry::sentry(local_18,param_1,true);\n  if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }\n  else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }\n  std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));\n  return -1;\n}\n\n" (function_definition "int FUN_002e6c18(wistream *param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  uint uVar4;\n  sentry local_18 [16];\n  \n  *(undefined4 *)(param_1 + 4) = 0;\n  std::wistream::sentry::sentry(local_18,param_1,true);\n  if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }\n  else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }\n  std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));\n  return -1;\n}" primitive_type (function_declarator "FUN_002e6c18(wistream *param_1)" identifier (parameter_list "(wistream *param_1)" ( (parameter_declaration "wistream *param_1" type_identifier (pointer_declarator "*param_1" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  uint uVar4;\n  sentry local_18 [16];\n  \n  *(undefined4 *)(param_1 + 4) = 0;\n  std::wistream::sentry::sentry(local_18,param_1,true);\n  if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }\n  else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }\n  std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));\n  return -1;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int *piVar3;" primitive_type (pointer_declarator "*piVar3" * identifier) ;) (declaration "uint uVar4;" type_identifier identifier ;) (declaration "sentry local_18 [16];" type_identifier (array_declarator "local_18 [16]" identifier [ number_literal ]) ;) (expression_statement "*(undefined4 *)(param_1 + 4) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 4) = 0" (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = number_literal) ;) (labeled_statement "std::wistream::sentry::sentry(local_18,param_1,true);" statement_identifier : (ERROR ":" :) (labeled_statement "wistream::sentry::sentry(local_18,param_1,true);" statement_identifier : (ERROR ":" :) (labeled_statement "sentry::sentry(local_18,param_1,true);" statement_identifier : (ERROR ":" :) (expression_statement "sentry(local_18,param_1,true);" (call_expression "sentry(local_18,param_1,true)" identifier (argument_list "(local_18,param_1,true)" ( identifier , identifier , true ))) ;)))) (if_statement "if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }\n  else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }" if (parenthesized_expression "(local_18[0] == (sentry)0x0)" ( (binary_expression "local_18[0] == (sentry)0x0" (subscript_expression "local_18[0]" identifier [ number_literal ]) == (cast_expression "(sentry)0x0" ( (type_descriptor "sentry" type_identifier) ) number_literal)) )) (compound_statement "{\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }" { (if_statement "if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 4) != 0)" ( (binary_expression "*(int *)(param_1 + 4) != 0" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      return -1;\n    }" { (return_statement "return -1;" return number_literal ;) })) (expression_statement "uVar4 = 4;" (assignment_expression "uVar4 = 4" identifier = number_literal) ;) }) (else_clause "else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }" else (compound_statement "{\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }" { (expression_statement "piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);" (assignment_expression "piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c)" identifier = (pointer_expression "*(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c)" * (cast_expression "(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c)" ( (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c" (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) ))))) + number_literal) ))))) ;) (expression_statement "piVar2 = (int *)piVar3[2];" (assignment_expression "piVar2 = (int *)piVar3[2]" identifier = (cast_expression "(int *)piVar3[2]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar3[2]" identifier [ number_literal ]))) ;) (if_statement "if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }" if (parenthesized_expression "(piVar2 < (int *)piVar3[3])" ( (binary_expression "piVar2 < (int *)piVar3[3]" identifier < (cast_expression "(int *)piVar3[3]" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (subscript_expression "piVar3[3]" identifier [ number_literal ]))) )) (compound_statement "{\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }" { (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" identifier = (pointer_expression "*piVar2" * identifier)) ;) (expression_statement "piVar3[2] = (int)(piVar2 + 1);" (assignment_expression "piVar3[2] = (int)(piVar2 + 1)" (subscript_expression "piVar3[2]" identifier [ number_literal ]) = (cast_expression "(int)(piVar2 + 1)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "(piVar2 + 1)" ( (binary_expression "piVar2 + 1" identifier + number_literal) )))) ;) }) (else_clause "else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }" else (compound_statement "{\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }" { (expression_statement "iVar1 = (**(code **)(*piVar3 + 0x28))();" (assignment_expression "iVar1 = (**(code **)(*piVar3 + 0x28))()" identifier = (call_expression "(**(code **)(*piVar3 + 0x28))()" (parenthesized_expression "(**(code **)(*piVar3 + 0x28))" ( (pointer_expression "**(code **)(*piVar3 + 0x28)" * (pointer_expression "*(code **)(*piVar3 + 0x28)" * (cast_expression "(code **)(*piVar3 + 0x28)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar3 + 0x28)" ( (binary_expression "*piVar3 + 0x28" (pointer_expression "*piVar3" * identifier) + number_literal) ))))) )) (argument_list "()" ( )))) ;) }))) (if_statement "if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }" if (parenthesized_expression "(iVar1 != -1)" ( (binary_expression "iVar1 != -1" identifier != number_literal) )) (compound_statement "{\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }" { (expression_statement "*(undefined4 *)(param_1 + 4) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 4) = 1" (pointer_expression "*(undefined4 *)(param_1 + 4)" * (cast_expression "(undefined4 *)(param_1 + 4)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = number_literal) ;) (return_statement "return iVar1;" return identifier ;) })) (expression_statement "uVar4 = 6;" (assignment_expression "uVar4 = 6" identifier = number_literal) ;) (if_statement "if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }" if (parenthesized_expression "(*(int *)(param_1 + 4) != 0)" ( (binary_expression "*(int *)(param_1 + 4) != 0" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      uVar4 = 2;\n    }" { (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" identifier = number_literal) ;) })) }))) (labeled_statement "std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));" statement_identifier : (ERROR ":" :) (labeled_statement "wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));" statement_identifier : (ERROR ":" :) (expression_statement "clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));" (call_expression "clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14))" identifier (argument_list "((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14))" ( (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) ))))) ))) , (binary_expression "uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14)" identifier | (pointer_expression "*(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14)" * (cast_expression "(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14)" ( (binary_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14" (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) ))))) ))) + number_literal) ))))) ))) ;))) (return_statement "return -1;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = 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 (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (return_statement return LIT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_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) ))))) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (subscript_expression IDENT [ LIT ]))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (return_statement return IDENT ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) }))) (labeled_statement statement_identifier : (ERROR :) (labeled_statement statement_identifier : (ERROR :) (expression_statement (call_expression IDENT (argument_list ( (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) ))))) ))) , (binary_expression IDENT | (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (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) ))))) ))) + LIT) ))))) ))) ;))) (return_statement return LIT ;) })))
(function_definition "int FUN_002e6c18(wistream *param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  uint uVar4;\n  sentry local_18 [16];\n  \n  *(undefined4 *)(param_1 + 4) = 0;\n  std::wistream::sentry::sentry(local_18,param_1,true);\n  if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }\n  else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }\n  std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));\n  return -1;\n}" (primitive_type "int") (function_declarator "FUN_002e6c18(wistream *param_1)" (identifier "FUN_002e6c18") (parameter_list "(wistream *param_1)" (( "(") (parameter_declaration "wistream *param_1" (type_identifier "wistream") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int *piVar3;\n  uint uVar4;\n  sentry local_18 [16];\n  \n  *(undefined4 *)(param_1 + 4) = 0;\n  std::wistream::sentry::sentry(local_18,param_1,true);\n  if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }\n  else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }\n  std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));\n  return -1;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int *piVar3;" (primitive_type "int") (pointer_declarator "*piVar3" (* "*") (identifier "piVar3")) (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (declaration "sentry local_18 [16];" (type_identifier "sentry") (array_declarator "local_18 [16]" (identifier "local_18") ([ "[") (number_literal "16") (] "]")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 4) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 4) = 0" (pointer_expression "*(undefined4 *)(param_1 + 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (= "=") (number_literal "0")) (; ";")) (labeled_statement "std::wistream::sentry::sentry(local_18,param_1,true);" (statement_identifier "std") (: ":") (ERROR ":" (: ":")) (labeled_statement "wistream::sentry::sentry(local_18,param_1,true);" (statement_identifier "wistream") (: ":") (ERROR ":" (: ":")) (labeled_statement "sentry::sentry(local_18,param_1,true);" (statement_identifier "sentry") (: ":") (ERROR ":" (: ":")) (expression_statement "sentry(local_18,param_1,true);" (call_expression "sentry(local_18,param_1,true)" (identifier "sentry") (argument_list "(local_18,param_1,true)" (( "(") (identifier "local_18") (, ",") (identifier "param_1") (, ",") (true "true") () ")"))) (; ";"))))) (if_statement "if (local_18[0] == (sentry)0x0) {\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }\n  else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }" (if "if") (parenthesized_expression "(local_18[0] == (sentry)0x0)" (( "(") (binary_expression "local_18[0] == (sentry)0x0" (subscript_expression "local_18[0]" (identifier "local_18") ([ "[") (number_literal "0") (] "]")) (== "==") (cast_expression "(sentry)0x0" (( "(") (type_descriptor "sentry" (type_identifier "sentry")) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }\n    uVar4 = 4;\n  }" ({ "{") (if_statement "if (*(int *)(param_1 + 4) != 0) {\n      return -1;\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 4) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 4) != 0" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      return -1;\n    }" ({ "{") (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}"))) (expression_statement "uVar4 = 4;" (assignment_expression "uVar4 = 4" (identifier "uVar4") (= "=") (number_literal "4")) (; ";")) (} "}")) (else_clause "else {\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }" (else "else") (compound_statement "{\n    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);\n    piVar2 = (int *)piVar3[2];\n    if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }\n    if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }\n    uVar4 = 6;\n    if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }\n  }" ({ "{") (expression_statement "piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);" (assignment_expression "piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c)" (identifier "piVar3") (= "=") (pointer_expression "*(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c)" (* "*") (cast_expression "(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c)" (( "(") (binary_expression "param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c" (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")) () ")"))))) (+ "+") (number_literal "0x7c")) () ")"))))) (; ";")) (expression_statement "piVar2 = (int *)piVar3[2];" (assignment_expression "piVar2 = (int *)piVar3[2]" (identifier "piVar2") (= "=") (cast_expression "(int *)piVar3[2]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar3[2]" (identifier "piVar3") ([ "[") (number_literal "2") (] "]")))) (; ";")) (if_statement "if (piVar2 < (int *)piVar3[3]) {\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }\n    else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }" (if "if") (parenthesized_expression "(piVar2 < (int *)piVar3[3])" (( "(") (binary_expression "piVar2 < (int *)piVar3[3]" (identifier "piVar2") (< "<") (cast_expression "(int *)piVar3[3]" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (subscript_expression "piVar3[3]" (identifier "piVar3") ([ "[") (number_literal "3") (] "]")))) () ")")) (compound_statement "{\n      iVar1 = *piVar2;\n      piVar3[2] = (int)(piVar2 + 1);\n    }" ({ "{") (expression_statement "iVar1 = *piVar2;" (assignment_expression "iVar1 = *piVar2" (identifier "iVar1") (= "=") (pointer_expression "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (expression_statement "piVar3[2] = (int)(piVar2 + 1);" (assignment_expression "piVar3[2] = (int)(piVar2 + 1)" (subscript_expression "piVar3[2]" (identifier "piVar3") ([ "[") (number_literal "2") (] "]")) (= "=") (cast_expression "(int)(piVar2 + 1)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "(piVar2 + 1)" (( "(") (binary_expression "piVar2 + 1" (identifier "piVar2") (+ "+") (number_literal "1")) () ")")))) (; ";")) (} "}")) (else_clause "else {\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }" (else "else") (compound_statement "{\n                    \n      iVar1 = (**(code **)(*piVar3 + 0x28))();\n    }" ({ "{") (expression_statement "iVar1 = (**(code **)(*piVar3 + 0x28))();" (assignment_expression "iVar1 = (**(code **)(*piVar3 + 0x28))()" (identifier "iVar1") (= "=") (call_expression "(**(code **)(*piVar3 + 0x28))()" (parenthesized_expression "(**(code **)(*piVar3 + 0x28))" (( "(") (pointer_expression "**(code **)(*piVar3 + 0x28)" (* "*") (pointer_expression "*(code **)(*piVar3 + 0x28)" (* "*") (cast_expression "(code **)(*piVar3 + 0x28)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar3 + 0x28)" (( "(") (binary_expression "*piVar3 + 0x28" (pointer_expression "*piVar3" (* "*") (identifier "piVar3")) (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (} "}")))) (if_statement "if (iVar1 != -1) {\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }" (if "if") (parenthesized_expression "(iVar1 != -1)" (( "(") (binary_expression "iVar1 != -1" (identifier "iVar1") (!= "!=") (number_literal "-1")) () ")")) (compound_statement "{\n      *(undefined4 *)(param_1 + 4) = 1;\n      return iVar1;\n    }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 4) = 1;" (assignment_expression "*(undefined4 *)(param_1 + 4) = 1" (pointer_expression "*(undefined4 *)(param_1 + 4)" (* "*") (cast_expression "(undefined4 *)(param_1 + 4)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (= "=") (number_literal "1")) (; ";")) (return_statement "return iVar1;" (return "return") (identifier "iVar1") (; ";")) (} "}"))) (expression_statement "uVar4 = 6;" (assignment_expression "uVar4 = 6" (identifier "uVar4") (= "=") (number_literal "6")) (; ";")) (if_statement "if (*(int *)(param_1 + 4) != 0) {\n      uVar4 = 2;\n    }" (if "if") (parenthesized_expression "(*(int *)(param_1 + 4) != 0)" (( "(") (binary_expression "*(int *)(param_1 + 4) != 0" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      uVar4 = 2;\n    }" ({ "{") (expression_statement "uVar4 = 2;" (assignment_expression "uVar4 = 2" (identifier "uVar4") (= "=") (number_literal "2")) (; ";")) (} "}"))) (} "}")))) (labeled_statement "std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));" (statement_identifier "std") (: ":") (ERROR ":" (: ":")) (labeled_statement "wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));" (statement_identifier "wios") (: ":") (ERROR ":" (: ":")) (expression_statement "clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));" (call_expression "clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14))" (identifier "clear") (argument_list "((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),\n                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14))" (( "(") (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")) () ")"))))) () ")"))) (, ",") (binary_expression "uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14)" (identifier "uVar4") (| "|") (pointer_expression "*(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14)" (* "*") (cast_expression "(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14)" (( "(") (binary_expression "(wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14" (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")) () ")"))))) () ")"))) (+ "+") (number_literal "0x14")) () ")"))))) () ")"))) (; ";")))) (return_statement "return -1;" (return "return") (number_literal "-1") (; ";")) (} "}")))

/* std::wistream::get() */

int __thiscall std::type_1::function_1(type_1 *var_1)

{
  int var_3;
  int *var_2;
  int *piVar3;
  type_2 var_7;
  type_3 local_18 [16];
  
  *(type_4 *)(var_1 + 4) = 0;
  sentry::type_3(local_18,var_1,true);
  if (local_18[0] == (type_3)0x0) {
    if (*(int *)(var_1 + 4) != 0) {
      return -1;
    }
    var_7 = var_4;
  }
  else {
    piVar3 = *(int **)(var_1 + *(int *)(*(int *)var_1 + -0xc) + 0x7c);
    var_2 = (int *)piVar3[2];
    if (var_2 < (int *)piVar3[3]) {
      var_3 = *var_2;
      piVar3[2] = (int)(var_2 + 1);
    }
    else {
                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */
      var_3 = (**(type_5 **)(*piVar3 + 0x28))();
    }
    if (var_3 != -1) {
      *(type_4 *)(var_1 + 4) = 1;
      return var_3;
    }
    var_7 = var_4|var_5;
    if (*(int *)(var_1 + 4) != 0) {
      var_7 = var_5;
    }
  }
  wios::var_6((type_6 *)(var_1 + *(int *)(*(int *)var_1 + -0xc)),
              var_7 | *(type_2 *)((type_6 *)(var_1 + *(int *)(*(int *)var_1 + -0xc)) + 0x14));
  return -1;
}


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

int MASKED(wistream *param_1)

{
  int iVar1;
  int *piVar2;
  int *piVar3;
  uint uVar4;
  sentry local_18 [16];
  
  *(undefined4 *)(param_1 + 4) = 0;
  std::wistream::sentry::sentry(local_18,param_1,true);
  if (local_18[0] == (sentry)0x0) {
    if (*(int *)(param_1 + 4) != 0) {
      return -1;
    }
    uVar4 = 4;
  }
  else {
    piVar3 = *(int **)(param_1 + *(int *)(*(int *)param_1 + -0xc) + 0x7c);
    piVar2 = (int *)piVar3[2];
    if (piVar2 < (int *)piVar3[3]) {
      iVar1 = *piVar2;
      piVar3[2] = (int)(piVar2 + 1);
    }
    else {
                    /* try { // try from 002e6d5c to 002e6d63 has its CatchHandler @ 002e6cf0 */
      iVar1 = (**(code **)(*piVar3 + 0x28))();
    }
    if (iVar1 != -1) {
      *(undefined4 *)(param_1 + 4) = 1;
      return iVar1;
    }
    uVar4 = 6;
    if (*(int *)(param_1 + 4) != 0) {
      uVar4 = 2;
    }
  }
  std::wios::clear((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)),
                   uVar4 | *(uint *)((wios *)(param_1 + *(int *)(*(int *)param_1 + -0xc)) + 0x14));
  return -1;
}

