	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function writeout
_writeout:                              ## @writeout
	.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	%rsi, %rbx
	movq	_bytes_written@GOTPCREL(%rip), %rax
	addq	%rsi, (%rax)
	movq	%rdi, %r15
	movq	_idx_crc32_complement@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	callq	_crc32_partial
	movl	%eax, (%r14)
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.1:
	movq	_IO_BUFFSIZE@GOTPCREL(%rip), %r13
	movq	_wptr@GOTPCREL(%rip), %r14
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %eax
	movq	_io_buff@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movl	(%r14), %edi
	subl	%edi, %eax
	movslq	%eax, %rbx
	cmpq	%rbx, %r12
	cmovbl	%r12d, %ebx
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	movslq	%ebx, %rax
	addl	%eax, (%r14)
	subq	%rax, %r12
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	%rax, %r15
	xorl	%eax, %eax
	callq	_flushout
	jmp	LBB0_2
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bytes_written,8,3              ## @bytes_written
	.comm	_idx_crc32_complement,4,2       ## @idx_crc32_complement
	.comm	_io_buff,4,2                    ## @io_buff
	.comm	_IO_BUFFSIZE,4,2                ## @IO_BUFFSIZE
	.comm	_wptr,4,2                       ## @wptr
	.no_dead_strip	_writeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function writeout
_writeout:                              ; @writeout
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _bytes_written@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bytes_written@GOTPAGEOFF]
	ldr	x9, [x8]
	add	x9, x9, x1
	str	x9, [x8]
Lloh2:
	adrp	x21, _idx_crc32_complement@GOTPAGE
Lloh3:
	ldr	x21, [x21, _idx_crc32_complement@GOTPAGEOFF]
	ldr	w2, [x21]
	bl	_crc32_partial
	str	w0, [x21]
	cbz	x19, LBB0_4
; %bb.1:
Lloh4:
	adrp	x22, _io_buff@GOTPAGE
Lloh5:
	ldr	x22, [x22, _io_buff@GOTPAGEOFF]
Lloh6:
	adrp	x23, _IO_BUFFSIZE@GOTPAGE
Lloh7:
	ldr	x23, [x23, _IO_BUFFSIZE@GOTPAGEOFF]
	mov	x24, x19
Lloh8:
	adrp	x25, _wptr@GOTPAGE
Lloh9:
	ldr	x25, [x25, _wptr@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x22]
	ldr	w9, [x23]
	ldr	w0, [x25]
	add	w8, w9, w8
	sub	w8, w8, w0
	cmp	x24, w8, sxtw
	csel	w21, w24, w8, lo
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
	sxtw	x8, w21
	ldr	w9, [x25]
	add	w9, w21, w9
	str	w9, [x25]
	subs	x24, x24, x8
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x20, x20, x8
	bl	_flushout
	b	LBB0_2
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_bytes_written,8,3              ; @bytes_written
	.comm	_idx_crc32_complement,4,2       ; @idx_crc32_complement
	.comm	_io_buff,4,2                    ; @io_buff
	.comm	_IO_BUFFSIZE,4,2                ; @IO_BUFFSIZE
	.comm	_wptr,4,2                       ; @wptr
	.no_dead_strip	_writeout
.subsections_via_symbols
