	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_buffer
_write_buffer:                          ## @write_buffer
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_AUDIO_CHUNK_SIZE_NONBLOCKING@GOTPCREL(%rip), %r13
	movq	_AUDIO_MAX_RATIO@GOTPCREL(%rip), %r12
	movl	(%r12), %r14d
	imull	(%r13), %r14d
	leaq	(,%r14,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rax
	movq	%r15, %rdi
	movq	%rax, %r15
	callq	_FRAMES
	movslq	(%r13), %rdx
	movslq	(%r12), %rcx
	imulq	%rdx, %rcx
	cmpq	%rcx, %rax
	cmovbq	%rax, %rcx
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.1:
	leaq	-1(%rcx), %r8
	movl	%ecx, %eax
	andl	$3, %eax
	cmpq	$3, %r8
	jae	LBB0_3
## %bb.2:
	xorl	%edx, %edx
	jmp	LBB0_5
LBB0_3:
	movq	%rcx, %rsi
	andq	$-4, %rsi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%rbx,%rdx,8), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%r15,%rdx,4)
	movss	8(%rbx,%rdx,8), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 4(%r15,%rdx,4)
	movss	16(%rbx,%rdx,8), %xmm0          ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 8(%r15,%rdx,4)
	movss	24(%rbx,%rdx,8), %xmm0          ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, 12(%r15,%rdx,4)
	addq	$4, %rdx
	cmpq	%rdx, %rsi
	jne	LBB0_4
LBB0_5:
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	leaq	(%r15,%rdx,4), %rsi
	leaq	(%rbx,%rdx,8), %rdx
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movss	(%rdx,%rdi,8), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rsi,%rdi,4)
	incq	%rdi
	cmpq	%rdi, %rax
	jne	LBB0_7
LBB0_8:
	testq	%rcx, %rcx
	je	LBB0_16
## %bb.9:
	movl	%ecx, %edi
	andl	$3, %edi
	cmpq	$3, %r8
	jae	LBB0_11
## %bb.10:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_11:
	movq	%rcx, %rdx
	andq	$-4, %rdx
	leaq	(%r15,%r14,4), %rsi
	addq	$12, %rsi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movss	4(%rbx,%rax,8), %xmm0           ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -12(%rsi,%rax,4)
	movss	12(%rbx,%rax,8), %xmm0          ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -8(%rsi,%rax,4)
	movss	20(%rbx,%rax,8), %xmm0          ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -4(%rsi,%rax,4)
	movss	28(%rbx,%rax,8), %xmm0          ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rsi,%rax,4)
	addq	$4, %rax
	cmpq	%rax, %rdx
	jne	LBB0_12
LBB0_13:
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.14:
	leaq	(%rax,%r14), %rdx
	leaq	(%r15,%rdx,4), %rdx
	leaq	(%rbx,%rax,8), %rax
	addq	$4, %rax
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movss	(%rax,%rsi,8), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rdx,%rsi,4)
	incq	%rsi
	cmpq	%rsi, %rdi
	jne	LBB0_15
LBB0_16:
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	leaq	(%r15,%r14,4), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	$0, (%r14)
	jne	LBB0_23
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %r13
	subq	%r15, %r13
	jbe	LBB0_23
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpq	$0, 24(%r14)
	jne	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	16(%r14), %rax
	movl	(%rax), %edi
	callq	_jack_ringbuffer_write_space
	movq	%rax, %r12
	movq	16(%r14), %rax
	movl	4(%rax), %edi
	callq	_jack_ringbuffer_write_space
	movq	%rax, %rbx
	cmpq	%rax, %r12
	cmovbq	%r12, %rbx
	shrq	$2, %rbx
	cmpq	%rbx, %r13
	cmovbq	%r13, %rbx
	testq	%rbx, %rbx
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=1
	leaq	(,%rbx,4), %r12
	movq	16(%r14), %rax
	movl	(%rax), %edi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,4), %rsi
	movq	%r12, %rdx
	callq	_jack_ringbuffer_write
	movq	16(%r14), %rax
	movl	4(%rax), %edi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15,4), %rsi
	movq	%r12, %rdx
	callq	_jack_ringbuffer_write
	addq	%rbx, %r15
	jmp	LBB0_22
LBB0_23:
	shlq	$3, %r15
	jmp	LBB0_24
LBB0_19:
	xorl	%r15d, %r15d
LBB0_24:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_26
## %bb.25:
	movq	%r15, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AUDIO_CHUNK_SIZE_NONBLOCKING,4,2 ## @AUDIO_CHUNK_SIZE_NONBLOCKING
	.comm	_AUDIO_MAX_RATIO,4,2            ## @AUDIO_MAX_RATIO
	.no_dead_strip	_write_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_buffer
