	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function switch_thread_audio_write
_switch_thread_audio_write:             ## @switch_thread_audio_write
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.1:
	movq	%rdi, %rbx
	cmpq	$0, 16(%rdi)
	je	LBB0_16
## %bb.2:
	movq	%rdx, %r12
	movq	%rsi, %r14
	cmpq	$0, 24(%rbx)
	je	LBB0_8
## %bb.3:
	movq	%rbx, %rdi
	callq	_compat_mutex_lock
	movl	4(%rbx), %edi
	callq	_fifo_write_avail
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_MIN
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	4(%rbx), %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_fifo_write
LBB0_5:
	movq	%rbx, %rdi
	callq	_compat_mutex_unlock
	jmp	LBB0_17
LBB0_8:
	testq	%r12, %r12
	je	LBB0_16
## %bb.9:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%rbx), %r13
	leaq	12(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %rdi
	subq	%r15, %rdi
	movq	%rax, %rsi
	callq	_MIN
	movq	%rax, %r14
	movl	4(%rbx), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15), %rsi
	movq	%r14, %rdx
	callq	_fifo_write
	movq	%rbx, %rdi
	callq	_compat_mutex_unlock
	addq	%r14, %r15
	cmpq	%r12, %r15
	jae	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
	cmpq	$0, 16(%rbx)
	je	LBB0_17
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_compat_mutex_lock
	movl	4(%rbx), %edi
	callq	_fifo_write_avail
	testq	%rax, %rax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%rbx, %rdi
	callq	_compat_mutex_unlock
	movq	%r13, %rdi
	callq	_compat_mutex_lock
	cmpq	$0, 16(%rbx)
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_compat_condvar_wait
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r13, %rdi
	callq	_compat_mutex_unlock
	cmpq	%r12, %r15
	jb	LBB0_15
	jmp	LBB0_17
LBB0_16:
	xorl	%r15d, %r15d
LBB0_17:
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_switch_thread_audio_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function switch_thread_audio_write
_switch_thread_audio_write:             ; @switch_thread_audio_write
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_6
; %bb.2:
	mov	x22, x2
	mov	x20, x1
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_compat_mutex_lock
	ldr	w0, [x19, #4]
	bl	_fifo_write_avail
	mov	x1, x22
	bl	_MIN
	mov	x21, x0
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w0, [x19, #4]
	mov	x1, x20
	mov	x2, x21
	bl	_fifo_write
LBB0_5:
	mov	x0, x19
	bl	_compat_mutex_unlock
	b	LBB0_7
LBB0_6:
	mov	x21, #0
LBB0_7:
	mov	x0, x21
	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_8:
	mov	x21, #0
	cbz	x22, LBB0_7
; %bb.9:
	add	x23, x19, #8
	add	x24, x19, #12
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x1, x0
	sub	x0, x22, x21
	bl	_MIN
	mov	x25, x0
	ldr	w0, [x19, #4]
	add	x1, x20, x21
	mov	x2, x25
	bl	_fifo_write
	mov	x0, x19
	bl	_compat_mutex_unlock
	add	x21, x25, x21
	cmp	x21, x22
	b.hs	LBB0_7
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_compat_mutex_lock
	ldr	w0, [x19, #4]
	bl	_fifo_write_avail
	cbnz	x0, LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x19
	bl	_compat_mutex_unlock
	mov	x0, x23
	bl	_compat_mutex_lock
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x24
	mov	x1, x23
	bl	_compat_condvar_wait
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	mov	x0, x23
	bl	_compat_mutex_unlock
	cmp	x21, x22
	b.lo	LBB0_11
	b	LBB0_7
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_switch_thread_audio_write
.subsections_via_symbols
