
/* std::filebuf::xsputn(char const*, long) */

long __thiscall std::filebuf::xsputn(filebuf *this,char *param_1,long param_2)

{
  filebuf fVar1;
  char cVar2;
  long lVar3;
  long lVar4;
  long lVar5;
  
  fVar1 = this[0x78];
  if (*(long **)(this + 200) == (long *)0x0) {
                    /* WARNING: Subroutine does not return */
    __throw_bad_cast();
  }
  cVar2 = (**(code **)(**(long **)(this + 200) + 0x30))();
  if (((cVar2 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0xa9] == (filebuf)0x0)) {
    lVar3 = *(long *)(this + 0x30) - *(long *)(this + 0x28);
    if ((this[0xaa] == (filebuf)0x0) && (1 < *(ulong *)(this + 0xa0))) {
      lVar3 = *(ulong *)(this + 0xa0) - 1;
    }
    if (0x3ff < lVar3) {
      lVar3 = 0x400;
    }
    if (lVar3 <= param_2) {
      lVar5 = *(long *)(this + 0x28) - (long)*(char **)(this + 0x20);
      lVar3 = __basic_file<char>::xsputn_2
                        ((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,
                         param_2);
      if (param_2 + lVar5 == lVar3) {
        lVar4 = *(long *)(this + 0x98);
        *(long *)(this + 8) = lVar4;
        *(long *)(this + 0x10) = lVar4;
        *(long *)(this + 0x18) = lVar4;
        if ((((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||
           (*(ulong *)(this + 0xa0) < 2)) {
          *(undefined8 *)(this + 0x28) = 0;
          *(undefined8 *)(this + 0x20) = 0;
          *(undefined8 *)(this + 0x30) = 0;
        }
        else {
          *(long *)(this + 0x28) = lVar4;
          *(long *)(this + 0x20) = lVar4;
          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);
        }
        this[0xaa] = (filebuf)0x1;
      }
      lVar4 = 0;
      if (lVar5 < lVar3) {
        lVar4 = lVar3 - lVar5;
      }
      return lVar4;
    }
  }
  lVar3 = streambuf::xsputn((streambuf *)this,param_1,param_2);
  return lVar3;
}



long FUN_002cac90(long param_1,undefined8 param_2,long param_3)

{
  byte bVar1;
  char cVar2;
  long lVar3;
  long lVar4;
  long lVar5;
  
  bVar1 = *(byte *)(param_1 + 0x78);
  if (*(long **)(param_1 + 200) == (long *)0x0) {
                    /* WARNING: Subroutine does not return */
    FUN_002e1170();
  }
  cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();
  if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {
    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);
    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {
      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;
    }
    if (0x3ff < lVar3) {
      lVar3 = 0x400;
    }
    if (lVar3 <= param_3) {
      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);
      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);
      if (param_3 + lVar5 == lVar3) {
        lVar4 = *(long *)(param_1 + 0x98);
        *(long *)(param_1 + 8) = lVar4;
        *(long *)(param_1 + 0x10) = lVar4;
        *(long *)(param_1 + 0x18) = lVar4;
        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||
           (*(ulong *)(param_1 + 0xa0) < 2)) {
          *(undefined8 *)(param_1 + 0x28) = 0;
          *(undefined8 *)(param_1 + 0x20) = 0;
          *(undefined8 *)(param_1 + 0x30) = 0;
        }
        else {
          *(long *)(param_1 + 0x28) = lVar4;
          *(long *)(param_1 + 0x20) = lVar4;
          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);
        }
        *(undefined1 *)(param_1 + 0xaa) = 1;
      }
      lVar4 = 0;
      if (lVar5 < lVar3) {
        lVar4 = lVar3 - lVar5;
      }
      return lVar4;
    }
  }
  lVar3 = FUN_002abf30(param_1,param_2,param_3);
  return lVar3;
}


PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
TEST byte ptr [RDI + 0x78],0x11
MOV RDI,qword ptr [RDI + 0xc8]
SETNZ R13B
TEST RDI,RDI
JZ 0x002cadd1
MOV RAX,qword ptr [RDI]
MOV R12,RSI
MOV RBP,RDX
CALL qword ptr [RAX + 0x30]
TEST AL,AL
JZ 0x002cad58
TEST R13B,R13B
JZ 0x002cad58
CMP byte ptr [RBX + 0xa9],0x0
JNZ 0x002cad58
MOV RDX,qword ptr [RBX + 0x28]
MOV RAX,qword ptr [RBX + 0x30]
SUB RAX,RDX
CMP byte ptr [RBX + 0xaa],0x0
JNZ 0x002cad02
MOV RCX,qword ptr [RBX + 0xa0]
LEA RSI,[RCX + -0x1]
CMP RCX,0x1
CMOVA RAX,RSI
CMP RAX,0x400
MOV ECX,0x400
CMOVGE RAX,RCX
CMP RAX,RBP
JG 0x002cad58
MOV RSI,qword ptr [RBX + 0x20]
MOV R8,RBP
LEA RDI,[RBX + 0x68]
MOV RCX,R12
SUB RDX,RSI
MOV R13,RDX
CALL 0x002a30d0
ADD RBP,R13
CMP RBP,RAX
JZ 0x002cad70
MOV RDX,RAX
SUB RDX,R13
CMP R13,RAX
MOV EAX,0x0
CMOVL RAX,RDX
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
RET
ADD RSP,0x8
MOV RDX,RBP
MOV RSI,R12
MOV RDI,RBX
POP RBX
POP RBP
POP R12
POP R13
JMP 0x002abf30
MOV RDX,qword ptr [RBX + 0x98]
MOV ECX,dword ptr [RBX + 0x78]
MOV qword ptr [RBX + 0x8],RDX
MOV qword ptr [RBX + 0x10],RDX
MOV qword ptr [RBX + 0x18],RDX
TEST CL,0x10
JNZ 0x002cad90
AND ECX,0x1
JZ 0x002cadb7
MOV RCX,qword ptr [RBX + 0xa0]
CMP RCX,0x1
JBE 0x002cadb7
MOV qword ptr [RBX + 0x28],RDX
MOV qword ptr [RBX + 0x20],RDX
LEA RDX,[RDX + RCX*0x1 + -0x1]
MOV qword ptr [RBX + 0x30],RDX
MOV byte ptr [RBX + 0xaa],0x1
JMP 0x002cad37
MOV qword ptr [RBX + 0x28],0x0
MOV qword ptr [RBX + 0x20],0x0
MOV qword ptr [RBX + 0x30],0x0
JMP 0x002cadae
CALL 0x002e1170
(translation_unit "long FUN_002cac90(long param_1,undefined8 param_2,long param_3)\n\n{\n  byte bVar1;\n  char cVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  bVar1 = *(byte *)(param_1 + 0x78);\n  if (*(long **)(param_1 + 200) == (long *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002e1170();\n  }\n  cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();\n  if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }\n  lVar3 = FUN_002abf30(param_1,param_2,param_3);\n  return lVar3;\n}\n\n" (function_definition "long FUN_002cac90(long param_1,undefined8 param_2,long param_3)\n\n{\n  byte bVar1;\n  char cVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  bVar1 = *(byte *)(param_1 + 0x78);\n  if (*(long **)(param_1 + 200) == (long *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002e1170();\n  }\n  cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();\n  if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }\n  lVar3 = FUN_002abf30(param_1,param_2,param_3);\n  return lVar3;\n}" (sized_type_specifier "long" long) (function_declarator "FUN_002cac90(long param_1,undefined8 param_2,long param_3)" identifier (parameter_list "(long param_1,undefined8 param_2,long param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  byte bVar1;\n  char cVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  bVar1 = *(byte *)(param_1 + 0x78);\n  if (*(long **)(param_1 + 200) == (long *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002e1170();\n  }\n  cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();\n  if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }\n  lVar3 = FUN_002abf30(param_1,param_2,param_3);\n  return lVar3;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (expression_statement "bVar1 = *(byte *)(param_1 + 0x78);" (assignment_expression "bVar1 = *(byte *)(param_1 + 0x78)" identifier = (pointer_expression "*(byte *)(param_1 + 0x78)" * (cast_expression "(byte *)(param_1 + 0x78)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) ))))) ;) (if_statement "if (*(long **)(param_1 + 200) == (long *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002e1170();\n  }" if (parenthesized_expression "(*(long **)(param_1 + 200) == (long *)0x0)" ( (binary_expression "*(long **)(param_1 + 200) == (long *)0x0" (pointer_expression "*(long **)(param_1 + 200)" * (cast_expression "(long **)(param_1 + 200)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 200)" ( (binary_expression "param_1 + 200" identifier + number_literal) )))) == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_002e1170();\n  }" { comment (expression_statement "FUN_002e1170();" (call_expression "FUN_002e1170()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();" (assignment_expression "cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))()" identifier = (call_expression "(**(code **)(**(long **)(param_1 + 200) + 0x30))()" (parenthesized_expression "(**(code **)(**(long **)(param_1 + 200) + 0x30))" ( (pointer_expression "**(code **)(**(long **)(param_1 + 200) + 0x30)" * (pointer_expression "*(code **)(**(long **)(param_1 + 200) + 0x30)" * (cast_expression "(code **)(**(long **)(param_1 + 200) + 0x30)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(long **)(param_1 + 200) + 0x30)" ( (binary_expression "**(long **)(param_1 + 200) + 0x30" (pointer_expression "**(long **)(param_1 + 200)" * (pointer_expression "*(long **)(param_1 + 200)" * (cast_expression "(long **)(param_1 + 200)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 200)" ( (binary_expression "param_1 + 200" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "()" ( )))) ;) (if_statement "if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }" if (parenthesized_expression "(((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0'))" ( (binary_expression "((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')" (parenthesized_expression "((cVar2 != '\0') && ((bVar1 & 0x11) != 0))" ( (binary_expression "(cVar2 != '\0') && ((bVar1 & 0x11) != 0)" (parenthesized_expression "(cVar2 != '\0')" ( (binary_expression "cVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "((bVar1 & 0x11) != 0)" ( (binary_expression "(bVar1 & 0x11) != 0" (parenthesized_expression "(bVar1 & 0x11)" ( (binary_expression "bVar1 & 0x11" identifier & number_literal) )) != number_literal) ))) )) && (parenthesized_expression "(*(char *)(param_1 + 0xa9) == '\0')" ( (binary_expression "*(char *)(param_1 + 0xa9) == '\0'" (pointer_expression "*(char *)(param_1 + 0xa9)" * (cast_expression "(char *)(param_1 + 0xa9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa9)" ( (binary_expression "param_1 + 0xa9" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }" { (expression_statement "lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);" (assignment_expression "lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28)" identifier = (binary_expression "*(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28)" (pointer_expression "*(long *)(param_1 + 0x30)" * (cast_expression "(long *)(param_1 + 0x30)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) - (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))))) ;) (if_statement "if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }" if (parenthesized_expression "((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0)))" ( (binary_expression "(*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))" (parenthesized_expression "(*(char *)(param_1 + 0xaa) == '\0')" ( (binary_expression "*(char *)(param_1 + 0xaa) == '\0'" (pointer_expression "*(char *)(param_1 + 0xaa)" * (cast_expression "(char *)(param_1 + 0xaa)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xaa)" ( (binary_expression "param_1 + 0xaa" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(1 < *(ulong *)(param_1 + 0xa0))" ( (binary_expression "1 < *(ulong *)(param_1 + 0xa0)" number_literal < (pointer_expression "*(ulong *)(param_1 + 0xa0)" * (cast_expression "(ulong *)(param_1 + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa0)" ( (binary_expression "param_1 + 0xa0" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }" { (expression_statement "lVar3 = *(ulong *)(param_1 + 0xa0) - 1;" (assignment_expression "lVar3 = *(ulong *)(param_1 + 0xa0) - 1" identifier = (binary_expression "*(ulong *)(param_1 + 0xa0) - 1" (pointer_expression "*(ulong *)(param_1 + 0xa0)" * (cast_expression "(ulong *)(param_1 + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa0)" ( (binary_expression "param_1 + 0xa0" identifier + number_literal) )))) - number_literal)) ;) })) (if_statement "if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }" if (parenthesized_expression "(0x3ff < lVar3)" ( (binary_expression "0x3ff < lVar3" number_literal < identifier) )) (compound_statement "{\n      lVar3 = 0x400;\n    }" { (expression_statement "lVar3 = 0x400;" (assignment_expression "lVar3 = 0x400" identifier = number_literal) ;) })) (if_statement "if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }" if (parenthesized_expression "(lVar3 <= param_3)" ( (binary_expression "lVar3 <= param_3" identifier <= identifier) )) (compound_statement "{\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }" { (expression_statement "lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);" (assignment_expression "lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20)" identifier = (binary_expression "*(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20)" (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) - (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))))) ;) (expression_statement "lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);" (assignment_expression "lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3)" identifier = (call_expression "FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3)" identifier (argument_list "(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3)" ( (binary_expression "param_1 + 0x68" identifier + number_literal) , (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) , identifier , identifier , identifier )))) ;) (if_statement "if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }" if (parenthesized_expression "(param_3 + lVar5 == lVar3)" ( (binary_expression "param_3 + lVar5 == lVar3" (binary_expression "param_3 + lVar5" identifier + identifier) == identifier) )) (compound_statement "{\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }" { (expression_statement "lVar4 = *(long *)(param_1 + 0x98);" (assignment_expression "lVar4 = *(long *)(param_1 + 0x98)" identifier = (pointer_expression "*(long *)(param_1 + 0x98)" * (cast_expression "(long *)(param_1 + 0x98)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) ))))) ;) (expression_statement "*(long *)(param_1 + 8) = lVar4;" (assignment_expression "*(long *)(param_1 + 8) = lVar4" (pointer_expression "*(long *)(param_1 + 8)" * (cast_expression "(long *)(param_1 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(param_1 + 0x10) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x10) = lVar4" (pointer_expression "*(long *)(param_1 + 0x10)" * (cast_expression "(long *)(param_1 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(param_1 + 0x18) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x18) = lVar4" (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }" if (parenthesized_expression "((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2))" ( (binary_expression "(((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)" (parenthesized_expression "(((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0))" ( (binary_expression "((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)" (parenthesized_expression "((*(uint *)(param_1 + 0x78) & 0x10) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x78) & 0x10) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x78) & 0x10)" ( (binary_expression "*(uint *)(param_1 + 0x78) & 0x10" (pointer_expression "*(uint *)(param_1 + 0x78)" * (cast_expression "(uint *)(param_1 + 0x78)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "((*(uint *)(param_1 + 0x78) & 1) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x78) & 1) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x78) & 1)" ( (binary_expression "*(uint *)(param_1 + 0x78) & 1" (pointer_expression "*(uint *)(param_1 + 0x78)" * (cast_expression "(uint *)(param_1 + 0x78)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) || (parenthesized_expression "(*(ulong *)(param_1 + 0xa0) < 2)" ( (binary_expression "*(ulong *)(param_1 + 0xa0) < 2" (pointer_expression "*(ulong *)(param_1 + 0xa0)" * (cast_expression "(ulong *)(param_1 + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa0)" ( (binary_expression "param_1 + 0xa0" identifier + number_literal) )))) < number_literal) ))) )) (compound_statement "{\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }" { (expression_statement "*(undefined8 *)(param_1 + 0x28) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x28) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x28)" * (cast_expression "(undefined8 *)(param_1 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(param_1 + 0x20) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x20) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x20)" * (cast_expression "(undefined8 *)(param_1 + 0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(param_1 + 0x30) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x30) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x30)" * (cast_expression "(undefined8 *)(param_1 + 0x30)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }" else (compound_statement "{\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }" { (expression_statement "*(long *)(param_1 + 0x28) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x28) = lVar4" (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(param_1 + 0x20) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x20) = lVar4" (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);" (assignment_expression "*(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0)" (pointer_expression "*(ulong *)(param_1 + 0x30)" * (cast_expression "(ulong *)(param_1 + 0x30)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = (binary_expression "lVar4 + -1 + *(ulong *)(param_1 + 0xa0)" (binary_expression "lVar4 + -1" identifier + number_literal) + (pointer_expression "*(ulong *)(param_1 + 0xa0)" * (cast_expression "(ulong *)(param_1 + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa0)" ( (binary_expression "param_1 + 0xa0" identifier + number_literal) )))))) ;) }))) (expression_statement "*(undefined1 *)(param_1 + 0xaa) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0xaa) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0xaa)" * (cast_expression "(undefined1 *)(param_1 + 0xaa)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xaa)" ( (binary_expression "param_1 + 0xaa" identifier + number_literal) )))) = number_literal) ;) })) (expression_statement "lVar4 = 0;" (assignment_expression "lVar4 = 0" identifier = number_literal) ;) (if_statement "if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }" if (parenthesized_expression "(lVar5 < lVar3)" ( (binary_expression "lVar5 < lVar3" identifier < identifier) )) (compound_statement "{\n        lVar4 = lVar3 - lVar5;\n      }" { (expression_statement "lVar4 = lVar3 - lVar5;" (assignment_expression "lVar4 = lVar3 - lVar5" identifier = (binary_expression "lVar3 - lVar5" identifier - identifier)) ;) })) (return_statement "return lVar4;" return identifier ;) })) })) (expression_statement "lVar3 = FUN_002abf30(param_1,param_2,param_3);" (assignment_expression "lVar3 = FUN_002abf30(param_1,param_2,param_3)" identifier = (call_expression "FUN_002abf30(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (return_statement "return lVar3;" return identifier ;) })))
(translation_unit "/* std::filebuf::xsputn(char const*, long) */\n\nlong __thiscall std::filebuf::xsputn(filebuf *this,char *param_1,long param_2)\n\n{\n  filebuf fVar1;\n  char cVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  fVar1 = this[0x78];\n  if (*(long **)(this + 200) == (long *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __throw_bad_cast();\n  }\n  cVar2 = (**(code **)(**(long **)(this + 200) + 0x30))();\n  if (((cVar2 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0xa9] == (filebuf)0x0)) {\n    lVar3 = *(long *)(this + 0x30) - *(long *)(this + 0x28);\n    if ((this[0xaa] == (filebuf)0x0) && (1 < *(ulong *)(this + 0xa0))) {\n      lVar3 = *(ulong *)(this + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_2) {\n      lVar5 = *(long *)(this + 0x28) - (long)*(char **)(this + 0x20);\n      lVar3 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,\n                         param_2);\n      if (param_2 + lVar5 == lVar3) {\n        lVar4 = *(long *)(this + 0x98);\n        *(long *)(this + 8) = lVar4;\n        *(long *)(this + 0x10) = lVar4;\n        *(long *)(this + 0x18) = lVar4;\n        if ((((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||\n           (*(ulong *)(this + 0xa0) < 2)) {\n          *(undefined8 *)(this + 0x28) = 0;\n          *(undefined8 *)(this + 0x20) = 0;\n          *(undefined8 *)(this + 0x30) = 0;\n        }\n        else {\n          *(long *)(this + 0x28) = lVar4;\n          *(long *)(this + 0x20) = lVar4;\n          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);\n        }\n        this[0xaa] = (filebuf)0x1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }\n  lVar3 = streambuf::xsputn((streambuf *)this,param_1,param_2);\n  return lVar3;\n}\n\n" comment (function_definition "long __thiscall std::filebuf::xsputn(filebuf *this,char *param_1,long param_2)\n\n{\n  filebuf fVar1;\n  char cVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  fVar1 = this[0x78];\n  if (*(long **)(this + 200) == (long *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __throw_bad_cast();\n  }\n  cVar2 = (**(code **)(**(long **)(this + 200) + 0x30))();\n  if (((cVar2 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0xa9] == (filebuf)0x0)) {\n    lVar3 = *(long *)(this + 0x30) - *(long *)(this + 0x28);\n    if ((this[0xaa] == (filebuf)0x0) && (1 < *(ulong *)(this + 0xa0))) {\n      lVar3 = *(ulong *)(this + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_2) {\n      lVar5 = *(long *)(this + 0x28) - (long)*(char **)(this + 0x20);\n      lVar3 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,\n                         param_2);\n      if (param_2 + lVar5 == lVar3) {\n        lVar4 = *(long *)(this + 0x98);\n        *(long *)(this + 8) = lVar4;\n        *(long *)(this + 0x10) = lVar4;\n        *(long *)(this + 0x18) = lVar4;\n        if ((((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||\n           (*(ulong *)(this + 0xa0) < 2)) {\n          *(undefined8 *)(this + 0x28) = 0;\n          *(undefined8 *)(this + 0x20) = 0;\n          *(undefined8 *)(this + 0x30) = 0;\n        }\n        else {\n          *(long *)(this + 0x28) = lVar4;\n          *(long *)(this + 0x20) = lVar4;\n          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);\n        }\n        this[0xaa] = (filebuf)0x1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }\n  lVar3 = streambuf::xsputn((streambuf *)this,param_1,param_2);\n  return lVar3;\n}" (sized_type_specifier "long" long) (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::filebuf::" identifier : : identifier : :) (function_declarator "xsputn(filebuf *this,char *param_1,long param_2)" identifier (parameter_list "(filebuf *this,char *param_1,long param_2)" ( (parameter_declaration "filebuf *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "char *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  filebuf fVar1;\n  char cVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  fVar1 = this[0x78];\n  if (*(long **)(this + 200) == (long *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __throw_bad_cast();\n  }\n  cVar2 = (**(code **)(**(long **)(this + 200) + 0x30))();\n  if (((cVar2 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0xa9] == (filebuf)0x0)) {\n    lVar3 = *(long *)(this + 0x30) - *(long *)(this + 0x28);\n    if ((this[0xaa] == (filebuf)0x0) && (1 < *(ulong *)(this + 0xa0))) {\n      lVar3 = *(ulong *)(this + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_2) {\n      lVar5 = *(long *)(this + 0x28) - (long)*(char **)(this + 0x20);\n      lVar3 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,\n                         param_2);\n      if (param_2 + lVar5 == lVar3) {\n        lVar4 = *(long *)(this + 0x98);\n        *(long *)(this + 8) = lVar4;\n        *(long *)(this + 0x10) = lVar4;\n        *(long *)(this + 0x18) = lVar4;\n        if ((((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||\n           (*(ulong *)(this + 0xa0) < 2)) {\n          *(undefined8 *)(this + 0x28) = 0;\n          *(undefined8 *)(this + 0x20) = 0;\n          *(undefined8 *)(this + 0x30) = 0;\n        }\n        else {\n          *(long *)(this + 0x28) = lVar4;\n          *(long *)(this + 0x20) = lVar4;\n          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);\n        }\n        this[0xaa] = (filebuf)0x1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }\n  lVar3 = streambuf::xsputn((streambuf *)this,param_1,param_2);\n  return lVar3;\n}" { (declaration "filebuf fVar1;" type_identifier identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (expression_statement "fVar1 = this[0x78];" (assignment_expression "fVar1 = this[0x78]" identifier = (subscript_expression "this[0x78]" identifier [ number_literal ])) ;) (if_statement "if (*(long **)(this + 200) == (long *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __throw_bad_cast();\n  }" if (parenthesized_expression "(*(long **)(this + 200) == (long *)0x0)" ( (binary_expression "*(long **)(this + 200) == (long *)0x0" (pointer_expression "*(long **)(this + 200)" * (cast_expression "(long **)(this + 200)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 200)" ( (binary_expression "this + 200" identifier + number_literal) )))) == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __throw_bad_cast();\n  }" { comment (expression_statement "__throw_bad_cast();" (call_expression "__throw_bad_cast()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "cVar2 = (**(code **)(**(long **)(this + 200) + 0x30))();" (assignment_expression "cVar2 = (**(code **)(**(long **)(this + 200) + 0x30))()" identifier = (call_expression "(**(code **)(**(long **)(this + 200) + 0x30))()" (parenthesized_expression "(**(code **)(**(long **)(this + 200) + 0x30))" ( (pointer_expression "**(code **)(**(long **)(this + 200) + 0x30)" * (pointer_expression "*(code **)(**(long **)(this + 200) + 0x30)" * (cast_expression "(code **)(**(long **)(this + 200) + 0x30)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(long **)(this + 200) + 0x30)" ( (binary_expression "**(long **)(this + 200) + 0x30" (pointer_expression "**(long **)(this + 200)" * (pointer_expression "*(long **)(this + 200)" * (cast_expression "(long **)(this + 200)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 200)" ( (binary_expression "this + 200" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "()" ( )))) ;) (if_statement "if (((cVar2 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0xa9] == (filebuf)0x0)) {\n    lVar3 = *(long *)(this + 0x30) - *(long *)(this + 0x28);\n    if ((this[0xaa] == (filebuf)0x0) && (1 < *(ulong *)(this + 0xa0))) {\n      lVar3 = *(ulong *)(this + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_2) {\n      lVar5 = *(long *)(this + 0x28) - (long)*(char **)(this + 0x20);\n      lVar3 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,\n                         param_2);\n      if (param_2 + lVar5 == lVar3) {\n        lVar4 = *(long *)(this + 0x98);\n        *(long *)(this + 8) = lVar4;\n        *(long *)(this + 0x10) = lVar4;\n        *(long *)(this + 0x18) = lVar4;\n        if ((((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||\n           (*(ulong *)(this + 0xa0) < 2)) {\n          *(undefined8 *)(this + 0x28) = 0;\n          *(undefined8 *)(this + 0x20) = 0;\n          *(undefined8 *)(this + 0x30) = 0;\n        }\n        else {\n          *(long *)(this + 0x28) = lVar4;\n          *(long *)(this + 0x20) = lVar4;\n          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);\n        }\n        this[0xaa] = (filebuf)0x1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }" if (parenthesized_expression "(((cVar2 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0xa9] == (filebuf)0x0))" ( (binary_expression "((cVar2 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0xa9] == (filebuf)0x0)" (parenthesized_expression "((cVar2 != '\0') && (((byte)fVar1 & 0x11) != 0))" ( (binary_expression "(cVar2 != '\0') && (((byte)fVar1 & 0x11) != 0)" (parenthesized_expression "(cVar2 != '\0')" ( (binary_expression "cVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(((byte)fVar1 & 0x11) != 0)" ( (binary_expression "((byte)fVar1 & 0x11) != 0" (parenthesized_expression "((byte)fVar1 & 0x11)" ( (binary_expression "(byte)fVar1 & 0x11" (cast_expression "(byte)fVar1" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) )) != number_literal) ))) )) && (parenthesized_expression "(this[0xa9] == (filebuf)0x0)" ( (binary_expression "this[0xa9] == (filebuf)0x0" (subscript_expression "this[0xa9]" identifier [ number_literal ]) == (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ))) )) (compound_statement "{\n    lVar3 = *(long *)(this + 0x30) - *(long *)(this + 0x28);\n    if ((this[0xaa] == (filebuf)0x0) && (1 < *(ulong *)(this + 0xa0))) {\n      lVar3 = *(ulong *)(this + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_2) {\n      lVar5 = *(long *)(this + 0x28) - (long)*(char **)(this + 0x20);\n      lVar3 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,\n                         param_2);\n      if (param_2 + lVar5 == lVar3) {\n        lVar4 = *(long *)(this + 0x98);\n        *(long *)(this + 8) = lVar4;\n        *(long *)(this + 0x10) = lVar4;\n        *(long *)(this + 0x18) = lVar4;\n        if ((((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||\n           (*(ulong *)(this + 0xa0) < 2)) {\n          *(undefined8 *)(this + 0x28) = 0;\n          *(undefined8 *)(this + 0x20) = 0;\n          *(undefined8 *)(this + 0x30) = 0;\n        }\n        else {\n          *(long *)(this + 0x28) = lVar4;\n          *(long *)(this + 0x20) = lVar4;\n          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);\n        }\n        this[0xaa] = (filebuf)0x1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }" { (expression_statement "lVar3 = *(long *)(this + 0x30) - *(long *)(this + 0x28);" (assignment_expression "lVar3 = *(long *)(this + 0x30) - *(long *)(this + 0x28)" identifier = (binary_expression "*(long *)(this + 0x30) - *(long *)(this + 0x28)" (pointer_expression "*(long *)(this + 0x30)" * (cast_expression "(long *)(this + 0x30)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x30)" ( (binary_expression "this + 0x30" identifier + number_literal) )))) - (pointer_expression "*(long *)(this + 0x28)" * (cast_expression "(long *)(this + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x28)" ( (binary_expression "this + 0x28" identifier + number_literal) )))))) ;) (if_statement "if ((this[0xaa] == (filebuf)0x0) && (1 < *(ulong *)(this + 0xa0))) {\n      lVar3 = *(ulong *)(this + 0xa0) - 1;\n    }" if (parenthesized_expression "((this[0xaa] == (filebuf)0x0) && (1 < *(ulong *)(this + 0xa0)))" ( (binary_expression "(this[0xaa] == (filebuf)0x0) && (1 < *(ulong *)(this + 0xa0))" (parenthesized_expression "(this[0xaa] == (filebuf)0x0)" ( (binary_expression "this[0xaa] == (filebuf)0x0" (subscript_expression "this[0xaa]" identifier [ number_literal ]) == (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) )) && (parenthesized_expression "(1 < *(ulong *)(this + 0xa0))" ( (binary_expression "1 < *(ulong *)(this + 0xa0)" number_literal < (pointer_expression "*(ulong *)(this + 0xa0)" * (cast_expression "(ulong *)(this + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xa0)" ( (binary_expression "this + 0xa0" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      lVar3 = *(ulong *)(this + 0xa0) - 1;\n    }" { (expression_statement "lVar3 = *(ulong *)(this + 0xa0) - 1;" (assignment_expression "lVar3 = *(ulong *)(this + 0xa0) - 1" identifier = (binary_expression "*(ulong *)(this + 0xa0) - 1" (pointer_expression "*(ulong *)(this + 0xa0)" * (cast_expression "(ulong *)(this + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xa0)" ( (binary_expression "this + 0xa0" identifier + number_literal) )))) - number_literal)) ;) })) (if_statement "if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }" if (parenthesized_expression "(0x3ff < lVar3)" ( (binary_expression "0x3ff < lVar3" number_literal < identifier) )) (compound_statement "{\n      lVar3 = 0x400;\n    }" { (expression_statement "lVar3 = 0x400;" (assignment_expression "lVar3 = 0x400" identifier = number_literal) ;) })) (if_statement "if (lVar3 <= param_2) {\n      lVar5 = *(long *)(this + 0x28) - (long)*(char **)(this + 0x20);\n      lVar3 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,\n                         param_2);\n      if (param_2 + lVar5 == lVar3) {\n        lVar4 = *(long *)(this + 0x98);\n        *(long *)(this + 8) = lVar4;\n        *(long *)(this + 0x10) = lVar4;\n        *(long *)(this + 0x18) = lVar4;\n        if ((((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||\n           (*(ulong *)(this + 0xa0) < 2)) {\n          *(undefined8 *)(this + 0x28) = 0;\n          *(undefined8 *)(this + 0x20) = 0;\n          *(undefined8 *)(this + 0x30) = 0;\n        }\n        else {\n          *(long *)(this + 0x28) = lVar4;\n          *(long *)(this + 0x20) = lVar4;\n          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);\n        }\n        this[0xaa] = (filebuf)0x1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }" if (parenthesized_expression "(lVar3 <= param_2)" ( (binary_expression "lVar3 <= param_2" identifier <= identifier) )) (compound_statement "{\n      lVar5 = *(long *)(this + 0x28) - (long)*(char **)(this + 0x20);\n      lVar3 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,\n                         param_2);\n      if (param_2 + lVar5 == lVar3) {\n        lVar4 = *(long *)(this + 0x98);\n        *(long *)(this + 8) = lVar4;\n        *(long *)(this + 0x10) = lVar4;\n        *(long *)(this + 0x18) = lVar4;\n        if ((((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||\n           (*(ulong *)(this + 0xa0) < 2)) {\n          *(undefined8 *)(this + 0x28) = 0;\n          *(undefined8 *)(this + 0x20) = 0;\n          *(undefined8 *)(this + 0x30) = 0;\n        }\n        else {\n          *(long *)(this + 0x28) = lVar4;\n          *(long *)(this + 0x20) = lVar4;\n          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);\n        }\n        this[0xaa] = (filebuf)0x1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }" { (expression_statement "lVar5 = *(long *)(this + 0x28) - (long)*(char **)(this + 0x20);" (assignment_expression "lVar5 = *(long *)(this + 0x28) - (long)*(char **)(this + 0x20)" identifier = (binary_expression "*(long *)(this + 0x28) - (long)*(char **)(this + 0x20)" (pointer_expression "*(long *)(this + 0x28)" * (cast_expression "(long *)(this + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x28)" ( (binary_expression "this + 0x28" identifier + number_literal) )))) - (cast_expression "(long)*(char **)(this + 0x20)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (pointer_expression "*(char **)(this + 0x20)" * (cast_expression "(char **)(this + 0x20)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x20)" ( (binary_expression "this + 0x20" identifier + number_literal) ))))))) ;) (expression_statement "lVar3 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,\n                         param_2);" (assignment_expression "lVar3 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,\n                         param_2)" identifier = (binary_expression "__basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,\n                         param_2)" (binary_expression "__basic_file<char" identifier < identifier) > (ERROR "::" : :) (call_expression "xsputn_2\n                        ((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,\n                         param_2)" identifier (argument_list "((__basic_file<char> *)(this + 0x68),*(char **)(this + 0x20),lVar5,param_1,\n                         param_2)" ( (call_expression "(__basic_file<char> *)(this + 0x68)" (parenthesized_expression "(__basic_file<char> *)" ( (binary_expression "__basic_file<char> *" (binary_expression "__basic_file<char" identifier < identifier) > (pointer_expression "*" * identifier)) )) (argument_list "(this + 0x68)" ( (binary_expression "this + 0x68" identifier + number_literal) ))) , (pointer_expression "*(char **)(this + 0x20)" * (cast_expression "(char **)(this + 0x20)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x20)" ( (binary_expression "this + 0x20" identifier + number_literal) )))) , identifier , identifier , identifier ))))) ;) (if_statement "if (param_2 + lVar5 == lVar3) {\n        lVar4 = *(long *)(this + 0x98);\n        *(long *)(this + 8) = lVar4;\n        *(long *)(this + 0x10) = lVar4;\n        *(long *)(this + 0x18) = lVar4;\n        if ((((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||\n           (*(ulong *)(this + 0xa0) < 2)) {\n          *(undefined8 *)(this + 0x28) = 0;\n          *(undefined8 *)(this + 0x20) = 0;\n          *(undefined8 *)(this + 0x30) = 0;\n        }\n        else {\n          *(long *)(this + 0x28) = lVar4;\n          *(long *)(this + 0x20) = lVar4;\n          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);\n        }\n        this[0xaa] = (filebuf)0x1;\n      }" if (parenthesized_expression "(param_2 + lVar5 == lVar3)" ( (binary_expression "param_2 + lVar5 == lVar3" (binary_expression "param_2 + lVar5" identifier + identifier) == identifier) )) (compound_statement "{\n        lVar4 = *(long *)(this + 0x98);\n        *(long *)(this + 8) = lVar4;\n        *(long *)(this + 0x10) = lVar4;\n        *(long *)(this + 0x18) = lVar4;\n        if ((((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||\n           (*(ulong *)(this + 0xa0) < 2)) {\n          *(undefined8 *)(this + 0x28) = 0;\n          *(undefined8 *)(this + 0x20) = 0;\n          *(undefined8 *)(this + 0x30) = 0;\n        }\n        else {\n          *(long *)(this + 0x28) = lVar4;\n          *(long *)(this + 0x20) = lVar4;\n          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);\n        }\n        this[0xaa] = (filebuf)0x1;\n      }" { (expression_statement "lVar4 = *(long *)(this + 0x98);" (assignment_expression "lVar4 = *(long *)(this + 0x98)" identifier = (pointer_expression "*(long *)(this + 0x98)" * (cast_expression "(long *)(this + 0x98)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x98)" ( (binary_expression "this + 0x98" identifier + number_literal) ))))) ;) (expression_statement "*(long *)(this + 8) = lVar4;" (assignment_expression "*(long *)(this + 8) = lVar4" (pointer_expression "*(long *)(this + 8)" * (cast_expression "(long *)(this + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(this + 0x10) = lVar4;" (assignment_expression "*(long *)(this + 0x10) = lVar4" (pointer_expression "*(long *)(this + 0x10)" * (cast_expression "(long *)(this + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(this + 0x18) = lVar4;" (assignment_expression "*(long *)(this + 0x18) = lVar4" (pointer_expression "*(long *)(this + 0x18)" * (cast_expression "(long *)(this + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||\n           (*(ulong *)(this + 0xa0) < 2)) {\n          *(undefined8 *)(this + 0x28) = 0;\n          *(undefined8 *)(this + 0x20) = 0;\n          *(undefined8 *)(this + 0x30) = 0;\n        }\n        else {\n          *(long *)(this + 0x28) = lVar4;\n          *(long *)(this + 0x20) = lVar4;\n          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);\n        }" if (parenthesized_expression "((((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||\n           (*(ulong *)(this + 0xa0) < 2))" ( (binary_expression "(((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)) ||\n           (*(ulong *)(this + 0xa0) < 2)" (parenthesized_expression "(((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0))" ( (binary_expression "((*(uint *)(this + 0x78) & 0x10) == 0) && ((*(uint *)(this + 0x78) & 1) == 0)" (parenthesized_expression "((*(uint *)(this + 0x78) & 0x10) == 0)" ( (binary_expression "(*(uint *)(this + 0x78) & 0x10) == 0" (parenthesized_expression "(*(uint *)(this + 0x78) & 0x10)" ( (binary_expression "*(uint *)(this + 0x78) & 0x10" (pointer_expression "*(uint *)(this + 0x78)" * (cast_expression "(uint *)(this + 0x78)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x78)" ( (binary_expression "this + 0x78" identifier + number_literal) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "((*(uint *)(this + 0x78) & 1) == 0)" ( (binary_expression "(*(uint *)(this + 0x78) & 1) == 0" (parenthesized_expression "(*(uint *)(this + 0x78) & 1)" ( (binary_expression "*(uint *)(this + 0x78) & 1" (pointer_expression "*(uint *)(this + 0x78)" * (cast_expression "(uint *)(this + 0x78)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x78)" ( (binary_expression "this + 0x78" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) || (parenthesized_expression "(*(ulong *)(this + 0xa0) < 2)" ( (binary_expression "*(ulong *)(this + 0xa0) < 2" (pointer_expression "*(ulong *)(this + 0xa0)" * (cast_expression "(ulong *)(this + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xa0)" ( (binary_expression "this + 0xa0" identifier + number_literal) )))) < number_literal) ))) )) (compound_statement "{\n          *(undefined8 *)(this + 0x28) = 0;\n          *(undefined8 *)(this + 0x20) = 0;\n          *(undefined8 *)(this + 0x30) = 0;\n        }" { (expression_statement "*(undefined8 *)(this + 0x28) = 0;" (assignment_expression "*(undefined8 *)(this + 0x28) = 0" (pointer_expression "*(undefined8 *)(this + 0x28)" * (cast_expression "(undefined8 *)(this + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x28)" ( (binary_expression "this + 0x28" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(this + 0x20) = 0;" (assignment_expression "*(undefined8 *)(this + 0x20) = 0" (pointer_expression "*(undefined8 *)(this + 0x20)" * (cast_expression "(undefined8 *)(this + 0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x20)" ( (binary_expression "this + 0x20" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(this + 0x30) = 0;" (assignment_expression "*(undefined8 *)(this + 0x30) = 0" (pointer_expression "*(undefined8 *)(this + 0x30)" * (cast_expression "(undefined8 *)(this + 0x30)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x30)" ( (binary_expression "this + 0x30" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n          *(long *)(this + 0x28) = lVar4;\n          *(long *)(this + 0x20) = lVar4;\n          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);\n        }" else (compound_statement "{\n          *(long *)(this + 0x28) = lVar4;\n          *(long *)(this + 0x20) = lVar4;\n          *(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);\n        }" { (expression_statement "*(long *)(this + 0x28) = lVar4;" (assignment_expression "*(long *)(this + 0x28) = lVar4" (pointer_expression "*(long *)(this + 0x28)" * (cast_expression "(long *)(this + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x28)" ( (binary_expression "this + 0x28" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(this + 0x20) = lVar4;" (assignment_expression "*(long *)(this + 0x20) = lVar4" (pointer_expression "*(long *)(this + 0x20)" * (cast_expression "(long *)(this + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x20)" ( (binary_expression "this + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0);" (assignment_expression "*(ulong *)(this + 0x30) = lVar4 + -1 + *(ulong *)(this + 0xa0)" (pointer_expression "*(ulong *)(this + 0x30)" * (cast_expression "(ulong *)(this + 0x30)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x30)" ( (binary_expression "this + 0x30" identifier + number_literal) )))) = (binary_expression "lVar4 + -1 + *(ulong *)(this + 0xa0)" (binary_expression "lVar4 + -1" identifier + number_literal) + (pointer_expression "*(ulong *)(this + 0xa0)" * (cast_expression "(ulong *)(this + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xa0)" ( (binary_expression "this + 0xa0" identifier + number_literal) )))))) ;) }))) (expression_statement "this[0xaa] = (filebuf)0x1;" (assignment_expression "this[0xaa] = (filebuf)0x1" (subscript_expression "this[0xaa]" identifier [ number_literal ]) = (cast_expression "(filebuf)0x1" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ;) })) (expression_statement "lVar4 = 0;" (assignment_expression "lVar4 = 0" identifier = number_literal) ;) (if_statement "if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }" if (parenthesized_expression "(lVar5 < lVar3)" ( (binary_expression "lVar5 < lVar3" identifier < identifier) )) (compound_statement "{\n        lVar4 = lVar3 - lVar5;\n      }" { (expression_statement "lVar4 = lVar3 - lVar5;" (assignment_expression "lVar4 = lVar3 - lVar5" identifier = (binary_expression "lVar3 - lVar5" identifier - identifier)) ;) })) (return_statement "return lVar4;" return identifier ;) })) })) (ERROR "lVar3 = streambuf::" (assignment_expression "lVar3 = streambuf" identifier = identifier) : :) (expression_statement "xsputn((streambuf *)this,param_1,param_2);" (call_expression "xsputn((streambuf *)this,param_1,param_2)" identifier (argument_list "((streambuf *)this,param_1,param_2)" ( (cast_expression "(streambuf *)this" ( (type_descriptor "streambuf *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , identifier , identifier ))) ;) (return_statement "return lVar3;" return identifier ;) })))
(translation_unit "long FUN_002cac90(long param_1,undefined8 param_2,long param_3)\n\n{\n  byte bVar1;\n  char cVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  bVar1 = *(byte *)(param_1 + 0x78);\n  if (*(long **)(param_1 + 200) == (long *)0x0) {\n                    \n    FUN_002e1170();\n  }\n  cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();\n  if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }\n  lVar3 = FUN_002abf30(param_1,param_2,param_3);\n  return lVar3;\n}\n\n" (function_definition "long FUN_002cac90(long param_1,undefined8 param_2,long param_3)\n\n{\n  byte bVar1;\n  char cVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  bVar1 = *(byte *)(param_1 + 0x78);\n  if (*(long **)(param_1 + 200) == (long *)0x0) {\n                    \n    FUN_002e1170();\n  }\n  cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();\n  if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }\n  lVar3 = FUN_002abf30(param_1,param_2,param_3);\n  return lVar3;\n}" (sized_type_specifier "long" long) (function_declarator "FUN_002cac90(long param_1,undefined8 param_2,long param_3)" identifier (parameter_list "(long param_1,undefined8 param_2,long param_3)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "long param_3" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  byte bVar1;\n  char cVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  bVar1 = *(byte *)(param_1 + 0x78);\n  if (*(long **)(param_1 + 200) == (long *)0x0) {\n                    \n    FUN_002e1170();\n  }\n  cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();\n  if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }\n  lVar3 = FUN_002abf30(param_1,param_2,param_3);\n  return lVar3;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "char cVar2;" primitive_type identifier ;) (declaration "long lVar3;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar4;" (sized_type_specifier "long" long) identifier ;) (declaration "long lVar5;" (sized_type_specifier "long" long) identifier ;) (expression_statement "bVar1 = *(byte *)(param_1 + 0x78);" (assignment_expression "bVar1 = *(byte *)(param_1 + 0x78)" identifier = (pointer_expression "*(byte *)(param_1 + 0x78)" * (cast_expression "(byte *)(param_1 + 0x78)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) ))))) ;) (if_statement "if (*(long **)(param_1 + 200) == (long *)0x0) {\n                    \n    FUN_002e1170();\n  }" if (parenthesized_expression "(*(long **)(param_1 + 200) == (long *)0x0)" ( (binary_expression "*(long **)(param_1 + 200) == (long *)0x0" (pointer_expression "*(long **)(param_1 + 200)" * (cast_expression "(long **)(param_1 + 200)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 200)" ( (binary_expression "param_1 + 200" identifier + number_literal) )))) == (cast_expression "(long *)0x0" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    FUN_002e1170();\n  }" { (expression_statement "FUN_002e1170();" (call_expression "FUN_002e1170()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();" (assignment_expression "cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))()" identifier = (call_expression "(**(code **)(**(long **)(param_1 + 200) + 0x30))()" (parenthesized_expression "(**(code **)(**(long **)(param_1 + 200) + 0x30))" ( (pointer_expression "**(code **)(**(long **)(param_1 + 200) + 0x30)" * (pointer_expression "*(code **)(**(long **)(param_1 + 200) + 0x30)" * (cast_expression "(code **)(**(long **)(param_1 + 200) + 0x30)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(**(long **)(param_1 + 200) + 0x30)" ( (binary_expression "**(long **)(param_1 + 200) + 0x30" (pointer_expression "**(long **)(param_1 + 200)" * (pointer_expression "*(long **)(param_1 + 200)" * (cast_expression "(long **)(param_1 + 200)" ( (type_descriptor "long **" (sized_type_specifier "long" long) (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 200)" ( (binary_expression "param_1 + 200" identifier + number_literal) ))))) + number_literal) ))))) )) (argument_list "()" ( )))) ;) (if_statement "if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }" if (parenthesized_expression "(((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0'))" ( (binary_expression "((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')" (parenthesized_expression "((cVar2 != '\0') && ((bVar1 & 0x11) != 0))" ( (binary_expression "(cVar2 != '\0') && ((bVar1 & 0x11) != 0)" (parenthesized_expression "(cVar2 != '\0')" ( (binary_expression "cVar2 != '\0'" identifier != (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "((bVar1 & 0x11) != 0)" ( (binary_expression "(bVar1 & 0x11) != 0" (parenthesized_expression "(bVar1 & 0x11)" ( (binary_expression "bVar1 & 0x11" identifier & number_literal) )) != number_literal) ))) )) && (parenthesized_expression "(*(char *)(param_1 + 0xa9) == '\0')" ( (binary_expression "*(char *)(param_1 + 0xa9) == '\0'" (pointer_expression "*(char *)(param_1 + 0xa9)" * (cast_expression "(char *)(param_1 + 0xa9)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa9)" ( (binary_expression "param_1 + 0xa9" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }" { (expression_statement "lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);" (assignment_expression "lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28)" identifier = (binary_expression "*(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28)" (pointer_expression "*(long *)(param_1 + 0x30)" * (cast_expression "(long *)(param_1 + 0x30)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) - (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))))) ;) (if_statement "if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }" if (parenthesized_expression "((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0)))" ( (binary_expression "(*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))" (parenthesized_expression "(*(char *)(param_1 + 0xaa) == '\0')" ( (binary_expression "*(char *)(param_1 + 0xaa) == '\0'" (pointer_expression "*(char *)(param_1 + 0xaa)" * (cast_expression "(char *)(param_1 + 0xaa)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xaa)" ( (binary_expression "param_1 + 0xaa" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(1 < *(ulong *)(param_1 + 0xa0))" ( (binary_expression "1 < *(ulong *)(param_1 + 0xa0)" number_literal < (pointer_expression "*(ulong *)(param_1 + 0xa0)" * (cast_expression "(ulong *)(param_1 + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa0)" ( (binary_expression "param_1 + 0xa0" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }" { (expression_statement "lVar3 = *(ulong *)(param_1 + 0xa0) - 1;" (assignment_expression "lVar3 = *(ulong *)(param_1 + 0xa0) - 1" identifier = (binary_expression "*(ulong *)(param_1 + 0xa0) - 1" (pointer_expression "*(ulong *)(param_1 + 0xa0)" * (cast_expression "(ulong *)(param_1 + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa0)" ( (binary_expression "param_1 + 0xa0" identifier + number_literal) )))) - number_literal)) ;) })) (if_statement "if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }" if (parenthesized_expression "(0x3ff < lVar3)" ( (binary_expression "0x3ff < lVar3" number_literal < identifier) )) (compound_statement "{\n      lVar3 = 0x400;\n    }" { (expression_statement "lVar3 = 0x400;" (assignment_expression "lVar3 = 0x400" identifier = number_literal) ;) })) (if_statement "if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }" if (parenthesized_expression "(lVar3 <= param_3)" ( (binary_expression "lVar3 <= param_3" identifier <= identifier) )) (compound_statement "{\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }" { (expression_statement "lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);" (assignment_expression "lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20)" identifier = (binary_expression "*(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20)" (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) - (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))))) ;) (expression_statement "lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);" (assignment_expression "lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3)" identifier = (call_expression "FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3)" identifier (argument_list "(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3)" ( (binary_expression "param_1 + 0x68" identifier + number_literal) , (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) , identifier , identifier , identifier )))) ;) (if_statement "if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }" if (parenthesized_expression "(param_3 + lVar5 == lVar3)" ( (binary_expression "param_3 + lVar5 == lVar3" (binary_expression "param_3 + lVar5" identifier + identifier) == identifier) )) (compound_statement "{\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }" { (expression_statement "lVar4 = *(long *)(param_1 + 0x98);" (assignment_expression "lVar4 = *(long *)(param_1 + 0x98)" identifier = (pointer_expression "*(long *)(param_1 + 0x98)" * (cast_expression "(long *)(param_1 + 0x98)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x98)" ( (binary_expression "param_1 + 0x98" identifier + number_literal) ))))) ;) (expression_statement "*(long *)(param_1 + 8) = lVar4;" (assignment_expression "*(long *)(param_1 + 8) = lVar4" (pointer_expression "*(long *)(param_1 + 8)" * (cast_expression "(long *)(param_1 + 8)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(param_1 + 0x10) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x10) = lVar4" (pointer_expression "*(long *)(param_1 + 0x10)" * (cast_expression "(long *)(param_1 + 0x10)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(param_1 + 0x18) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x18) = lVar4" (pointer_expression "*(long *)(param_1 + 0x18)" * (cast_expression "(long *)(param_1 + 0x18)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }" if (parenthesized_expression "((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2))" ( (binary_expression "(((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)" (parenthesized_expression "(((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0))" ( (binary_expression "((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)" (parenthesized_expression "((*(uint *)(param_1 + 0x78) & 0x10) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x78) & 0x10) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x78) & 0x10)" ( (binary_expression "*(uint *)(param_1 + 0x78) & 0x10" (pointer_expression "*(uint *)(param_1 + 0x78)" * (cast_expression "(uint *)(param_1 + 0x78)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "((*(uint *)(param_1 + 0x78) & 1) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x78) & 1) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x78) & 1)" ( (binary_expression "*(uint *)(param_1 + 0x78) & 1" (pointer_expression "*(uint *)(param_1 + 0x78)" * (cast_expression "(uint *)(param_1 + 0x78)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x78)" ( (binary_expression "param_1 + 0x78" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) || (parenthesized_expression "(*(ulong *)(param_1 + 0xa0) < 2)" ( (binary_expression "*(ulong *)(param_1 + 0xa0) < 2" (pointer_expression "*(ulong *)(param_1 + 0xa0)" * (cast_expression "(ulong *)(param_1 + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa0)" ( (binary_expression "param_1 + 0xa0" identifier + number_literal) )))) < number_literal) ))) )) (compound_statement "{\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }" { (expression_statement "*(undefined8 *)(param_1 + 0x28) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x28) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x28)" * (cast_expression "(undefined8 *)(param_1 + 0x28)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(param_1 + 0x20) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x20) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x20)" * (cast_expression "(undefined8 *)(param_1 + 0x20)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined8 *)(param_1 + 0x30) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x30) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x30)" * (cast_expression "(undefined8 *)(param_1 + 0x30)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }" else (compound_statement "{\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }" { (expression_statement "*(long *)(param_1 + 0x28) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x28) = lVar4" (pointer_expression "*(long *)(param_1 + 0x28)" * (cast_expression "(long *)(param_1 + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x28)" ( (binary_expression "param_1 + 0x28" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(long *)(param_1 + 0x20) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x20) = lVar4" (pointer_expression "*(long *)(param_1 + 0x20)" * (cast_expression "(long *)(param_1 + 0x20)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);" (assignment_expression "*(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0)" (pointer_expression "*(ulong *)(param_1 + 0x30)" * (cast_expression "(ulong *)(param_1 + 0x30)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x30)" ( (binary_expression "param_1 + 0x30" identifier + number_literal) )))) = (binary_expression "lVar4 + -1 + *(ulong *)(param_1 + 0xa0)" (binary_expression "lVar4 + -1" identifier + number_literal) + (pointer_expression "*(ulong *)(param_1 + 0xa0)" * (cast_expression "(ulong *)(param_1 + 0xa0)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xa0)" ( (binary_expression "param_1 + 0xa0" identifier + number_literal) )))))) ;) }))) (expression_statement "*(undefined1 *)(param_1 + 0xaa) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0xaa) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0xaa)" * (cast_expression "(undefined1 *)(param_1 + 0xaa)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xaa)" ( (binary_expression "param_1 + 0xaa" identifier + number_literal) )))) = number_literal) ;) })) (expression_statement "lVar4 = 0;" (assignment_expression "lVar4 = 0" identifier = number_literal) ;) (if_statement "if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }" if (parenthesized_expression "(lVar5 < lVar3)" ( (binary_expression "lVar5 < lVar3" identifier < identifier) )) (compound_statement "{\n        lVar4 = lVar3 - lVar5;\n      }" { (expression_statement "lVar4 = lVar3 - lVar5;" (assignment_expression "lVar4 = lVar3 - lVar5" identifier = (binary_expression "lVar3 - lVar5" identifier - identifier)) ;) })) (return_statement "return lVar4;" return identifier ;) })) })) (expression_statement "lVar3 = FUN_002abf30(param_1,param_2,param_3);" (assignment_expression "lVar3 = FUN_002abf30(param_1,param_2,param_3)" identifier = (call_expression "FUN_002abf30(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (return_statement "return lVar3;" return identifier ;) })))
(translation_unit (function_definition (sized_type_specifier long) (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) + LIT) ))))) )) (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT != (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) != LIT) ))) )) && (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) == (char_literal ' escape_sequence ')) )) && (parenthesized_expression ( (binary_expression LIT < (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression IDENT + IDENT) == IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) )) && (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) & LIT) )) == LIT) ))) )) || (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) < LIT) ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (binary_expression IDENT + LIT) + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) }))) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = LIT) ;) })) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT - IDENT)) ;) })) (return_statement return IDENT ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (return_statement return IDENT ;) })))
(function_definition "long FUN_002cac90(long param_1,undefined8 param_2,long param_3)\n\n{\n  byte bVar1;\n  char cVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  bVar1 = *(byte *)(param_1 + 0x78);\n  if (*(long **)(param_1 + 200) == (long *)0x0) {\n                    \n    FUN_002e1170();\n  }\n  cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();\n  if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }\n  lVar3 = FUN_002abf30(param_1,param_2,param_3);\n  return lVar3;\n}" (sized_type_specifier "long" (long "long")) (function_declarator "FUN_002cac90(long param_1,undefined8 param_2,long param_3)" (identifier "FUN_002cac90") (parameter_list "(long param_1,undefined8 param_2,long param_3)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) (, ",") (parameter_declaration "long param_3" (sized_type_specifier "long" (long "long")) (identifier "param_3")) () ")"))) (compound_statement "{\n  byte bVar1;\n  char cVar2;\n  long lVar3;\n  long lVar4;\n  long lVar5;\n  \n  bVar1 = *(byte *)(param_1 + 0x78);\n  if (*(long **)(param_1 + 200) == (long *)0x0) {\n                    \n    FUN_002e1170();\n  }\n  cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();\n  if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }\n  lVar3 = FUN_002abf30(param_1,param_2,param_3);\n  return lVar3;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "char cVar2;" (primitive_type "char") (identifier "cVar2") (; ";")) (declaration "long lVar3;" (sized_type_specifier "long" (long "long")) (identifier "lVar3") (; ";")) (declaration "long lVar4;" (sized_type_specifier "long" (long "long")) (identifier "lVar4") (; ";")) (declaration "long lVar5;" (sized_type_specifier "long" (long "long")) (identifier "lVar5") (; ";")) (expression_statement "bVar1 = *(byte *)(param_1 + 0x78);" (assignment_expression "bVar1 = *(byte *)(param_1 + 0x78)" (identifier "bVar1") (= "=") (pointer_expression "*(byte *)(param_1 + 0x78)" (* "*") (cast_expression "(byte *)(param_1 + 0x78)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x78)" (( "(") (binary_expression "param_1 + 0x78" (identifier "param_1") (+ "+") (number_literal "0x78")) () ")"))))) (; ";")) (if_statement "if (*(long **)(param_1 + 200) == (long *)0x0) {\n                    \n    FUN_002e1170();\n  }" (if "if") (parenthesized_expression "(*(long **)(param_1 + 200) == (long *)0x0)" (( "(") (binary_expression "*(long **)(param_1 + 200) == (long *)0x0" (pointer_expression "*(long **)(param_1 + 200)" (* "*") (cast_expression "(long **)(param_1 + 200)" (( "(") (type_descriptor "long **" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 200)" (( "(") (binary_expression "param_1 + 200" (identifier "param_1") (+ "+") (number_literal "200")) () ")")))) (== "==") (cast_expression "(long *)0x0" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    FUN_002e1170();\n  }" ({ "{") (expression_statement "FUN_002e1170();" (call_expression "FUN_002e1170()" (identifier "FUN_002e1170") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();" (assignment_expression "cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))()" (identifier "cVar2") (= "=") (call_expression "(**(code **)(**(long **)(param_1 + 200) + 0x30))()" (parenthesized_expression "(**(code **)(**(long **)(param_1 + 200) + 0x30))" (( "(") (pointer_expression "**(code **)(**(long **)(param_1 + 200) + 0x30)" (* "*") (pointer_expression "*(code **)(**(long **)(param_1 + 200) + 0x30)" (* "*") (cast_expression "(code **)(**(long **)(param_1 + 200) + 0x30)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(**(long **)(param_1 + 200) + 0x30)" (( "(") (binary_expression "**(long **)(param_1 + 200) + 0x30" (pointer_expression "**(long **)(param_1 + 200)" (* "*") (pointer_expression "*(long **)(param_1 + 200)" (* "*") (cast_expression "(long **)(param_1 + 200)" (( "(") (type_descriptor "long **" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 200)" (( "(") (binary_expression "param_1 + 200" (identifier "param_1") (+ "+") (number_literal "200")) () ")"))))) (+ "+") (number_literal "0x30")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }" (if "if") (parenthesized_expression "(((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0'))" (( "(") (binary_expression "((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')" (parenthesized_expression "((cVar2 != '\0') && ((bVar1 & 0x11) != 0))" (( "(") (binary_expression "(cVar2 != '\0') && ((bVar1 & 0x11) != 0)" (parenthesized_expression "(cVar2 != '\0')" (( "(") (binary_expression "cVar2 != '\0'" (identifier "cVar2") (!= "!=") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "((bVar1 & 0x11) != 0)" (( "(") (binary_expression "(bVar1 & 0x11) != 0" (parenthesized_expression "(bVar1 & 0x11)" (( "(") (binary_expression "bVar1 & 0x11" (identifier "bVar1") (& "&") (number_literal "0x11")) () ")")) (!= "!=") (number_literal "0")) () ")"))) () ")")) (&& "&&") (parenthesized_expression "(*(char *)(param_1 + 0xa9) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0xa9) == '\0'" (pointer_expression "*(char *)(param_1 + 0xa9)" (* "*") (cast_expression "(char *)(param_1 + 0xa9)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xa9)" (( "(") (binary_expression "param_1 + 0xa9" (identifier "param_1") (+ "+") (number_literal "0xa9")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);\n    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }\n    if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }\n    if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }\n  }" ({ "{") (expression_statement "lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);" (assignment_expression "lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28)" (identifier "lVar3") (= "=") (binary_expression "*(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28)" (pointer_expression "*(long *)(param_1 + 0x30)" (* "*") (cast_expression "(long *)(param_1 + 0x30)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (- "-") (pointer_expression "*(long *)(param_1 + 0x28)" (* "*") (cast_expression "(long *)(param_1 + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))))) (; ";")) (if_statement "if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }" (if "if") (parenthesized_expression "((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0)))" (( "(") (binary_expression "(*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))" (parenthesized_expression "(*(char *)(param_1 + 0xaa) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0xaa) == '\0'" (pointer_expression "*(char *)(param_1 + 0xaa)" (* "*") (cast_expression "(char *)(param_1 + 0xaa)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xaa)" (( "(") (binary_expression "param_1 + 0xaa" (identifier "param_1") (+ "+") (number_literal "0xaa")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(1 < *(ulong *)(param_1 + 0xa0))" (( "(") (binary_expression "1 < *(ulong *)(param_1 + 0xa0)" (number_literal "1") (< "<") (pointer_expression "*(ulong *)(param_1 + 0xa0)" (* "*") (cast_expression "(ulong *)(param_1 + 0xa0)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xa0)" (( "(") (binary_expression "param_1 + 0xa0" (identifier "param_1") (+ "+") (number_literal "0xa0")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;\n    }" ({ "{") (expression_statement "lVar3 = *(ulong *)(param_1 + 0xa0) - 1;" (assignment_expression "lVar3 = *(ulong *)(param_1 + 0xa0) - 1" (identifier "lVar3") (= "=") (binary_expression "*(ulong *)(param_1 + 0xa0) - 1" (pointer_expression "*(ulong *)(param_1 + 0xa0)" (* "*") (cast_expression "(ulong *)(param_1 + 0xa0)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xa0)" (( "(") (binary_expression "param_1 + 0xa0" (identifier "param_1") (+ "+") (number_literal "0xa0")) () ")")))) (- "-") (number_literal "1"))) (; ";")) (} "}"))) (if_statement "if (0x3ff < lVar3) {\n      lVar3 = 0x400;\n    }" (if "if") (parenthesized_expression "(0x3ff < lVar3)" (( "(") (binary_expression "0x3ff < lVar3" (number_literal "0x3ff") (< "<") (identifier "lVar3")) () ")")) (compound_statement "{\n      lVar3 = 0x400;\n    }" ({ "{") (expression_statement "lVar3 = 0x400;" (assignment_expression "lVar3 = 0x400" (identifier "lVar3") (= "=") (number_literal "0x400")) (; ";")) (} "}"))) (if_statement "if (lVar3 <= param_3) {\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }" (if "if") (parenthesized_expression "(lVar3 <= param_3)" (( "(") (binary_expression "lVar3 <= param_3" (identifier "lVar3") (<= "<=") (identifier "param_3")) () ")")) (compound_statement "{\n      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);\n      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);\n      if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }\n      lVar4 = 0;\n      if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }\n      return lVar4;\n    }" ({ "{") (expression_statement "lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);" (assignment_expression "lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20)" (identifier "lVar5") (= "=") (binary_expression "*(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20)" (pointer_expression "*(long *)(param_1 + 0x28)" (* "*") (cast_expression "(long *)(param_1 + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (- "-") (pointer_expression "*(long *)(param_1 + 0x20)" (* "*") (cast_expression "(long *)(param_1 + 0x20)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))))) (; ";")) (expression_statement "lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);" (assignment_expression "lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3)" (identifier "lVar3") (= "=") (call_expression "FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3)" (identifier "FUN_002a30d0") (argument_list "(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3)" (( "(") (binary_expression "param_1 + 0x68" (identifier "param_1") (+ "+") (number_literal "0x68")) (, ",") (pointer_expression "*(long *)(param_1 + 0x20)" (* "*") (cast_expression "(long *)(param_1 + 0x20)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (, ",") (identifier "lVar5") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (param_3 + lVar5 == lVar3) {\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }" (if "if") (parenthesized_expression "(param_3 + lVar5 == lVar3)" (( "(") (binary_expression "param_3 + lVar5 == lVar3" (binary_expression "param_3 + lVar5" (identifier "param_3") (+ "+") (identifier "lVar5")) (== "==") (identifier "lVar3")) () ")")) (compound_statement "{\n        lVar4 = *(long *)(param_1 + 0x98);\n        *(long *)(param_1 + 8) = lVar4;\n        *(long *)(param_1 + 0x10) = lVar4;\n        *(long *)(param_1 + 0x18) = lVar4;\n        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }\n        *(undefined1 *)(param_1 + 0xaa) = 1;\n      }" ({ "{") (expression_statement "lVar4 = *(long *)(param_1 + 0x98);" (assignment_expression "lVar4 = *(long *)(param_1 + 0x98)" (identifier "lVar4") (= "=") (pointer_expression "*(long *)(param_1 + 0x98)" (* "*") (cast_expression "(long *)(param_1 + 0x98)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x98)" (( "(") (binary_expression "param_1 + 0x98" (identifier "param_1") (+ "+") (number_literal "0x98")) () ")"))))) (; ";")) (expression_statement "*(long *)(param_1 + 8) = lVar4;" (assignment_expression "*(long *)(param_1 + 8) = lVar4" (pointer_expression "*(long *)(param_1 + 8)" (* "*") (cast_expression "(long *)(param_1 + 8)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "lVar4")) (; ";")) (expression_statement "*(long *)(param_1 + 0x10) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x10) = lVar4" (pointer_expression "*(long *)(param_1 + 0x10)" (* "*") (cast_expression "(long *)(param_1 + 0x10)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "lVar4")) (; ";")) (expression_statement "*(long *)(param_1 + 0x18) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x18) = lVar4" (pointer_expression "*(long *)(param_1 + 0x18)" (* "*") (cast_expression "(long *)(param_1 + 0x18)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (identifier "lVar4")) (; ";")) (if_statement "if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)) {\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }\n        else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }" (if "if") (parenthesized_expression "((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2))" (( "(") (binary_expression "(((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||\n           (*(ulong *)(param_1 + 0xa0) < 2)" (parenthesized_expression "(((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0))" (( "(") (binary_expression "((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)" (parenthesized_expression "((*(uint *)(param_1 + 0x78) & 0x10) == 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x78) & 0x10) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x78) & 0x10)" (( "(") (binary_expression "*(uint *)(param_1 + 0x78) & 0x10" (pointer_expression "*(uint *)(param_1 + 0x78)" (* "*") (cast_expression "(uint *)(param_1 + 0x78)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x78)" (( "(") (binary_expression "param_1 + 0x78" (identifier "param_1") (+ "+") (number_literal "0x78")) () ")")))) (& "&") (number_literal "0x10")) () ")")) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((*(uint *)(param_1 + 0x78) & 1) == 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x78) & 1) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x78) & 1)" (( "(") (binary_expression "*(uint *)(param_1 + 0x78) & 1" (pointer_expression "*(uint *)(param_1 + 0x78)" (* "*") (cast_expression "(uint *)(param_1 + 0x78)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x78)" (( "(") (binary_expression "param_1 + 0x78" (identifier "param_1") (+ "+") (number_literal "0x78")) () ")")))) (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (|| "||") (parenthesized_expression "(*(ulong *)(param_1 + 0xa0) < 2)" (( "(") (binary_expression "*(ulong *)(param_1 + 0xa0) < 2" (pointer_expression "*(ulong *)(param_1 + 0xa0)" (* "*") (cast_expression "(ulong *)(param_1 + 0xa0)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xa0)" (( "(") (binary_expression "param_1 + 0xa0" (identifier "param_1") (+ "+") (number_literal "0xa0")) () ")")))) (< "<") (number_literal "2")) () ")"))) () ")")) (compound_statement "{\n          *(undefined8 *)(param_1 + 0x28) = 0;\n          *(undefined8 *)(param_1 + 0x20) = 0;\n          *(undefined8 *)(param_1 + 0x30) = 0;\n        }" ({ "{") (expression_statement "*(undefined8 *)(param_1 + 0x28) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x28) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x28)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x28)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined8 *)(param_1 + 0x20) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x20) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined8 *)(param_1 + 0x30) = 0;" (assignment_expression "*(undefined8 *)(param_1 + 0x30) = 0" (pointer_expression "*(undefined8 *)(param_1 + 0x30)" (* "*") (cast_expression "(undefined8 *)(param_1 + 0x30)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }" (else "else") (compound_statement "{\n          *(long *)(param_1 + 0x28) = lVar4;\n          *(long *)(param_1 + 0x20) = lVar4;\n          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);\n        }" ({ "{") (expression_statement "*(long *)(param_1 + 0x28) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x28) = lVar4" (pointer_expression "*(long *)(param_1 + 0x28)" (* "*") (cast_expression "(long *)(param_1 + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x28)" (( "(") (binary_expression "param_1 + 0x28" (identifier "param_1") (+ "+") (number_literal "0x28")) () ")")))) (= "=") (identifier "lVar4")) (; ";")) (expression_statement "*(long *)(param_1 + 0x20) = lVar4;" (assignment_expression "*(long *)(param_1 + 0x20) = lVar4" (pointer_expression "*(long *)(param_1 + 0x20)" (* "*") (cast_expression "(long *)(param_1 + 0x20)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (= "=") (identifier "lVar4")) (; ";")) (expression_statement "*(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);" (assignment_expression "*(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0)" (pointer_expression "*(ulong *)(param_1 + 0x30)" (* "*") (cast_expression "(ulong *)(param_1 + 0x30)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x30)" (( "(") (binary_expression "param_1 + 0x30" (identifier "param_1") (+ "+") (number_literal "0x30")) () ")")))) (= "=") (binary_expression "lVar4 + -1 + *(ulong *)(param_1 + 0xa0)" (binary_expression "lVar4 + -1" (identifier "lVar4") (+ "+") (number_literal "-1")) (+ "+") (pointer_expression "*(ulong *)(param_1 + 0xa0)" (* "*") (cast_expression "(ulong *)(param_1 + 0xa0)" (( "(") (type_descriptor "ulong *" (type_identifier "ulong") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xa0)" (( "(") (binary_expression "param_1 + 0xa0" (identifier "param_1") (+ "+") (number_literal "0xa0")) () ")")))))) (; ";")) (} "}")))) (expression_statement "*(undefined1 *)(param_1 + 0xaa) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0xaa) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0xaa)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0xaa)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xaa)" (( "(") (binary_expression "param_1 + 0xaa" (identifier "param_1") (+ "+") (number_literal "0xaa")) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}"))) (expression_statement "lVar4 = 0;" (assignment_expression "lVar4 = 0" (identifier "lVar4") (= "=") (number_literal "0")) (; ";")) (if_statement "if (lVar5 < lVar3) {\n        lVar4 = lVar3 - lVar5;\n      }" (if "if") (parenthesized_expression "(lVar5 < lVar3)" (( "(") (binary_expression "lVar5 < lVar3" (identifier "lVar5") (< "<") (identifier "lVar3")) () ")")) (compound_statement "{\n        lVar4 = lVar3 - lVar5;\n      }" ({ "{") (expression_statement "lVar4 = lVar3 - lVar5;" (assignment_expression "lVar4 = lVar3 - lVar5" (identifier "lVar4") (= "=") (binary_expression "lVar3 - lVar5" (identifier "lVar3") (- "-") (identifier "lVar5"))) (; ";")) (} "}"))) (return_statement "return lVar4;" (return "return") (identifier "lVar4") (; ";")) (} "}"))) (} "}"))) (expression_statement "lVar3 = FUN_002abf30(param_1,param_2,param_3);" (assignment_expression "lVar3 = FUN_002abf30(param_1,param_2,param_3)" (identifier "lVar3") (= "=") (call_expression "FUN_002abf30(param_1,param_2,param_3)" (identifier "FUN_002abf30") (argument_list "(param_1,param_2,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (return_statement "return lVar3;" (return "return") (identifier "lVar3") (; ";")) (} "}")))

/* std::filebuf::xsputn(char const*, long) */

long __thiscall std::type_1::function_1(type_1 *var_1,char *param_1,long var_5)

{
  type_1 fVar1;
  char var_3;
  long var_4;
  long var_10;
  long var_9;
  
  fVar1 = var_1[0x78];
  if (*(long **)(var_1 + 200) == (long *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_2();
  }
  var_3 = (**(type_2 **)(**(long **)(var_1 + 200) + 0x30))();
  if (((var_3 != '\0') && (((type_3)fVar1 & 0x11) != 0)) && (var_1[0xa9] == (type_1)0x0)) {
    var_4 = *(long *)(var_1 + 0x30) - *(long *)(var_1 + 0x28);
    if ((var_1[0xaa] == (type_1)0x0) && (1 < *(type_4 *)(var_1 + 0xa0))) {
      var_4 = *(type_4 *)(var_1 + 0xa0) - 1;
    }
    if (0x3ff < var_4) {
      var_4 = 0x400;
    }
    if (var_4 <= var_5) {
      var_9 = *(long *)(var_1 + 0x28) - (long)*(char **)(var_1 + 0x20);
      var_4 = var_6<var_7>::var_8
                        ((var_6<var_7> *)(var_1 + 0x68),*(char **)(var_1 + 0x20),var_9,param_1,
                         var_5);
      if (var_5 + var_9 == var_4) {
        var_10 = *(long *)(var_1 + 0x98);
        *(long *)(var_1 + 8) = var_10;
        *(long *)(var_1 + 0x10) = var_10;
        *(long *)(var_1 + 0x18) = var_10;
        if ((((*(type_5 *)(var_1 + 0x78) & 0x10) == 0) && ((*(type_5 *)(var_1 + 0x78) & 1) == 0)) ||
           (*(type_4 *)(var_1 + 0xa0) < 2)) {
          *(type_6 *)(var_1 + 0x28) = 0;
          *(type_6 *)(var_1 + 0x20) = 0;
          *(type_6 *)(var_1 + 0x30) = 0;
        }
        else {
          *(long *)(var_1 + 0x28) = var_10;
          *(long *)(var_1 + 0x20) = var_10;
          *(type_4 *)(var_1 + 0x30) = var_10 + -1 + *(type_4 *)(var_1 + 0xa0);
        }
        var_1[0xaa] = (type_1)0x1;
      }
      var_10 = 0;
      if (var_9 < var_4) {
        var_10 = var_4 - var_9;
      }
      return var_10;
    }
  }
  var_4 = type_7::function_1((type_7 *)var_1,param_1,var_5);
  return var_4;
}


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

long MASKED(long param_1,undefined8 param_2,long param_3)

{
  byte bVar1;
  char cVar2;
  long lVar3;
  long lVar4;
  long lVar5;
  
  bVar1 = *(byte *)(param_1 + 0x78);
  if (*(long **)(param_1 + 200) == (long *)0x0) {
                    /* WARNING: Subroutine does not return */
    FUN_002e1170();
  }
  cVar2 = (**(code **)(**(long **)(param_1 + 200) + 0x30))();
  if (((cVar2 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0xa9) == '\0')) {
    lVar3 = *(long *)(param_1 + 0x30) - *(long *)(param_1 + 0x28);
    if ((*(char *)(param_1 + 0xaa) == '\0') && (1 < *(ulong *)(param_1 + 0xa0))) {
      lVar3 = *(ulong *)(param_1 + 0xa0) - 1;
    }
    if (0x3ff < lVar3) {
      lVar3 = 0x400;
    }
    if (lVar3 <= param_3) {
      lVar5 = *(long *)(param_1 + 0x28) - *(long *)(param_1 + 0x20);
      lVar3 = FUN_002a30d0(param_1 + 0x68,*(long *)(param_1 + 0x20),lVar5,param_2,param_3);
      if (param_3 + lVar5 == lVar3) {
        lVar4 = *(long *)(param_1 + 0x98);
        *(long *)(param_1 + 8) = lVar4;
        *(long *)(param_1 + 0x10) = lVar4;
        *(long *)(param_1 + 0x18) = lVar4;
        if ((((*(uint *)(param_1 + 0x78) & 0x10) == 0) && ((*(uint *)(param_1 + 0x78) & 1) == 0)) ||
           (*(ulong *)(param_1 + 0xa0) < 2)) {
          *(undefined8 *)(param_1 + 0x28) = 0;
          *(undefined8 *)(param_1 + 0x20) = 0;
          *(undefined8 *)(param_1 + 0x30) = 0;
        }
        else {
          *(long *)(param_1 + 0x28) = lVar4;
          *(long *)(param_1 + 0x20) = lVar4;
          *(ulong *)(param_1 + 0x30) = lVar4 + -1 + *(ulong *)(param_1 + 0xa0);
        }
        *(undefined1 *)(param_1 + 0xaa) = 1;
      }
      lVar4 = 0;
      if (lVar5 < lVar3) {
        lVar4 = lVar3 - lVar5;
      }
      return lVar4;
    }
  }
  lVar3 = FUN_002abf30(param_1,param_2,param_3);
  return lVar3;
}

