
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int unixSync(sqlite3_file *id,int flags)

{
  ushort *puVar1;
  int iVar2;
  int iVar3;
  int *piVar4;
  int lineno;
  int in_GS_OFFSET;
  int dirfd;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar2 = fdatasync((int)id[3].pMethods);
  if (iVar2 == 0) {
    iVar2 = 0;
    if (((uint)id[4].pMethods & 0x80000) != 0) {
      iVar3 = (*aSyscall[0x11].pCurrent)(id[8].pMethods,&dirfd);
      if (iVar3 == 0) {
        fdatasync(dirfd);
        iVar3 = (*aSyscall[1].pCurrent)(dirfd);
        if (iVar3 != 0) {
          robust_close((unixFile *)id,0x8d21,lineno);
        }
      }
      puVar1 = (ushort *)((int)&id[4].pMethods + 2);
      *puVar1 = *puVar1 & 0xfff7;
    }
  }
  else {
    piVar4 = __errno_location();
    id[5].pMethods = (sqlite3_io_methods *)*piVar4;
    iVar2 = unixLogErrorAtLine(0x40a,"full_fsync",(char *)id[8].pMethods,0x8d13);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



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

undefined4 FUN_00072370(int param_1)

{
  int iVar1;
  int *piVar2;
  undefined4 uVar3;
  int in_GS_OFFSET;
  int local_14;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = fdatasync(*(int *)(param_1 + 0xc));
  if (iVar1 == 0) {
    uVar3 = 0;
    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {
      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);
      if (iVar1 == 0) {
        fdatasync(local_14);
        iVar1 = (*(code *)PTR_close_0017d750)(local_14);
        if (iVar1 != 0) {
          FUN_00071ca0();
        }
      }
      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;
    }
  }
  else {
    piVar2 = __errno_location();
    *(int *)(param_1 + 0x14) = *piVar2;
    uVar3 = FUN_000719e0(0x8d13);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00116110();
}


PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x00017230
ADD EBX,0x109ab0
SUB ESP,0x1c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0x18],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x2c]
PUSH dword ptr [ESI + 0xc]
CALL 0x000155f0
ADD ESP,0x10
TEST EAX,EAX
JNZ 0x000723e0
MOV EDI,EAX
TEST byte ptr [ESI + 0x12],0x8
JZ 0x000723c5
SUB ESP,0x8
LEA EAX,[ESP + 0x10]
PUSH EAX
PUSH dword ptr [ESI + 0x20]
CALL dword ptr [EBX + 0x19e8]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x00072410
AND word ptr [ESI + 0x12],0xfff7
MOV EDX,dword ptr [ESP + 0xc]
XOR EDX,dword ptr GS:[0x14]
MOV EAX,EDI
JNZ 0x0007243c
ADD ESP,0x10
POP EBX
POP ESI
POP EDI
RET
CALL 0x00015480
SUB ESP,0xc
MOV ECX,dword ptr [ESI + 0x20]
LEA EDX,[EBX + 0xfffa3c37]
MOV EAX,dword ptr [EAX]
MOV dword ptr [ESI + 0x14],EAX
MOV EAX,0x40a
PUSH 0x8d13
CALL 0x000719e0
ADD ESP,0x10
MOV EDI,EAX
JMP 0x000723c5
SUB ESP,0xc
PUSH dword ptr [ESP + 0x14]
CALL 0x000155f0
POP EAX
PUSH dword ptr [ESP + 0x14]
CALL dword ptr [EBX + 0x1928]
ADD ESP,0x10
TEST EAX,EAX
JZ 0x000723c0
MOV EDX,0x8d21
MOV EAX,ESI
CALL 0x00071ca0
JMP 0x000723c0
CALL 0x00116110
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nundefined4 FUN_00072370(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  int in_GS_OFFSET;\n  int local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = fdatasync(*(int *)(param_1 + 0xc));\n  if (iVar1 == 0) {\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }\n  else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00116110();\n}\n\n" comment (function_definition "undefined4 FUN_00072370(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  int in_GS_OFFSET;\n  int local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = fdatasync(*(int *)(param_1 + 0xc));\n  if (iVar1 == 0) {\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }\n  else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00116110();\n}" type_identifier (function_declarator "FUN_00072370(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  int in_GS_OFFSET;\n  int local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = fdatasync(*(int *)(param_1 + 0xc));\n  if (iVar1 == 0) {\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }\n  else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00116110();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_14;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = fdatasync(*(int *)(param_1 + 0xc));" (assignment_expression "iVar1 = fdatasync(*(int *)(param_1 + 0xc))" identifier = (call_expression "fdatasync(*(int *)(param_1 + 0xc))" identifier (argument_list "(*(int *)(param_1 + 0xc))" ( (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) )))) )))) ;) (if_statement "if (iVar1 == 0) {\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }\n  else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (if_statement "if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }" if (parenthesized_expression "((*(byte *)(param_1 + 0x12) & 8) != 0)" ( (binary_expression "(*(byte *)(param_1 + 0x12) & 8) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x12) & 8)" ( (binary_expression "*(byte *)(param_1 + 0x12) & 8" (pointer_expression "*(byte *)(param_1 + 0x12)" * (cast_expression "(byte *)(param_1 + 0x12)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }" { (expression_statement "iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);" (assignment_expression "iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14)" identifier = (call_expression "(*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14)" (parenthesized_expression "(*(code *)PTR_FUN_0017d810)" ( (pointer_expression "*(code *)PTR_FUN_0017d810" * (cast_expression "(code *)PTR_FUN_0017d810" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0x20),&local_14)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) , (pointer_expression "&local_14" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }" { (expression_statement "fdatasync(local_14);" (call_expression "fdatasync(local_14)" identifier (argument_list "(local_14)" ( identifier ))) ;) (expression_statement "iVar1 = (*(code *)PTR_close_0017d750)(local_14);" (assignment_expression "iVar1 = (*(code *)PTR_close_0017d750)(local_14)" identifier = (call_expression "(*(code *)PTR_close_0017d750)(local_14)" (parenthesized_expression "(*(code *)PTR_close_0017d750)" ( (pointer_expression "*(code *)PTR_close_0017d750" * (cast_expression "(code *)PTR_close_0017d750" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_14)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n          FUN_00071ca0();\n        }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n          FUN_00071ca0();\n        }" { (expression_statement "FUN_00071ca0();" (call_expression "FUN_00071ca0()" identifier (argument_list "()" ( ))) ;) })) })) (expression_statement "*(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;" (assignment_expression "*(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7" (pointer_expression "*(ushort *)(param_1 + 0x12)" * (cast_expression "(ushort *)(param_1 + 0x12)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) )))) = (binary_expression "*(ushort *)(param_1 + 0x12) & 0xfff7" (pointer_expression "*(ushort *)(param_1 + 0x12)" * (cast_expression "(ushort *)(param_1 + 0x12)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) )))) & number_literal)) ;) })) }) (else_clause "else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }" else (compound_statement "{\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(int *)(param_1 + 0x14) = *piVar2;" (assignment_expression "*(int *)(param_1 + 0x14) = *piVar2" (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 "*piVar2" * identifier)) ;) (expression_statement "uVar3 = FUN_000719e0(0x8d13);" (assignment_expression "uVar3 = FUN_000719e0(0x8d13)" identifier = (call_expression "FUN_000719e0(0x8d13)" identifier (argument_list "(0x8d13)" ( number_literal )))) ;) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar3;\n  }" { (return_statement "return uVar3;" return identifier ;) })) comment (expression_statement "FUN_00116110();" (call_expression "FUN_00116110()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n\nint unixSync(sqlite3_file *id,int flags)\n\n{\n  ushort *puVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  int lineno;\n  int in_GS_OFFSET;\n  int dirfd;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = fdatasync((int)id[3].pMethods);\n  if (iVar2 == 0) {\n    iVar2 = 0;\n    if (((uint)id[4].pMethods & 0x80000) != 0) {\n      iVar3 = (*aSyscall[0x11].pCurrent)(id[8].pMethods,&dirfd);\n      if (iVar3 == 0) {\n        fdatasync(dirfd);\n        iVar3 = (*aSyscall[1].pCurrent)(dirfd);\n        if (iVar3 != 0) {\n          robust_close((unixFile *)id,0x8d21,lineno);\n        }\n      }\n      puVar1 = (ushort *)((int)&id[4].pMethods + 2);\n      *puVar1 = *puVar1 & 0xfff7;\n    }\n  }\n  else {\n    piVar4 = __errno_location();\n    id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n    iVar2 = unixLogErrorAtLine(0x40a,"full_fsync",(char *)id[8].pMethods,0x8d13);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment (function_definition "int unixSync(sqlite3_file *id,int flags)\n\n{\n  ushort *puVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  int lineno;\n  int in_GS_OFFSET;\n  int dirfd;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = fdatasync((int)id[3].pMethods);\n  if (iVar2 == 0) {\n    iVar2 = 0;\n    if (((uint)id[4].pMethods & 0x80000) != 0) {\n      iVar3 = (*aSyscall[0x11].pCurrent)(id[8].pMethods,&dirfd);\n      if (iVar3 == 0) {\n        fdatasync(dirfd);\n        iVar3 = (*aSyscall[1].pCurrent)(dirfd);\n        if (iVar3 != 0) {\n          robust_close((unixFile *)id,0x8d21,lineno);\n        }\n      }\n      puVar1 = (ushort *)((int)&id[4].pMethods + 2);\n      *puVar1 = *puVar1 & 0xfff7;\n    }\n  }\n  else {\n    piVar4 = __errno_location();\n    id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n    iVar2 = unixLogErrorAtLine(0x40a,"full_fsync",(char *)id[8].pMethods,0x8d13);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "unixSync(sqlite3_file *id,int flags)" identifier (parameter_list "(sqlite3_file *id,int flags)" ( (parameter_declaration "sqlite3_file *id" type_identifier (pointer_declarator "*id" * identifier)) , (parameter_declaration "int flags" primitive_type identifier) ))) (compound_statement "{\n  ushort *puVar1;\n  int iVar2;\n  int iVar3;\n  int *piVar4;\n  int lineno;\n  int in_GS_OFFSET;\n  int dirfd;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar2 = fdatasync((int)id[3].pMethods);\n  if (iVar2 == 0) {\n    iVar2 = 0;\n    if (((uint)id[4].pMethods & 0x80000) != 0) {\n      iVar3 = (*aSyscall[0x11].pCurrent)(id[8].pMethods,&dirfd);\n      if (iVar3 == 0) {\n        fdatasync(dirfd);\n        iVar3 = (*aSyscall[1].pCurrent)(dirfd);\n        if (iVar3 != 0) {\n          robust_close((unixFile *)id,0x8d21,lineno);\n        }\n      }\n      puVar1 = (ushort *)((int)&id[4].pMethods + 2);\n      *puVar1 = *puVar1 & 0xfff7;\n    }\n  }\n  else {\n    piVar4 = __errno_location();\n    id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n    iVar2 = unixLogErrorAtLine(0x40a,"full_fsync",(char *)id[8].pMethods,0x8d13);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "ushort *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "int *piVar4;" primitive_type (pointer_declarator "*piVar4" * identifier) ;) (declaration "int lineno;" primitive_type identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int dirfd;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar2 = fdatasync((int)id[3].pMethods);" (assignment_expression "iVar2 = fdatasync((int)id[3].pMethods)" identifier = (call_expression "fdatasync((int)id[3].pMethods)" identifier (argument_list "((int)id[3].pMethods)" ( (cast_expression "(int)id[3].pMethods" ( (type_descriptor "int" primitive_type) ) (field_expression "id[3].pMethods" (subscript_expression "id[3]" identifier [ number_literal ]) . field_identifier)) )))) ;) (if_statement "if (iVar2 == 0) {\n    iVar2 = 0;\n    if (((uint)id[4].pMethods & 0x80000) != 0) {\n      iVar3 = (*aSyscall[0x11].pCurrent)(id[8].pMethods,&dirfd);\n      if (iVar3 == 0) {\n        fdatasync(dirfd);\n        iVar3 = (*aSyscall[1].pCurrent)(dirfd);\n        if (iVar3 != 0) {\n          robust_close((unixFile *)id,0x8d21,lineno);\n        }\n      }\n      puVar1 = (ushort *)((int)&id[4].pMethods + 2);\n      *puVar1 = *puVar1 & 0xfff7;\n    }\n  }\n  else {\n    piVar4 = __errno_location();\n    id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n    iVar2 = unixLogErrorAtLine(0x40a,"full_fsync",(char *)id[8].pMethods,0x8d13);\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    iVar2 = 0;\n    if (((uint)id[4].pMethods & 0x80000) != 0) {\n      iVar3 = (*aSyscall[0x11].pCurrent)(id[8].pMethods,&dirfd);\n      if (iVar3 == 0) {\n        fdatasync(dirfd);\n        iVar3 = (*aSyscall[1].pCurrent)(dirfd);\n        if (iVar3 != 0) {\n          robust_close((unixFile *)id,0x8d21,lineno);\n        }\n      }\n      puVar1 = (ushort *)((int)&id[4].pMethods + 2);\n      *puVar1 = *puVar1 & 0xfff7;\n    }\n  }" { (expression_statement "iVar2 = 0;" (assignment_expression "iVar2 = 0" identifier = number_literal) ;) (if_statement "if (((uint)id[4].pMethods & 0x80000) != 0) {\n      iVar3 = (*aSyscall[0x11].pCurrent)(id[8].pMethods,&dirfd);\n      if (iVar3 == 0) {\n        fdatasync(dirfd);\n        iVar3 = (*aSyscall[1].pCurrent)(dirfd);\n        if (iVar3 != 0) {\n          robust_close((unixFile *)id,0x8d21,lineno);\n        }\n      }\n      puVar1 = (ushort *)((int)&id[4].pMethods + 2);\n      *puVar1 = *puVar1 & 0xfff7;\n    }" if (parenthesized_expression "(((uint)id[4].pMethods & 0x80000) != 0)" ( (binary_expression "((uint)id[4].pMethods & 0x80000) != 0" (parenthesized_expression "((uint)id[4].pMethods & 0x80000)" ( (binary_expression "(uint)id[4].pMethods & 0x80000" (cast_expression "(uint)id[4].pMethods" ( (type_descriptor "uint" type_identifier) ) (field_expression "id[4].pMethods" (subscript_expression "id[4]" identifier [ number_literal ]) . field_identifier)) & number_literal) )) != number_literal) )) (compound_statement "{\n      iVar3 = (*aSyscall[0x11].pCurrent)(id[8].pMethods,&dirfd);\n      if (iVar3 == 0) {\n        fdatasync(dirfd);\n        iVar3 = (*aSyscall[1].pCurrent)(dirfd);\n        if (iVar3 != 0) {\n          robust_close((unixFile *)id,0x8d21,lineno);\n        }\n      }\n      puVar1 = (ushort *)((int)&id[4].pMethods + 2);\n      *puVar1 = *puVar1 & 0xfff7;\n    }" { (expression_statement "iVar3 = (*aSyscall[0x11].pCurrent)(id[8].pMethods,&dirfd);" (assignment_expression "iVar3 = (*aSyscall[0x11].pCurrent)(id[8].pMethods,&dirfd)" identifier = (call_expression "(*aSyscall[0x11].pCurrent)(id[8].pMethods,&dirfd)" (parenthesized_expression "(*aSyscall[0x11].pCurrent)" ( (pointer_expression "*aSyscall[0x11].pCurrent" * (field_expression "aSyscall[0x11].pCurrent" (subscript_expression "aSyscall[0x11]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(id[8].pMethods,&dirfd)" ( (field_expression "id[8].pMethods" (subscript_expression "id[8]" identifier [ number_literal ]) . field_identifier) , (pointer_expression "&dirfd" & identifier) )))) ;) (if_statement "if (iVar3 == 0) {\n        fdatasync(dirfd);\n        iVar3 = (*aSyscall[1].pCurrent)(dirfd);\n        if (iVar3 != 0) {\n          robust_close((unixFile *)id,0x8d21,lineno);\n        }\n      }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n        fdatasync(dirfd);\n        iVar3 = (*aSyscall[1].pCurrent)(dirfd);\n        if (iVar3 != 0) {\n          robust_close((unixFile *)id,0x8d21,lineno);\n        }\n      }" { (expression_statement "fdatasync(dirfd);" (call_expression "fdatasync(dirfd)" identifier (argument_list "(dirfd)" ( identifier ))) ;) (expression_statement "iVar3 = (*aSyscall[1].pCurrent)(dirfd);" (assignment_expression "iVar3 = (*aSyscall[1].pCurrent)(dirfd)" identifier = (call_expression "(*aSyscall[1].pCurrent)(dirfd)" (parenthesized_expression "(*aSyscall[1].pCurrent)" ( (pointer_expression "*aSyscall[1].pCurrent" * (field_expression "aSyscall[1].pCurrent" (subscript_expression "aSyscall[1]" identifier [ number_literal ]) . field_identifier)) )) (argument_list "(dirfd)" ( identifier )))) ;) (if_statement "if (iVar3 != 0) {\n          robust_close((unixFile *)id,0x8d21,lineno);\n        }" if (parenthesized_expression "(iVar3 != 0)" ( (binary_expression "iVar3 != 0" identifier != number_literal) )) (compound_statement "{\n          robust_close((unixFile *)id,0x8d21,lineno);\n        }" { (expression_statement "robust_close((unixFile *)id,0x8d21,lineno);" (call_expression "robust_close((unixFile *)id,0x8d21,lineno)" identifier (argument_list "((unixFile *)id,0x8d21,lineno)" ( (cast_expression "(unixFile *)id" ( (type_descriptor "unixFile *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , number_literal , identifier ))) ;) })) })) (expression_statement "puVar1 = (ushort *)((int)&id[4].pMethods + 2);" (assignment_expression "puVar1 = (ushort *)((int)&id[4].pMethods + 2)" identifier = (cast_expression "(ushort *)((int)&id[4].pMethods + 2)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((int)&id[4].pMethods + 2)" ( (binary_expression "(int)&id[4].pMethods + 2" (cast_expression "(int)&id[4].pMethods" ( (type_descriptor "int" primitive_type) ) (pointer_expression "&id[4].pMethods" & (field_expression "id[4].pMethods" (subscript_expression "id[4]" identifier [ number_literal ]) . field_identifier))) + number_literal) )))) ;) (expression_statement "*puVar1 = *puVar1 & 0xfff7;" (assignment_expression "*puVar1 = *puVar1 & 0xfff7" (pointer_expression "*puVar1" * identifier) = (binary_expression "*puVar1 & 0xfff7" (pointer_expression "*puVar1" * identifier) & number_literal)) ;) })) }) (else_clause "else {\n    piVar4 = __errno_location();\n    id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n    iVar2 = unixLogErrorAtLine(0x40a,"full_fsync",(char *)id[8].pMethods,0x8d13);\n  }" else (compound_statement "{\n    piVar4 = __errno_location();\n    id[5].pMethods = (sqlite3_io_methods *)*piVar4;\n    iVar2 = unixLogErrorAtLine(0x40a,"full_fsync",(char *)id[8].pMethods,0x8d13);\n  }" { (expression_statement "piVar4 = __errno_location();" (assignment_expression "piVar4 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "id[5].pMethods = (sqlite3_io_methods *)*piVar4;" (assignment_expression "id[5].pMethods = (sqlite3_io_methods *)*piVar4" (field_expression "id[5].pMethods" (subscript_expression "id[5]" identifier [ number_literal ]) . field_identifier) = (cast_expression "(sqlite3_io_methods *)*piVar4" ( (type_descriptor "sqlite3_io_methods *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*piVar4" * identifier))) ;) (expression_statement "iVar2 = unixLogErrorAtLine(0x40a,"full_fsync",(char *)id[8].pMethods,0x8d13);" (assignment_expression "iVar2 = unixLogErrorAtLine(0x40a,"full_fsync",(char *)id[8].pMethods,0x8d13)" identifier = (call_expression "unixLogErrorAtLine(0x40a,"full_fsync",(char *)id[8].pMethods,0x8d13)" identifier (argument_list "(0x40a,"full_fsync",(char *)id[8].pMethods,0x8d13)" ( number_literal , (string_literal ""full_fsync"" " string_content ") , (cast_expression "(char *)id[8].pMethods" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (field_expression "id[8].pMethods" (subscript_expression "id[8]" identifier [ number_literal ]) . field_identifier)) , number_literal )))) ;) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return iVar2;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "undefined4 FUN_00072370(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  int in_GS_OFFSET;\n  int local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = fdatasync(*(int *)(param_1 + 0xc));\n  if (iVar1 == 0) {\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }\n  else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    \n  FUN_00116110();\n}\n\n" (function_definition "undefined4 FUN_00072370(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  int in_GS_OFFSET;\n  int local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = fdatasync(*(int *)(param_1 + 0xc));\n  if (iVar1 == 0) {\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }\n  else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    \n  FUN_00116110();\n}" type_identifier (function_declarator "FUN_00072370(int param_1)" identifier (parameter_list "(int param_1)" ( (parameter_declaration "int param_1" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  int in_GS_OFFSET;\n  int local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = fdatasync(*(int *)(param_1 + 0xc));\n  if (iVar1 == 0) {\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }\n  else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    \n  FUN_00116110();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "undefined4 uVar3;" type_identifier identifier ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_14;" primitive_type identifier ;) (declaration "int local_10;" primitive_type identifier ;) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = fdatasync(*(int *)(param_1 + 0xc));" (assignment_expression "iVar1 = fdatasync(*(int *)(param_1 + 0xc))" identifier = (call_expression "fdatasync(*(int *)(param_1 + 0xc))" identifier (argument_list "(*(int *)(param_1 + 0xc))" ( (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) )))) )))) ;) (if_statement "if (iVar1 == 0) {\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }\n  else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }" { (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" identifier = number_literal) ;) (if_statement "if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }" if (parenthesized_expression "((*(byte *)(param_1 + 0x12) & 8) != 0)" ( (binary_expression "(*(byte *)(param_1 + 0x12) & 8) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x12) & 8)" ( (binary_expression "*(byte *)(param_1 + 0x12) & 8" (pointer_expression "*(byte *)(param_1 + 0x12)" * (cast_expression "(byte *)(param_1 + 0x12)" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) )))) & number_literal) )) != number_literal) )) (compound_statement "{\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }" { (expression_statement "iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);" (assignment_expression "iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14)" identifier = (call_expression "(*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14)" (parenthesized_expression "(*(code *)PTR_FUN_0017d810)" ( (pointer_expression "*(code *)PTR_FUN_0017d810" * (cast_expression "(code *)PTR_FUN_0017d810" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(*(undefined4 *)(param_1 + 0x20),&local_14)" ( (pointer_expression "*(undefined4 *)(param_1 + 0x20)" * (cast_expression "(undefined4 *)(param_1 + 0x20)" ( (type_descriptor "undefined4 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20)" ( (binary_expression "param_1 + 0x20" identifier + number_literal) )))) , (pointer_expression "&local_14" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }" { (expression_statement "fdatasync(local_14);" (call_expression "fdatasync(local_14)" identifier (argument_list "(local_14)" ( identifier ))) ;) (expression_statement "iVar1 = (*(code *)PTR_close_0017d750)(local_14);" (assignment_expression "iVar1 = (*(code *)PTR_close_0017d750)(local_14)" identifier = (call_expression "(*(code *)PTR_close_0017d750)(local_14)" (parenthesized_expression "(*(code *)PTR_close_0017d750)" ( (pointer_expression "*(code *)PTR_close_0017d750" * (cast_expression "(code *)PTR_close_0017d750" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(local_14)" ( identifier )))) ;) (if_statement "if (iVar1 != 0) {\n          FUN_00071ca0();\n        }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n          FUN_00071ca0();\n        }" { (expression_statement "FUN_00071ca0();" (call_expression "FUN_00071ca0()" identifier (argument_list "()" ( ))) ;) })) })) (expression_statement "*(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;" (assignment_expression "*(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7" (pointer_expression "*(ushort *)(param_1 + 0x12)" * (cast_expression "(ushort *)(param_1 + 0x12)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) )))) = (binary_expression "*(ushort *)(param_1 + 0x12) & 0xfff7" (pointer_expression "*(ushort *)(param_1 + 0x12)" * (cast_expression "(ushort *)(param_1 + 0x12)" ( (type_descriptor "ushort *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x12)" ( (binary_expression "param_1 + 0x12" identifier + number_literal) )))) & number_literal)) ;) })) }) (else_clause "else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }" else (compound_statement "{\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }" { (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" identifier = (call_expression "__errno_location()" identifier (argument_list "()" ( )))) ;) (expression_statement "*(int *)(param_1 + 0x14) = *piVar2;" (assignment_expression "*(int *)(param_1 + 0x14) = *piVar2" (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 "*piVar2" * identifier)) ;) (expression_statement "uVar3 = FUN_000719e0(0x8d13);" (assignment_expression "uVar3 = FUN_000719e0(0x8d13)" identifier = (call_expression "FUN_000719e0(0x8d13)" identifier (argument_list "(0x8d13)" ( number_literal )))) ;) }))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }" if (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar3;\n  }" { (return_statement "return uVar3;" return identifier ;) })) (expression_statement "FUN_00116110();" (call_expression "FUN_00116110()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (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 = (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_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) )))) & LIT) )) != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) })) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_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 IDENT = (call_expression IDENT (argument_list ( )))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (pointer_expression * IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( LIT )))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "undefined4 FUN_00072370(int param_1)\n\n{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  int in_GS_OFFSET;\n  int local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = fdatasync(*(int *)(param_1 + 0xc));\n  if (iVar1 == 0) {\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }\n  else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    \n  FUN_00116110();\n}" (type_identifier "undefined4") (function_declarator "FUN_00072370(int param_1)" (identifier "FUN_00072370") (parameter_list "(int param_1)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  undefined4 uVar3;\n  int in_GS_OFFSET;\n  int local_14;\n  int local_10;\n  \n  local_10 = *(int *)(in_GS_OFFSET + 0x14);\n  iVar1 = fdatasync(*(int *)(param_1 + 0xc));\n  if (iVar1 == 0) {\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }\n  else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }\n  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }\n                    \n  FUN_00116110();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "undefined4 uVar3;" (type_identifier "undefined4") (identifier "uVar3") (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int local_14;" (primitive_type "int") (identifier "local_14") (; ";")) (declaration "int local_10;" (primitive_type "int") (identifier "local_10") (; ";")) (expression_statement "local_10 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_10 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (expression_statement "iVar1 = fdatasync(*(int *)(param_1 + 0xc));" (assignment_expression "iVar1 = fdatasync(*(int *)(param_1 + 0xc))" (identifier "iVar1") (= "=") (call_expression "fdatasync(*(int *)(param_1 + 0xc))" (identifier "fdatasync") (argument_list "(*(int *)(param_1 + 0xc))" (( "(") (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")) () ")")))) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }\n  else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar3 = 0;\n    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }\n  }" ({ "{") (expression_statement "uVar3 = 0;" (assignment_expression "uVar3 = 0" (identifier "uVar3") (= "=") (number_literal "0")) (; ";")) (if_statement "if ((*(byte *)(param_1 + 0x12) & 8) != 0) {\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }" (if "if") (parenthesized_expression "((*(byte *)(param_1 + 0x12) & 8) != 0)" (( "(") (binary_expression "(*(byte *)(param_1 + 0x12) & 8) != 0" (parenthesized_expression "(*(byte *)(param_1 + 0x12) & 8)" (( "(") (binary_expression "*(byte *)(param_1 + 0x12) & 8" (pointer_expression "*(byte *)(param_1 + 0x12)" (* "*") (cast_expression "(byte *)(param_1 + 0x12)" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x12)" (( "(") (binary_expression "param_1 + 0x12" (identifier "param_1") (+ "+") (number_literal "0x12")) () ")")))) (& "&") (number_literal "8")) () ")")) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);\n      if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }\n      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;\n    }" ({ "{") (expression_statement "iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);" (assignment_expression "iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14)" (parenthesized_expression "(*(code *)PTR_FUN_0017d810)" (( "(") (pointer_expression "*(code *)PTR_FUN_0017d810" (* "*") (cast_expression "(code *)PTR_FUN_0017d810" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_FUN_0017d810"))) () ")")) (argument_list "(*(undefined4 *)(param_1 + 0x20),&local_14)" (( "(") (pointer_expression "*(undefined4 *)(param_1 + 0x20)" (* "*") (cast_expression "(undefined4 *)(param_1 + 0x20)" (( "(") (type_descriptor "undefined4 *" (type_identifier "undefined4") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20)" (( "(") (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) () ")")))) (, ",") (pointer_expression "&local_14" (& "&") (identifier "local_14")) () ")")))) (; ";")) (if_statement "if (iVar1 == 0) {\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }" (if "if") (parenthesized_expression "(iVar1 == 0)" (( "(") (binary_expression "iVar1 == 0" (identifier "iVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        fdatasync(local_14);\n        iVar1 = (*(code *)PTR_close_0017d750)(local_14);\n        if (iVar1 != 0) {\n          FUN_00071ca0();\n        }\n      }" ({ "{") (expression_statement "fdatasync(local_14);" (call_expression "fdatasync(local_14)" (identifier "fdatasync") (argument_list "(local_14)" (( "(") (identifier "local_14") () ")"))) (; ";")) (expression_statement "iVar1 = (*(code *)PTR_close_0017d750)(local_14);" (assignment_expression "iVar1 = (*(code *)PTR_close_0017d750)(local_14)" (identifier "iVar1") (= "=") (call_expression "(*(code *)PTR_close_0017d750)(local_14)" (parenthesized_expression "(*(code *)PTR_close_0017d750)" (( "(") (pointer_expression "*(code *)PTR_close_0017d750" (* "*") (cast_expression "(code *)PTR_close_0017d750" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_close_0017d750"))) () ")")) (argument_list "(local_14)" (( "(") (identifier "local_14") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n          FUN_00071ca0();\n        }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          FUN_00071ca0();\n        }" ({ "{") (expression_statement "FUN_00071ca0();" (call_expression "FUN_00071ca0()" (identifier "FUN_00071ca0") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (} "}"))) (expression_statement "*(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;" (assignment_expression "*(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7" (pointer_expression "*(ushort *)(param_1 + 0x12)" (* "*") (cast_expression "(ushort *)(param_1 + 0x12)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x12)" (( "(") (binary_expression "param_1 + 0x12" (identifier "param_1") (+ "+") (number_literal "0x12")) () ")")))) (= "=") (binary_expression "*(ushort *)(param_1 + 0x12) & 0xfff7" (pointer_expression "*(ushort *)(param_1 + 0x12)" (* "*") (cast_expression "(ushort *)(param_1 + 0x12)" (( "(") (type_descriptor "ushort *" (type_identifier "ushort") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x12)" (( "(") (binary_expression "param_1 + 0x12" (identifier "param_1") (+ "+") (number_literal "0x12")) () ")")))) (& "&") (number_literal "0xfff7"))) (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }" (else "else") (compound_statement "{\n    piVar2 = __errno_location();\n    *(int *)(param_1 + 0x14) = *piVar2;\n    uVar3 = FUN_000719e0(0x8d13);\n  }" ({ "{") (expression_statement "piVar2 = __errno_location();" (assignment_expression "piVar2 = __errno_location()" (identifier "piVar2") (= "=") (call_expression "__errno_location()" (identifier "__errno_location") (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "*(int *)(param_1 + 0x14) = *piVar2;" (assignment_expression "*(int *)(param_1 + 0x14) = *piVar2" (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 "*piVar2" (* "*") (identifier "piVar2"))) (; ";")) (expression_statement "uVar3 = FUN_000719e0(0x8d13);" (assignment_expression "uVar3 = FUN_000719e0(0x8d13)" (identifier "uVar3") (= "=") (call_expression "FUN_000719e0(0x8d13)" (identifier "FUN_000719e0") (argument_list "(0x8d13)" (( "(") (number_literal "0x8d13") () ")")))) (; ";")) (} "}")))) (if_statement "if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return uVar3;\n  }" (if "if") (parenthesized_expression "(local_10 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_10 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_10") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return uVar3;\n  }" ({ "{") (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (expression_statement "FUN_00116110();" (call_expression "FUN_00116110()" (identifier "FUN_00116110") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */

int function_1(type_1 *id,int flags)

{
  type_2 *puVar1;
  int var_3;
  int var_4;
  int *piVar4;
  int lineno;
  int var_1;
  int dirfd;
  int var_8;
  
  var_8 = *(int *)(var_1 + 0x14);
  var_3 = var_2((int)id[3].pMethods);
  if (var_3 == 0) {
    var_3 = 0;
    if (((type_3)id[4].pMethods & 0x80000) != 0) {
      var_4 = (*aSyscall[0x11].pCurrent)(id[8].pMethods,&dirfd);
      if (var_4 == 0) {
        var_2(dirfd);
        var_4 = (*aSyscall[1].pCurrent)(dirfd);
        if (var_4 != 0) {
          var_5((type_4 *)id,0x8d21,lineno);
        }
      }
      puVar1 = (type_2 *)((int)&id[4].pMethods + 2);
      *puVar1 = *puVar1 & 0xfff7;
    }
  }
  else {
    piVar4 = var_6();
    id[5].pMethods = (type_5 *)*piVar4;
    var_3 = var_7(0x40a,"full_fsync",(char *)id[8].pMethods,0x8d13);
  }
  if (var_8 == *(int *)(var_1 + 0x14)) {
    return var_3;
  }
                    /* WARNING: Subroutine does not return */
  var_9();
}


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

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

undefined4 MASKED(int param_1)

{
  int iVar1;
  int *piVar2;
  undefined4 uVar3;
  int in_GS_OFFSET;
  int local_14;
  int local_10;
  
  local_10 = *(int *)(in_GS_OFFSET + 0x14);
  iVar1 = fdatasync(*(int *)(param_1 + 0xc));
  if (iVar1 == 0) {
    uVar3 = 0;
    if ((*(byte *)(param_1 + 0x12) & 8) != 0) {
      iVar1 = (*(code *)PTR_FUN_0017d810)(*(undefined4 *)(param_1 + 0x20),&local_14);
      if (iVar1 == 0) {
        fdatasync(local_14);
        iVar1 = (*(code *)PTR_close_0017d750)(local_14);
        if (iVar1 != 0) {
          FUN_00071ca0();
        }
      }
      *(ushort *)(param_1 + 0x12) = *(ushort *)(param_1 + 0x12) & 0xfff7;
    }
  }
  else {
    piVar2 = __errno_location();
    *(int *)(param_1 + 0x14) = *piVar2;
    uVar3 = FUN_000719e0(0x8d13);
  }
  if (local_10 == *(int *)(in_GS_OFFSET + 0x14)) {
    return uVar3;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00116110();
}

