	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_dsp_destroy_pcm_channel ## -- Begin function cs46xx_dsp_destroy_pcm_channel
	.p2align	4, 0x90
_cs46xx_dsp_destroy_pcm_channel:        ## @cs46xx_dsp_destroy_pcm_channel
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %r15
	movl	$1, %edi
	cmpq	$0, 40(%rsi)
	je	LBB0_3
## %bb.1:
	cmpq	$0, (%r15)
	jle	LBB0_3
## %bb.2:
	movq	16(%rbx), %rax
	xorl	%edi, %edi
	cmpq	$0, (%rax)
	setle	%dil
LBB0_3:
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_7
## %bb.4:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	$1, (%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movq	16(%rbx), %rax
	decq	(%rax)
	decq	(%r15)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	24(%rbx), %rsi
	movq	%r14, %rdi
	callq	_cs46xx_dsp_remove_scb
	movq	16(%rbx), %rsi
	cmpq	$0, (%rsi)
	jne	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	callq	_cs46xx_dsp_remove_scb
	movq	8(%rbx), %rax
	movq	_DSP_MAX_SRC_NR@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setae	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	16(%r15), %rax
	movq	8(%rbx), %rcx
	movq	$0, (%rax,%rcx,8)
	decl	8(%r15)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSP_MAX_SRC_NR,8,3             ## @DSP_MAX_SRC_NR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_dsp_destroy_pcm_channel ; -- Begin function cs46xx_dsp_destroy_pcm_channel
	.p2align	2
_cs46xx_dsp_destroy_pcm_channel:        ; @cs46xx_dsp_destroy_pcm_channel
	.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, x1
	mov	x20, x0
	ldr	x21, [x0, #8]
	ldr	x8, [x1, #40]
	cbz	x8, LBB0_3
; %bb.1:
	ldr	x8, [x21]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.2:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cmp	x8, #1
	cset	w0, lt
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_7
	b	LBB0_4
LBB0_3:
	mov	w0, #1
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_7
LBB0_4:
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	w8, #1
	str	w8, [x19]
	stp	xzr, xzr, [x19, #32]
	ldr	x8, [x19, #16]
	ldr	x9, [x8]
	sub	x9, x9, #1
	str	x9, [x8]
	ldr	x8, [x21]
	sub	x8, x8, #1
	str	x8, [x21]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	x1, [x19, #24]
	mov	x0, x20
	bl	_cs46xx_dsp_remove_scb
	ldr	x1, [x19, #16]
	ldr	x8, [x1]
	cbnz	x8, LBB0_7
; %bb.5:
	mov	x0, x20
	bl	_cs46xx_dsp_remove_scb
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _DSP_MAX_SRC_NR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DSP_MAX_SRC_NR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, hs
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_7
; %bb.6:
	ldr	x8, [x21, #16]
	ldr	x9, [x19, #8]
	str	xzr, [x8, x9, lsl #3]
	ldr	w8, [x21, #8]
	sub	w8, w8, #1
	str	w8, [x21, #8]
LBB0_7:
	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	_DSP_MAX_SRC_NR,8,3             ; @DSP_MAX_SRC_NR
.subsections_via_symbols
