
/* std::wistream::TEMPNAMEPLACEHOLDERVALUE(short&) */

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

{
  int *piVar1;
  wistream *pwVar2;
  undefined1 local_34 [15];
  sentry local_25;
  uint local_24;
  int local_20 [4];
  
  __x86_get_pc_thunk_di();
  sentry::sentry(&local_25,this,false);
  if (local_25 != (sentry)0x0) {
    local_24 = 0;
    pwVar2 = this + *(int *)(*(int *)this + -0xc);
    piVar1 = *(int **)(pwVar2 + 0x88);
    if (piVar1 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */
      __throw_bad_cast();
    }
                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */
    (**(code **)(*piVar1 + 0xc))
              (local_34,piVar1,*(undefined4 *)(pwVar2 + 0x7c),0xffffffff,0,0xffffffff,pwVar2,
               &local_24,local_20);
    if (local_20[0] < -0x8000) {
      local_24 = local_24 | 4;
      *param_1 = -0x8000;
    }
    else {
      if (0x7fff < local_20[0]) {
        local_24 = local_24 | 4;
        *param_1 = 0x7fff;
        if (local_24 == 0) {
          return this;
        }
        goto LAB_003d503d;
      }
      *param_1 = (short)local_20[0];
    }
    if (local_24 != 0) {
LAB_003d503d:
      wios::clear((_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc)));
      return this;
    }
  }
  return this;
}



int * FUN_003d4f70(int *param_1,undefined2 *param_2)

{
  int *piVar1;
  int iVar2;
  undefined1 local_34 [15];
  char local_25;
  uint local_24;
  int local_20 [4];
  
  FUN_00074f0a();
  FUN_003d4d40(&local_25,param_1,0);
  if (local_25 != '\0') {
    local_24 = 0;
    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;
    piVar1 = *(int **)(iVar2 + 0x88);
    if (piVar1 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */
      FUN_003f3900();
    }
                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */
    (**(code **)(*piVar1 + 0xc))
              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24
               ,local_20);
    if (local_20[0] < -0x8000) {
      local_24 = local_24 | 4;
      *param_2 = 0x8000;
    }
    else {
      if (0x7fff < local_20[0]) {
        local_24 = local_24 | 4;
        *param_2 = 0x7fff;
        if (local_24 == 0) {
          return param_1;
        }
        goto LAB_003d503d;
      }
      *param_2 = (short)local_20[0];
    }
    if (local_24 != 0) {
LAB_003d503d:
      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;
      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));
      return param_1;
    }
  }
  return param_1;
}


