	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_dsp_spos_destroy        ## -- Begin function cs46xx_dsp_spos_destroy
	.p2align	4, 0x90
_cs46xx_dsp_spos_destroy:               ## @cs46xx_dsp_spos_destroy
	.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	%rdi, %r14
	movq	8(%rdi), %r15
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_1
## %bb.7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	addq	$8, %r12
	cmpq	%rcx, %rbx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %rdi
	cmpq	$0, (%rdi,%r12)
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	%r12, %rdi
	callq	_cs46xx_dsp_proc_free_scb_desc
	movl	(%r15), %eax
	jmp	LBB0_5
LBB0_6:
	movq	24(%r15), %rdi
	callq	_kfree
	movl	16(%r15), %edi
	callq	_vfree
	movq	8(%r15), %rdi
	callq	_kfree
	movq	%r15, %rdi
	callq	_kfree
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mutex_unlock                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_dsp_spos_destroy        ; -- Begin function cs46xx_dsp_spos_destroy
	.p2align	2
_cs46xx_dsp_spos_destroy:               ; @cs46xx_dsp_spos_destroy
	.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, x0
	ldr	x20, [x0, #8]
	cmp	x20, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbz	x0, LBB0_2
; %bb.1:
	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
LBB0_2:
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x21, #0
	mov	x22, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	add	x21, x21, #8
	cmp	x22, w8, sxtw
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #32]
	add	x0, x9, x21
	ldr	x9, [x0]
	cbnz	x9, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_cs46xx_dsp_proc_free_scb_desc
	ldr	w8, [x20]
	b	LBB0_4
LBB0_7:
	ldr	x0, [x20, #24]
	bl	_kfree
	ldr	w0, [x20, #16]
	bl	_vfree
	ldr	x0, [x20, #8]
	bl	_kfree
	mov	x0, x20
	bl	_kfree
	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
	b	_mutex_unlock
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
