	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_rptr@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	movq	_wptr@GOTPCREL(%rip), %r13
	movq	(%r13), %rbx
	cmpq	%rsi, %rbx
	jle	LBB0_6
## %bb.1:
	movq	_wfd@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	subl	%esi, %ebx
	movl	(%r14), %edi
	movl	%ebx, %edx
	callq	_write
	cmpl	%ebx, %eax
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %r15d
	movl	(%r14), %esi
	movq	(%r12), %rdx
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_kprintf
	movl	$-1, %eax
	testl	%r15d, %r15d
	jle	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%ebx, %r15d
	jge	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%r15d, %esi
	addq	(%r12), %rsi
	movq	%rsi, (%r12)
	movq	(%r13), %rbx
	cmpq	%rsi, %rbx
	jg	LBB0_2
LBB0_6:
	movq	_Buff@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	movq	%rax, (%r12)
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rptr,8,3                       ## @rptr
	.comm	_wptr,8,3                       ## @wptr
	.comm	_wfd,4,2                        ## @wfd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write (%d, %p, %d) fail, written %d bytes, %m\n"

	.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	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x22, _rptr@GOTPAGE
Lloh1:
	ldr	x22, [x22, _rptr@GOTPAGEOFF]
	ldr	x1, [x22]
Lloh2:
	adrp	x23, _wptr@GOTPAGE
Lloh3:
	ldr	x23, [x23, _wptr@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x8, x1
	b.le	LBB0_5
; %bb.1:
Lloh4:
	adrp	x24, _wfd@GOTPAGE
Lloh5:
	ldr	x24, [x24, _wfd@GOTPAGEOFF]
Lloh6:
	adrp	x19, l_.str@PAGE
Lloh7:
	add	x19, x19, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	w20, w8, w1
	ldr	w0, [x24]
	mov	x2, x20
	bl	_write
	cmp	w0, w20
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
	ldr	w1, [x24]
	ldr	x2, [x22]
	mov	x0, x19
	mov	x3, x20
	mov	x4, x21
	bl	_kprintf
	cmp	w21, #1
	ccmp	w21, w20, #0, ge
	b.ge	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x22]
	add	x1, x8, w21, uxtw
	str	x1, [x22]
	ldr	x8, [x23]
	cmp	x8, x1
	b.gt	LBB0_2
LBB0_5:
	mov	w0, #0
Lloh8:
	adrp	x8, _Buff@GOTPAGE
Lloh9:
	ldr	x8, [x8, _Buff@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x23]
	str	x8, [x22]
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	w0, #-1
	b	LBB0_6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_rptr,8,3                       ; @rptr
	.comm	_wptr,8,3                       ; @wptr
	.comm	_wfd,4,2                        ; @wfd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write (%d, %p, %d) fail, written %d bytes, %m\n"

	.comm	_Buff,8,3                       ; @Buff
.subsections_via_symbols
