	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flush                          ## -- Begin function flush
	.p2align	4, 0x90
_flush:                                 ## @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
	cmpq	$0, 40(%rsi)
	je	LBB0_11
## %bb.1:
	movq	%rsi, %rbx
	movq	$0, 40(%rsi)
	movq	_fswritefd@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	js	LBB0_12
## %bb.2:
	movl	%edi, %r14d
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.3:
	movl	4(%rbx), %eax
	movq	_dev_bsize@GOTPCREL(%rip), %rsi
	cltd
	idivl	(%rsi)
	cmpl	%eax, %ecx
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	16(%rbx), %rdx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pfatal
LBB0_4:
	movl	$0, (%rbx)
	movl	8(%rbx), %eax
	cmpl	$129, %eax
	je	LBB0_14
## %bb.5:
	cmpl	$128, %eax
	jne	LBB0_13
## %bb.6:
	cmpq	_sblk@GOTPCREL(%rip), %rbx
	je	LBB0_8
## %bb.7:
	leaq	L_.str.4(%rip), %rdi
	movq	_sblk@GOTPCREL(%rip), %rdx
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_pfatal
LBB0_8:
	movl	32(%rbx), %esi
	movl	%r14d, %edi
	xorl	%edx, %edx
	callq	_sbput
	testl	%eax, %eax
	jne	LBB0_11
	jmp	LBB0_10
LBB0_12:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_pfatal                         ## TAILCALL
LBB0_14:
	movl	28(%rbx), %esi
	movq	_disk@GOTPCREL(%rip), %rdi
	callq	_cgput
	testl	%eax, %eax
	jne	LBB0_11
LBB0_10:
	movq	_fsmodified@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_13:
	movl	24(%rbx), %esi
	movq	16(%rbx), %rdx
	movl	4(%rbx), %ecx
	movl	%r14d, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_blwrite                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_fswritefd,8,3                  ## @fswritefd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"WRITING IN READ_ONLY MODE.\n"

L_.str.1:                               ## @.str.1
	.asciz	"WRITING %sZERO'ED BLOCK %lld TO DISK\n"

	.comm	_dev_bsize,4,2                  ## @dev_bsize
L_.str.2:                               ## @.str.2
	.space	1

L_.str.3:                               ## @.str.3
	.asciz	"PARTIALLY "

	.comm	_sblk,48,3                      ## @sblk
L_.str.4:                               ## @.str.4
	.asciz	"BUFFER %p DOES NOT MATCH SBLK %p\n"

	.comm	_fsmodified,4,2                 ## @fsmodified
	.comm	_disk,4,2                       ## @disk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flush                          ; -- Begin function flush
	.p2align	2
_flush:                                 ; @flush
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x1, #40]
	cbz	x8, LBB0_10
; %bb.1:
	mov	x20, x1
	str	xzr, [x1, #40]
Lloh0:
	adrp	x8, _fswritefd@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fswritefd@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	tbnz	x8, #63, LBB0_11
; %bb.2:
	mov	x19, x0
	ldr	w8, [x20]
	cbz	w8, LBB0_4
; %bb.3:
	ldr	w9, [x20, #4]
Lloh3:
	adrp	x10, _dev_bsize@GOTPAGE
Lloh4:
	ldr	x10, [x10, _dev_bsize@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
Lloh6:
	adrp	x11, l_.str.3@PAGE
Lloh7:
	add	x11, x11, l_.str.3@PAGEOFF
	sdiv	w9, w9, w10
Lloh8:
	adrp	x10, l_.str.2@PAGE
Lloh9:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	w8, w9
	csel	x8, x10, x11, eq
	ldr	x9, [x20, #16]
	stp	x8, x9, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pfatal
LBB0_4:
	str	wzr, [x20]
	ldr	w8, [x20, #8]
	cmp	w8, #129
	b.eq	LBB0_12
; %bb.5:
	cmp	w8, #128
	b.ne	LBB0_13
; %bb.6:
Lloh12:
	adrp	x8, _sblk@GOTPAGE
Lloh13:
	ldr	x8, [x8, _sblk@GOTPAGEOFF]
	cmp	x20, x8
	b.eq	LBB0_8
; %bb.7:
	stp	x20, x8, [sp]
Lloh14:
	adrp	x0, l_.str.4@PAGE
Lloh15:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pfatal
LBB0_8:
	ldr	w1, [x20, #32]
	mov	x0, x19
	mov	w2, #0
	bl	_sbput
	cbnz	w0, LBB0_10
LBB0_9:
Lloh16:
	adrp	x8, _fsmodified@GOTPAGE
Lloh17:
	ldr	x8, [x8, _fsmodified@GOTPAGEOFF]
	mov	w9, #1
Lloh18:
	str	w9, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_11:
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_pfatal
LBB0_12:
	ldr	w1, [x20, #28]
Lloh21:
	adrp	x0, _disk@GOTPAGE
Lloh22:
	ldr	x0, [x0, _disk@GOTPAGEOFF]
	bl	_cgput
	cbnz	w0, LBB0_10
	b	LBB0_9
LBB0_13:
	ldr	w1, [x20, #24]
	ldr	x2, [x20, #16]
	ldr	w3, [x20, #4]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_blwrite
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotStr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_fswritefd,8,3                  ; @fswritefd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"WRITING IN READ_ONLY MODE.\n"

l_.str.1:                               ; @.str.1
	.asciz	"WRITING %sZERO'ED BLOCK %lld TO DISK\n"

	.comm	_dev_bsize,4,2                  ; @dev_bsize
l_.str.2:                               ; @.str.2
	.space	1

l_.str.3:                               ; @.str.3
	.asciz	"PARTIALLY "

	.comm	_sblk,48,3                      ; @sblk
l_.str.4:                               ; @.str.4
	.asciz	"BUFFER %p DOES NOT MATCH SBLK %p\n"

	.comm	_fsmodified,4,2                 ; @fsmodified
	.comm	_disk,4,2                       ; @disk
.subsections_via_symbols
