	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_hwdep_dev_disconnect
_snd_hwdep_dev_disconnect:              ## @snd_hwdep_dev_disconnect
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	(%rdi), %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movq	_register_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	_snd_hwdep_search
	cmpq	%rbx, %rax
	je	LBB0_5
## %bb.4:
	movq	_register_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	movq	%rbx, %rdi
	callq	_mutex_lock
	leaq	32(%rbx), %rdi
	callq	_wake_up
	movq	_SNDRV_DEVICE_TYPE_HWDEP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %edx
	movl	12(%rbx), %esi
	callq	_snd_unregister_device
	leaq	4(%rbx), %rdi
	callq	_list_del_init
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movq	_register_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_register_mutex,4,2             ## @register_mutex
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SNDRV_DEVICE_TYPE_HWDEP,4,2    ## @SNDRV_DEVICE_TYPE_HWDEP
	.no_dead_strip	_snd_hwdep_dev_disconnect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_hwdep_dev_disconnect
_snd_hwdep_dev_disconnect:              ; @snd_hwdep_dev_disconnect
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x19, [x0]
	cmp	x19, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _ENXIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
Lloh2:
	adrp	x0, _register_mutex@GOTPAGE
Lloh3:
	ldr	x0, [x0, _register_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldp	w1, w0, [x19, #8]
	bl	_snd_hwdep_search
	cmp	x0, x19
	b.eq	LBB0_6
; %bb.3:
Lloh4:
	adrp	x0, _register_mutex@GOTPAGE
Lloh5:
	ldr	x0, [x0, _register_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	bl	_mutex_lock
	add	x0, x19, #32
	bl	_wake_up
Lloh8:
	adrp	x8, _SNDRV_DEVICE_TYPE_HWDEP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SNDRV_DEVICE_TYPE_HWDEP@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldp	w2, w1, [x19, #8]
	bl	_snd_unregister_device
	add	x0, x19, #4
	bl	_list_del_init
	mov	x0, x19
	bl	_mutex_unlock
Lloh11:
	adrp	x0, _register_mutex@GOTPAGE
Lloh12:
	ldr	x0, [x0, _register_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_register_mutex,4,2             ; @register_mutex
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SNDRV_DEVICE_TYPE_HWDEP,4,2    ; @SNDRV_DEVICE_TYPE_HWDEP
	.no_dead_strip	_snd_hwdep_dev_disconnect
.subsections_via_symbols
