	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function open_device_check
_open_device_check:                     ## @open_device_check
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	_CM_OPEN_CH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%esi, %eax
	movslq	%eax, %rbx
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r13), %rax
	cmpl	$0, (%rax,%rbx,4)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	movl	%r15d, (%rax,%rbx,4)
	movq	16(%r13), %rax
	shlq	$4, %rbx
	movq	%r12, 8(%rax,%rbx)
	movq	_CM_OPEN_DAC@GOTPCREL(%rip), %rcx
	testl	%r15d, (%rcx)
	jne	LBB0_4
## %bb.3:
	movq	$0, (%rax,%rbx)
	leaq	12(%r13), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irq
	movq	_CM_REG_MISC_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_CM_ENDBDAC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_snd_cmipci_clear_bit
	movq	%r15, %rdi
	callq	_spin_unlock_irq
LBB0_4:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CM_OPEN_CH_MASK,4,2            ## @CM_OPEN_CH_MASK
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_CM_OPEN_DAC,4,2                ## @CM_OPEN_DAC
	.comm	_CM_REG_MISC_CTRL,4,2           ## @CM_REG_MISC_CTRL
	.comm	_CM_ENDBDAC,4,2                 ## @CM_ENDBDAC
	.no_dead_strip	_open_device_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function open_device_check
_open_device_check:                     ; @open_device_check
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _CM_OPEN_CH_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CM_OPEN_CH_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w23, w8, w1
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x9, [x20]
	ldr	w8, [x9, w23, sxtw #2]
	cbz	w8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mutex_unlock
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	sxtw	x8, w23
	str	w21, [x9, x8, lsl #2]
	ldr	x9, [x20, #16]
	add	x10, x9, x8, lsl #4
	str	x22, [x10, #8]
Lloh6:
	adrp	x10, _CM_OPEN_DAC@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CM_OPEN_DAC@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w21
	b.ne	LBB0_4
; %bb.3:
	lsl	x8, x8, #4
	str	xzr, [x9, x8]
	add	x21, x20, #12
	mov	x0, x21
	bl	_spin_lock_irq
Lloh9:
	adrp	x8, _CM_REG_MISC_CTRL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CM_REG_MISC_CTRL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _CM_ENDBDAC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CM_ENDBDAC@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_snd_cmipci_clear_bit
	mov	x0, x21
	bl	_spin_unlock_irq
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_CM_OPEN_CH_MASK,4,2            ; @CM_OPEN_CH_MASK
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_CM_OPEN_DAC,4,2                ; @CM_OPEN_DAC
	.comm	_CM_REG_MISC_CTRL,4,2           ; @CM_REG_MISC_CTRL
	.comm	_CM_ENDBDAC,4,2                 ; @CM_ENDBDAC
	.no_dead_strip	_open_device_check
.subsections_via_symbols
