	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_emu10k1_efx_playback_trigger
_snd_emu10k1_efx_playback_trigger:      ## @snd_emu10k1_efx_playback_trigger
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	callq	_snd_pcm_substream_chip
	movq	%rax, %r13
	movq	(%r15), %rax
	movq	(%rax), %r15
	movq	%r13, %rdi
	callq	_spin_lock
	addl	$-128, %r14d
	cmpl	$5, %r14d
	ja	LBB0_18
## %bb.1:
	movl	$35, %eax
	btl	%r14d, %eax
	jae	LBB0_2
## %bb.14:
	movl	$0, (%r15)
	movq	_NUM_EFX_PLAYBACK@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_17
## %bb.15:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r13, %rdi
	callq	_snd_emu10k1_playback_stop_voice
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_16
LBB0_17:
	movl	4(%r15), %esi
	movq	%r13, %rdi
	callq	_snd_emu10k1_playback_stop_voice
	xorl	%r14d, %r14d
	jmp	LBB0_19
LBB0_2:
	movl	$24, %eax
	btl	%r14d, %eax
	jb	LBB0_7
## %bb.3:
	movq	_NUM_EFX_PLAYBACK@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %edx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_snd_emu10k1_playback_invalidate_cache
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movl	4(%r15), %edx
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_snd_emu10k1_playback_invalidate_cache
LBB0_7:
	movl	4(%r15), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_snd_emu10k1_playback_prepare_voice
	movq	8(%r15), %rax
	movl	(%rax), %esi
	movq	8(%r13), %r8
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_snd_emu10k1_playback_prepare_voice
	movq	_NUM_EFX_PLAYBACK@GOTPCREL(%rip), %r12
	cmpl	$2, (%r12)
	jl	LBB0_10
## %bb.8:
	movl	$1, %r14d
	movl	$4, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx), %esi
	movq	8(%r13), %r8
	addq	%rbx, %r8
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_snd_emu10k1_playback_prepare_voice
	incq	%r14
	movslq	(%r12), %rax
	addq	$4, %rbx
	cmpq	%rax, %r14
	jl	LBB0_9
LBB0_10:
	movq	8(%r15), %rax
	movl	(%rax), %esi
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_snd_emu10k1_playback_trigger_voice
	movl	4(%r15), %esi
	movq	%r13, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	callq	_snd_emu10k1_playback_trigger_voice
	cmpl	$2, (%r12)
	jl	LBB0_13
## %bb.11:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movl	(%rax,%rbx,4), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_snd_emu10k1_playback_trigger_voice
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_12
LBB0_13:
	movl	$1, (%r15)
	jmp	LBB0_19
LBB0_18:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_19:
	movq	%r13, %rdi
	callq	_spin_unlock
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_EFX_PLAYBACK,4,2           ## @NUM_EFX_PLAYBACK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_snd_emu10k1_efx_playback_trigger
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_emu10k1_efx_playback_trigger
_snd_emu10k1_efx_playback_trigger:      ; @snd_emu10k1_efx_playback_trigger
	.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
	mov	x20, x1
	mov	x21, x0
	bl	_snd_pcm_substream_chip
	mov	x19, x0
	ldr	x8, [x21]
	ldr	x21, [x8]
	bl	_spin_lock
	sub	w8, w20, #128
	cmp	w8, #5
	b.hi	LBB0_18
; %bb.1:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #35
Lloh0:
	adrp	x20, _NUM_EFX_PLAYBACK@GOTPAGE
Lloh1:
	ldr	x20, [x20, _NUM_EFX_PLAYBACK@GOTPAGEOFF]
	tst	w8, w9
	b.eq	LBB0_6
; %bb.2:
	str	wzr, [x21]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x22, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	w1, [x8, x22, lsl #2]
	mov	x0, x19
	bl	_snd_emu10k1_playback_stop_voice
	add	x22, x22, #1
	ldrsw	x8, [x20]
	cmp	x22, x8
	b.lt	LBB0_4
LBB0_5:
	ldr	w1, [x21, #4]
	mov	x0, x19
	bl	_snd_emu10k1_playback_stop_voice
	mov	w20, #0
	b	LBB0_19
LBB0_6:
	tst	w8, #0x18
	b.ne	LBB0_11
; %bb.7:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.8:
	mov	x22, #0
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	w2, [x8, x22, lsl #2]
	mov	x0, x19
	mov	w1, #0
	bl	_snd_emu10k1_playback_invalidate_cache
	add	x22, x22, #1
	ldrsw	x8, [x20]
	cmp	x22, x8
	b.lt	LBB0_9
LBB0_10:
	ldr	w2, [x21, #4]
	mov	x0, x19
	mov	w1, #1
	bl	_snd_emu10k1_playback_invalidate_cache
LBB0_11:
	ldr	w1, [x21, #4]
	mov	x0, x19
	mov	w2, #1
	mov	w3, #1
	mov	x4, #0
	bl	_snd_emu10k1_playback_prepare_voice
	ldr	x8, [x21, #8]
	ldr	w1, [x8]
	ldr	x4, [x19, #8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_snd_emu10k1_playback_prepare_voice
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_14
; %bb.12:
	mov	w22, #1
	mov	w23, #4
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	w1, [x8, x23]
	ldr	x8, [x19, #8]
	add	x4, x8, x23
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_snd_emu10k1_playback_prepare_voice
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x23, x23, #4
	cmp	x22, x8
	b.lt	LBB0_13
LBB0_14:
	ldr	x8, [x21, #8]
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_snd_emu10k1_playback_trigger_voice
	ldr	w1, [x21, #4]
	mov	w22, #1
	mov	x0, x19
	mov	w2, #1
	mov	w3, #1
	bl	_snd_emu10k1_playback_trigger_voice
	ldr	w8, [x20]
	cmp	w8, #2
	b.lt	LBB0_17
; %bb.15:
	mov	w23, #1
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	ldr	w1, [x8, x23, lsl #2]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	bl	_snd_emu10k1_playback_trigger_voice
	add	x23, x23, #1
	ldrsw	x8, [x20]
	cmp	x23, x8
	b.lt	LBB0_16
LBB0_17:
	mov	w20, #0
	str	w22, [x21]
	b	LBB0_19
LBB0_18:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_19:
	mov	x0, x19
	bl	_spin_unlock
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_EFX_PLAYBACK,4,2           ; @NUM_EFX_PLAYBACK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_snd_emu10k1_efx_playback_trigger
.subsections_via_symbols