_write_buffer:                          ; @write_buffer
	.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
	sub	sp, sp, #16
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x22, _AUDIO_CHUNK_SIZE_NONBLOCKING@GOTPAGE
Lloh4:
	ldr	x22, [x22, _AUDIO_CHUNK_SIZE_NONBLOCKING@GOTPAGEOFF]
Lloh5:
	adrp	x24, _AUDIO_MAX_RATIO@GOTPAGE
Lloh6:
	ldr	x24, [x24, _AUDIO_MAX_RATIO@GOTPAGEOFF]
	ldr	w8, [x22]
	ldr	w9, [x24]
	mul	w23, w9, w8
	lsl	x9, x23, #3
	add	x8, x9, #15
	and	x8, x8, #0xffffffff0
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	sub	x21, x9, x8
	mov	sp, x21
	mov	x0, x2
	bl	_FRAMES
	ldrsw	x8, [x22]
	ldrsw	x9, [x24]
	mul	x8, x9, x8
	cmp	x0, x8
	csel	x22, x0, x8, lo
	cbz	x22, LBB0_16
; %bb.1:
	cmp	x22, #4
	b.hs	LBB0_3
; %bb.2:
	mov	x8, #0
	b	LBB0_6
LBB0_3:
	and	x8, x22, #0xfffffffffffffffc
	add	x9, x21, #8
	add	x10, x20, #16
	mov	x11, x8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldur	s0, [x10, #-16]
	ldur	s1, [x10, #-8]
	ldr	s2, [x10]
	ldr	s3, [x10, #8]
	stp	s0, s1, [x9, #-8]
	stp	s2, s3, [x9], #16
	add	x10, x10, #32
	subs	x11, x11, #4
	b.ne	LBB0_4
; %bb.5:
	cmp	x22, x8
	b.eq	LBB0_8
LBB0_6:
	add	x9, x20, x8, lsl #3
	sub	x10, x22, x8
	add	x8, x21, x8, lsl #2
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x9], #8
	str	s0, [x8], #4
	subs	x10, x10, #1
	b.ne	LBB0_7
LBB0_8:
	cbz	x22, LBB0_16
; %bb.9:
	cmp	x22, #4
	b.hs	LBB0_11
; %bb.10:
	mov	x8, #0
	b	LBB0_14
LBB0_11:
	and	x8, x22, #0xfffffffffffffffc
	add	x9, x21, x23, lsl #2
	add	x9, x9, #8
	add	x10, x20, #20
	mov	x11, x8
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldur	s0, [x10, #-16]
	ldur	s1, [x10, #-8]
	ldr	s2, [x10]
	ldr	s3, [x10, #8]
	stp	s0, s1, [x9, #-8]
	stp	s2, s3, [x9], #16
	add	x10, x10, #32
	subs	x11, x11, #4
	b.ne	LBB0_12
; %bb.13:
	cmp	x22, x8
	b.eq	LBB0_16
LBB0_14:
	sub	x9, x22, x8
	add	x10, x8, x23
	add	x10, x21, x10, lsl #2
	add	x8, x20, x8, lsl #3
	add	x8, x8, #4
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	s0, [x8], #8
	str	s0, [x10], #4
	subs	x9, x9, #1
	b.ne	LBB0_15
LBB0_16:
	mov	x24, #0
	add	x23, x21, x23, lsl #2
	b	LBB0_18
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x19]
	cbnz	x8, LBB0_22
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	subs	x25, x22, x24
	b.ls	LBB0_22
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_23
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	bl	_jack_ringbuffer_write_space
	mov	x20, x0
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #4]
	bl	_jack_ringbuffer_write_space
	cmp	x20, x0
	csel	x8, x20, x0, lo
	lsr	x8, x8, #2
	cmp	x25, x8
	csel	x25, x25, x8, lo
	cbz	x25, LBB0_17
; %bb.21:                               ;   in Loop: Header=BB0_18 Depth=1
	lsl	x20, x25, #2
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
	lsl	x26, x24, #2
	add	x1, x21, x26
	mov	x2, x20
	bl	_jack_ringbuffer_write
	ldr	x8, [x19, #16]
	ldr	w0, [x8, #4]
	add	x1, x23, x26
	mov	x2, x20
	bl	_jack_ringbuffer_write
	add	x24, x25, x24
	b	LBB0_17
LBB0_22:
	lsl	x0, x24, #3
	b	LBB0_24
LBB0_23:
	mov	x0, #0
LBB0_24:
	ldur	x8, [x29, #-72]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.25:
	sub	sp, x29, #64
	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
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AUDIO_CHUNK_SIZE_NONBLOCKING,4,2 ; @AUDIO_CHUNK_SIZE_NONBLOCKING
	.comm	_AUDIO_MAX_RATIO,4,2            ; @AUDIO_MAX_RATIO
	.no_dead_strip	_write_buffer
.subsections_via_symbols
