	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsnd_fill_buffer
_rsnd_fill_buffer:                      ## @rsnd_fill_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 16(%rdi)
	je	LBB0_5
## %bb.1:
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %r12
	leaq	L_.str.1(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rbx), %edi
	callq	_slock_lock
	movl	12(%rbx), %edi
	callq	_fifo_write_avail
	movq	%rax, %r15
	movl	4(%rbx), %edi
	callq	_slock_unlock
	cmpq	%r14, %r15
	jae	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	8(%rbx), %edi
	callq	_slock_lock
	movl	(%rbx), %edi
	callq	_scond_signal
	movq	%r12, %rdi
	callq	_RSD_DEBUG
	movl	(%rbx), %edi
	movl	8(%rbx), %esi
	callq	_scond_wait
	movq	%r13, %rdi
	callq	_RSD_DEBUG
	movl	8(%rbx), %edi
	callq	_slock_unlock
	cmpl	$0, 16(%rbx)
	jne	LBB0_2
LBB0_5:
	xorl	%r14d, %r14d
	jmp	LBB0_6
LBB0_3:
	movl	4(%rbx), %edi
	callq	_slock_lock
	movl	12(%rbx), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_fifo_write
	movl	4(%rbx), %edi
	callq	_slock_unlock
	movl	(%rbx), %edi
	callq	_scond_signal
LBB0_6:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[RSound] rsnd_fill_buffer: Going to sleep.\n"

L_.str.1:                               ## @.str.1
	.asciz	"[RSound] rsnd_fill_buffer: Woke up.\n"

	.no_dead_strip	_rsnd_fill_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsnd_fill_buffer
_rsnd_fill_buffer:                      ; @rsnd_fill_buffer
	.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
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x22, l_.str@PAGE
Lloh1:
	add	x22, x22, l_.str@PAGEOFF
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #4]
	bl	_slock_lock
	ldr	w0, [x20, #12]
	bl	_fifo_write_avail
	mov	x24, x0
	ldr	w0, [x20, #4]
	bl	_slock_unlock
	cmp	x24, x19
	b.hs	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x20, #8]
	bl	_slock_lock
	ldr	w0, [x20]
	bl	_scond_signal
	mov	x0, x22
	bl	_RSD_DEBUG
	ldr	w0, [x20]
	ldr	w1, [x20, #8]
	bl	_scond_wait
	mov	x0, x23
	bl	_RSD_DEBUG
	ldr	w0, [x20, #8]
	bl	_slock_unlock
	ldr	w8, [x20, #16]
	cbnz	w8, LBB0_2
LBB0_4:
	mov	x19, #0
	b	LBB0_6
LBB0_5:
	ldr	w0, [x20, #4]
	bl	_slock_lock
	ldr	w0, [x20, #12]
	mov	x1, x21
	mov	x2, x19
	bl	_fifo_write
	ldr	w0, [x20, #4]
	bl	_slock_unlock
	ldr	w0, [x20]
	bl	_scond_signal
LBB0_6:
	mov	x0, x19
	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
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[RSound] rsnd_fill_buffer: Going to sleep.\n"

l_.str.1:                               ; @.str.1
	.asciz	"[RSound] rsnd_fill_buffer: Woke up.\n"

	.no_dead_strip	_rsnd_fill_buffer
.subsections_via_symbols
