	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flushout                       ## -- Begin function flushout
	.p2align	4, 0x90
_flushout:                              ## @flushout
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_wptr@GOTPCREL(%rip), %r14
	movq	(%r14), %rbx
	movq	_wptr0@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	cmpq	%rax, %rbx
	jle	LBB0_2
## %bb.1:
	movl	%ebx, %ecx
	subl	%eax, %ecx
	movq	_write_pos@GOTPCREL(%rip), %rax
	addl	%ecx, (%rax)
	movq	_metafile_pos@GOTPCREL(%rip), %rax
	addl	%ecx, (%rax)
LBB0_2:
	movq	_rptr@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	cmpq	%rsi, %rbx
	jle	LBB0_6
## %bb.3:
	subl	%esi, %ebx
	movq	_newidx_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%edi, %edi
	jle	LBB0_5
## %bb.4:
	movl	%ebx, %edx
	callq	_write
	xorl	%edi, %edi
	cmpl	%ebx, %eax
	sete	%dil
	callq	_assert
	jmp	LBB0_6
LBB0_5:
	movq	_SWS@GOTPCREL(%rip), %rdi
	movl	%ebx, %edx
	callq	_kfs_sws_write
LBB0_6:
	movq	_Buff@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r15)
	movq	%rax, (%r14)
	movq	%rax, (%r12)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_wptr,8,3                       ## @wptr
	.comm	_wptr0,8,3                      ## @wptr0
	.comm	_write_pos,4,2                  ## @write_pos
	.comm	_metafile_pos,4,2               ## @metafile_pos
	.comm	_rptr,8,3                       ## @rptr
	.comm	_newidx_fd,4,2                  ## @newidx_fd
	.comm	_SWS,4,2                        ## @SWS
	.comm	_Buff,8,3                       ## @Buff
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_flushout                       ; -- Begin function flushout
	.p2align	2
_flushout:                              ; @flushout
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
Lloh0:
	adrp	x20, _wptr@GOTPAGE
Lloh1:
	ldr	x20, [x20, _wptr@GOTPAGEOFF]
	ldr	x8, [x20]
Lloh2:
	adrp	x21, _wptr0@GOTPAGE
Lloh3:
	ldr	x21, [x21, _wptr0@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.le	LBB0_2
; %bb.1:
Lloh4:
	adrp	x10, _write_pos@GOTPAGE
Lloh5:
	ldr	x10, [x10, _write_pos@GOTPAGEOFF]
	ldr	w11, [x10]
	sub	w9, w8, w9
	add	w11, w11, w9
	str	w11, [x10]
Lloh6:
	adrp	x10, _metafile_pos@GOTPAGE
Lloh7:
	ldr	x10, [x10, _metafile_pos@GOTPAGEOFF]
	ldr	w11, [x10]
	add	w9, w11, w9
	str	w9, [x10]
LBB0_2:
Lloh8:
	adrp	x22, _rptr@GOTPAGE
Lloh9:
	ldr	x22, [x22, _rptr@GOTPAGEOFF]
	ldr	x1, [x22]
	cmp	x8, x1
	b.le	LBB0_6
; %bb.3:
	sub	w19, w8, w1
Lloh10:
	adrp	x8, _newidx_fd@GOTPAGE
Lloh11:
	ldr	x8, [x8, _newidx_fd@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.4:
	mov	x2, x19
	bl	_write
	cmp	w0, w19
	cset	w0, eq
	bl	_assert
	b	LBB0_6
LBB0_5:
Lloh13:
	adrp	x0, _SWS@GOTPAGE
Lloh14:
	ldr	x0, [x0, _SWS@GOTPAGEOFF]
	mov	x2, x19
	bl	_kfs_sws_write
LBB0_6:
Lloh15:
	adrp	x8, _Buff@GOTPAGE
Lloh16:
	ldr	x8, [x8, _Buff@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	x8, [x21]
	str	x8, [x20]
	str	x8, [x22]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_wptr,8,3                       ; @wptr
	.comm	_wptr0,8,3                      ; @wptr0
	.comm	_write_pos,4,2                  ; @write_pos
	.comm	_metafile_pos,4,2               ; @metafile_pos
	.comm	_rptr,8,3                       ; @rptr
	.comm	_newidx_fd,4,2                  ; @newidx_fd
	.comm	_SWS,4,2                        ; @SWS
	.comm	_Buff,8,3                       ; @Buff
.subsections_via_symbols
