	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flushout
_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), %r15
	movq	(%r15), %rax
	movq	_wptr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rbx
	cmpq	%rax, %rbx
	jle	LBB0_7
## %bb.1:
	movq	_newidx_fds@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_7
## %bb.2:
	subl	%eax, %ebx
	xorl	%r12d, %r12d
	movq	_newidx_fd@GOTPCREL(%rip), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movslq	(%r13), %rax
	cmpq	%rax, %r12
	jge	LBB0_7
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movl	(%rax,%r12,4), %edi
	testl	%edi, %edi
	js	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r15), %rsi
	movl	%ebx, %edx
	callq	_write
	cmpl	%ebx, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_filename_newidx@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%r12,4), %esi
	leaq	L_.str(%rip), %rdi
	movl	%eax, %edx
	movl	%ebx, %ecx
	callq	_kprintf
	movq	(%r14), %rax
	movl	(%rax,%r12,4), %edi
	callq	_close
	movq	(%r14), %rax
	movl	$-1, (%rax,%r12,4)
	jmp	LBB0_6
LBB0_7:
	movq	_io_buff@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_wptr@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movq	%rax, (%r15)
	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	_newidx_fds,4,2                 ## @newidx_fds
	.comm	_newidx_fd,8,3                  ## @newidx_fd
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Write to %s failed (%d of %d) bytes written. %m\n"

	.comm	_filename_newidx,8,3            ## @filename_newidx
	.comm	_io_buff,8,3                    ## @io_buff
	.no_dead_strip	_flushout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flushout
_flushout:                              ; @flushout
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x21, _rptr@GOTPAGE
Lloh1:
	ldr	x21, [x21, _rptr@GOTPAGEOFF]
	ldr	x8, [x21]
Lloh2:
	adrp	x22, _wptr@GOTPAGE
Lloh3:
	ldr	x22, [x22, _wptr@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x9, x8
	b.le	LBB0_7
; %bb.1:
Lloh4:
	adrp	x23, _newidx_fds@GOTPAGE
Lloh5:
	ldr	x23, [x23, _newidx_fds@GOTPAGEOFF]
	ldr	w10, [x23]
	cmp	w10, #1
	b.lt	LBB0_7
; %bb.2:
	mov	x24, #0
Lloh6:
	adrp	x25, _newidx_fd@GOTPAGE
Lloh7:
	ldr	x25, [x25, _newidx_fd@GOTPAGEOFF]
	sub	w19, w9, w8
Lloh8:
	adrp	x26, _filename_newidx@GOTPAGE
Lloh9:
	ldr	x26, [x26, _filename_newidx@GOTPAGEOFF]
	mov	w27, #-1
Lloh10:
	adrp	x20, l_.str@PAGE
Lloh11:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x24, x24, #1
	ldrsw	x8, [x23]
	cmp	x24, x8
	b.ge	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	w0, [x8, x24, lsl #2]
	tbnz	w0, #31, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x1, [x21]
	mov	x2, x19
	bl	_write
	cmp	w0, w19
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x0
	ldr	x8, [x26]
	lsl	x28, x24, #2
	ldr	w1, [x8, x28]
	mov	x0, x20
	mov	x3, x19
	bl	_kprintf
	ldr	x8, [x25]
	ldr	w0, [x8, x28]
	bl	_close
	ldr	x8, [x25]
	str	w27, [x8, x28]
	b	LBB0_3
LBB0_7:
Lloh12:
	adrp	x8, _io_buff@GOTPAGE
Lloh13:
	ldr	x8, [x8, _io_buff@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x22]
	str	x8, [x21]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_rptr,8,3                       ; @rptr
	.comm	_wptr,8,3                       ; @wptr
	.comm	_newidx_fds,4,2                 ; @newidx_fds
	.comm	_newidx_fd,8,3                  ; @newidx_fd
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Write to %s failed (%d of %d) bytes written. %m\n"

	.comm	_filename_newidx,8,3            ; @filename_newidx
	.comm	_io_buff,8,3                    ; @io_buff
	.no_dead_strip	_flushout
.subsections_via_symbols
