	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ps3_audio_write
_ps3_audio_write:                       ## @ps3_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %r12
	cmpq	$0, 16(%rdi)
	je	LBB0_3
## %bb.1:
	movl	4(%r12), %edi
	callq	_fifo_write_avail
	cmpq	%r14, %rax
	jae	LBB0_3
## %bb.2:
	xorl	%r14d, %r14d
	jmp	LBB0_7
LBB0_3:
	movl	4(%r12), %edi
	callq	_fifo_write_avail
	cmpq	%r14, %rax
	jae	LBB0_6
## %bb.4:
	leaq	8(%r12), %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_sys_lwcond_wait
	movl	4(%r12), %edi
	callq	_fifo_write_avail
	cmpq	%r14, %rax
	jb	LBB0_5
LBB0_6:
	movq	_SYS_NO_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_sys_lwmutex_lock
	movl	4(%r12), %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_fifo_write
	movq	%r12, %rdi
	callq	_sys_lwmutex_unlock
LBB0_7:
	movq	%r14, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SYS_NO_TIMEOUT,4,2             ## @SYS_NO_TIMEOUT
	.no_dead_strip	_ps3_audio_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ps3_audio_write
_ps3_audio_write:                       ; @ps3_audio_write
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	w0, [x20, #4]
	bl	_fifo_write_avail
	cmp	x0, x19
	b.hs	LBB0_3
; %bb.2:
	mov	x19, #0
	b	LBB0_7
LBB0_3:
	ldr	w0, [x20, #4]
	bl	_fifo_write_avail
	cmp	x0, x19
	b.hs	LBB0_6
; %bb.4:
	add	x22, x20, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	w1, #0
	bl	_sys_lwcond_wait
	ldr	w0, [x20, #4]
	bl	_fifo_write_avail
	cmp	x0, x19
	b.lo	LBB0_5
LBB0_6:
Lloh0:
	adrp	x8, _SYS_NO_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYS_NO_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_sys_lwmutex_lock
	ldr	w0, [x20, #4]
	mov	x1, x21
	mov	x2, x19
	bl	_fifo_write
	mov	x0, x20
	bl	_sys_lwmutex_unlock
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SYS_NO_TIMEOUT,4,2             ; @SYS_NO_TIMEOUT
	.no_dead_strip	_ps3_audio_write
.subsections_via_symbols