PUSH EBP
MOV EBP,ESP
PUSH EDI
CALL 0x00074f0a
ADD EDI,0x215087
PUSH ESI
LEA EAX,[EBP + -0x21]
PUSH EBX
SUB ESP,0x40
MOV ESI,dword ptr [EBP + 0x8]
PUSH 0x0
PUSH ESI
MOV EBX,EDI
PUSH EAX
CALL 0x003d4d40
ADD ESP,0x10
CMP byte ptr [EBP + -0x21],0x0
JZ 0x003d5012
MOV EAX,dword ptr [ESI]
MOV dword ptr [EBP + -0x20],0x0
MOV EDX,dword ptr [EAX + -0xc]
ADD EDX,ESI
MOV EAX,dword ptr [EDX + 0x88]
TEST EAX,EAX
JZ 0x003d5068
MOV ECX,dword ptr [EDX + 0x7c]
LEA EBX,[EBP + -0x30]
SUB ESP,0xc
MOV dword ptr [EBP + -0x34],0xffffffff
MOV dword ptr [EBP + -0x3c],EBX
LEA EBX,[EBP + -0x1c]
MOV dword ptr [EBP + -0x38],ECX
MOV ECX,dword ptr [EAX]
PUSH EBX
LEA EBX,[EBP + -0x20]
PUSH EBX
PUSH EDX
PUSH -0x1
PUSH 0x0
PUSH dword ptr [EBP + -0x34]
PUSH dword ptr [EBP + -0x38]
PUSH EAX
PUSH dword ptr [EBP + -0x3c]
CALL dword ptr [ECX + 0xc]
MOV EDX,dword ptr [EBP + -0x1c]
ADD ESP,0x2c
MOV EAX,dword ptr [EBP + -0x20]
CMP EDX,0xffff8000
JGE 0x003d5020
MOV ECX,dword ptr [EBP + 0xc]
OR EAX,0x4
MOV EBX,0xffff8000
MOV dword ptr [EBP + -0x20],EAX
MOV word ptr [ECX],BX
TEST EAX,EAX
JNZ 0x003d503d
LEA ESP,[EBP + -0xc]
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
CMP EDX,0x7fff
JLE 0x003d5060
MOV ECX,dword ptr [EBP + 0xc]
OR EAX,0x4
MOV EDX,0x7fff
MOV dword ptr [EBP + -0x20],EAX
MOV word ptr [ECX],DX
TEST EAX,EAX
JZ 0x003d5012
MOV EDX,dword ptr [ESI]
SUB ESP,0x8
MOV EBX,EDI
MOV ECX,dword ptr [EDX + -0xc]
ADD ECX,ESI
OR EAX,dword ptr [ECX + 0x14]
PUSH EAX
PUSH ECX
CALL 0x003d8970
ADD ESP,0x10
LEA ESP,[EBP + -0xc]
MOV EAX,ESI
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EBX,dword ptr [EBP + 0xc]
MOV word ptr [EBX],DX
JMP 0x003d500e
CALL 0x003f3900
(translation_unit "int * FUN_003d4f70(int *param_1,undefined2 *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined1 local_34 [15];\n  char local_25;\n  uint local_24;\n  int local_20 [4];\n  \n  FUN_00074f0a();\n  FUN_003d4d40(&local_25,param_1,0);\n  if (local_25 != '\0') {\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      FUN_003f3900();\n    }\n                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */\n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }\n  return param_1;\n}\n\n" (function_definition "int * FUN_003d4f70(int *param_1,undefined2 *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined1 local_34 [15];\n  char local_25;\n  uint local_24;\n  int local_20 [4];\n  \n  FUN_00074f0a();\n  FUN_003d4d40(&local_25,param_1,0);\n  if (local_25 != '\0') {\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      FUN_003f3900();\n    }\n                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */\n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_003d4f70(int *param_1,undefined2 *param_2)" * (function_declarator "FUN_003d4f70(int *param_1,undefined2 *param_2)" identifier (parameter_list "(int *param_1,undefined2 *param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined2 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined1 local_34 [15];\n  char local_25;\n  uint local_24;\n  int local_20 [4];\n  \n  FUN_00074f0a();\n  FUN_003d4d40(&local_25,param_1,0);\n  if (local_25 != '\0') {\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      FUN_003f3900();\n    }\n                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */\n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }\n  return param_1;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined1 local_34 [15];" type_identifier (array_declarator "local_34 [15]" identifier [ number_literal ]) ;) (declaration "char local_25;" primitive_type identifier ;) (declaration "uint local_24;" type_identifier identifier ;) (declaration "int local_20 [4];" primitive_type (array_declarator "local_20 [4]" identifier [ number_literal ]) ;) (expression_statement "FUN_00074f0a();" (call_expression "FUN_00074f0a()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_003d4d40(&local_25,param_1,0);" (call_expression "FUN_003d4d40(&local_25,param_1,0)" identifier (argument_list "(&local_25,param_1,0)" ( (pointer_expression "&local_25" & identifier) , identifier , number_literal ))) ;) (if_statement "if (local_25 != '\0') {\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      FUN_003f3900();\n    }\n                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */\n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }" if (parenthesized_expression "(local_25 != '\0')" ( (binary_expression "local_25 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      FUN_003f3900();\n    }\n                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */\n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }" { (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;" (assignment_expression "iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1" identifier = (binary_expression "*(int *)(*param_1 + -0xc) + (int)param_1" (pointer_expression "*(int *)(*param_1 + -0xc)" * (cast_expression "(int *)(*param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0xc)" ( (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) + (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "piVar1 = *(int **)(iVar2 + 0x88);" (assignment_expression "piVar1 = *(int **)(iVar2 + 0x88)" identifier = (pointer_expression "*(int **)(iVar2 + 0x88)" * (cast_expression "(int **)(iVar2 + 0x88)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + 0x88)" ( (binary_expression "iVar2 + 0x88" identifier + number_literal) ))))) ;) (if_statement "if (piVar1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      FUN_003f3900();\n    }" if (parenthesized_expression "(piVar1 == (int *)0x0)" ( (binary_expression "piVar1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      FUN_003f3900();\n    }" { comment comment (expression_statement "FUN_003f3900();" (call_expression "FUN_003f3900()" identifier (argument_list "()" ( ))) ;) })) comment (expression_statement "(**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);" (call_expression "(**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20)" (parenthesized_expression "(**(code **)(*piVar1 + 0xc))" ( (pointer_expression "**(code **)(*piVar1 + 0xc)" * (pointer_expression "*(code **)(*piVar1 + 0xc)" * (cast_expression "(code **)(*piVar1 + 0xc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar1 + 0xc)" ( (binary_expression "*piVar1 + 0xc" (pointer_expression "*piVar1" * identifier) + number_literal) ))))) )) (argument_list "(local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20)" ( identifier , identifier , (pointer_expression "*(undefined4 *)(iVar2 + 0x7c)" * (cast_expression "(undefined4 *)(iVar2 + 0x7c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x7c)" ( (binary_expression "iVar2 + 0x7c" identifier + number_literal) )))) , number_literal , number_literal , number_literal , identifier , (pointer_expression "&local_24" & identifier) , identifier ))) ;) (if_statement "if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }" if (parenthesized_expression "(local_20[0] < -0x8000)" ( (binary_expression "local_20[0] < -0x8000" (subscript_expression "local_20[0]" identifier [ number_literal ]) < number_literal) )) (compound_statement "{\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }" { (expression_statement "local_24 = local_24 | 4;" (assignment_expression "local_24 = local_24 | 4" identifier = (binary_expression "local_24 | 4" identifier | number_literal)) ;) (expression_statement "*param_2 = 0x8000;" (assignment_expression "*param_2 = 0x8000" (pointer_expression "*param_2" * identifier) = number_literal) ;) }) (else_clause "else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }" else (compound_statement "{\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }" { (if_statement "if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }" if (parenthesized_expression "(0x7fff < local_20[0])" ( (binary_expression "0x7fff < local_20[0]" number_literal < (subscript_expression "local_20[0]" identifier [ number_literal ])) )) (compound_statement "{\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }" { (expression_statement "local_24 = local_24 | 4;" (assignment_expression "local_24 = local_24 | 4" identifier = (binary_expression "local_24 | 4" identifier | number_literal)) ;) (expression_statement "*param_2 = 0x7fff;" (assignment_expression "*param_2 = 0x7fff" (pointer_expression "*param_2" * identifier) = number_literal) ;) (if_statement "if (local_24 == 0) {\n          return param_1;\n        }" if (parenthesized_expression "(local_24 == 0)" ( (binary_expression "local_24 == 0" identifier == number_literal) )) (compound_statement "{\n          return param_1;\n        }" { (return_statement "return param_1;" return identifier ;) })) (goto_statement "goto LAB_003d503d;" goto statement_identifier ;) })) (expression_statement "*param_2 = (short)local_20[0];" (assignment_expression "*param_2 = (short)local_20[0]" (pointer_expression "*param_2" * identifier) = (cast_expression "(short)local_20[0]" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (subscript_expression "local_20[0]" identifier [ number_literal ]))) ;) }))) (if_statement "if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }" if (parenthesized_expression "(local_24 != 0)" ( (binary_expression "local_24 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }" { (labeled_statement "LAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;" statement_identifier : (expression_statement "iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;" (assignment_expression "iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1" identifier = (binary_expression "*(int *)(*param_1 + -0xc) + (int)param_1" (pointer_expression "*(int *)(*param_1 + -0xc)" * (cast_expression "(int *)(*param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0xc)" ( (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) + (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier))) ;)) (expression_statement "FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));" (call_expression "FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14))" identifier (argument_list "(iVar2,local_24 | *(uint *)(iVar2 + 0x14))" ( identifier , (binary_expression "local_24 | *(uint *)(iVar2 + 0x14)" identifier | (pointer_expression "*(uint *)(iVar2 + 0x14)" * (cast_expression "(uint *)(iVar2 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) ))))) ))) ;) (return_statement "return param_1;" return identifier ;) })) })) (return_statement "return param_1;" return identifier ;) })))
(translation_unit "/* std::wistream::TEMPNAMEPLACEHOLDERVALUE(short&) */\n\nwistream * __thiscall std::wistream::operator>>(wistream *this,short *param_1)\n\n{\n  int *piVar1;\n  wistream *pwVar2;\n  undefined1 local_34 [15];\n  sentry local_25;\n  uint local_24;\n  int local_20 [4];\n  \n  __x86_get_pc_thunk_di();\n  sentry::sentry(&local_25,this,false);\n  if (local_25 != (sentry)0x0) {\n    local_24 = 0;\n    pwVar2 = this + *(int *)(*(int *)this + -0xc);\n    piVar1 = *(int **)(pwVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      __throw_bad_cast();\n    }\n                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */\n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(pwVar2 + 0x7c),0xffffffff,0,0xffffffff,pwVar2,\n               &local_24,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_1 = -0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_1 = 0x7fff;\n        if (local_24 == 0) {\n          return this;\n        }\n        goto LAB_003d503d;\n      }\n      *param_1 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      wios::clear((_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc)));\n      return this;\n    }\n  }\n  return this;\n}\n\n" comment (ERROR "wistream * __thiscall std::wistream::operator>>(wistream *this,short *param_1)" (binary_expression "wistream * __thiscall std::wistream::operator>>(wistream *this,short *param_1)" (binary_expression "wistream * __thiscall" identifier * identifier) (ERROR "std::wistream::operator" identifier : : identifier : : identifier) >> (parenthesized_expression "(wistream *this,short *param_1)" ( (comma_expression "wistream *this,short *param_1" (binary_expression "wistream *this" identifier * identifier) , (binary_expression "short *param_1" identifier * identifier)) )))) (compound_statement "{\n  int *piVar1;\n  wistream *pwVar2;\n  undefined1 local_34 [15];\n  sentry local_25;\n  uint local_24;\n  int local_20 [4];\n  \n  __x86_get_pc_thunk_di();\n  sentry::sentry(&local_25,this,false);\n  if (local_25 != (sentry)0x0) {\n    local_24 = 0;\n    pwVar2 = this + *(int *)(*(int *)this + -0xc);\n    piVar1 = *(int **)(pwVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      __throw_bad_cast();\n    }\n                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */\n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(pwVar2 + 0x7c),0xffffffff,0,0xffffffff,pwVar2,\n               &local_24,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_1 = -0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_1 = 0x7fff;\n        if (local_24 == 0) {\n          return this;\n        }\n        goto LAB_003d503d;\n      }\n      *param_1 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      wios::clear((_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc)));\n      return this;\n    }\n  }\n  return this;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "wistream *pwVar2;" type_identifier (pointer_declarator "*pwVar2" * identifier) ;) (declaration "undefined1 local_34 [15];" type_identifier (array_declarator "local_34 [15]" identifier [ number_literal ]) ;) (declaration "sentry local_25;" type_identifier identifier ;) (declaration "uint local_24;" type_identifier identifier ;) (declaration "int local_20 [4];" primitive_type (array_declarator "local_20 [4]" identifier [ number_literal ]) ;) (expression_statement "__x86_get_pc_thunk_di();" (call_expression "__x86_get_pc_thunk_di()" identifier (argument_list "()" ( ))) ;) (labeled_statement "sentry::sentry(&local_25,this,false);" statement_identifier : (ERROR ":" :) (expression_statement "sentry(&local_25,this,false);" (call_expression "sentry(&local_25,this,false)" identifier (argument_list "(&local_25,this,false)" ( (pointer_expression "&local_25" & identifier) , identifier , false ))) ;)) (if_statement "if (local_25 != (sentry)0x0) {\n    local_24 = 0;\n    pwVar2 = this + *(int *)(*(int *)this + -0xc);\n    piVar1 = *(int **)(pwVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      __throw_bad_cast();\n    }\n                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */\n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(pwVar2 + 0x7c),0xffffffff,0,0xffffffff,pwVar2,\n               &local_24,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_1 = -0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_1 = 0x7fff;\n        if (local_24 == 0) {\n          return this;\n        }\n        goto LAB_003d503d;\n      }\n      *param_1 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      wios::clear((_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc)));\n      return this;\n    }\n  }" if (parenthesized_expression "(local_25 != (sentry)0x0)" ( (binary_expression "local_25 != (sentry)0x0" identifier != (cast_expression "(sentry)0x0" ( (type_descriptor "sentry" type_identifier) ) number_literal)) )) (compound_statement "{\n    local_24 = 0;\n    pwVar2 = this + *(int *)(*(int *)this + -0xc);\n    piVar1 = *(int **)(pwVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      __throw_bad_cast();\n    }\n                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */\n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(pwVar2 + 0x7c),0xffffffff,0,0xffffffff,pwVar2,\n               &local_24,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_1 = -0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_1 = 0x7fff;\n        if (local_24 == 0) {\n          return this;\n        }\n        goto LAB_003d503d;\n      }\n      *param_1 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      wios::clear((_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc)));\n      return this;\n    }\n  }" { (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "pwVar2 = this + *(int *)(*(int *)this + -0xc);" (assignment_expression "pwVar2 = this + *(int *)(*(int *)this + -0xc)" identifier = (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) )))))) ;) (expression_statement "piVar1 = *(int **)(pwVar2 + 0x88);" (assignment_expression "piVar1 = *(int **)(pwVar2 + 0x88)" identifier = (pointer_expression "*(int **)(pwVar2 + 0x88)" * (cast_expression "(int **)(pwVar2 + 0x88)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(pwVar2 + 0x88)" ( (binary_expression "pwVar2 + 0x88" identifier + number_literal) ))))) ;) (if_statement "if (piVar1 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      __throw_bad_cast();\n    }" if (parenthesized_expression "(piVar1 == (int *)0x0)" ( (binary_expression "piVar1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */\n      __throw_bad_cast();\n    }" { comment comment (expression_statement "__throw_bad_cast();" (call_expression "__throw_bad_cast()" identifier (argument_list "()" ( ))) ;) })) comment (expression_statement "(**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(pwVar2 + 0x7c),0xffffffff,0,0xffffffff,pwVar2,\n               &local_24,local_20);" (call_expression "(**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(pwVar2 + 0x7c),0xffffffff,0,0xffffffff,pwVar2,\n               &local_24,local_20)" (parenthesized_expression "(**(code **)(*piVar1 + 0xc))" ( (pointer_expression "**(code **)(*piVar1 + 0xc)" * (pointer_expression "*(code **)(*piVar1 + 0xc)" * (cast_expression "(code **)(*piVar1 + 0xc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar1 + 0xc)" ( (binary_expression "*piVar1 + 0xc" (pointer_expression "*piVar1" * identifier) + number_literal) ))))) )) (argument_list "(local_34,piVar1,*(undefined4 *)(pwVar2 + 0x7c),0xffffffff,0,0xffffffff,pwVar2,\n               &local_24,local_20)" ( identifier , identifier , (pointer_expression "*(undefined4 *)(pwVar2 + 0x7c)" * (cast_expression "(undefined4 *)(pwVar2 + 0x7c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(pwVar2 + 0x7c)" ( (binary_expression "pwVar2 + 0x7c" identifier + number_literal) )))) , number_literal , number_literal , number_literal , identifier , (pointer_expression "&local_24" & identifier) , identifier ))) ;) (if_statement "if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_1 = -0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_1 = 0x7fff;\n        if (local_24 == 0) {\n          return this;\n        }\n        goto LAB_003d503d;\n      }\n      *param_1 = (short)local_20[0];\n    }" if (parenthesized_expression "(local_20[0] < -0x8000)" ( (binary_expression "local_20[0] < -0x8000" (subscript_expression "local_20[0]" identifier [ number_literal ]) < number_literal) )) (compound_statement "{\n      local_24 = local_24 | 4;\n      *param_1 = -0x8000;\n    }" { (expression_statement "local_24 = local_24 | 4;" (assignment_expression "local_24 = local_24 | 4" identifier = (binary_expression "local_24 | 4" identifier | number_literal)) ;) (expression_statement "*param_1 = -0x8000;" (assignment_expression "*param_1 = -0x8000" (pointer_expression "*param_1" * identifier) = number_literal) ;) }) (else_clause "else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_1 = 0x7fff;\n        if (local_24 == 0) {\n          return this;\n        }\n        goto LAB_003d503d;\n      }\n      *param_1 = (short)local_20[0];\n    }" else (compound_statement "{\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_1 = 0x7fff;\n        if (local_24 == 0) {\n          return this;\n        }\n        goto LAB_003d503d;\n      }\n      *param_1 = (short)local_20[0];\n    }" { (if_statement "if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_1 = 0x7fff;\n        if (local_24 == 0) {\n          return this;\n        }\n        goto LAB_003d503d;\n      }" if (parenthesized_expression "(0x7fff < local_20[0])" ( (binary_expression "0x7fff < local_20[0]" number_literal < (subscript_expression "local_20[0]" identifier [ number_literal ])) )) (compound_statement "{\n        local_24 = local_24 | 4;\n        *param_1 = 0x7fff;\n        if (local_24 == 0) {\n          return this;\n        }\n        goto LAB_003d503d;\n      }" { (expression_statement "local_24 = local_24 | 4;" (assignment_expression "local_24 = local_24 | 4" identifier = (binary_expression "local_24 | 4" identifier | number_literal)) ;) (expression_statement "*param_1 = 0x7fff;" (assignment_expression "*param_1 = 0x7fff" (pointer_expression "*param_1" * identifier) = number_literal) ;) (if_statement "if (local_24 == 0) {\n          return this;\n        }" if (parenthesized_expression "(local_24 == 0)" ( (binary_expression "local_24 == 0" identifier == number_literal) )) (compound_statement "{\n          return this;\n        }" { (return_statement "return this;" return identifier ;) })) (goto_statement "goto LAB_003d503d;" goto statement_identifier ;) })) (expression_statement "*param_1 = (short)local_20[0];" (assignment_expression "*param_1 = (short)local_20[0]" (pointer_expression "*param_1" * identifier) = (cast_expression "(short)local_20[0]" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (subscript_expression "local_20[0]" identifier [ number_literal ]))) ;) }))) (if_statement "if (local_24 != 0) {\nLAB_003d503d:\n      wios::clear((_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc)));\n      return this;\n    }" if (parenthesized_expression "(local_24 != 0)" ( (binary_expression "local_24 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_003d503d:\n      wios::clear((_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc)));\n      return this;\n    }" { (labeled_statement "LAB_003d503d:\n      wios::clear((_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc)));" statement_identifier : (labeled_statement "wios::clear((_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc)));" statement_identifier : (ERROR ":" :) (expression_statement "clear((_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc)));" (call_expression "clear((_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc)))" identifier (argument_list "((_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc)))" ( (call_expression "(_Ios_Iostate)(this + *(int *)(*(int *)this + -0xc))" (parenthesized_expression "(_Ios_Iostate)" ( identifier )) (argument_list "(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) ))))) ))) ))) ;))) (return_statement "return this;" return identifier ;) })) })) (return_statement "return this;" return identifier ;) }))
(translation_unit "int * FUN_003d4f70(int *param_1,undefined2 *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined1 local_34 [15];\n  char local_25;\n  uint local_24;\n  int local_20 [4];\n  \n  FUN_00074f0a();\n  FUN_003d4d40(&local_25,param_1,0);\n  if (local_25 != '\0') {\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    \n                    \n      FUN_003f3900();\n    }\n                    \n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }\n  return param_1;\n}\n\n" (function_definition "int * FUN_003d4f70(int *param_1,undefined2 *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined1 local_34 [15];\n  char local_25;\n  uint local_24;\n  int local_20 [4];\n  \n  FUN_00074f0a();\n  FUN_003d4d40(&local_25,param_1,0);\n  if (local_25 != '\0') {\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    \n                    \n      FUN_003f3900();\n    }\n                    \n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }\n  return param_1;\n}" primitive_type (pointer_declarator "* FUN_003d4f70(int *param_1,undefined2 *param_2)" * (function_declarator "FUN_003d4f70(int *param_1,undefined2 *param_2)" identifier (parameter_list "(int *param_1,undefined2 *param_2)" ( (parameter_declaration "int *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "undefined2 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) )))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined1 local_34 [15];\n  char local_25;\n  uint local_24;\n  int local_20 [4];\n  \n  FUN_00074f0a();\n  FUN_003d4d40(&local_25,param_1,0);\n  if (local_25 != '\0') {\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    \n                    \n      FUN_003f3900();\n    }\n                    \n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }\n  return param_1;\n}" { (declaration "int *piVar1;" primitive_type (pointer_declarator "*piVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "undefined1 local_34 [15];" type_identifier (array_declarator "local_34 [15]" identifier [ number_literal ]) ;) (declaration "char local_25;" primitive_type identifier ;) (declaration "uint local_24;" type_identifier identifier ;) (declaration "int local_20 [4];" primitive_type (array_declarator "local_20 [4]" identifier [ number_literal ]) ;) (expression_statement "FUN_00074f0a();" (call_expression "FUN_00074f0a()" identifier (argument_list "()" ( ))) ;) (expression_statement "FUN_003d4d40(&local_25,param_1,0);" (call_expression "FUN_003d4d40(&local_25,param_1,0)" identifier (argument_list "(&local_25,param_1,0)" ( (pointer_expression "&local_25" & identifier) , identifier , number_literal ))) ;) (if_statement "if (local_25 != '\0') {\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    \n                    \n      FUN_003f3900();\n    }\n                    \n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }" if (parenthesized_expression "(local_25 != '\0')" ( (binary_expression "local_25 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) (compound_statement "{\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    \n                    \n      FUN_003f3900();\n    }\n                    \n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }" { (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" identifier = number_literal) ;) (expression_statement "iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;" (assignment_expression "iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1" identifier = (binary_expression "*(int *)(*param_1 + -0xc) + (int)param_1" (pointer_expression "*(int *)(*param_1 + -0xc)" * (cast_expression "(int *)(*param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0xc)" ( (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) + (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier))) ;) (expression_statement "piVar1 = *(int **)(iVar2 + 0x88);" (assignment_expression "piVar1 = *(int **)(iVar2 + 0x88)" identifier = (pointer_expression "*(int **)(iVar2 + 0x88)" * (cast_expression "(int **)(iVar2 + 0x88)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(iVar2 + 0x88)" ( (binary_expression "iVar2 + 0x88" identifier + number_literal) ))))) ;) (if_statement "if (piVar1 == (int *)0x0) {\n                    \n                    \n      FUN_003f3900();\n    }" if (parenthesized_expression "(piVar1 == (int *)0x0)" ( (binary_expression "piVar1 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n                    \n      FUN_003f3900();\n    }" { (expression_statement "FUN_003f3900();" (call_expression "FUN_003f3900()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "(**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);" (call_expression "(**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20)" (parenthesized_expression "(**(code **)(*piVar1 + 0xc))" ( (pointer_expression "**(code **)(*piVar1 + 0xc)" * (pointer_expression "*(code **)(*piVar1 + 0xc)" * (cast_expression "(code **)(*piVar1 + 0xc)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar1 + 0xc)" ( (binary_expression "*piVar1 + 0xc" (pointer_expression "*piVar1" * identifier) + number_literal) ))))) )) (argument_list "(local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20)" ( identifier , identifier , (pointer_expression "*(undefined4 *)(iVar2 + 0x7c)" * (cast_expression "(undefined4 *)(iVar2 + 0x7c)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x7c)" ( (binary_expression "iVar2 + 0x7c" identifier + number_literal) )))) , number_literal , number_literal , number_literal , identifier , (pointer_expression "&local_24" & identifier) , identifier ))) ;) (if_statement "if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }" if (parenthesized_expression "(local_20[0] < -0x8000)" ( (binary_expression "local_20[0] < -0x8000" (subscript_expression "local_20[0]" identifier [ number_literal ]) < number_literal) )) (compound_statement "{\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }" { (expression_statement "local_24 = local_24 | 4;" (assignment_expression "local_24 = local_24 | 4" identifier = (binary_expression "local_24 | 4" identifier | number_literal)) ;) (expression_statement "*param_2 = 0x8000;" (assignment_expression "*param_2 = 0x8000" (pointer_expression "*param_2" * identifier) = number_literal) ;) }) (else_clause "else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }" else (compound_statement "{\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }" { (if_statement "if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }" if (parenthesized_expression "(0x7fff < local_20[0])" ( (binary_expression "0x7fff < local_20[0]" number_literal < (subscript_expression "local_20[0]" identifier [ number_literal ])) )) (compound_statement "{\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }" { (expression_statement "local_24 = local_24 | 4;" (assignment_expression "local_24 = local_24 | 4" identifier = (binary_expression "local_24 | 4" identifier | number_literal)) ;) (expression_statement "*param_2 = 0x7fff;" (assignment_expression "*param_2 = 0x7fff" (pointer_expression "*param_2" * identifier) = number_literal) ;) (if_statement "if (local_24 == 0) {\n          return param_1;\n        }" if (parenthesized_expression "(local_24 == 0)" ( (binary_expression "local_24 == 0" identifier == number_literal) )) (compound_statement "{\n          return param_1;\n        }" { (return_statement "return param_1;" return identifier ;) })) (goto_statement "goto LAB_003d503d;" goto statement_identifier ;) })) (expression_statement "*param_2 = (short)local_20[0];" (assignment_expression "*param_2 = (short)local_20[0]" (pointer_expression "*param_2" * identifier) = (cast_expression "(short)local_20[0]" ( (type_descriptor "short" (sized_type_specifier "short" short)) ) (subscript_expression "local_20[0]" identifier [ number_literal ]))) ;) }))) (if_statement "if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }" if (parenthesized_expression "(local_24 != 0)" ( (binary_expression "local_24 != 0" identifier != number_literal) )) (compound_statement "{\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }" { (labeled_statement "LAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;" statement_identifier : (expression_statement "iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;" (assignment_expression "iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1" identifier = (binary_expression "*(int *)(*param_1 + -0xc) + (int)param_1" (pointer_expression "*(int *)(*param_1 + -0xc)" * (cast_expression "(int *)(*param_1 + -0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(*param_1 + -0xc)" ( (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" * identifier) + number_literal) )))) + (cast_expression "(int)param_1" ( (type_descriptor "int" primitive_type) ) identifier))) ;)) (expression_statement "FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));" (call_expression "FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14))" identifier (argument_list "(iVar2,local_24 | *(uint *)(iVar2 + 0x14))" ( identifier , (binary_expression "local_24 | *(uint *)(iVar2 + 0x14)" identifier | (pointer_expression "*(uint *)(iVar2 + 0x14)" * (cast_expression "(uint *)(iVar2 + 0x14)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar2 + 0x14)" ( (binary_expression "iVar2 + 0x14" identifier + number_literal) ))))) ))) ;) (return_statement "return param_1;" return identifier ;) })) })) (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 (pointer_declarator * IDENT)) )))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (call_expression IDENT (argument_list ( ))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT , LIT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (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 ( IDENT , IDENT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT , LIT , IDENT , (pointer_expression & IDENT) , IDENT ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (subscript_expression IDENT [ LIT ]) < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression LIT < (subscript_expression IDENT [ LIT ])) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT | LIT)) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (return_statement return IDENT ;) })) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression (pointer_expression * IDENT) = (cast_expression ( (type_descriptor (sized_type_specifier short)) ) (subscript_expression IDENT [ LIT ]))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (labeled_statement statement_identifier : (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) )))) + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;)) (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 ;) })) })) (return_statement return IDENT ;) })))
(function_definition "int * FUN_003d4f70(int *param_1,undefined2 *param_2)\n\n{\n  int *piVar1;\n  int iVar2;\n  undefined1 local_34 [15];\n  char local_25;\n  uint local_24;\n  int local_20 [4];\n  \n  FUN_00074f0a();\n  FUN_003d4d40(&local_25,param_1,0);\n  if (local_25 != '\0') {\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    \n                    \n      FUN_003f3900();\n    }\n                    \n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }\n  return param_1;\n}" (primitive_type "int") (pointer_declarator "* FUN_003d4f70(int *param_1,undefined2 *param_2)" (* "*") (function_declarator "FUN_003d4f70(int *param_1,undefined2 *param_2)" (identifier "FUN_003d4f70") (parameter_list "(int *param_1,undefined2 *param_2)" (( "(") (parameter_declaration "int *param_1" (primitive_type "int") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "undefined2 *param_2" (type_identifier "undefined2") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) () ")")))) (compound_statement "{\n  int *piVar1;\n  int iVar2;\n  undefined1 local_34 [15];\n  char local_25;\n  uint local_24;\n  int local_20 [4];\n  \n  FUN_00074f0a();\n  FUN_003d4d40(&local_25,param_1,0);\n  if (local_25 != '\0') {\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    \n                    \n      FUN_003f3900();\n    }\n                    \n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }\n  return param_1;\n}" ({ "{") (declaration "int *piVar1;" (primitive_type "int") (pointer_declarator "*piVar1" (* "*") (identifier "piVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "undefined1 local_34 [15];" (type_identifier "undefined1") (array_declarator "local_34 [15]" (identifier "local_34") ([ "[") (number_literal "15") (] "]")) (; ";")) (declaration "char local_25;" (primitive_type "char") (identifier "local_25") (; ";")) (declaration "uint local_24;" (type_identifier "uint") (identifier "local_24") (; ";")) (declaration "int local_20 [4];" (primitive_type "int") (array_declarator "local_20 [4]" (identifier "local_20") ([ "[") (number_literal "4") (] "]")) (; ";")) (expression_statement "FUN_00074f0a();" (call_expression "FUN_00074f0a()" (identifier "FUN_00074f0a") (argument_list "()" (( "(") () ")"))) (; ";")) (expression_statement "FUN_003d4d40(&local_25,param_1,0);" (call_expression "FUN_003d4d40(&local_25,param_1,0)" (identifier "FUN_003d4d40") (argument_list "(&local_25,param_1,0)" (( "(") (pointer_expression "&local_25" (& "&") (identifier "local_25")) (, ",") (identifier "param_1") (, ",") (number_literal "0") () ")"))) (; ";")) (if_statement "if (local_25 != '\0') {\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    \n                    \n      FUN_003f3900();\n    }\n                    \n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }" (if "if") (parenthesized_expression "(local_25 != '\0')" (( "(") (binary_expression "local_25 != '\0'" (identifier "local_25") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (compound_statement "{\n    local_24 = 0;\n    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n    piVar1 = *(int **)(iVar2 + 0x88);\n    if (piVar1 == (int *)0x0) {\n                    \n                    \n      FUN_003f3900();\n    }\n                    \n    (**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);\n    if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }\n    if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }\n  }" ({ "{") (expression_statement "local_24 = 0;" (assignment_expression "local_24 = 0" (identifier "local_24") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;" (assignment_expression "iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1" (identifier "iVar2") (= "=") (binary_expression "*(int *)(*param_1 + -0xc) + (int)param_1" (pointer_expression "*(int *)(*param_1 + -0xc)" (* "*") (cast_expression "(int *)(*param_1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + -0xc)" (( "(") (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "-0xc")) () ")")))) (+ "+") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")))) (; ";")) (expression_statement "piVar1 = *(int **)(iVar2 + 0x88);" (assignment_expression "piVar1 = *(int **)(iVar2 + 0x88)" (identifier "piVar1") (= "=") (pointer_expression "*(int **)(iVar2 + 0x88)" (* "*") (cast_expression "(int **)(iVar2 + 0x88)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(iVar2 + 0x88)" (( "(") (binary_expression "iVar2 + 0x88" (identifier "iVar2") (+ "+") (number_literal "0x88")) () ")"))))) (; ";")) (if_statement "if (piVar1 == (int *)0x0) {\n                    \n                    \n      FUN_003f3900();\n    }" (if "if") (parenthesized_expression "(piVar1 == (int *)0x0)" (( "(") (binary_expression "piVar1 == (int *)0x0" (identifier "piVar1") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n                    \n      FUN_003f3900();\n    }" ({ "{") (expression_statement "FUN_003f3900();" (call_expression "FUN_003f3900()" (identifier "FUN_003f3900") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "(**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20);" (call_expression "(**(code **)(*piVar1 + 0xc))\n              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20)" (parenthesized_expression "(**(code **)(*piVar1 + 0xc))" (( "(") (pointer_expression "**(code **)(*piVar1 + 0xc)" (* "*") (pointer_expression "*(code **)(*piVar1 + 0xc)" (* "*") (cast_expression "(code **)(*piVar1 + 0xc)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar1 + 0xc)" (( "(") (binary_expression "*piVar1 + 0xc" (pointer_expression "*piVar1" (* "*") (identifier "piVar1")) (+ "+") (number_literal "0xc")) () ")"))))) () ")")) (argument_list "(local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24\n               ,local_20)" (( "(") (identifier "local_34") (, ",") (identifier "piVar1") (, ",") (pointer_expression "*(undefined4 *)(iVar2 + 0x7c)" (* "*") (cast_expression "(undefined4 *)(iVar2 + 0x7c)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x7c)" (( "(") (binary_expression "iVar2 + 0x7c" (identifier "iVar2") (+ "+") (number_literal "0x7c")) () ")")))) (, ",") (number_literal "0xffffffff") (, ",") (number_literal "0") (, ",") (number_literal "0xffffffff") (, ",") (identifier "iVar2") (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) (, ",") (identifier "local_20") () ")"))) (; ";")) (if_statement "if (local_20[0] < -0x8000) {\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }\n    else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }" (if "if") (parenthesized_expression "(local_20[0] < -0x8000)" (( "(") (binary_expression "local_20[0] < -0x8000" (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")) (< "<") (number_literal "-0x8000")) () ")")) (compound_statement "{\n      local_24 = local_24 | 4;\n      *param_2 = 0x8000;\n    }" ({ "{") (expression_statement "local_24 = local_24 | 4;" (assignment_expression "local_24 = local_24 | 4" (identifier "local_24") (= "=") (binary_expression "local_24 | 4" (identifier "local_24") (| "|") (number_literal "4"))) (; ";")) (expression_statement "*param_2 = 0x8000;" (assignment_expression "*param_2 = 0x8000" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0x8000")) (; ";")) (} "}")) (else_clause "else {\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }" (else "else") (compound_statement "{\n      if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }\n      *param_2 = (short)local_20[0];\n    }" ({ "{") (if_statement "if (0x7fff < local_20[0]) {\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }" (if "if") (parenthesized_expression "(0x7fff < local_20[0])" (( "(") (binary_expression "0x7fff < local_20[0]" (number_literal "0x7fff") (< "<") (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]"))) () ")")) (compound_statement "{\n        local_24 = local_24 | 4;\n        *param_2 = 0x7fff;\n        if (local_24 == 0) {\n          return param_1;\n        }\n        goto LAB_003d503d;\n      }" ({ "{") (expression_statement "local_24 = local_24 | 4;" (assignment_expression "local_24 = local_24 | 4" (identifier "local_24") (= "=") (binary_expression "local_24 | 4" (identifier "local_24") (| "|") (number_literal "4"))) (; ";")) (expression_statement "*param_2 = 0x7fff;" (assignment_expression "*param_2 = 0x7fff" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (number_literal "0x7fff")) (; ";")) (if_statement "if (local_24 == 0) {\n          return param_1;\n        }" (if "if") (parenthesized_expression "(local_24 == 0)" (( "(") (binary_expression "local_24 == 0" (identifier "local_24") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n          return param_1;\n        }" ({ "{") (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (goto_statement "goto LAB_003d503d;" (goto "goto") (statement_identifier "LAB_003d503d") (; ";")) (} "}"))) (expression_statement "*param_2 = (short)local_20[0];" (assignment_expression "*param_2 = (short)local_20[0]" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (cast_expression "(short)local_20[0]" (( "(") (type_descriptor "short" (sized_type_specifier "short" (short "short"))) () ")") (subscript_expression "local_20[0]" (identifier "local_20") ([ "[") (number_literal "0") (] "]")))) (; ";")) (} "}")))) (if_statement "if (local_24 != 0) {\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }" (if "if") (parenthesized_expression "(local_24 != 0)" (( "(") (binary_expression "local_24 != 0" (identifier "local_24") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\nLAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;\n      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));\n      return param_1;\n    }" ({ "{") (labeled_statement "LAB_003d503d:\n      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;" (statement_identifier "LAB_003d503d") (: ":") (expression_statement "iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;" (assignment_expression "iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1" (identifier "iVar2") (= "=") (binary_expression "*(int *)(*param_1 + -0xc) + (int)param_1" (pointer_expression "*(int *)(*param_1 + -0xc)" (* "*") (cast_expression "(int *)(*param_1 + -0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(*param_1 + -0xc)" (( "(") (binary_expression "*param_1 + -0xc" (pointer_expression "*param_1" (* "*") (identifier "param_1")) (+ "+") (number_literal "-0xc")) () ")")))) (+ "+") (cast_expression "(int)param_1" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "param_1")))) (; ";"))) (expression_statement "FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));" (call_expression "FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14))" (identifier "FUN_003d8970") (argument_list "(iVar2,local_24 | *(uint *)(iVar2 + 0x14))" (( "(") (identifier "iVar2") (, ",") (binary_expression "local_24 | *(uint *)(iVar2 + 0x14)" (identifier "local_24") (| "|") (pointer_expression "*(uint *)(iVar2 + 0x14)" (* "*") (cast_expression "(uint *)(iVar2 + 0x14)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar2 + 0x14)" (( "(") (binary_expression "iVar2 + 0x14" (identifier "iVar2") (+ "+") (number_literal "0x14")) () ")"))))) () ")"))) (; ";")) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}"))) (} "}"))) (return_statement "return param_1;" (return "return") (identifier "param_1") (; ";")) (} "}")))

