	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ctl_remove_user_ctl
_snd_ctl_remove_user_ctl:               ## @snd_ctl_remove_user_ctl
	.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, %r15
	movq	(%rdi), %r14
	movq	%r14, %rdi
	callq	_down_write
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_snd_ctl_find_id
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	8(%rax), %rcx
	movq	_SNDRV_CTL_ELEM_ACCESS_USER@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	je	LBB0_6
## %bb.4:
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_11
## %bb.5:
	shlq	$4, %rdx
	xorl	%esi, %esi
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	addq	$16, %rsi
	cmpq	%rsi, %rdx
	je	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rcx,%rsi), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	cmpq	%r15, %rdi
	je	LBB0_7
## %bb.10:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_11:
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_snd_ctl_remove
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.12:
	decl	4(%r14)
	jmp	LBB0_13
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movq	%r14, %rdi
	callq	_up_write
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_SNDRV_CTL_ELEM_ACCESS_USER,4,2 ## @SNDRV_CTL_ELEM_ACCESS_USER
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.no_dead_strip	_snd_ctl_remove_user_ctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ctl_remove_user_ctl
_snd_ctl_remove_user_ctl:               ; @snd_ctl_remove_user_ctl
	.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	x21, x1
	mov	x20, x0
	ldr	x19, [x0]
	mov	x0, x19
	bl	_down_write
	mov	x0, x19
	mov	x1, x21
	bl	_snd_ctl_find_id
	cbz	x0, LBB0_8
; %bb.1:
	mov	x1, x0
	ldr	x9, [x0, #8]
	ldr	w8, [x9]
Lloh0:
	adrp	x10, _SNDRV_CTL_ELEM_ACCESS_USER@GOTPAGE
Lloh1:
	ldr	x10, [x10, _SNDRV_CTL_ELEM_ACCESS_USER@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_9
; %bb.2:
	ldr	w8, [x1]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.3:
	add	x9, x9, #8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cmp	x10, #0
	ccmp	x10, x20, #4, ne
	b.ne	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x9, x9, #16
	subs	x8, x8, #1
	b.ne	LBB0_4
LBB0_6:
	mov	x0, x19
	bl	_snd_ctl_remove
	mov	x20, x0
	tbnz	w0, #31, LBB0_12
; %bb.7:
	ldr	w8, [x19, #4]
	sub	w8, w8, #1
	str	w8, [x19, #4]
	b	LBB0_12
LBB0_8:
Lloh3:
	adrp	x8, _ENOENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh7:
	adrp	x8, _EBUSY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_12:
	mov	x0, x19
	bl	_up_write
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_SNDRV_CTL_ELEM_ACCESS_USER,4,2 ; @SNDRV_CTL_ELEM_ACCESS_USER
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.no_dead_strip	_snd_ctl_remove_user_ctl
.subsections_via_symbols
