	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_dsp_remove_scb          ## -- Begin function cs46xx_dsp_remove_scb
	.p2align	4, 0x90
_cs46xx_dsp_remove_scb:                 ## @cs46xx_dsp_remove_scb
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %r12
	movl	(%rsi), %eax
	movl	$1, %edi
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	cmpl	(%r12), %eax
	jge	LBB0_3
## %bb.2:
	leaq	(%rax,%rax,4), %rax
	shlq	$3, %rax
	addq	24(%r12), %rax
	xorl	%edi, %edi
	cmpq	%rbx, %rax
	setne	%dil
LBB0_3:
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_11
## %bb.4:
	leaq	32(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	__dsp_unlink_scb
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%rbx, %rdi
	callq	_cs46xx_dsp_proc_free_scb_desc
	xorl	%edi, %edi
	cmpl	$0, 28(%rbx)
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	jne	LBB0_11
## %bb.5:
	movl	28(%rbx), %esi
	movq	%r14, %rdi
	callq	_remove_symbol
	movq	24(%r12), %rdx
	movl	(%rbx), %eax
	movslq	%eax, %rcx
	leaq	(%rcx,%rcx,4), %rsi
	movl	$1, 24(%rdx,%rsi,8)
	movq	16(%r12), %rdx
	cmpq	%rcx, %rdx
	jbe	LBB0_7
## %bb.6:
	movq	%rcx, 16(%r12)
	movq	%rcx, %rdx
LBB0_7:
	movslq	(%r12), %rsi
	leal	-1(%rsi), %edi
	cmpl	%edi, %eax
	jne	LBB0_9
## %bb.8:
	movl	%eax, (%r12)
	movq	%rcx, %rsi
LBB0_9:
	cmpq	%rsi, %rdx
	jbe	LBB0_11
## %bb.10:
	movq	%rsi, 16(%r12)
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_i,4,2                          ## @i
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cs46xx_dsp_remove_scb          ; -- Begin function cs46xx_dsp_remove_scb
	.p2align	2
_cs46xx_dsp_remove_scb:                 ; @cs46xx_dsp_remove_scb
	.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	x22, [x0]
	ldr	w8, [x1]
	tbnz	w8, #31, LBB0_3
; %bb.1:
	ldr	w9, [x22]
	cmp	w8, w9
	b.ge	LBB0_3
; %bb.2:
	ldr	x9, [x22, #24]
	mov	w10, #40
	madd	x8, x8, x10, x9
	cmp	x8, x19
	cset	w0, ne
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_11
	b	LBB0_4
LBB0_3:
	mov	w0, #1
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_11
LBB0_4:
	add	x21, x19, #32
	mov	x0, x21
	bl	_spin_lock_irqsave
	mov	x0, x20
	mov	x1, x19
	bl	__dsp_unlink_scb
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_cs46xx_dsp_proc_free_scb_desc
	ldr	w8, [x19, #28]
	cmp	w8, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbnz	x0, LBB0_11
; %bb.5:
	ldr	w1, [x19, #28]
	mov	x0, x20
	bl	_remove_symbol
	ldr	w8, [x19]
	sxtw	x9, w8
	mov	w11, #40
	ldp	x10, x12, [x22, #16]
	smaddl	x11, w8, w11, x12
	mov	w12, #1
	str	w12, [x11, #24]
	cmp	x10, x9
	b.ls	LBB0_7
; %bb.6:
	str	x9, [x22, #16]
	mov	x10, x9
LBB0_7:
	ldrsw	x11, [x22]
	sub	w12, w11, #1
	cmp	w8, w12
	b.ne	LBB0_9
; %bb.8:
	str	w8, [x22]
	mov	x11, x9
LBB0_9:
	cmp	x10, x11
	b.ls	LBB0_11
; %bb.10:
	str	x11, [x22, #16]
LBB0_11:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_i,4,2                          ; @i
.subsections_via_symbols