/* std::wistream::TEMPNAMEPLACEHOLDERVALUE(short&) */

type_1 * __thiscall std::type_1::operator>>(type_1 *var_3,short *param_1)

{
  int *var_5;
  type_1 *var_4;
  type_2 local_34 [15];
  type_3 var_2;
  type_4 var_7;
  int local_20 [4];
  
  var_1();
  sentry::type_3(&var_2,var_3,false);
  if (var_2 != (type_3)0x0) {
    var_7 = 0;
    var_4 = var_3 + *(int *)(*(int *)var_3 + -0xc);
    var_5 = *(int **)(var_4 + 0x88);
    if (var_5 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */
      var_6();
    }
                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */
    (**(type_5 **)(*var_5 + 0xc))
              (local_34,var_5,*(type_6 *)(var_4 + 0x7c),0xffffffff,0,0xffffffff,var_4,
               &var_7,local_20);
    if (local_20[0] < -0x8000) {
      var_7 = var_7 | 4;
      *param_1 = -0x8000;
    }
    else {
      if (0x7fff < local_20[0]) {
        var_7 = var_7 | 4;
        *param_1 = 0x7fff;
        if (var_7 == 0) {
          return var_3;
        }
        goto LAB_003d503d;
      }
      *param_1 = (short)local_20[0];
    }
    if (var_7 != 0) {
LAB_003d503d:
      wios::var_8((_Ios_Iostate)(var_3 + *(int *)(*(int *)var_3 + -0xc)));
      return var_3;
    }
  }
  return var_3;
}


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

