	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_file_flush                     ## -- Begin function file_flush
	.p2align	4, 0x90
_file_flush:                            ## @file_flush
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testl	%edx, %edx
	je	LBB0_6
## %bb.1:
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$-1, %esi
	callq	_lseek
	testq	%rax, %rax
	js	LBB0_2
## %bb.3:
	leaq	_file_flush.blnk(%rip), %rsi
	movl	%ebx, %edi
	movl	$1, %edx
	callq	_write
	testq	%rax, %rax
	js	LBB0_4
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rdx
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edi
	movq	%r14, %rcx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_syswarn                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_file_flush.blnk,2,0 ## @file_flush.blnk
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed seek on file %s"

L_.str.1:                               ## @.str.1
	.asciz	"Failed write to file %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_file_flush                     ; -- Begin function file_flush
	.p2align	2
_file_flush:                            ; @file_flush
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	w2, LBB0_3
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #-1
	bl	_lseek
	tbnz	x0, #63, LBB0_4
; %bb.2:
Lloh3:
	adrp	x1, _file_flush.blnk@PAGE
Lloh4:
	add	x1, x1, _file_flush.blnk@PAGEOFF
	mov	x0, x20
	mov	w2, #1
	bl	_write
	tbnz	x0, #63, LBB0_5
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_6:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	w0, #1
	mov	x3, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_syswarn
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_file_flush.blnk,2,0 ; @file_flush.blnk
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed seek on file %s"

l_.str.1:                               ; @.str.1
	.asciz	"Failed write to file %s"

.subsections_via_symbols
