	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_seq_device_free
_snd_seq_device_free:                   ## @snd_seq_device_free
	.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	%rdi, %r15
	xorl	%edi, %edi
	testq	%r15, %r15
	sete	%dil
	callq	_snd_BUG_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_7:
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_2:
	movl	12(%r15), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_find_driver
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_lock
	leaq	8(%r15), %rdi
	callq	_list_del
	decl	4(%r14)
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_free_device
	movq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	*%rax
LBB0_5:
	movq	%r15, %rdi
	callq	_kfree
	movq	%r14, %rdi
	callq	_unlock_driver
	xorl	%ebx, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_snd_seq_device_free
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_seq_device_free
_snd_seq_device_free:                   ; @snd_seq_device_free
	.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
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_snd_BUG_ON
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_3:
	ldr	w0, [x19, #12]
	mov	w1, #0
	bl	_find_driver
	cbz	x0, LBB0_8
; %bb.4:
	mov	x20, x0
	bl	_mutex_lock
	add	x0, x19, #8
	bl	_list_del
	ldr	w8, [x20, #4]
	sub	w8, w8, #1
	str	w8, [x20, #4]
	mov	x0, x20
	bl	_mutex_unlock
	mov	x0, x19
	mov	x1, x20
	bl	_free_device
	ldr	x8, [x19]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	blr	x8
LBB0_6:
	mov	x0, x19
	bl	_kfree
	mov	x0, x20
	bl	_unlock_driver
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh2:
	adrp	x8, _ENXIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_snd_seq_device_free
.subsections_via_symbols