int * MASKED(int *param_1,undefined2 *param_2)

{
  int *piVar1;
  int iVar2;
  undefined1 local_34 [15];
  char local_25;
  uint local_24;
  int local_20 [4];
  
  FUN_00074f0a();
  FUN_003d4d40(&local_25,param_1,0);
  if (local_25 != '\0') {
    local_24 = 0;
    iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;
    piVar1 = *(int **)(iVar2 + 0x88);
    if (piVar1 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
                    /* try { // try from 003d5068 to 003d506c has its CatchHandler @ 003d506d */
      FUN_003f3900();
    }
                    /* try { // try from 003d4fe9 to 003d4feb has its CatchHandler @ 003d506d */
    (**(code **)(*piVar1 + 0xc))
              (local_34,piVar1,*(undefined4 *)(iVar2 + 0x7c),0xffffffff,0,0xffffffff,iVar2,&local_24
               ,local_20);
    if (local_20[0] < -0x8000) {
      local_24 = local_24 | 4;
      *param_2 = 0x8000;
    }
    else {
      if (0x7fff < local_20[0]) {
        local_24 = local_24 | 4;
        *param_2 = 0x7fff;
        if (local_24 == 0) {
          return param_1;
        }
        goto LAB_003d503d;
      }
      *param_2 = (short)local_20[0];
    }
    if (local_24 != 0) {
LAB_003d503d:
      iVar2 = *(int *)(*param_1 + -0xc) + (int)param_1;
      FUN_003d8970(iVar2,local_24 | *(uint *)(iVar2 + 0x14));
      return param_1;
    }
  }
  return param_1;
}

