
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::filebuf::xsputn(char const*, int) */

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

{
  filebuf fVar1;
  int *piVar2;
  int iVar3;
  char cVar4;
  int iVar5;
  int iVar6;
  
  fVar1 = this[0x40];
  piVar2 = *(int **)(this + 0x74);
  if (piVar2 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
    __throw_bad_cast();
  }
  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);
  if (((cVar4 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0x65] == (filebuf)0x0)) {
    iVar5 = *(int *)(this + 0x18) - *(int *)(this + 0x14);
    if ((this[0x66] == (filebuf)0x0) && (1 < *(uint *)(this + 0x60))) {
      iVar5 = *(uint *)(this + 0x60) - 1;
    }
    if (0x3ff < iVar5) {
      iVar5 = 0x400;
    }
    if (iVar5 <= param_2) {
      iVar6 = *(int *)(this + 0x14) - (int)*(char **)(this + 0x10);
      iVar5 = __basic_file<char>::xsputn_2
                        ((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,
                         param_2);
      if (param_2 + iVar6 == iVar5) {
        iVar3 = *(int *)(this + 0x5c);
        *(int *)(this + 4) = iVar3;
        *(int *)(this + 8) = iVar3;
        *(int *)(this + 0xc) = iVar3;
        if ((((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||
           (*(uint *)(this + 0x60) < 2)) {
          *(undefined4 *)(this + 0x14) = 0;
          *(undefined4 *)(this + 0x10) = 0;
          *(undefined4 *)(this + 0x18) = 0;
        }
        else {
          *(int *)(this + 0x14) = iVar3;
          *(int *)(this + 0x10) = iVar3;
          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);
        }
        this[0x66] = (filebuf)0x1;
      }
      if (iVar5 <= iVar6) {
        return 0;
      }
      return iVar5 - iVar6;
    }
  }
  iVar5 = streambuf::xsputn((streambuf *)this,param_1,param_2);
  return iVar5;
}



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

int FUN_00229630(int param_1,undefined4 param_2,int param_3)

{
  byte bVar1;
  int *piVar2;
  int iVar3;
  char cVar4;
  int iVar5;
  int iVar6;
  
  bVar1 = *(byte *)(param_1 + 0x40);
  piVar2 = *(int **)(param_1 + 0x74);
  if (piVar2 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
    FUN_002428a0();
  }
  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);
  if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {
    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);
    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {
      iVar5 = *(uint *)(param_1 + 0x60) - 1;
    }
    if (0x3ff < iVar5) {
      iVar5 = 0x400;
    }
    if (iVar5 <= param_3) {
      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);
      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);
      if (param_3 + iVar6 == iVar5) {
        iVar3 = *(int *)(param_1 + 0x5c);
        *(int *)(param_1 + 4) = iVar3;
        *(int *)(param_1 + 8) = iVar3;
        *(int *)(param_1 + 0xc) = iVar3;
        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||
           (*(uint *)(param_1 + 0x60) < 2)) {
          *(undefined4 *)(param_1 + 0x14) = 0;
          *(undefined4 *)(param_1 + 0x10) = 0;
          *(undefined4 *)(param_1 + 0x18) = 0;
        }
        else {
          *(int *)(param_1 + 0x14) = iVar3;
          *(int *)(param_1 + 0x10) = iVar3;
          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);
        }
        *(undefined1 *)(param_1 + 0x66) = 1;
      }
      if (iVar5 <= iVar6) {
        return 0;
      }
      return iVar5 - iVar6;
    }
  }
  iVar5 = FUN_00208000(param_1,param_2,param_3);
  return iVar5;
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00036db0
ADD EBX,0x1809c7
SUB ESP,0xc
MOV ESI,dword ptr [ESP + 0x20]
MOV EDI,dword ptr [ESP + 0x28]
TEST byte ptr [ESI + 0x40],0x11
SETNZ AL
MOV EBP,EAX
MOV EAX,dword ptr [ESI + 0x74]
TEST EAX,EAX
JZ 0x0022974b
SUB ESP,0xc
MOV EDX,dword ptr [EAX]
PUSH EAX
CALL dword ptr [EDX + 0x18]
ADD ESP,0x10
TEST AL,AL
JZ 0x002296e0
MOV EAX,EBP
TEST AL,AL
JZ 0x002296e0
CMP byte ptr [ESI + 0x65],0x0
JNZ 0x002296e0
MOV EDX,dword ptr [ESI + 0x14]
MOV EAX,dword ptr [ESI + 0x18]
SUB EAX,EDX
CMP byte ptr [ESI + 0x66],0x0
JNZ 0x00229694
MOV ECX,dword ptr [ESI + 0x60]
LEA EBP,[ECX + -0x1]
CMP ECX,0x1
CMOVA EAX,EBP
CMP EAX,0x400
MOV ECX,0x400
CMOVGE EAX,ECX
CMP EAX,EDI
JG 0x002296e0
MOV EAX,dword ptr [ESI + 0x10]
SUB ESP,0xc
PUSH EDI
SUB EDX,EAX
PUSH dword ptr [ESP + 0x34]
PUSH EDX
MOV EBP,EDX
PUSH EAX
LEA EAX,[ESI + 0x38]
ADD EDI,EBP
PUSH EAX
CALL 0x001fd910
ADD ESP,0x20
CMP EDI,EAX
JZ 0x00229700
MOV EDX,EAX
SUB EDX,EBP
CMP EBP,EAX
MOV EAX,0x0
CMOVL EAX,EDX
JMP 0x002296f1
SUB ESP,0x4
PUSH EDI
PUSH dword ptr [ESP + 0x2c]
PUSH ESI
CALL 0x00208000
ADD ESP,0x10
ADD ESP,0xc
POP EBX
POP ESI
POP EDI
POP EBP
RET
MOV EDX,dword ptr [ESI + 0x5c]
MOV ECX,dword ptr [ESI + 0x40]
MOV dword ptr [ESI + 0x4],EDX
MOV dword ptr [ESI + 0x8],EDX
MOV dword ptr [ESI + 0xc],EDX
TEST CL,0x10
JNZ 0x00229719
AND ECX,0x1
JZ 0x00229734
MOV ECX,dword ptr [ESI + 0x60]
CMP ECX,0x1
JBE 0x00229734
MOV dword ptr [ESI + 0x14],EDX
MOV dword ptr [ESI + 0x10],EDX
LEA EDX,[EDX + ECX*0x1 + -0x1]
MOV dword ptr [ESI + 0x18],EDX
MOV byte ptr [ESI + 0x66],0x1
JMP 0x002296c8
MOV dword ptr [ESI + 0x14],0x0
MOV dword ptr [ESI + 0x10],0x0
MOV dword ptr [ESI + 0x18],0x0
JMP 0x0022972e
CALL 0x002428a0
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nint FUN_00229630(int param_1,undefined4 param_2,int param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  int iVar3;\n  char cVar4;\n  int iVar5;\n  int iVar6;\n  \n  bVar1 = *(byte *)(param_1 + 0x40);\n  piVar2 = *(int **)(param_1 + 0x74);\n  if (piVar2 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002428a0();\n  }\n  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);\n  if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }\n  iVar5 = FUN_00208000(param_1,param_2,param_3);\n  return iVar5;\n}\n\n" comment (function_definition "int FUN_00229630(int param_1,undefined4 param_2,int param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  int iVar3;\n  char cVar4;\n  int iVar5;\n  int iVar6;\n  \n  bVar1 = *(byte *)(param_1 + 0x40);\n  piVar2 = *(int **)(param_1 + 0x74);\n  if (piVar2 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002428a0();\n  }\n  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);\n  if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }\n  iVar5 = FUN_00208000(param_1,param_2,param_3);\n  return iVar5;\n}" primitive_type (function_declarator "FUN_00229630(int param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  int *piVar2;\n  int iVar3;\n  char cVar4;\n  int iVar5;\n  int iVar6;\n  \n  bVar1 = *(byte *)(param_1 + 0x40);\n  piVar2 = *(int **)(param_1 + 0x74);\n  if (piVar2 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002428a0();\n  }\n  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);\n  if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }\n  iVar5 = FUN_00208000(param_1,param_2,param_3);\n  return iVar5;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (expression_statement "bVar1 = *(byte *)(param_1 + 0x40);" (assignment_expression "bVar1 = *(byte *)(param_1 + 0x40)" identifier = (pointer_expression "*(byte *)(param_1 + 0x40)" * (cast_expression "(byte *)(param_1 + 0x40)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) ))))) ;) (expression_statement "piVar2 = *(int **)(param_1 + 0x74);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x74)" identifier = (pointer_expression "*(int **)(param_1 + 0x74)" * (cast_expression "(int **)(param_1 + 0x74)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) ))))) ;) (if_statement "if (piVar2 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    FUN_002428a0();\n  }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_002428a0();\n  }" { comment (expression_statement "FUN_002428a0();" (call_expression "FUN_002428a0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);" (assignment_expression "cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2)" identifier = (call_expression "(**(code **)(*piVar2 + 0x18))(piVar2)" (parenthesized_expression "(**(code **)(*piVar2 + 0x18))" ( (pointer_expression "**(code **)(*piVar2 + 0x18)" * (pointer_expression "*(code **)(*piVar2 + 0x18)" * (cast_expression "(code **)(*piVar2 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 0x18)" ( (binary_expression "*piVar2 + 0x18" (pointer_expression "*piVar2" * identifier) + number_literal) ))))) )) (argument_list "(piVar2)" ( identifier )))) ;) (if_statement "if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }" if (parenthesized_expression "(((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0'))" ( (binary_expression "((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')" (parenthesized_expression "((cVar4 != '\0') && ((bVar1 & 0x11) != 0))" ( (binary_expression "(cVar4 != '\0') && ((bVar1 & 0x11) != 0)" (parenthesized_expression "(cVar4 != '\0')" ( (binary_expression "cVar4 != '\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 + 0x65) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x65) == '\0'" (pointer_expression "*(char *)(param_1 + 0x65)" * (cast_expression "(char *)(param_1 + 0x65)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x65)" ( (binary_expression "param_1 + 0x65" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }" { (expression_statement "iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14)" identifier = (binary_expression "*(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14)" (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) - (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))))) ;) (if_statement "if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }" if (parenthesized_expression "((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60)))" ( (binary_expression "(*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))" (parenthesized_expression "(*(char *)(param_1 + 0x66) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x66) == '\0'" (pointer_expression "*(char *)(param_1 + 0x66)" * (cast_expression "(char *)(param_1 + 0x66)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x66)" ( (binary_expression "param_1 + 0x66" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(1 < *(uint *)(param_1 + 0x60))" ( (binary_expression "1 < *(uint *)(param_1 + 0x60)" number_literal < (pointer_expression "*(uint *)(param_1 + 0x60)" * (cast_expression "(uint *)(param_1 + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }" { (expression_statement "iVar5 = *(uint *)(param_1 + 0x60) - 1;" (assignment_expression "iVar5 = *(uint *)(param_1 + 0x60) - 1" identifier = (binary_expression "*(uint *)(param_1 + 0x60) - 1" (pointer_expression "*(uint *)(param_1 + 0x60)" * (cast_expression "(uint *)(param_1 + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) )))) - number_literal)) ;) })) (if_statement "if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }" if (parenthesized_expression "(0x3ff < iVar5)" ( (binary_expression "0x3ff < iVar5" number_literal < identifier) )) (compound_statement "{\n      iVar5 = 0x400;\n    }" { (expression_statement "iVar5 = 0x400;" (assignment_expression "iVar5 = 0x400" identifier = number_literal) ;) })) (if_statement "if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }" if (parenthesized_expression "(iVar5 <= param_3)" ( (binary_expression "iVar5 <= param_3" identifier <= identifier) )) (compound_statement "{\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }" { (expression_statement "iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);" (assignment_expression "iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10)" identifier = (binary_expression "*(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10)" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) - (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))))) ;) (expression_statement "iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);" (assignment_expression "iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3)" identifier = (call_expression "FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3)" identifier (argument_list "(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) , (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , identifier , identifier , identifier )))) ;) (if_statement "if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }" if (parenthesized_expression "(param_3 + iVar6 == iVar5)" ( (binary_expression "param_3 + iVar6 == iVar5" (binary_expression "param_3 + iVar6" identifier + identifier) == identifier) )) (compound_statement "{\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }" { (expression_statement "iVar3 = *(int *)(param_1 + 0x5c);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x5c)" identifier = (pointer_expression "*(int *)(param_1 + 0x5c)" * (cast_expression "(int *)(param_1 + 0x5c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 4) = iVar3;" (assignment_expression "*(int *)(param_1 + 4) = iVar3" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_1 + 8) = iVar3;" (assignment_expression "*(int *)(param_1 + 8) = iVar3" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_1 + 0xc) = iVar3;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar3" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }" if (parenthesized_expression "((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2))" ( (binary_expression "(((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)" (parenthesized_expression "(((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0))" ( (binary_expression "((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)" (parenthesized_expression "((*(uint *)(param_1 + 0x40) & 0x10) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x40) & 0x10) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x40) & 0x10)" ( (binary_expression "*(uint *)(param_1 + 0x40) & 0x10" (pointer_expression "*(uint *)(param_1 + 0x40)" * (cast_expression "(uint *)(param_1 + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "((*(uint *)(param_1 + 0x40) & 1) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x40) & 1) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x40) & 1)" ( (binary_expression "*(uint *)(param_1 + 0x40) & 1" (pointer_expression "*(uint *)(param_1 + 0x40)" * (cast_expression "(uint *)(param_1 + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) || (parenthesized_expression "(*(uint *)(param_1 + 0x60) < 2)" ( (binary_expression "*(uint *)(param_1 + 0x60) < 2" (pointer_expression "*(uint *)(param_1 + 0x60)" * (cast_expression "(uint *)(param_1 + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) )))) < number_literal) ))) )) (compound_statement "{\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }" { (expression_statement "*(undefined4 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x18) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x18) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }" else (compound_statement "{\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }" { (expression_statement "*(int *)(param_1 + 0x14) = iVar3;" (assignment_expression "*(int *)(param_1 + 0x14) = iVar3" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_1 + 0x10) = iVar3;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar3" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);" (assignment_expression "*(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60)" (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = (binary_expression "iVar3 + -1 + *(uint *)(param_1 + 0x60)" (binary_expression "iVar3 + -1" identifier + number_literal) + (pointer_expression "*(uint *)(param_1 + 0x60)" * (cast_expression "(uint *)(param_1 + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) )))))) ;) }))) (expression_statement "*(undefined1 *)(param_1 + 0x66) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x66) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x66)" * (cast_expression "(undefined1 *)(param_1 + 0x66)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x66)" ( (binary_expression "param_1 + 0x66" identifier + number_literal) )))) = number_literal) ;) })) (if_statement "if (iVar5 <= iVar6) {\n        return 0;\n      }" if (parenthesized_expression "(iVar5 <= iVar6)" ( (binary_expression "iVar5 <= iVar6" identifier <= identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (return_statement "return iVar5 - iVar6;" return (binary_expression "iVar5 - iVar6" identifier - identifier) ;) })) })) (expression_statement "iVar5 = FUN_00208000(param_1,param_2,param_3);" (assignment_expression "iVar5 = FUN_00208000(param_1,param_2,param_3)" identifier = (call_expression "FUN_00208000(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* std::filebuf::xsputn(char const*, int) */\n\nint __thiscall std::filebuf::xsputn(filebuf *this,char *param_1,int param_2)\n\n{\n  filebuf fVar1;\n  int *piVar2;\n  int iVar3;\n  char cVar4;\n  int iVar5;\n  int iVar6;\n  \n  fVar1 = this[0x40];\n  piVar2 = *(int **)(this + 0x74);\n  if (piVar2 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __throw_bad_cast();\n  }\n  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);\n  if (((cVar4 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0x65] == (filebuf)0x0)) {\n    iVar5 = *(int *)(this + 0x18) - *(int *)(this + 0x14);\n    if ((this[0x66] == (filebuf)0x0) && (1 < *(uint *)(this + 0x60))) {\n      iVar5 = *(uint *)(this + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_2) {\n      iVar6 = *(int *)(this + 0x14) - (int)*(char **)(this + 0x10);\n      iVar5 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,\n                         param_2);\n      if (param_2 + iVar6 == iVar5) {\n        iVar3 = *(int *)(this + 0x5c);\n        *(int *)(this + 4) = iVar3;\n        *(int *)(this + 8) = iVar3;\n        *(int *)(this + 0xc) = iVar3;\n        if ((((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||\n           (*(uint *)(this + 0x60) < 2)) {\n          *(undefined4 *)(this + 0x14) = 0;\n          *(undefined4 *)(this + 0x10) = 0;\n          *(undefined4 *)(this + 0x18) = 0;\n        }\n        else {\n          *(int *)(this + 0x14) = iVar3;\n          *(int *)(this + 0x10) = iVar3;\n          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);\n        }\n        this[0x66] = (filebuf)0x1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }\n  iVar5 = streambuf::xsputn((streambuf *)this,param_1,param_2);\n  return iVar5;\n}\n\n" comment comment (function_definition "int __thiscall std::filebuf::xsputn(filebuf *this,char *param_1,int param_2)\n\n{\n  filebuf fVar1;\n  int *piVar2;\n  int iVar3;\n  char cVar4;\n  int iVar5;\n  int iVar6;\n  \n  fVar1 = this[0x40];\n  piVar2 = *(int **)(this + 0x74);\n  if (piVar2 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __throw_bad_cast();\n  }\n  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);\n  if (((cVar4 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0x65] == (filebuf)0x0)) {\n    iVar5 = *(int *)(this + 0x18) - *(int *)(this + 0x14);\n    if ((this[0x66] == (filebuf)0x0) && (1 < *(uint *)(this + 0x60))) {\n      iVar5 = *(uint *)(this + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_2) {\n      iVar6 = *(int *)(this + 0x14) - (int)*(char **)(this + 0x10);\n      iVar5 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,\n                         param_2);\n      if (param_2 + iVar6 == iVar5) {\n        iVar3 = *(int *)(this + 0x5c);\n        *(int *)(this + 4) = iVar3;\n        *(int *)(this + 8) = iVar3;\n        *(int *)(this + 0xc) = iVar3;\n        if ((((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||\n           (*(uint *)(this + 0x60) < 2)) {\n          *(undefined4 *)(this + 0x14) = 0;\n          *(undefined4 *)(this + 0x10) = 0;\n          *(undefined4 *)(this + 0x18) = 0;\n        }\n        else {\n          *(int *)(this + 0x14) = iVar3;\n          *(int *)(this + 0x10) = iVar3;\n          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);\n        }\n        this[0x66] = (filebuf)0x1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }\n  iVar5 = streambuf::xsputn((streambuf *)this,param_1,param_2);\n  return iVar5;\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "std::filebuf::" identifier : : identifier : :) (function_declarator "xsputn(filebuf *this,char *param_1,int param_2)" identifier (parameter_list "(filebuf *this,char *param_1,int 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 "int param_2" primitive_type identifier) ))) (compound_statement "{\n  filebuf fVar1;\n  int *piVar2;\n  int iVar3;\n  char cVar4;\n  int iVar5;\n  int iVar6;\n  \n  fVar1 = this[0x40];\n  piVar2 = *(int **)(this + 0x74);\n  if (piVar2 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __throw_bad_cast();\n  }\n  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);\n  if (((cVar4 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0x65] == (filebuf)0x0)) {\n    iVar5 = *(int *)(this + 0x18) - *(int *)(this + 0x14);\n    if ((this[0x66] == (filebuf)0x0) && (1 < *(uint *)(this + 0x60))) {\n      iVar5 = *(uint *)(this + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_2) {\n      iVar6 = *(int *)(this + 0x14) - (int)*(char **)(this + 0x10);\n      iVar5 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,\n                         param_2);\n      if (param_2 + iVar6 == iVar5) {\n        iVar3 = *(int *)(this + 0x5c);\n        *(int *)(this + 4) = iVar3;\n        *(int *)(this + 8) = iVar3;\n        *(int *)(this + 0xc) = iVar3;\n        if ((((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||\n           (*(uint *)(this + 0x60) < 2)) {\n          *(undefined4 *)(this + 0x14) = 0;\n          *(undefined4 *)(this + 0x10) = 0;\n          *(undefined4 *)(this + 0x18) = 0;\n        }\n        else {\n          *(int *)(this + 0x14) = iVar3;\n          *(int *)(this + 0x10) = iVar3;\n          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);\n        }\n        this[0x66] = (filebuf)0x1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }\n  iVar5 = streambuf::xsputn((streambuf *)this,param_1,param_2);\n  return iVar5;\n}" { (declaration "filebuf fVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (expression_statement "fVar1 = this[0x40];" (assignment_expression "fVar1 = this[0x40]" identifier = (subscript_expression "this[0x40]" identifier [ number_literal ])) ;) (expression_statement "piVar2 = *(int **)(this + 0x74);" (assignment_expression "piVar2 = *(int **)(this + 0x74)" identifier = (pointer_expression "*(int **)(this + 0x74)" * (cast_expression "(int **)(this + 0x74)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x74)" ( (binary_expression "this + 0x74" identifier + number_literal) ))))) ;) (if_statement "if (piVar2 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    __throw_bad_cast();\n  }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __throw_bad_cast();\n  }" { comment (expression_statement "__throw_bad_cast();" (call_expression "__throw_bad_cast()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);" (assignment_expression "cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2)" identifier = (call_expression "(**(code **)(*piVar2 + 0x18))(piVar2)" (parenthesized_expression "(**(code **)(*piVar2 + 0x18))" ( (pointer_expression "**(code **)(*piVar2 + 0x18)" * (pointer_expression "*(code **)(*piVar2 + 0x18)" * (cast_expression "(code **)(*piVar2 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 0x18)" ( (binary_expression "*piVar2 + 0x18" (pointer_expression "*piVar2" * identifier) + number_literal) ))))) )) (argument_list "(piVar2)" ( identifier )))) ;) (if_statement "if (((cVar4 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0x65] == (filebuf)0x0)) {\n    iVar5 = *(int *)(this + 0x18) - *(int *)(this + 0x14);\n    if ((this[0x66] == (filebuf)0x0) && (1 < *(uint *)(this + 0x60))) {\n      iVar5 = *(uint *)(this + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_2) {\n      iVar6 = *(int *)(this + 0x14) - (int)*(char **)(this + 0x10);\n      iVar5 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,\n                         param_2);\n      if (param_2 + iVar6 == iVar5) {\n        iVar3 = *(int *)(this + 0x5c);\n        *(int *)(this + 4) = iVar3;\n        *(int *)(this + 8) = iVar3;\n        *(int *)(this + 0xc) = iVar3;\n        if ((((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||\n           (*(uint *)(this + 0x60) < 2)) {\n          *(undefined4 *)(this + 0x14) = 0;\n          *(undefined4 *)(this + 0x10) = 0;\n          *(undefined4 *)(this + 0x18) = 0;\n        }\n        else {\n          *(int *)(this + 0x14) = iVar3;\n          *(int *)(this + 0x10) = iVar3;\n          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);\n        }\n        this[0x66] = (filebuf)0x1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }" if (parenthesized_expression "(((cVar4 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0x65] == (filebuf)0x0))" ( (binary_expression "((cVar4 != '\0') && (((byte)fVar1 & 0x11) != 0)) && (this[0x65] == (filebuf)0x0)" (parenthesized_expression "((cVar4 != '\0') && (((byte)fVar1 & 0x11) != 0))" ( (binary_expression "(cVar4 != '\0') && (((byte)fVar1 & 0x11) != 0)" (parenthesized_expression "(cVar4 != '\0')" ( (binary_expression "cVar4 != '\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[0x65] == (filebuf)0x0)" ( (binary_expression "this[0x65] == (filebuf)0x0" (subscript_expression "this[0x65]" identifier [ number_literal ]) == (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ))) )) (compound_statement "{\n    iVar5 = *(int *)(this + 0x18) - *(int *)(this + 0x14);\n    if ((this[0x66] == (filebuf)0x0) && (1 < *(uint *)(this + 0x60))) {\n      iVar5 = *(uint *)(this + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_2) {\n      iVar6 = *(int *)(this + 0x14) - (int)*(char **)(this + 0x10);\n      iVar5 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,\n                         param_2);\n      if (param_2 + iVar6 == iVar5) {\n        iVar3 = *(int *)(this + 0x5c);\n        *(int *)(this + 4) = iVar3;\n        *(int *)(this + 8) = iVar3;\n        *(int *)(this + 0xc) = iVar3;\n        if ((((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||\n           (*(uint *)(this + 0x60) < 2)) {\n          *(undefined4 *)(this + 0x14) = 0;\n          *(undefined4 *)(this + 0x10) = 0;\n          *(undefined4 *)(this + 0x18) = 0;\n        }\n        else {\n          *(int *)(this + 0x14) = iVar3;\n          *(int *)(this + 0x10) = iVar3;\n          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);\n        }\n        this[0x66] = (filebuf)0x1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }" { (expression_statement "iVar5 = *(int *)(this + 0x18) - *(int *)(this + 0x14);" (assignment_expression "iVar5 = *(int *)(this + 0x18) - *(int *)(this + 0x14)" identifier = (binary_expression "*(int *)(this + 0x18) - *(int *)(this + 0x14)" (pointer_expression "*(int *)(this + 0x18)" * (cast_expression "(int *)(this + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) - (pointer_expression "*(int *)(this + 0x14)" * (cast_expression "(int *)(this + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x14)" ( (binary_expression "this + 0x14" identifier + number_literal) )))))) ;) (if_statement "if ((this[0x66] == (filebuf)0x0) && (1 < *(uint *)(this + 0x60))) {\n      iVar5 = *(uint *)(this + 0x60) - 1;\n    }" if (parenthesized_expression "((this[0x66] == (filebuf)0x0) && (1 < *(uint *)(this + 0x60)))" ( (binary_expression "(this[0x66] == (filebuf)0x0) && (1 < *(uint *)(this + 0x60))" (parenthesized_expression "(this[0x66] == (filebuf)0x0)" ( (binary_expression "this[0x66] == (filebuf)0x0" (subscript_expression "this[0x66]" identifier [ number_literal ]) == (cast_expression "(filebuf)0x0" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) )) && (parenthesized_expression "(1 < *(uint *)(this + 0x60))" ( (binary_expression "1 < *(uint *)(this + 0x60)" number_literal < (pointer_expression "*(uint *)(this + 0x60)" * (cast_expression "(uint *)(this + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x60)" ( (binary_expression "this + 0x60" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      iVar5 = *(uint *)(this + 0x60) - 1;\n    }" { (expression_statement "iVar5 = *(uint *)(this + 0x60) - 1;" (assignment_expression "iVar5 = *(uint *)(this + 0x60) - 1" identifier = (binary_expression "*(uint *)(this + 0x60) - 1" (pointer_expression "*(uint *)(this + 0x60)" * (cast_expression "(uint *)(this + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x60)" ( (binary_expression "this + 0x60" identifier + number_literal) )))) - number_literal)) ;) })) (if_statement "if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }" if (parenthesized_expression "(0x3ff < iVar5)" ( (binary_expression "0x3ff < iVar5" number_literal < identifier) )) (compound_statement "{\n      iVar5 = 0x400;\n    }" { (expression_statement "iVar5 = 0x400;" (assignment_expression "iVar5 = 0x400" identifier = number_literal) ;) })) (if_statement "if (iVar5 <= param_2) {\n      iVar6 = *(int *)(this + 0x14) - (int)*(char **)(this + 0x10);\n      iVar5 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,\n                         param_2);\n      if (param_2 + iVar6 == iVar5) {\n        iVar3 = *(int *)(this + 0x5c);\n        *(int *)(this + 4) = iVar3;\n        *(int *)(this + 8) = iVar3;\n        *(int *)(this + 0xc) = iVar3;\n        if ((((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||\n           (*(uint *)(this + 0x60) < 2)) {\n          *(undefined4 *)(this + 0x14) = 0;\n          *(undefined4 *)(this + 0x10) = 0;\n          *(undefined4 *)(this + 0x18) = 0;\n        }\n        else {\n          *(int *)(this + 0x14) = iVar3;\n          *(int *)(this + 0x10) = iVar3;\n          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);\n        }\n        this[0x66] = (filebuf)0x1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }" if (parenthesized_expression "(iVar5 <= param_2)" ( (binary_expression "iVar5 <= param_2" identifier <= identifier) )) (compound_statement "{\n      iVar6 = *(int *)(this + 0x14) - (int)*(char **)(this + 0x10);\n      iVar5 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,\n                         param_2);\n      if (param_2 + iVar6 == iVar5) {\n        iVar3 = *(int *)(this + 0x5c);\n        *(int *)(this + 4) = iVar3;\n        *(int *)(this + 8) = iVar3;\n        *(int *)(this + 0xc) = iVar3;\n        if ((((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||\n           (*(uint *)(this + 0x60) < 2)) {\n          *(undefined4 *)(this + 0x14) = 0;\n          *(undefined4 *)(this + 0x10) = 0;\n          *(undefined4 *)(this + 0x18) = 0;\n        }\n        else {\n          *(int *)(this + 0x14) = iVar3;\n          *(int *)(this + 0x10) = iVar3;\n          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);\n        }\n        this[0x66] = (filebuf)0x1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }" { (expression_statement "iVar6 = *(int *)(this + 0x14) - (int)*(char **)(this + 0x10);" (assignment_expression "iVar6 = *(int *)(this + 0x14) - (int)*(char **)(this + 0x10)" identifier = (binary_expression "*(int *)(this + 0x14) - (int)*(char **)(this + 0x10)" (pointer_expression "*(int *)(this + 0x14)" * (cast_expression "(int *)(this + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x14)" ( (binary_expression "this + 0x14" identifier + number_literal) )))) - (cast_expression "(int)*(char **)(this + 0x10)" ( (type_descriptor "int" primitive_type) ) (pointer_expression "*(char **)(this + 0x10)" * (cast_expression "(char **)(this + 0x10)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) ))))))) ;) (expression_statement "iVar5 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,\n                         param_2);" (assignment_expression "iVar5 = __basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,\n                         param_2)" identifier = (binary_expression "__basic_file<char>::xsputn_2\n                        ((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,\n                         param_2)" (binary_expression "__basic_file<char" identifier < identifier) > (ERROR "::" : :) (call_expression "xsputn_2\n                        ((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,\n                         param_2)" identifier (argument_list "((__basic_file<char> *)(this + 0x38),*(char **)(this + 0x10),iVar6,param_1,\n                         param_2)" ( (call_expression "(__basic_file<char> *)(this + 0x38)" (parenthesized_expression "(__basic_file<char> *)" ( (binary_expression "__basic_file<char> *" (binary_expression "__basic_file<char" identifier < identifier) > (pointer_expression "*" * identifier)) )) (argument_list "(this + 0x38)" ( (binary_expression "this + 0x38" identifier + number_literal) ))) , (pointer_expression "*(char **)(this + 0x10)" * (cast_expression "(char **)(this + 0x10)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) , identifier , identifier , identifier ))))) ;) (if_statement "if (param_2 + iVar6 == iVar5) {\n        iVar3 = *(int *)(this + 0x5c);\n        *(int *)(this + 4) = iVar3;\n        *(int *)(this + 8) = iVar3;\n        *(int *)(this + 0xc) = iVar3;\n        if ((((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||\n           (*(uint *)(this + 0x60) < 2)) {\n          *(undefined4 *)(this + 0x14) = 0;\n          *(undefined4 *)(this + 0x10) = 0;\n          *(undefined4 *)(this + 0x18) = 0;\n        }\n        else {\n          *(int *)(this + 0x14) = iVar3;\n          *(int *)(this + 0x10) = iVar3;\n          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);\n        }\n        this[0x66] = (filebuf)0x1;\n      }" if (parenthesized_expression "(param_2 + iVar6 == iVar5)" ( (binary_expression "param_2 + iVar6 == iVar5" (binary_expression "param_2 + iVar6" identifier + identifier) == identifier) )) (compound_statement "{\n        iVar3 = *(int *)(this + 0x5c);\n        *(int *)(this + 4) = iVar3;\n        *(int *)(this + 8) = iVar3;\n        *(int *)(this + 0xc) = iVar3;\n        if ((((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||\n           (*(uint *)(this + 0x60) < 2)) {\n          *(undefined4 *)(this + 0x14) = 0;\n          *(undefined4 *)(this + 0x10) = 0;\n          *(undefined4 *)(this + 0x18) = 0;\n        }\n        else {\n          *(int *)(this + 0x14) = iVar3;\n          *(int *)(this + 0x10) = iVar3;\n          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);\n        }\n        this[0x66] = (filebuf)0x1;\n      }" { (expression_statement "iVar3 = *(int *)(this + 0x5c);" (assignment_expression "iVar3 = *(int *)(this + 0x5c)" identifier = (pointer_expression "*(int *)(this + 0x5c)" * (cast_expression "(int *)(this + 0x5c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x5c)" ( (binary_expression "this + 0x5c" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(this + 4) = iVar3;" (assignment_expression "*(int *)(this + 4) = iVar3" (pointer_expression "*(int *)(this + 4)" * (cast_expression "(int *)(this + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 4)" ( (binary_expression "this + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(this + 8) = iVar3;" (assignment_expression "*(int *)(this + 8) = iVar3" (pointer_expression "*(int *)(this + 8)" * (cast_expression "(int *)(this + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 8)" ( (binary_expression "this + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(this + 0xc) = iVar3;" (assignment_expression "*(int *)(this + 0xc) = iVar3" (pointer_expression "*(int *)(this + 0xc)" * (cast_expression "(int *)(this + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0xc)" ( (binary_expression "this + 0xc" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||\n           (*(uint *)(this + 0x60) < 2)) {\n          *(undefined4 *)(this + 0x14) = 0;\n          *(undefined4 *)(this + 0x10) = 0;\n          *(undefined4 *)(this + 0x18) = 0;\n        }\n        else {\n          *(int *)(this + 0x14) = iVar3;\n          *(int *)(this + 0x10) = iVar3;\n          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);\n        }" if (parenthesized_expression "((((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||\n           (*(uint *)(this + 0x60) < 2))" ( (binary_expression "(((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)) ||\n           (*(uint *)(this + 0x60) < 2)" (parenthesized_expression "(((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0))" ( (binary_expression "((*(uint *)(this + 0x40) & 0x10) == 0) && ((*(uint *)(this + 0x40) & 1) == 0)" (parenthesized_expression "((*(uint *)(this + 0x40) & 0x10) == 0)" ( (binary_expression "(*(uint *)(this + 0x40) & 0x10) == 0" (parenthesized_expression "(*(uint *)(this + 0x40) & 0x10)" ( (binary_expression "*(uint *)(this + 0x40) & 0x10" (pointer_expression "*(uint *)(this + 0x40)" * (cast_expression "(uint *)(this + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x40)" ( (binary_expression "this + 0x40" identifier + number_literal) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "((*(uint *)(this + 0x40) & 1) == 0)" ( (binary_expression "(*(uint *)(this + 0x40) & 1) == 0" (parenthesized_expression "(*(uint *)(this + 0x40) & 1)" ( (binary_expression "*(uint *)(this + 0x40) & 1" (pointer_expression "*(uint *)(this + 0x40)" * (cast_expression "(uint *)(this + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x40)" ( (binary_expression "this + 0x40" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) || (parenthesized_expression "(*(uint *)(this + 0x60) < 2)" ( (binary_expression "*(uint *)(this + 0x60) < 2" (pointer_expression "*(uint *)(this + 0x60)" * (cast_expression "(uint *)(this + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x60)" ( (binary_expression "this + 0x60" identifier + number_literal) )))) < number_literal) ))) )) (compound_statement "{\n          *(undefined4 *)(this + 0x14) = 0;\n          *(undefined4 *)(this + 0x10) = 0;\n          *(undefined4 *)(this + 0x18) = 0;\n        }" { (expression_statement "*(undefined4 *)(this + 0x14) = 0;" (assignment_expression "*(undefined4 *)(this + 0x14) = 0" (pointer_expression "*(undefined4 *)(this + 0x14)" * (cast_expression "(undefined4 *)(this + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x14)" ( (binary_expression "this + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x10) = 0;" (assignment_expression "*(undefined4 *)(this + 0x10) = 0" (pointer_expression "*(undefined4 *)(this + 0x10)" * (cast_expression "(undefined4 *)(this + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(this + 0x18) = 0;" (assignment_expression "*(undefined4 *)(this + 0x18) = 0" (pointer_expression "*(undefined4 *)(this + 0x18)" * (cast_expression "(undefined4 *)(this + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n          *(int *)(this + 0x14) = iVar3;\n          *(int *)(this + 0x10) = iVar3;\n          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);\n        }" else (compound_statement "{\n          *(int *)(this + 0x14) = iVar3;\n          *(int *)(this + 0x10) = iVar3;\n          *(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);\n        }" { (expression_statement "*(int *)(this + 0x14) = iVar3;" (assignment_expression "*(int *)(this + 0x14) = iVar3" (pointer_expression "*(int *)(this + 0x14)" * (cast_expression "(int *)(this + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x14)" ( (binary_expression "this + 0x14" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(this + 0x10) = iVar3;" (assignment_expression "*(int *)(this + 0x10) = iVar3" (pointer_expression "*(int *)(this + 0x10)" * (cast_expression "(int *)(this + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x10)" ( (binary_expression "this + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60);" (assignment_expression "*(uint *)(this + 0x18) = iVar3 + -1 + *(uint *)(this + 0x60)" (pointer_expression "*(uint *)(this + 0x18)" * (cast_expression "(uint *)(this + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x18)" ( (binary_expression "this + 0x18" identifier + number_literal) )))) = (binary_expression "iVar3 + -1 + *(uint *)(this + 0x60)" (binary_expression "iVar3 + -1" identifier + number_literal) + (pointer_expression "*(uint *)(this + 0x60)" * (cast_expression "(uint *)(this + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(this + 0x60)" ( (binary_expression "this + 0x60" identifier + number_literal) )))))) ;) }))) (expression_statement "this[0x66] = (filebuf)0x1;" (assignment_expression "this[0x66] = (filebuf)0x1" (subscript_expression "this[0x66]" identifier [ number_literal ]) = (cast_expression "(filebuf)0x1" ( (type_descriptor "filebuf" type_identifier) ) number_literal)) ;) })) (if_statement "if (iVar5 <= iVar6) {\n        return 0;\n      }" if (parenthesized_expression "(iVar5 <= iVar6)" ( (binary_expression "iVar5 <= iVar6" identifier <= identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (return_statement "return iVar5 - iVar6;" return (binary_expression "iVar5 - iVar6" identifier - identifier) ;) })) })) (ERROR "iVar5 = streambuf::" (assignment_expression "iVar5 = 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 iVar5;" return identifier ;) })))
(translation_unit "int FUN_00229630(int param_1,undefined4 param_2,int param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  int iVar3;\n  char cVar4;\n  int iVar5;\n  int iVar6;\n  \n  bVar1 = *(byte *)(param_1 + 0x40);\n  piVar2 = *(int **)(param_1 + 0x74);\n  if (piVar2 == (int *)0x0) {\n                    \n    FUN_002428a0();\n  }\n  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);\n  if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }\n  iVar5 = FUN_00208000(param_1,param_2,param_3);\n  return iVar5;\n}\n\n" (function_definition "int FUN_00229630(int param_1,undefined4 param_2,int param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  int iVar3;\n  char cVar4;\n  int iVar5;\n  int iVar6;\n  \n  bVar1 = *(byte *)(param_1 + 0x40);\n  piVar2 = *(int **)(param_1 + 0x74);\n  if (piVar2 == (int *)0x0) {\n                    \n    FUN_002428a0();\n  }\n  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);\n  if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }\n  iVar5 = FUN_00208000(param_1,param_2,param_3);\n  return iVar5;\n}" primitive_type (function_declarator "FUN_00229630(int param_1,undefined4 param_2,int param_3)" identifier (parameter_list "(int param_1,undefined4 param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined4 param_2" type_identifier identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  byte bVar1;\n  int *piVar2;\n  int iVar3;\n  char cVar4;\n  int iVar5;\n  int iVar6;\n  \n  bVar1 = *(byte *)(param_1 + 0x40);\n  piVar2 = *(int **)(param_1 + 0x74);\n  if (piVar2 == (int *)0x0) {\n                    \n    FUN_002428a0();\n  }\n  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);\n  if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }\n  iVar5 = FUN_00208000(param_1,param_2,param_3);\n  return iVar5;\n}" { (declaration "byte bVar1;" type_identifier identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "char cVar4;" primitive_type identifier ;) (declaration "int iVar5;" primitive_type identifier ;) (declaration "int iVar6;" primitive_type identifier ;) (expression_statement "bVar1 = *(byte *)(param_1 + 0x40);" (assignment_expression "bVar1 = *(byte *)(param_1 + 0x40)" identifier = (pointer_expression "*(byte *)(param_1 + 0x40)" * (cast_expression "(byte *)(param_1 + 0x40)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) ))))) ;) (expression_statement "piVar2 = *(int **)(param_1 + 0x74);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x74)" identifier = (pointer_expression "*(int **)(param_1 + 0x74)" * (cast_expression "(int **)(param_1 + 0x74)" ( (type_descriptor "int **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x74)" ( (binary_expression "param_1 + 0x74" identifier + number_literal) ))))) ;) (if_statement "if (piVar2 == (int *)0x0) {\n                    \n    FUN_002428a0();\n  }" if (parenthesized_expression "(piVar2 == (int *)0x0)" ( (binary_expression "piVar2 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    FUN_002428a0();\n  }" { (expression_statement "FUN_002428a0();" (call_expression "FUN_002428a0()" identifier (argument_list "()" ( ))) ;) })) (expression_statement "cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);" (assignment_expression "cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2)" identifier = (call_expression "(**(code **)(*piVar2 + 0x18))(piVar2)" (parenthesized_expression "(**(code **)(*piVar2 + 0x18))" ( (pointer_expression "**(code **)(*piVar2 + 0x18)" * (pointer_expression "*(code **)(*piVar2 + 0x18)" * (cast_expression "(code **)(*piVar2 + 0x18)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(*piVar2 + 0x18)" ( (binary_expression "*piVar2 + 0x18" (pointer_expression "*piVar2" * identifier) + number_literal) ))))) )) (argument_list "(piVar2)" ( identifier )))) ;) (if_statement "if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }" if (parenthesized_expression "(((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0'))" ( (binary_expression "((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')" (parenthesized_expression "((cVar4 != '\0') && ((bVar1 & 0x11) != 0))" ( (binary_expression "(cVar4 != '\0') && ((bVar1 & 0x11) != 0)" (parenthesized_expression "(cVar4 != '\0')" ( (binary_expression "cVar4 != '\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 + 0x65) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x65) == '\0'" (pointer_expression "*(char *)(param_1 + 0x65)" * (cast_expression "(char *)(param_1 + 0x65)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x65)" ( (binary_expression "param_1 + 0x65" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) ))) )) (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }" { (expression_statement "iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14)" identifier = (binary_expression "*(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14)" (pointer_expression "*(int *)(param_1 + 0x18)" * (cast_expression "(int *)(param_1 + 0x18)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) - (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))))) ;) (if_statement "if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }" if (parenthesized_expression "((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60)))" ( (binary_expression "(*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))" (parenthesized_expression "(*(char *)(param_1 + 0x66) == '\0')" ( (binary_expression "*(char *)(param_1 + 0x66) == '\0'" (pointer_expression "*(char *)(param_1 + 0x66)" * (cast_expression "(char *)(param_1 + 0x66)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x66)" ( (binary_expression "param_1 + 0x66" identifier + number_literal) )))) == (char_literal "'\0'" ' escape_sequence ')) )) && (parenthesized_expression "(1 < *(uint *)(param_1 + 0x60))" ( (binary_expression "1 < *(uint *)(param_1 + 0x60)" number_literal < (pointer_expression "*(uint *)(param_1 + 0x60)" * (cast_expression "(uint *)(param_1 + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) ))))) ))) )) (compound_statement "{\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }" { (expression_statement "iVar5 = *(uint *)(param_1 + 0x60) - 1;" (assignment_expression "iVar5 = *(uint *)(param_1 + 0x60) - 1" identifier = (binary_expression "*(uint *)(param_1 + 0x60) - 1" (pointer_expression "*(uint *)(param_1 + 0x60)" * (cast_expression "(uint *)(param_1 + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) )))) - number_literal)) ;) })) (if_statement "if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }" if (parenthesized_expression "(0x3ff < iVar5)" ( (binary_expression "0x3ff < iVar5" number_literal < identifier) )) (compound_statement "{\n      iVar5 = 0x400;\n    }" { (expression_statement "iVar5 = 0x400;" (assignment_expression "iVar5 = 0x400" identifier = number_literal) ;) })) (if_statement "if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }" if (parenthesized_expression "(iVar5 <= param_3)" ( (binary_expression "iVar5 <= param_3" identifier <= identifier) )) (compound_statement "{\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }" { (expression_statement "iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);" (assignment_expression "iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10)" identifier = (binary_expression "*(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10)" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) - (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))))) ;) (expression_statement "iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);" (assignment_expression "iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3)" identifier = (call_expression "FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3)" identifier (argument_list "(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3)" ( (binary_expression "param_1 + 0x38" identifier + number_literal) , (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) , identifier , identifier , identifier )))) ;) (if_statement "if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }" if (parenthesized_expression "(param_3 + iVar6 == iVar5)" ( (binary_expression "param_3 + iVar6 == iVar5" (binary_expression "param_3 + iVar6" identifier + identifier) == identifier) )) (compound_statement "{\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }" { (expression_statement "iVar3 = *(int *)(param_1 + 0x5c);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x5c)" identifier = (pointer_expression "*(int *)(param_1 + 0x5c)" * (cast_expression "(int *)(param_1 + 0x5c)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x5c)" ( (binary_expression "param_1 + 0x5c" identifier + number_literal) ))))) ;) (expression_statement "*(int *)(param_1 + 4) = iVar3;" (assignment_expression "*(int *)(param_1 + 4) = iVar3" (pointer_expression "*(int *)(param_1 + 4)" * (cast_expression "(int *)(param_1 + 4)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 4)" ( (binary_expression "param_1 + 4" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_1 + 8) = iVar3;" (assignment_expression "*(int *)(param_1 + 8) = iVar3" (pointer_expression "*(int *)(param_1 + 8)" * (cast_expression "(int *)(param_1 + 8)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_1 + 0xc) = iVar3;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar3" (pointer_expression "*(int *)(param_1 + 0xc)" * (cast_expression "(int *)(param_1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0xc)" ( (binary_expression "param_1 + 0xc" identifier + number_literal) )))) = identifier) ;) (if_statement "if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }" if (parenthesized_expression "((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2))" ( (binary_expression "(((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)" (parenthesized_expression "(((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0))" ( (binary_expression "((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)" (parenthesized_expression "((*(uint *)(param_1 + 0x40) & 0x10) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x40) & 0x10) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x40) & 0x10)" ( (binary_expression "*(uint *)(param_1 + 0x40) & 0x10" (pointer_expression "*(uint *)(param_1 + 0x40)" * (cast_expression "(uint *)(param_1 + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) & number_literal) )) == number_literal) )) && (parenthesized_expression "((*(uint *)(param_1 + 0x40) & 1) == 0)" ( (binary_expression "(*(uint *)(param_1 + 0x40) & 1) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x40) & 1)" ( (binary_expression "*(uint *)(param_1 + 0x40) & 1" (pointer_expression "*(uint *)(param_1 + 0x40)" * (cast_expression "(uint *)(param_1 + 0x40)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x40)" ( (binary_expression "param_1 + 0x40" identifier + number_literal) )))) & number_literal) )) == number_literal) ))) )) || (parenthesized_expression "(*(uint *)(param_1 + 0x60) < 2)" ( (binary_expression "*(uint *)(param_1 + 0x60) < 2" (pointer_expression "*(uint *)(param_1 + 0x60)" * (cast_expression "(uint *)(param_1 + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) )))) < number_literal) ))) )) (compound_statement "{\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }" { (expression_statement "*(undefined4 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" * (cast_expression "(undefined4 *)(param_1 + 0x14)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" * (cast_expression "(undefined4 *)(param_1 + 0x10)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = number_literal) ;) (expression_statement "*(undefined4 *)(param_1 + 0x18) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x18) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x18)" * (cast_expression "(undefined4 *)(param_1 + 0x18)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = number_literal) ;) }) (else_clause "else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }" else (compound_statement "{\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }" { (expression_statement "*(int *)(param_1 + 0x14) = iVar3;" (assignment_expression "*(int *)(param_1 + 0x14) = iVar3" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(int *)(param_1 + 0x10) = iVar3;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar3" (pointer_expression "*(int *)(param_1 + 0x10)" * (cast_expression "(int *)(param_1 + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);" (assignment_expression "*(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60)" (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) )))) = (binary_expression "iVar3 + -1 + *(uint *)(param_1 + 0x60)" (binary_expression "iVar3 + -1" identifier + number_literal) + (pointer_expression "*(uint *)(param_1 + 0x60)" * (cast_expression "(uint *)(param_1 + 0x60)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x60)" ( (binary_expression "param_1 + 0x60" identifier + number_literal) )))))) ;) }))) (expression_statement "*(undefined1 *)(param_1 + 0x66) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x66) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x66)" * (cast_expression "(undefined1 *)(param_1 + 0x66)" ( (type_descriptor "undefined1 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x66)" ( (binary_expression "param_1 + 0x66" identifier + number_literal) )))) = number_literal) ;) })) (if_statement "if (iVar5 <= iVar6) {\n        return 0;\n      }" if (parenthesized_expression "(iVar5 <= iVar6)" ( (binary_expression "iVar5 <= iVar6" identifier <= identifier) )) (compound_statement "{\n        return 0;\n      }" { (return_statement "return 0;" return number_literal ;) })) (return_statement "return iVar5 - iVar6;" return (binary_expression "iVar5 - iVar6" identifier - identifier) ;) })) })) (expression_statement "iVar5 = FUN_00208000(param_1,param_2,param_3);" (assignment_expression "iVar5 = FUN_00208000(param_1,param_2,param_3)" identifier = (call_expression "FUN_00208000(param_1,param_2,param_3)" identifier (argument_list "(param_1,param_2,param_3)" ( identifier , identifier , identifier )))) ;) (return_statement "return iVar5;" return identifier ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) + LIT) ))))) )) (argument_list ( IDENT )))) ;) (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 TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) - (pointer_expression * (cast_expression ( (type_descriptor TYPE (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 TYPE (abstract_pointer_declarator *)) ) (parenthesized_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 IDENT = (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (pointer_expression * (cast_expression ( (type_descriptor TYPE (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 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) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (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) )))) = 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 TYPE (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) )))) = 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) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (compound_statement { (return_statement return LIT ;) })) (return_statement return (binary_expression IDENT - IDENT) ;) })) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT )))) ;) (return_statement return IDENT ;) })))
(function_definition "int FUN_00229630(int param_1,undefined4 param_2,int param_3)\n\n{\n  byte bVar1;\n  int *piVar2;\n  int iVar3;\n  char cVar4;\n  int iVar5;\n  int iVar6;\n  \n  bVar1 = *(byte *)(param_1 + 0x40);\n  piVar2 = *(int **)(param_1 + 0x74);\n  if (piVar2 == (int *)0x0) {\n                    \n    FUN_002428a0();\n  }\n  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);\n  if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }\n  iVar5 = FUN_00208000(param_1,param_2,param_3);\n  return iVar5;\n}" (primitive_type "int") (function_declarator "FUN_00229630(int param_1,undefined4 param_2,int param_3)" (identifier "FUN_00229630") (parameter_list "(int param_1,undefined4 param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 param_2" (type_identifier "undefined4") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  byte bVar1;\n  int *piVar2;\n  int iVar3;\n  char cVar4;\n  int iVar5;\n  int iVar6;\n  \n  bVar1 = *(byte *)(param_1 + 0x40);\n  piVar2 = *(int **)(param_1 + 0x74);\n  if (piVar2 == (int *)0x0) {\n                    \n    FUN_002428a0();\n  }\n  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);\n  if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }\n  iVar5 = FUN_00208000(param_1,param_2,param_3);\n  return iVar5;\n}" ({ "{") (declaration "byte bVar1;" (type_identifier "byte") (identifier "bVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "char cVar4;" (primitive_type "char") (identifier "cVar4") (; ";")) (declaration "int iVar5;" (primitive_type "int") (identifier "iVar5") (; ";")) (declaration "int iVar6;" (primitive_type "int") (identifier "iVar6") (; ";")) (expression_statement "bVar1 = *(byte *)(param_1 + 0x40);" (assignment_expression "bVar1 = *(byte *)(param_1 + 0x40)" (identifier "bVar1") (= "=") (pointer_expression "*(byte *)(param_1 + 0x40)" (* "*") (cast_expression "(byte *)(param_1 + 0x40)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")"))))) (; ";")) (expression_statement "piVar2 = *(int **)(param_1 + 0x74);" (assignment_expression "piVar2 = *(int **)(param_1 + 0x74)" (identifier "piVar2") (= "=") (pointer_expression "*(int **)(param_1 + 0x74)" (* "*") (cast_expression "(int **)(param_1 + 0x74)" (( "(") (type_descriptor "int **" (primitive_type "int") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x74)" (( "(") (binary_expression "param_1 + 0x74" (identifier "param_1") (+ "+") (number_literal "0x74")) () ")"))))) (; ";")) (if_statement "if (piVar2 == (int *)0x0) {\n                    \n    FUN_002428a0();\n  }" (if "if") (parenthesized_expression "(piVar2 == (int *)0x0)" (( "(") (binary_expression "piVar2 == (int *)0x0" (identifier "piVar2") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    FUN_002428a0();\n  }" ({ "{") (expression_statement "FUN_002428a0();" (call_expression "FUN_002428a0()" (identifier "FUN_002428a0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (expression_statement "cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);" (assignment_expression "cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2)" (identifier "cVar4") (= "=") (call_expression "(**(code **)(*piVar2 + 0x18))(piVar2)" (parenthesized_expression "(**(code **)(*piVar2 + 0x18))" (( "(") (pointer_expression "**(code **)(*piVar2 + 0x18)" (* "*") (pointer_expression "*(code **)(*piVar2 + 0x18)" (* "*") (cast_expression "(code **)(*piVar2 + 0x18)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(*piVar2 + 0x18)" (( "(") (binary_expression "*piVar2 + 0x18" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (+ "+") (number_literal "0x18")) () ")"))))) () ")")) (argument_list "(piVar2)" (( "(") (identifier "piVar2") () ")")))) (; ";")) (if_statement "if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }" (if "if") (parenthesized_expression "(((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0'))" (( "(") (binary_expression "((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')" (parenthesized_expression "((cVar4 != '\0') && ((bVar1 & 0x11) != 0))" (( "(") (binary_expression "(cVar4 != '\0') && ((bVar1 & 0x11) != 0)" (parenthesized_expression "(cVar4 != '\0')" (( "(") (binary_expression "cVar4 != '\0'" (identifier "cVar4") (!= "!=") (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 + 0x65) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x65) == '\0'" (pointer_expression "*(char *)(param_1 + 0x65)" (* "*") (cast_expression "(char *)(param_1 + 0x65)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x65)" (( "(") (binary_expression "param_1 + 0x65" (identifier "param_1") (+ "+") (number_literal "0x65")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")"))) () ")")) (compound_statement "{\n    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);\n    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }\n    if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }\n    if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }\n  }" ({ "{") (expression_statement "iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);" (assignment_expression "iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14)" (identifier "iVar5") (= "=") (binary_expression "*(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14)" (pointer_expression "*(int *)(param_1 + 0x18)" (* "*") (cast_expression "(int *)(param_1 + 0x18)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (- "-") (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))))) (; ";")) (if_statement "if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }" (if "if") (parenthesized_expression "((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60)))" (( "(") (binary_expression "(*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))" (parenthesized_expression "(*(char *)(param_1 + 0x66) == '\0')" (( "(") (binary_expression "*(char *)(param_1 + 0x66) == '\0'" (pointer_expression "*(char *)(param_1 + 0x66)" (* "*") (cast_expression "(char *)(param_1 + 0x66)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x66)" (( "(") (binary_expression "param_1 + 0x66" (identifier "param_1") (+ "+") (number_literal "0x66")) () ")")))) (== "==") (char_literal "'\0'" (' "'") (escape_sequence "\0") (' "'"))) () ")")) (&& "&&") (parenthesized_expression "(1 < *(uint *)(param_1 + 0x60))" (( "(") (binary_expression "1 < *(uint *)(param_1 + 0x60)" (number_literal "1") (< "<") (pointer_expression "*(uint *)(param_1 + 0x60)" (* "*") (cast_expression "(uint *)(param_1 + 0x60)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x60)" (( "(") (binary_expression "param_1 + 0x60" (identifier "param_1") (+ "+") (number_literal "0x60")) () ")"))))) () ")"))) () ")")) (compound_statement "{\n      iVar5 = *(uint *)(param_1 + 0x60) - 1;\n    }" ({ "{") (expression_statement "iVar5 = *(uint *)(param_1 + 0x60) - 1;" (assignment_expression "iVar5 = *(uint *)(param_1 + 0x60) - 1" (identifier "iVar5") (= "=") (binary_expression "*(uint *)(param_1 + 0x60) - 1" (pointer_expression "*(uint *)(param_1 + 0x60)" (* "*") (cast_expression "(uint *)(param_1 + 0x60)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x60)" (( "(") (binary_expression "param_1 + 0x60" (identifier "param_1") (+ "+") (number_literal "0x60")) () ")")))) (- "-") (number_literal "1"))) (; ";")) (} "}"))) (if_statement "if (0x3ff < iVar5) {\n      iVar5 = 0x400;\n    }" (if "if") (parenthesized_expression "(0x3ff < iVar5)" (( "(") (binary_expression "0x3ff < iVar5" (number_literal "0x3ff") (< "<") (identifier "iVar5")) () ")")) (compound_statement "{\n      iVar5 = 0x400;\n    }" ({ "{") (expression_statement "iVar5 = 0x400;" (assignment_expression "iVar5 = 0x400" (identifier "iVar5") (= "=") (number_literal "0x400")) (; ";")) (} "}"))) (if_statement "if (iVar5 <= param_3) {\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }" (if "if") (parenthesized_expression "(iVar5 <= param_3)" (( "(") (binary_expression "iVar5 <= param_3" (identifier "iVar5") (<= "<=") (identifier "param_3")) () ")")) (compound_statement "{\n      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);\n      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);\n      if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }\n      if (iVar5 <= iVar6) {\n        return 0;\n      }\n      return iVar5 - iVar6;\n    }" ({ "{") (expression_statement "iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);" (assignment_expression "iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10)" (identifier "iVar6") (= "=") (binary_expression "*(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10)" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (- "-") (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))))) (; ";")) (expression_statement "iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);" (assignment_expression "iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3)" (identifier "iVar5") (= "=") (call_expression "FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3)" (identifier "FUN_001fd910") (argument_list "(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3)" (( "(") (binary_expression "param_1 + 0x38" (identifier "param_1") (+ "+") (number_literal "0x38")) (, ",") (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (, ",") (identifier "iVar6") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (if_statement "if (param_3 + iVar6 == iVar5) {\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }" (if "if") (parenthesized_expression "(param_3 + iVar6 == iVar5)" (( "(") (binary_expression "param_3 + iVar6 == iVar5" (binary_expression "param_3 + iVar6" (identifier "param_3") (+ "+") (identifier "iVar6")) (== "==") (identifier "iVar5")) () ")")) (compound_statement "{\n        iVar3 = *(int *)(param_1 + 0x5c);\n        *(int *)(param_1 + 4) = iVar3;\n        *(int *)(param_1 + 8) = iVar3;\n        *(int *)(param_1 + 0xc) = iVar3;\n        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }\n        *(undefined1 *)(param_1 + 0x66) = 1;\n      }" ({ "{") (expression_statement "iVar3 = *(int *)(param_1 + 0x5c);" (assignment_expression "iVar3 = *(int *)(param_1 + 0x5c)" (identifier "iVar3") (= "=") (pointer_expression "*(int *)(param_1 + 0x5c)" (* "*") (cast_expression "(int *)(param_1 + 0x5c)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x5c)" (( "(") (binary_expression "param_1 + 0x5c" (identifier "param_1") (+ "+") (number_literal "0x5c")) () ")"))))) (; ";")) (expression_statement "*(int *)(param_1 + 4) = iVar3;" (assignment_expression "*(int *)(param_1 + 4) = iVar3" (pointer_expression "*(int *)(param_1 + 4)" (* "*") (cast_expression "(int *)(param_1 + 4)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 4)" (( "(") (binary_expression "param_1 + 4" (identifier "param_1") (+ "+") (number_literal "4")) () ")")))) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "*(int *)(param_1 + 8) = iVar3;" (assignment_expression "*(int *)(param_1 + 8) = iVar3" (pointer_expression "*(int *)(param_1 + 8)" (* "*") (cast_expression "(int *)(param_1 + 8)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "*(int *)(param_1 + 0xc) = iVar3;" (assignment_expression "*(int *)(param_1 + 0xc) = iVar3" (pointer_expression "*(int *)(param_1 + 0xc)" (* "*") (cast_expression "(int *)(param_1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0xc)" (( "(") (binary_expression "param_1 + 0xc" (identifier "param_1") (+ "+") (number_literal "0xc")) () ")")))) (= "=") (identifier "iVar3")) (; ";")) (if_statement "if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)) {\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }\n        else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }" (if "if") (parenthesized_expression "((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2))" (( "(") (binary_expression "(((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||\n           (*(uint *)(param_1 + 0x60) < 2)" (parenthesized_expression "(((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0))" (( "(") (binary_expression "((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)" (parenthesized_expression "((*(uint *)(param_1 + 0x40) & 0x10) == 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x40) & 0x10) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x40) & 0x10)" (( "(") (binary_expression "*(uint *)(param_1 + 0x40) & 0x10" (pointer_expression "*(uint *)(param_1 + 0x40)" (* "*") (cast_expression "(uint *)(param_1 + 0x40)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))) (& "&") (number_literal "0x10")) () ")")) (== "==") (number_literal "0")) () ")")) (&& "&&") (parenthesized_expression "((*(uint *)(param_1 + 0x40) & 1) == 0)" (( "(") (binary_expression "(*(uint *)(param_1 + 0x40) & 1) == 0" (parenthesized_expression "(*(uint *)(param_1 + 0x40) & 1)" (( "(") (binary_expression "*(uint *)(param_1 + 0x40) & 1" (pointer_expression "*(uint *)(param_1 + 0x40)" (* "*") (cast_expression "(uint *)(param_1 + 0x40)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x40)" (( "(") (binary_expression "param_1 + 0x40" (identifier "param_1") (+ "+") (number_literal "0x40")) () ")")))) (& "&") (number_literal "1")) () ")")) (== "==") (number_literal "0")) () ")"))) () ")")) (|| "||") (parenthesized_expression "(*(uint *)(param_1 + 0x60) < 2)" (( "(") (binary_expression "*(uint *)(param_1 + 0x60) < 2" (pointer_expression "*(uint *)(param_1 + 0x60)" (* "*") (cast_expression "(uint *)(param_1 + 0x60)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x60)" (( "(") (binary_expression "param_1 + 0x60" (identifier "param_1") (+ "+") (number_literal "0x60")) () ")")))) (< "<") (number_literal "2")) () ")"))) () ")")) (compound_statement "{\n          *(undefined4 *)(param_1 + 0x14) = 0;\n          *(undefined4 *)(param_1 + 0x10) = 0;\n          *(undefined4 *)(param_1 + 0x18) = 0;\n        }" ({ "{") (expression_statement "*(undefined4 *)(param_1 + 0x14) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x14) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x14)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x14)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x10) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x10) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x10)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x10)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (number_literal "0")) (; ";")) (expression_statement "*(undefined4 *)(param_1 + 0x18) = 0;" (assignment_expression "*(undefined4 *)(param_1 + 0x18) = 0" (pointer_expression "*(undefined4 *)(param_1 + 0x18)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x18)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (number_literal "0")) (; ";")) (} "}")) (else_clause "else {\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }" (else "else") (compound_statement "{\n          *(int *)(param_1 + 0x14) = iVar3;\n          *(int *)(param_1 + 0x10) = iVar3;\n          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);\n        }" ({ "{") (expression_statement "*(int *)(param_1 + 0x14) = iVar3;" (assignment_expression "*(int *)(param_1 + 0x14) = iVar3" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "*(int *)(param_1 + 0x10) = iVar3;" (assignment_expression "*(int *)(param_1 + 0x10) = iVar3" (pointer_expression "*(int *)(param_1 + 0x10)" (* "*") (cast_expression "(int *)(param_1 + 0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "iVar3")) (; ";")) (expression_statement "*(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);" (assignment_expression "*(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60)" (pointer_expression "*(uint *)(param_1 + 0x18)" (* "*") (cast_expression "(uint *)(param_1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")")))) (= "=") (binary_expression "iVar3 + -1 + *(uint *)(param_1 + 0x60)" (binary_expression "iVar3 + -1" (identifier "iVar3") (+ "+") (number_literal "-1")) (+ "+") (pointer_expression "*(uint *)(param_1 + 0x60)" (* "*") (cast_expression "(uint *)(param_1 + 0x60)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x60)" (( "(") (binary_expression "param_1 + 0x60" (identifier "param_1") (+ "+") (number_literal "0x60")) () ")")))))) (; ";")) (} "}")))) (expression_statement "*(undefined1 *)(param_1 + 0x66) = 1;" (assignment_expression "*(undefined1 *)(param_1 + 0x66) = 1" (pointer_expression "*(undefined1 *)(param_1 + 0x66)" (* "*") (cast_expression "(undefined1 *)(param_1 + 0x66)" (( "(") (type_descriptor "undefined1 *" (type_identifier "undefined1") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x66)" (( "(") (binary_expression "param_1 + 0x66" (identifier "param_1") (+ "+") (number_literal "0x66")) () ")")))) (= "=") (number_literal "1")) (; ";")) (} "}"))) (if_statement "if (iVar5 <= iVar6) {\n        return 0;\n      }" (if "if") (parenthesized_expression "(iVar5 <= iVar6)" (( "(") (binary_expression "iVar5 <= iVar6" (identifier "iVar5") (<= "<=") (identifier "iVar6")) () ")")) (compound_statement "{\n        return 0;\n      }" ({ "{") (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}"))) (return_statement "return iVar5 - iVar6;" (return "return") (binary_expression "iVar5 - iVar6" (identifier "iVar5") (- "-") (identifier "iVar6")) (; ";")) (} "}"))) (} "}"))) (expression_statement "iVar5 = FUN_00208000(param_1,param_2,param_3);" (assignment_expression "iVar5 = FUN_00208000(param_1,param_2,param_3)" (identifier "iVar5") (= "=") (call_expression "FUN_00208000(param_1,param_2,param_3)" (identifier "FUN_00208000") (argument_list "(param_1,param_2,param_3)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") () ")")))) (; ";")) (return_statement "return iVar5;" (return "return") (identifier "iVar5") (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* std::filebuf::xsputn(char const*, int) */

int __thiscall std::type_1::function_1(type_1 *var_1,char *param_1,int var_6)

{
  type_1 fVar1;
  int *var_2;
  int var_11;
  char var_4;
  int var_5;
  int var_10;
  
  fVar1 = var_1[0x40];
  var_2 = *(int **)(var_1 + 0x74);
  if (var_2 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3();
  }
  var_4 = (**(type_2 **)(*var_2 + 0x18))(var_2);
  if (((var_4 != '\0') && (((type_3)fVar1 & 0x11) != 0)) && (var_1[0x65] == (type_1)0x0)) {
    var_5 = *(int *)(var_1 + 0x18) - *(int *)(var_1 + 0x14);
    if ((var_1[0x66] == (type_1)0x0) && (1 < *(type_4 *)(var_1 + 0x60))) {
      var_5 = *(type_4 *)(var_1 + 0x60) - 1;
    }
    if (0x3ff < var_5) {
      var_5 = 0x400;
    }
    if (var_5 <= var_6) {
      var_10 = *(int *)(var_1 + 0x14) - (int)*(char **)(var_1 + 0x10);
      var_5 = var_7<var_8>::var_9
                        ((var_7<var_8> *)(var_1 + 0x38),*(char **)(var_1 + 0x10),var_10,param_1,
                         var_6);
      if (var_6 + var_10 == var_5) {
        var_11 = *(int *)(var_1 + 0x5c);
        *(int *)(var_1 + 4) = var_11;
        *(int *)(var_1 + 8) = var_11;
        *(int *)(var_1 + 0xc) = var_11;
        if ((((*(type_4 *)(var_1 + 0x40) & 0x10) == 0) && ((*(type_4 *)(var_1 + 0x40) & 1) == 0)) ||
           (*(type_4 *)(var_1 + 0x60) < 2)) {
          *(type_5 *)(var_1 + 0x14) = 0;
          *(type_5 *)(var_1 + 0x10) = 0;
          *(type_5 *)(var_1 + 0x18) = 0;
        }
        else {
          *(int *)(var_1 + 0x14) = var_11;
          *(int *)(var_1 + 0x10) = var_11;
          *(type_4 *)(var_1 + 0x18) = var_11 + -1 + *(type_4 *)(var_1 + 0x60);
        }
        var_1[0x66] = (type_1)0x1;
      }
      if (var_5 <= var_10) {
        return 0;
      }
      return var_5 - var_10;
    }
  }
  var_5 = type_6::function_1((type_6 *)var_1,param_1,var_6);
  return var_5;
}


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

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

int MASKED(int param_1,undefined4 param_2,int param_3)

{
  byte bVar1;
  int *piVar2;
  int iVar3;
  char cVar4;
  int iVar5;
  int iVar6;
  
  bVar1 = *(byte *)(param_1 + 0x40);
  piVar2 = *(int **)(param_1 + 0x74);
  if (piVar2 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
    FUN_002428a0();
  }
  cVar4 = (**(code **)(*piVar2 + 0x18))(piVar2);
  if (((cVar4 != '\0') && ((bVar1 & 0x11) != 0)) && (*(char *)(param_1 + 0x65) == '\0')) {
    iVar5 = *(int *)(param_1 + 0x18) - *(int *)(param_1 + 0x14);
    if ((*(char *)(param_1 + 0x66) == '\0') && (1 < *(uint *)(param_1 + 0x60))) {
      iVar5 = *(uint *)(param_1 + 0x60) - 1;
    }
    if (0x3ff < iVar5) {
      iVar5 = 0x400;
    }
    if (iVar5 <= param_3) {
      iVar6 = *(int *)(param_1 + 0x14) - *(int *)(param_1 + 0x10);
      iVar5 = FUN_001fd910(param_1 + 0x38,*(int *)(param_1 + 0x10),iVar6,param_2,param_3);
      if (param_3 + iVar6 == iVar5) {
        iVar3 = *(int *)(param_1 + 0x5c);
        *(int *)(param_1 + 4) = iVar3;
        *(int *)(param_1 + 8) = iVar3;
        *(int *)(param_1 + 0xc) = iVar3;
        if ((((*(uint *)(param_1 + 0x40) & 0x10) == 0) && ((*(uint *)(param_1 + 0x40) & 1) == 0)) ||
           (*(uint *)(param_1 + 0x60) < 2)) {
          *(undefined4 *)(param_1 + 0x14) = 0;
          *(undefined4 *)(param_1 + 0x10) = 0;
          *(undefined4 *)(param_1 + 0x18) = 0;
        }
        else {
          *(int *)(param_1 + 0x14) = iVar3;
          *(int *)(param_1 + 0x10) = iVar3;
          *(uint *)(param_1 + 0x18) = iVar3 + -1 + *(uint *)(param_1 + 0x60);
        }
        *(undefined1 *)(param_1 + 0x66) = 1;
      }
      if (iVar5 <= iVar6) {
        return 0;
      }
      return iVar5 - iVar6;
    }
  }
  iVar5 = FUN_00208000(param_1,param_2,param_3);
  return iVar5;
}

