
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::__basic_file<char>::showmanyc() */

uint __thiscall std::__basic_file<char>::showmanyc(__basic_file<char> *this)

{
  int iVar1;
  uint uVar2;
  __off64_t _Var3;
  uint local_78;
  pollfd local_74;
  stat64 local_6c;
  
  local_6c.st_ino._4_4_ = 0x1fda48;
  local_78 = 0;
  iVar1 = fd(this);
  iVar1 = ioctl(iVar1,0x541b,&local_78);
  if ((iVar1 != 0) || ((int)local_78 < 0)) {
    local_74.fd = fd(this);
    local_74.events = 1;
    iVar1 = poll(&local_74,1,0);
    if (0 < iVar1) {
      iVar1 = fd(this);
      iVar1 = __fxstat64(3,iVar1,&local_6c);
      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {
        iVar1 = fd(this);
        _Var3 = lseek64(iVar1,0,1);
        uVar2 = (uint)local_6c.st_size - (uint)_Var3;
        if ((int)(uint)(0x7fffffff < uVar2) <=
            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -
                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {
          return uVar2;
        }
        return 0x7fffffff;
      }
    }
    local_78 = 0;
  }
  return local_78;
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

uint FUN_001fda40(undefined4 param_1)

{
  int iVar1;
  uint uVar2;
  __off64_t _Var3;
  uint local_78;
  pollfd local_74;
  stat64 local_6c;
  
  local_6c.st_ino._4_4_ = 0x1fda48;
  local_78 = 0;
  iVar1 = FUN_001fd7c0(param_1);
  iVar1 = ioctl(iVar1,0x541b,&local_78);
  if ((iVar1 != 0) || ((int)local_78 < 0)) {
    local_74.fd = FUN_001fd7c0(param_1);
    local_74.events = 1;
    iVar1 = poll(&local_74,1,0);
    if (0 < iVar1) {
      iVar1 = FUN_001fd7c0(param_1);
      iVar1 = __fxstat64(3,iVar1,&local_6c);
      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {
        iVar1 = FUN_001fd7c0(param_1);
        _Var3 = lseek64(iVar1,0,1);
        uVar2 = (uint)local_6c.st_size - (uint)_Var3;
        if ((int)(uint)(0x7fffffff < uVar2) <=
            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -
                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {
          return uVar2;
        }
        return 0x7fffffff;
      }
    }
    local_78 = 0;
  }
  return local_78;
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00036db0
ADD EBX,0x1ac5b8
SUB ESP,0x8c
MOV ESI,dword ptr [ESP + 0x9c]
MOV dword ptr [ESP + 0x20],0x0
PUSH ESI
CALL 0x001fd7c0
ADD ESP,0xc
LEA EDX,[ESP + 0x18]
PUSH EDX
PUSH 0x541b
PUSH EAX
CALL 0x0002a4c0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x001fda8b
MOV EAX,dword ptr [ESP + 0x14]
TEST EAX,EAX
JNS 0x001fdaee
SUB ESP,0xc
PUSH ESI
CALL 0x001fd7c0
ADD ESP,0xc
MOV dword ptr [ESP + 0x1c],EAX
MOV EAX,0x1
MOV word ptr [ESP + 0x20],AX
PUSH 0x0
PUSH 0x1
LEA EAX,[ESP + 0x24]
PUSH EAX
CALL 0x0002a840
ADD ESP,0x10
TEST EAX,EAX
JLE 0x001fdaec
SUB ESP,0xc
PUSH ESI
CALL 0x001fd7c0
ADD ESP,0xc
LEA EDX,[ESP + 0x24]
PUSH EDX
PUSH EAX
PUSH 0x3
CALL 0x0002a910
ADD ESP,0x10
MOV EDI,EAX
TEST EAX,EAX
JNZ 0x001fdaec
MOV EAX,dword ptr [ESP + 0x30]
AND EAX,0xf000
CMP EAX,0x8000
JZ 0x001fdaf8
XOR EAX,EAX
SUB ESP,-0x80
POP EBX
POP ESI
POP EDI
RET
MOV EAX,dword ptr [ESP + 0x4c]
MOV EDX,dword ptr [ESP + 0x50]
SUB ESP,0xc
MOV dword ptr [ESP + 0x18],EDX
MOV dword ptr [ESP + 0x14],EAX
PUSH ESI
CALL 0x001fd7c0
ADD ESP,0x10
PUSH 0x1
PUSH 0x0
PUSH 0x0
PUSH EAX
CALL 0x0002a2f0
MOV ECX,dword ptr [ESP + 0x18]
MOV EBX,dword ptr [ESP + 0x1c]
SUB ECX,EAX
MOV EAX,ECX
MOV ECX,0x7fffffff
SBB EBX,EDX
ADD ESP,0x10
CMP ECX,EAX
SBB EDI,EBX
JGE 0x001fdaee
MOV EAX,0x7fffffff
JMP 0x001fdaee
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nuint FUN_001fda40(undefined4 param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  __off64_t _Var3;\n  uint local_78;\n  pollfd local_74;\n  stat64 local_6c;\n  \n  local_6c.st_ino._4_4_ = 0x1fda48;\n  local_78 = 0;\n  iVar1 = FUN_001fd7c0(param_1);\n  iVar1 = ioctl(iVar1,0x541b,&local_78);\n  if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }\n  return local_78;\n}\n\n" comment (function_definition "uint FUN_001fda40(undefined4 param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  __off64_t _Var3;\n  uint local_78;\n  pollfd local_74;\n  stat64 local_6c;\n  \n  local_6c.st_ino._4_4_ = 0x1fda48;\n  local_78 = 0;\n  iVar1 = FUN_001fd7c0(param_1);\n  iVar1 = ioctl(iVar1,0x541b,&local_78);\n  if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }\n  return local_78;\n}" type_identifier (function_declarator "FUN_001fda40(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  __off64_t _Var3;\n  uint local_78;\n  pollfd local_74;\n  stat64 local_6c;\n  \n  local_6c.st_ino._4_4_ = 0x1fda48;\n  local_78 = 0;\n  iVar1 = FUN_001fd7c0(param_1);\n  iVar1 = ioctl(iVar1,0x541b,&local_78);\n  if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }\n  return local_78;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "__off64_t _Var3;" type_identifier identifier ;) (declaration "uint local_78;" type_identifier identifier ;) (declaration "pollfd local_74;" type_identifier identifier ;) (declaration "stat64 local_6c;" type_identifier identifier ;) (expression_statement "local_6c.st_ino._4_4_ = 0x1fda48;" (assignment_expression "local_6c.st_ino._4_4_ = 0x1fda48" (field_expression "local_6c.st_ino._4_4_" (field_expression "local_6c.st_ino" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "local_78 = 0;" (assignment_expression "local_78 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = FUN_001fd7c0(param_1);" (assignment_expression "iVar1 = FUN_001fd7c0(param_1)" identifier = (call_expression "FUN_001fd7c0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar1 = ioctl(iVar1,0x541b,&local_78);" (assignment_expression "iVar1 = ioctl(iVar1,0x541b,&local_78)" identifier = (call_expression "ioctl(iVar1,0x541b,&local_78)" identifier (argument_list "(iVar1,0x541b,&local_78)" ( identifier , number_literal , (pointer_expression "&local_78" & identifier) )))) ;) (if_statement "if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }" if (parenthesized_expression "((iVar1 != 0) || ((int)local_78 < 0))" ( (binary_expression "(iVar1 != 0) || ((int)local_78 < 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) || (parenthesized_expression "((int)local_78 < 0)" ( (binary_expression "(int)local_78 < 0" (cast_expression "(int)local_78" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) ))) )) (compound_statement "{\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }" { (expression_statement "local_74.fd = FUN_001fd7c0(param_1);" (assignment_expression "local_74.fd = FUN_001fd7c0(param_1)" (field_expression "local_74.fd" identifier . field_identifier) = (call_expression "FUN_001fd7c0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "local_74.events = 1;" (assignment_expression "local_74.events = 1" (field_expression "local_74.events" identifier . field_identifier) = number_literal) ;) (expression_statement "iVar1 = poll(&local_74,1,0);" (assignment_expression "iVar1 = poll(&local_74,1,0)" identifier = (call_expression "poll(&local_74,1,0)" identifier (argument_list "(&local_74,1,0)" ( (pointer_expression "&local_74" & identifier) , number_literal , number_literal )))) ;) (if_statement "if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }" if (parenthesized_expression "(0 < iVar1)" ( (binary_expression "0 < iVar1" number_literal < identifier) )) (compound_statement "{\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }" { (expression_statement "iVar1 = FUN_001fd7c0(param_1);" (assignment_expression "iVar1 = FUN_001fd7c0(param_1)" identifier = (call_expression "FUN_001fd7c0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar1 = __fxstat64(3,iVar1,&local_6c);" (assignment_expression "iVar1 = __fxstat64(3,iVar1,&local_6c)" identifier = (call_expression "__fxstat64(3,iVar1,&local_6c)" identifier (argument_list "(3,iVar1,&local_6c)" ( number_literal , identifier , (pointer_expression "&local_6c" & identifier) )))) ;) (if_statement "if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }" if (parenthesized_expression "((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000))" ( (binary_expression "(iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) && (parenthesized_expression "((local_6c.st_mode & 0xf000) == 0x8000)" ( (binary_expression "(local_6c.st_mode & 0xf000) == 0x8000" (parenthesized_expression "(local_6c.st_mode & 0xf000)" ( (binary_expression "local_6c.st_mode & 0xf000" (field_expression "local_6c.st_mode" identifier . field_identifier) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }" { (expression_statement "iVar1 = FUN_001fd7c0(param_1);" (assignment_expression "iVar1 = FUN_001fd7c0(param_1)" identifier = (call_expression "FUN_001fd7c0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "_Var3 = lseek64(iVar1,0,1);" (assignment_expression "_Var3 = lseek64(iVar1,0,1)" identifier = (call_expression "lseek64(iVar1,0,1)" identifier (argument_list "(iVar1,0,1)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "uVar2 = (uint)local_6c.st_size - (uint)_Var3;" (assignment_expression "uVar2 = (uint)local_6c.st_size - (uint)_Var3" identifier = (binary_expression "(uint)local_6c.st_size - (uint)_Var3" (cast_expression "(uint)local_6c.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_6c.st_size" identifier . field_identifier)) - (cast_expression "(uint)_Var3" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (if_statement "if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }" if (parenthesized_expression "((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3)))" ( (binary_expression "(int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" (cast_expression "(int)(uint)(0x7fffffff < uVar2)" ( (type_descriptor "int" primitive_type) ) (call_expression "(uint)(0x7fffffff < uVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0x7fffffff < uVar2)" ( (binary_expression "0x7fffffff < uVar2" number_literal < identifier) )))) <= (cast_expression "(int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" ( (type_descriptor "int" primitive_type) ) (unary_expression "-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" - (parenthesized_expression "((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" ( (binary_expression "(local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3)" (parenthesized_expression "(local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20))" ( (binary_expression "local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)" (field_expression "local_6c.st_size._4_4_" (field_expression "local_6c.st_size" identifier . field_identifier) . field_identifier) - (cast_expression "(int)((ulonglong)_Var3 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)_Var3 >> 0x20)" ( (binary_expression "(ulonglong)_Var3 >> 0x20" (cast_expression "(ulonglong)_Var3" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) )) - (call_expression "(uint)((uint)local_6c.st_size < (uint)_Var3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((uint)local_6c.st_size < (uint)_Var3)" ( (binary_expression "(uint)local_6c.st_size < (uint)_Var3" (cast_expression "(uint)local_6c.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_6c.st_size" identifier . field_identifier)) < (cast_expression "(uint)_Var3" ( (type_descriptor "uint" type_identifier) ) identifier)) )))) ))))) )) (compound_statement "{\n          return uVar2;\n        }" { (return_statement "return uVar2;" return identifier ;) })) (return_statement "return 0x7fffffff;" return number_literal ;) })) })) (expression_statement "local_78 = 0;" (assignment_expression "local_78 = 0" identifier = number_literal) ;) })) (return_statement "return local_78;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::__basic_file<char>::showmanyc() */\n\nuint __thiscall std::__basic_file<char>::showmanyc(__basic_file<char> *this)\n\n{\n  int iVar1;\n  uint uVar2;\n  __off64_t _Var3;\n  uint local_78;\n  pollfd local_74;\n  stat64 local_6c;\n  \n  local_6c.st_ino._4_4_ = 0x1fda48;\n  local_78 = 0;\n  iVar1 = fd(this);\n  iVar1 = ioctl(iVar1,0x541b,&local_78);\n  if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = fd(this);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = fd(this);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = fd(this);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }\n  return local_78;\n}\n\n" comment comment (function_definition "uint __thiscall std::__basic_file<char>::showmanyc(__basic_file<char> *this)\n\n{\n  int iVar1;\n  uint uVar2;\n  __off64_t _Var3;\n  uint local_78;\n  pollfd local_74;\n  stat64 local_6c;\n  \n  local_6c.st_ino._4_4_ = 0x1fda48;\n  local_78 = 0;\n  iVar1 = fd(this);\n  iVar1 = ioctl(iVar1,0x541b,&local_78);\n  if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = fd(this);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = fd(this);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = fd(this);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }\n  return local_78;\n}" type_identifier (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::__basic_file<char>::" identifier : : identifier < primitive_type > : :) (function_declarator "showmanyc(__basic_file<char> *this)" identifier (parameter_list "(__basic_file<char> *this)" ( (parameter_declaration "__basic_file<char> *this" type_identifier (ERROR "<char>" < primitive_type >) (pointer_declarator "*this" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  __off64_t _Var3;\n  uint local_78;\n  pollfd local_74;\n  stat64 local_6c;\n  \n  local_6c.st_ino._4_4_ = 0x1fda48;\n  local_78 = 0;\n  iVar1 = fd(this);\n  iVar1 = ioctl(iVar1,0x541b,&local_78);\n  if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = fd(this);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = fd(this);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = fd(this);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }\n  return local_78;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "__off64_t _Var3;" type_identifier identifier ;) (declaration "uint local_78;" type_identifier identifier ;) (declaration "pollfd local_74;" type_identifier identifier ;) (declaration "stat64 local_6c;" type_identifier identifier ;) (expression_statement "local_6c.st_ino._4_4_ = 0x1fda48;" (assignment_expression "local_6c.st_ino._4_4_ = 0x1fda48" (field_expression "local_6c.st_ino._4_4_" (field_expression "local_6c.st_ino" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "local_78 = 0;" (assignment_expression "local_78 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = fd(this);" (assignment_expression "iVar1 = fd(this)" identifier = (call_expression "fd(this)" identifier (argument_list "(this)" ( identifier )))) ;) (expression_statement "iVar1 = ioctl(iVar1,0x541b,&local_78);" (assignment_expression "iVar1 = ioctl(iVar1,0x541b,&local_78)" identifier = (call_expression "ioctl(iVar1,0x541b,&local_78)" identifier (argument_list "(iVar1,0x541b,&local_78)" ( identifier , number_literal , (pointer_expression "&local_78" & identifier) )))) ;) (if_statement "if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = fd(this);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = fd(this);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = fd(this);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }" if (parenthesized_expression "((iVar1 != 0) || ((int)local_78 < 0))" ( (binary_expression "(iVar1 != 0) || ((int)local_78 < 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) || (parenthesized_expression "((int)local_78 < 0)" ( (binary_expression "(int)local_78 < 0" (cast_expression "(int)local_78" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) ))) )) (compound_statement "{\n    local_74.fd = fd(this);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = fd(this);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = fd(this);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }" { (expression_statement "local_74.fd = fd(this);" (assignment_expression "local_74.fd = fd(this)" (field_expression "local_74.fd" identifier . field_identifier) = (call_expression "fd(this)" identifier (argument_list "(this)" ( identifier )))) ;) (expression_statement "local_74.events = 1;" (assignment_expression "local_74.events = 1" (field_expression "local_74.events" identifier . field_identifier) = number_literal) ;) (expression_statement "iVar1 = poll(&local_74,1,0);" (assignment_expression "iVar1 = poll(&local_74,1,0)" identifier = (call_expression "poll(&local_74,1,0)" identifier (argument_list "(&local_74,1,0)" ( (pointer_expression "&local_74" & identifier) , number_literal , number_literal )))) ;) (if_statement "if (0 < iVar1) {\n      iVar1 = fd(this);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = fd(this);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }" if (parenthesized_expression "(0 < iVar1)" ( (binary_expression "0 < iVar1" number_literal < identifier) )) (compound_statement "{\n      iVar1 = fd(this);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = fd(this);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }" { (expression_statement "iVar1 = fd(this);" (assignment_expression "iVar1 = fd(this)" identifier = (call_expression "fd(this)" identifier (argument_list "(this)" ( identifier )))) ;) (expression_statement "iVar1 = __fxstat64(3,iVar1,&local_6c);" (assignment_expression "iVar1 = __fxstat64(3,iVar1,&local_6c)" identifier = (call_expression "__fxstat64(3,iVar1,&local_6c)" identifier (argument_list "(3,iVar1,&local_6c)" ( number_literal , identifier , (pointer_expression "&local_6c" & identifier) )))) ;) (if_statement "if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = fd(this);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }" if (parenthesized_expression "((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000))" ( (binary_expression "(iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) && (parenthesized_expression "((local_6c.st_mode & 0xf000) == 0x8000)" ( (binary_expression "(local_6c.st_mode & 0xf000) == 0x8000" (parenthesized_expression "(local_6c.st_mode & 0xf000)" ( (binary_expression "local_6c.st_mode & 0xf000" (field_expression "local_6c.st_mode" identifier . field_identifier) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        iVar1 = fd(this);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }" { (expression_statement "iVar1 = fd(this);" (assignment_expression "iVar1 = fd(this)" identifier = (call_expression "fd(this)" identifier (argument_list "(this)" ( identifier )))) ;) (expression_statement "_Var3 = lseek64(iVar1,0,1);" (assignment_expression "_Var3 = lseek64(iVar1,0,1)" identifier = (call_expression "lseek64(iVar1,0,1)" identifier (argument_list "(iVar1,0,1)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "uVar2 = (uint)local_6c.st_size - (uint)_Var3;" (assignment_expression "uVar2 = (uint)local_6c.st_size - (uint)_Var3" identifier = (binary_expression "(uint)local_6c.st_size - (uint)_Var3" (cast_expression "(uint)local_6c.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_6c.st_size" identifier . field_identifier)) - (cast_expression "(uint)_Var3" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (if_statement "if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }" if (parenthesized_expression "((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3)))" ( (binary_expression "(int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" (cast_expression "(int)(uint)(0x7fffffff < uVar2)" ( (type_descriptor "int" primitive_type) ) (call_expression "(uint)(0x7fffffff < uVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0x7fffffff < uVar2)" ( (binary_expression "0x7fffffff < uVar2" number_literal < identifier) )))) <= (cast_expression "(int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" ( (type_descriptor "int" primitive_type) ) (unary_expression "-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" - (parenthesized_expression "((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" ( (binary_expression "(local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3)" (parenthesized_expression "(local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20))" ( (binary_expression "local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)" (field_expression "local_6c.st_size._4_4_" (field_expression "local_6c.st_size" identifier . field_identifier) . field_identifier) - (cast_expression "(int)((ulonglong)_Var3 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)_Var3 >> 0x20)" ( (binary_expression "(ulonglong)_Var3 >> 0x20" (cast_expression "(ulonglong)_Var3" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) )) - (call_expression "(uint)((uint)local_6c.st_size < (uint)_Var3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((uint)local_6c.st_size < (uint)_Var3)" ( (binary_expression "(uint)local_6c.st_size < (uint)_Var3" (cast_expression "(uint)local_6c.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_6c.st_size" identifier . field_identifier)) < (cast_expression "(uint)_Var3" ( (type_descriptor "uint" type_identifier) ) identifier)) )))) ))))) )) (compound_statement "{\n          return uVar2;\n        }" { (return_statement "return uVar2;" return identifier ;) })) (return_statement "return 0x7fffffff;" return number_literal ;) })) })) (expression_statement "local_78 = 0;" (assignment_expression "local_78 = 0" identifier = number_literal) ;) })) (return_statement "return local_78;" return identifier ;) })))
(translation_unit "uint FUN_001fda40(undefined4 param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  __off64_t _Var3;\n  uint local_78;\n  pollfd local_74;\n  stat64 local_6c;\n  \n  local_6c.st_ino._4_4_ = 0x1fda48;\n  local_78 = 0;\n  iVar1 = FUN_001fd7c0(param_1);\n  iVar1 = ioctl(iVar1,0x541b,&local_78);\n  if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }\n  return local_78;\n}\n\n" (function_definition "uint FUN_001fda40(undefined4 param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  __off64_t _Var3;\n  uint local_78;\n  pollfd local_74;\n  stat64 local_6c;\n  \n  local_6c.st_ino._4_4_ = 0x1fda48;\n  local_78 = 0;\n  iVar1 = FUN_001fd7c0(param_1);\n  iVar1 = ioctl(iVar1,0x541b,&local_78);\n  if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }\n  return local_78;\n}" type_identifier (function_declarator "FUN_001fda40(undefined4 param_1)" identifier (parameter_list "(undefined4 param_1)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  __off64_t _Var3;\n  uint local_78;\n  pollfd local_74;\n  stat64 local_6c;\n  \n  local_6c.st_ino._4_4_ = 0x1fda48;\n  local_78 = 0;\n  iVar1 = FUN_001fd7c0(param_1);\n  iVar1 = ioctl(iVar1,0x541b,&local_78);\n  if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }\n  return local_78;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "__off64_t _Var3;" type_identifier identifier ;) (declaration "uint local_78;" type_identifier identifier ;) (declaration "pollfd local_74;" type_identifier identifier ;) (declaration "stat64 local_6c;" type_identifier identifier ;) (expression_statement "local_6c.st_ino._4_4_ = 0x1fda48;" (assignment_expression "local_6c.st_ino._4_4_ = 0x1fda48" (field_expression "local_6c.st_ino._4_4_" (field_expression "local_6c.st_ino" identifier . field_identifier) . field_identifier) = number_literal) ;) (expression_statement "local_78 = 0;" (assignment_expression "local_78 = 0" identifier = number_literal) ;) (expression_statement "iVar1 = FUN_001fd7c0(param_1);" (assignment_expression "iVar1 = FUN_001fd7c0(param_1)" identifier = (call_expression "FUN_001fd7c0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar1 = ioctl(iVar1,0x541b,&local_78);" (assignment_expression "iVar1 = ioctl(iVar1,0x541b,&local_78)" identifier = (call_expression "ioctl(iVar1,0x541b,&local_78)" identifier (argument_list "(iVar1,0x541b,&local_78)" ( identifier , number_literal , (pointer_expression "&local_78" & identifier) )))) ;) (if_statement "if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }" if (parenthesized_expression "((iVar1 != 0) || ((int)local_78 < 0))" ( (binary_expression "(iVar1 != 0) || ((int)local_78 < 0)" (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) || (parenthesized_expression "((int)local_78 < 0)" ( (binary_expression "(int)local_78 < 0" (cast_expression "(int)local_78" ( (type_descriptor "int" primitive_type) ) identifier) < number_literal) ))) )) (compound_statement "{\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }" { (expression_statement "local_74.fd = FUN_001fd7c0(param_1);" (assignment_expression "local_74.fd = FUN_001fd7c0(param_1)" (field_expression "local_74.fd" identifier . field_identifier) = (call_expression "FUN_001fd7c0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "local_74.events = 1;" (assignment_expression "local_74.events = 1" (field_expression "local_74.events" identifier . field_identifier) = number_literal) ;) (expression_statement "iVar1 = poll(&local_74,1,0);" (assignment_expression "iVar1 = poll(&local_74,1,0)" identifier = (call_expression "poll(&local_74,1,0)" identifier (argument_list "(&local_74,1,0)" ( (pointer_expression "&local_74" & identifier) , number_literal , number_literal )))) ;) (if_statement "if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }" if (parenthesized_expression "(0 < iVar1)" ( (binary_expression "0 < iVar1" number_literal < identifier) )) (compound_statement "{\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }" { (expression_statement "iVar1 = FUN_001fd7c0(param_1);" (assignment_expression "iVar1 = FUN_001fd7c0(param_1)" identifier = (call_expression "FUN_001fd7c0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "iVar1 = __fxstat64(3,iVar1,&local_6c);" (assignment_expression "iVar1 = __fxstat64(3,iVar1,&local_6c)" identifier = (call_expression "__fxstat64(3,iVar1,&local_6c)" identifier (argument_list "(3,iVar1,&local_6c)" ( number_literal , identifier , (pointer_expression "&local_6c" & identifier) )))) ;) (if_statement "if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }" if (parenthesized_expression "((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000))" ( (binary_expression "(iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)" (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) && (parenthesized_expression "((local_6c.st_mode & 0xf000) == 0x8000)" ( (binary_expression "(local_6c.st_mode & 0xf000) == 0x8000" (parenthesized_expression "(local_6c.st_mode & 0xf000)" ( (binary_expression "local_6c.st_mode & 0xf000" (field_expression "local_6c.st_mode" identifier . field_identifier) & number_literal) )) == number_literal) ))) )) (compound_statement "{\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }" { (expression_statement "iVar1 = FUN_001fd7c0(param_1);" (assignment_expression "iVar1 = FUN_001fd7c0(param_1)" identifier = (call_expression "FUN_001fd7c0(param_1)" identifier (argument_list "(param_1)" ( identifier )))) ;) (expression_statement "_Var3 = lseek64(iVar1,0,1);" (assignment_expression "_Var3 = lseek64(iVar1,0,1)" identifier = (call_expression "lseek64(iVar1,0,1)" identifier (argument_list "(iVar1,0,1)" ( identifier , number_literal , number_literal )))) ;) (expression_statement "uVar2 = (uint)local_6c.st_size - (uint)_Var3;" (assignment_expression "uVar2 = (uint)local_6c.st_size - (uint)_Var3" identifier = (binary_expression "(uint)local_6c.st_size - (uint)_Var3" (cast_expression "(uint)local_6c.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_6c.st_size" identifier . field_identifier)) - (cast_expression "(uint)_Var3" ( (type_descriptor "uint" type_identifier) ) identifier))) ;) (if_statement "if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }" if (parenthesized_expression "((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3)))" ( (binary_expression "(int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" (cast_expression "(int)(uint)(0x7fffffff < uVar2)" ( (type_descriptor "int" primitive_type) ) (call_expression "(uint)(0x7fffffff < uVar2)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(0x7fffffff < uVar2)" ( (binary_expression "0x7fffffff < uVar2" number_literal < identifier) )))) <= (cast_expression "(int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" ( (type_descriptor "int" primitive_type) ) (unary_expression "-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" - (parenthesized_expression "((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" ( (binary_expression "(local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3)" (parenthesized_expression "(local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20))" ( (binary_expression "local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)" (field_expression "local_6c.st_size._4_4_" (field_expression "local_6c.st_size" identifier . field_identifier) . field_identifier) - (cast_expression "(int)((ulonglong)_Var3 >> 0x20)" ( (type_descriptor "int" primitive_type) ) (parenthesized_expression "((ulonglong)_Var3 >> 0x20)" ( (binary_expression "(ulonglong)_Var3 >> 0x20" (cast_expression "(ulonglong)_Var3" ( (type_descriptor "ulonglong" type_identifier) ) identifier) >> number_literal) )))) )) - (call_expression "(uint)((uint)local_6c.st_size < (uint)_Var3)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "((uint)local_6c.st_size < (uint)_Var3)" ( (binary_expression "(uint)local_6c.st_size < (uint)_Var3" (cast_expression "(uint)local_6c.st_size" ( (type_descriptor "uint" type_identifier) ) (field_expression "local_6c.st_size" identifier . field_identifier)) < (cast_expression "(uint)_Var3" ( (type_descriptor "uint" type_identifier) ) identifier)) )))) ))))) )) (compound_statement "{\n          return uVar2;\n        }" { (return_statement "return uVar2;" return identifier ;) })) (return_statement "return 0x7fffffff;" return number_literal ;) })) })) (expression_statement "local_78 = 0;" (assignment_expression "local_78 = 0" identifier = number_literal) ;) })) (return_statement "return local_78;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression (field_expression (field_expression IDENT . field_identifier) . field_identifier) = LIT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != LIT) )) || (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression (field_expression IDENT . field_identifier) = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT , IDENT , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT == LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (field_expression IDENT . field_identifier) & LIT) )) == LIT) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , LIT , LIT )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (field_expression IDENT . field_identifier)) - (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression LIT < IDENT) )))) <= (cast_expression ( (type_descriptor TYPE) ) (unary_expression - (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (field_expression (field_expression IDENT . field_identifier) . field_identifier) - (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) >> LIT) )))) )) - (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) (field_expression IDENT . field_identifier)) < (cast_expression ( (type_descriptor TYPE) ) IDENT)) )))) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (return_statement return LIT ;) })) })) (expression_statement (assignment_expression IDENT = LIT) ;) })) (return_statement return IDENT ;) })))
(function_definition "uint FUN_001fda40(undefined4 param_1)\n\n{\n  int iVar1;\n  uint uVar2;\n  __off64_t _Var3;\n  uint local_78;\n  pollfd local_74;\n  stat64 local_6c;\n  \n  local_6c.st_ino._4_4_ = 0x1fda48;\n  local_78 = 0;\n  iVar1 = FUN_001fd7c0(param_1);\n  iVar1 = ioctl(iVar1,0x541b,&local_78);\n  if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }\n  return local_78;\n}" (type_identifier "uint") (function_declarator "FUN_001fda40(undefined4 param_1)" (identifier "FUN_001fda40") (parameter_list "(undefined4 param_1)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  __off64_t _Var3;\n  uint local_78;\n  pollfd local_74;\n  stat64 local_6c;\n  \n  local_6c.st_ino._4_4_ = 0x1fda48;\n  local_78 = 0;\n  iVar1 = FUN_001fd7c0(param_1);\n  iVar1 = ioctl(iVar1,0x541b,&local_78);\n  if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }\n  return local_78;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "__off64_t _Var3;" (type_identifier "__off64_t") (identifier "_Var3") (; ";")) (declaration "uint local_78;" (type_identifier "uint") (identifier "local_78") (; ";")) (declaration "pollfd local_74;" (type_identifier "pollfd") (identifier "local_74") (; ";")) (declaration "stat64 local_6c;" (type_identifier "stat64") (identifier "local_6c") (; ";")) (expression_statement "local_6c.st_ino._4_4_ = 0x1fda48;" (assignment_expression "local_6c.st_ino._4_4_ = 0x1fda48" (field_expression "local_6c.st_ino._4_4_" (field_expression "local_6c.st_ino" (identifier "local_6c") (. ".") (field_identifier "st_ino")) (. ".") (field_identifier "_4_4_")) (= "=") (number_literal "0x1fda48")) (; ";")) (expression_statement "local_78 = 0;" (assignment_expression "local_78 = 0" (identifier "local_78") (= "=") (number_literal "0")) (; ";")) (expression_statement "iVar1 = FUN_001fd7c0(param_1);" (assignment_expression "iVar1 = FUN_001fd7c0(param_1)" (identifier "iVar1") (= "=") (call_expression "FUN_001fd7c0(param_1)" (identifier "FUN_001fd7c0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "iVar1 = ioctl(iVar1,0x541b,&local_78);" (assignment_expression "iVar1 = ioctl(iVar1,0x541b,&local_78)" (identifier "iVar1") (= "=") (call_expression "ioctl(iVar1,0x541b,&local_78)" (identifier "ioctl") (argument_list "(iVar1,0x541b,&local_78)" (( "(") (identifier "iVar1") (, ",") (number_literal "0x541b") (, ",") (pointer_expression "&local_78" (& "&") (identifier "local_78")) () ")")))) (; ";")) (if_statement "if ((iVar1 != 0) || ((int)local_78 < 0)) {\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }" (if "if") (parenthesized_expression "((iVar1 != 0) || ((int)local_78 < 0))" (( "(") (binary_expression "(iVar1 != 0) || ((int)local_78 < 0)" (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (|| "||") (parenthesized_expression "((int)local_78 < 0)" (( "(") (binary_expression "(int)local_78 < 0" (cast_expression "(int)local_78" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "local_78")) (< "<") (number_literal "0")) () ")"))) () ")")) (compound_statement "{\n    local_74.fd = FUN_001fd7c0(param_1);\n    local_74.events = 1;\n    iVar1 = poll(&local_74,1,0);\n    if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }\n    local_78 = 0;\n  }" ({ "{") (expression_statement "local_74.fd = FUN_001fd7c0(param_1);" (assignment_expression "local_74.fd = FUN_001fd7c0(param_1)" (field_expression "local_74.fd" (identifier "local_74") (. ".") (field_identifier "fd")) (= "=") (call_expression "FUN_001fd7c0(param_1)" (identifier "FUN_001fd7c0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "local_74.events = 1;" (assignment_expression "local_74.events = 1" (field_expression "local_74.events" (identifier "local_74") (. ".") (field_identifier "events")) (= "=") (number_literal "1")) (; ";")) (expression_statement "iVar1 = poll(&local_74,1,0);" (assignment_expression "iVar1 = poll(&local_74,1,0)" (identifier "iVar1") (= "=") (call_expression "poll(&local_74,1,0)" (identifier "poll") (argument_list "(&local_74,1,0)" (( "(") (pointer_expression "&local_74" (& "&") (identifier "local_74")) (, ",") (number_literal "1") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if (0 < iVar1) {\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }" (if "if") (parenthesized_expression "(0 < iVar1)" (( "(") (binary_expression "0 < iVar1" (number_literal "0") (< "<") (identifier "iVar1")) () ")")) (compound_statement "{\n      iVar1 = FUN_001fd7c0(param_1);\n      iVar1 = __fxstat64(3,iVar1,&local_6c);\n      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }\n    }" ({ "{") (expression_statement "iVar1 = FUN_001fd7c0(param_1);" (assignment_expression "iVar1 = FUN_001fd7c0(param_1)" (identifier "iVar1") (= "=") (call_expression "FUN_001fd7c0(param_1)" (identifier "FUN_001fd7c0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "iVar1 = __fxstat64(3,iVar1,&local_6c);" (assignment_expression "iVar1 = __fxstat64(3,iVar1,&local_6c)" (identifier "iVar1") (= "=") (call_expression "__fxstat64(3,iVar1,&local_6c)" (identifier "__fxstat64") (argument_list "(3,iVar1,&local_6c)" (( "(") (number_literal "3") (, ",") (identifier "iVar1") (, ",") (pointer_expression "&local_6c" (& "&") (identifier "local_6c")) () ")")))) (; ";")) (if_statement "if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }" (if "if") (parenthesized_expression "((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000))" (( "(") (binary_expression "(iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)" (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((local_6c.st_mode & 0xf000) == 0x8000)" (( "(") (binary_expression "(local_6c.st_mode & 0xf000) == 0x8000" (parenthesized_expression "(local_6c.st_mode & 0xf000)" (( "(") (binary_expression "local_6c.st_mode & 0xf000" (field_expression "local_6c.st_mode" (identifier "local_6c") (. ".") (field_identifier "st_mode")) (& "&") (number_literal "0xf000")) () ")")) (== "==") (number_literal "0x8000")) () ")"))) () ")")) (compound_statement "{\n        iVar1 = FUN_001fd7c0(param_1);\n        _Var3 = lseek64(iVar1,0,1);\n        uVar2 = (uint)local_6c.st_size - (uint)_Var3;\n        if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }\n        return 0x7fffffff;\n      }" ({ "{") (expression_statement "iVar1 = FUN_001fd7c0(param_1);" (assignment_expression "iVar1 = FUN_001fd7c0(param_1)" (identifier "iVar1") (= "=") (call_expression "FUN_001fd7c0(param_1)" (identifier "FUN_001fd7c0") (argument_list "(param_1)" (( "(") (identifier "param_1") () ")")))) (; ";")) (expression_statement "_Var3 = lseek64(iVar1,0,1);" (assignment_expression "_Var3 = lseek64(iVar1,0,1)" (identifier "_Var3") (= "=") (call_expression "lseek64(iVar1,0,1)" (identifier "lseek64") (argument_list "(iVar1,0,1)" (( "(") (identifier "iVar1") (, ",") (number_literal "0") (, ",") (number_literal "1") () ")")))) (; ";")) (expression_statement "uVar2 = (uint)local_6c.st_size - (uint)_Var3;" (assignment_expression "uVar2 = (uint)local_6c.st_size - (uint)_Var3" (identifier "uVar2") (= "=") (binary_expression "(uint)local_6c.st_size - (uint)_Var3" (cast_expression "(uint)local_6c.st_size" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (field_expression "local_6c.st_size" (identifier "local_6c") (. ".") (field_identifier "st_size"))) (- "-") (cast_expression "(uint)_Var3" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "_Var3")))) (; ";")) (if_statement "if ((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {\n          return uVar2;\n        }" (if "if") (parenthesized_expression "((int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3)))" (( "(") (binary_expression "(int)(uint)(0x7fffffff < uVar2) <=\n            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" (cast_expression "(int)(uint)(0x7fffffff < uVar2)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (call_expression "(uint)(0x7fffffff < uVar2)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(0x7fffffff < uVar2)" (( "(") (binary_expression "0x7fffffff < uVar2" (number_literal "0x7fffffff") (< "<") (identifier "uVar2")) () ")")))) (<= "<=") (cast_expression "(int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (unary_expression "-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" (- "-") (parenthesized_expression "((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3))" (( "(") (binary_expression "(local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -\n                  (uint)((uint)local_6c.st_size < (uint)_Var3)" (parenthesized_expression "(local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20))" (( "(") (binary_expression "local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)" (field_expression "local_6c.st_size._4_4_" (field_expression "local_6c.st_size" (identifier "local_6c") (. ".") (field_identifier "st_size")) (. ".") (field_identifier "_4_4_")) (- "-") (cast_expression "(int)((ulonglong)_Var3 >> 0x20)" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (parenthesized_expression "((ulonglong)_Var3 >> 0x20)" (( "(") (binary_expression "(ulonglong)_Var3 >> 0x20" (cast_expression "(ulonglong)_Var3" (( "(") (type_descriptor "ulonglong" (type_identifier "ulonglong")) () ")") (identifier "_Var3")) (>> ">>") (number_literal "0x20")) () ")")))) () ")")) (- "-") (call_expression "(uint)((uint)local_6c.st_size < (uint)_Var3)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "((uint)local_6c.st_size < (uint)_Var3)" (( "(") (binary_expression "(uint)local_6c.st_size < (uint)_Var3" (cast_expression "(uint)local_6c.st_size" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (field_expression "local_6c.st_size" (identifier "local_6c") (. ".") (field_identifier "st_size"))) (< "<") (cast_expression "(uint)_Var3" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (identifier "_Var3"))) () ")")))) () ")"))))) () ")")) (compound_statement "{\n          return uVar2;\n        }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (return_statement "return 0x7fffffff;" (return "return") (number_literal "0x7fffffff") (; ";")) (} "}"))) (} "}"))) (expression_statement "local_78 = 0;" (assignment_expression "local_78 = 0" (identifier "local_78") (= "=") (number_literal "0")) (; ";")) (} "}"))) (return_statement "return local_78;" (return "return") (identifier "local_78") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::__basic_file<char>::showmanyc() */

type_1 __thiscall std::type_2<char>::function_1(type_2<char> *this)

{
  int var_3;
  type_1 var_7;
  type_3 _Var3;
  type_1 local_78;
  type_4 local_74;
  type_5 local_6c;
  
  local_6c.st_ino._4_4_ = 0x1fda48;
  local_78 = 0;
  var_3 = var_1(this);
  var_3 = var_2(var_3,0x541b,&local_78);
  if ((var_3 != 0) || ((int)local_78 < 0)) {
    local_74.var_1 = var_1(this);
    local_74.events = 1;
    var_3 = var_4(&local_74,1,0);
    if (0 < var_3) {
      var_3 = var_1(this);
      var_3 = var_5(3,var_3,&local_6c);
      if ((var_3 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {
        var_3 = var_1(this);
        _Var3 = var_6(var_3,0,1);
        var_7 = (type_1)local_6c.st_size - (type_1)_Var3;
        if ((int)(type_1)(0x7fffffff < var_7) <=
            (int)-((local_6c.st_size._4_4_ - (int)((type_6)_Var3 >> 0x20)) -
                  (type_1)((type_1)local_6c.st_size < (type_1)_Var3))) {
          return var_7;
        }
        return 0x7fffffff;
      }
    }
    local_78 = 0;
  }
  return local_78;
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (field_expression argument: (field_expression argument: (identifier) field: (field_identifier)) field: (field_identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (field_expression argument: (identifier) field: (field_identifier)) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (field_expression argument: (identifier) field: (field_identifier)) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (number_literal) (number_literal))))) (if_statement condition: (parenthesized_expression (binary_expression left: (number_literal) right: (identifier))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (number_literal) (identifier) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (field_expression argument: (identifier) field: (field_identifier)) right: (number_literal))) right: (number_literal))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (number_literal) (number_literal))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (field_expression argument: (identifier) field: (field_identifier))) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (number_literal) right: (identifier))))) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (unary_expression argument: (parenthesized_expression (binary_expression left: (parenthesized_expression (binary_expression left: (field_expression argument: (field_expression argument: (identifier) field: (field_identifier)) field: (field_identifier)) right: (cast_expression type: (type_descriptor type: (primitive_type)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) right: (number_literal)))))) right: (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (cast_expression type: (type_descriptor type: (type_identifier)) value: (field_expression argument: (identifier) field: (field_identifier))) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))))))))))) consequence: (compound_statement (return_statement (identifier)))) (return_statement (number_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))))) (return_statement (identifier)))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

uint MASKED(undefined4 param_1)

{
  int iVar1;
  uint uVar2;
  __off64_t _Var3;
  uint local_78;
  pollfd local_74;
  stat64 local_6c;
  
  local_6c.st_ino._4_4_ = 0x1fda48;
  local_78 = 0;
  iVar1 = FUN_001fd7c0(param_1);
  iVar1 = ioctl(iVar1,0x541b,&local_78);
  if ((iVar1 != 0) || ((int)local_78 < 0)) {
    local_74.fd = FUN_001fd7c0(param_1);
    local_74.events = 1;
    iVar1 = poll(&local_74,1,0);
    if (0 < iVar1) {
      iVar1 = FUN_001fd7c0(param_1);
      iVar1 = __fxstat64(3,iVar1,&local_6c);
      if ((iVar1 == 0) && ((local_6c.st_mode & 0xf000) == 0x8000)) {
        iVar1 = FUN_001fd7c0(param_1);
        _Var3 = lseek64(iVar1,0,1);
        uVar2 = (uint)local_6c.st_size - (uint)_Var3;
        if ((int)(uint)(0x7fffffff < uVar2) <=
            (int)-((local_6c.st_size._4_4_ - (int)((ulonglong)_Var3 >> 0x20)) -
                  (uint)((uint)local_6c.st_size < (uint)_Var3))) {
          return uVar2;
        }
        return 0x7fffffff;
      }
    }
    local_78 = 0;
  }
  return local_78;
}

