	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function snd_ad1816a_open
_snd_ad1816a_open:                      ## @snd_ad1816a_open
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	testl	%r15d, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_5
LBB0_2:
	movq	_AD1816A_MODE_OPEN@GOTPCREL(%rip), %rax
	andl	(%rax), %r15d
	leal	-128(%r15), %eax
	cmpl	$2, %eax
	ja	LBB0_4
## %bb.3:
	cltq
	leaq	l_switch.table.snd_ad1816a_open(%rip), %rcx
	movq	(%rcx,%rax,8), %rcx
	leaq	l_switch.table.snd_ad1816a_open.1(%rip), %rdx
	movq	(%rdx,%rax,8), %r12
	movq	_AD1816A_INTERRUPT_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_snd_ad1816a_out_mask
	movq	_AD1816A_INTERRUPT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$65535, %ecx                    ## imm = 0xFFFF
	callq	_snd_ad1816a_write_mask
LBB0_4:
	orl	%r15d, (%rbx)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AD1816A_MODE_OPEN,4,2          ## @AD1816A_MODE_OPEN
	.comm	_AD1816A_INTERRUPT_STATUS,4,2   ## @AD1816A_INTERRUPT_STATUS
	.comm	_AD1816A_PLAYBACK_IRQ_PENDING,4,2 ## @AD1816A_PLAYBACK_IRQ_PENDING
	.comm	_AD1816A_INTERRUPT_ENABLE,4,2   ## @AD1816A_INTERRUPT_ENABLE
	.comm	_AD1816A_PLAYBACK_IRQ_ENABLE,4,2 ## @AD1816A_PLAYBACK_IRQ_ENABLE
	.comm	_AD1816A_CAPTURE_IRQ_PENDING,4,2 ## @AD1816A_CAPTURE_IRQ_PENDING
	.comm	_AD1816A_CAPTURE_IRQ_ENABLE,4,2 ## @AD1816A_CAPTURE_IRQ_ENABLE
	.comm	_AD1816A_TIMER_IRQ_PENDING,4,2  ## @AD1816A_TIMER_IRQ_PENDING
	.comm	_AD1816A_TIMER_IRQ_ENABLE,4,2   ## @AD1816A_TIMER_IRQ_ENABLE
	.no_dead_strip	_snd_ad1816a_open
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.snd_ad1816a_open
l_switch.table.snd_ad1816a_open:
	.quad	_AD1816A_TIMER_IRQ_PENDING
	.quad	_AD1816A_PLAYBACK_IRQ_PENDING
	.quad	_AD1816A_CAPTURE_IRQ_PENDING

	.p2align	3                               ## @switch.table.snd_ad1816a_open.1
l_switch.table.snd_ad1816a_open.1:
	.quad	_AD1816A_TIMER_IRQ_ENABLE
	.quad	_AD1816A_PLAYBACK_IRQ_ENABLE
	.quad	_AD1816A_CAPTURE_IRQ_ENABLE

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function snd_ad1816a_open
_snd_ad1816a_open:                      ; @snd_ad1816a_open
	.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
	add	x19, x0, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
	tst	w8, w21
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
Lloh0:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
Lloh3:
	adrp	x8, _AD1816A_MODE_OPEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AD1816A_MODE_OPEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w21, w8, w21
	sub	w8, w21, #128
	cmp	w8, #2
	b.hi	LBB0_4
; %bb.3:
	sbfiz	x8, x8, #3, #32
Lloh6:
	adrp	x9, l_switch.table.snd_ad1816a_open@PAGE
Lloh7:
	add	x9, x9, l_switch.table.snd_ad1816a_open@PAGEOFF
	ldr	x9, [x9, x8]
Lloh8:
	adrp	x10, l_switch.table.snd_ad1816a_open.1@PAGE
Lloh9:
	add	x10, x10, l_switch.table.snd_ad1816a_open.1@PAGEOFF
	ldr	x22, [x10, x8]
Lloh10:
	adrp	x8, _AD1816A_INTERRUPT_STATUS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AD1816A_INTERRUPT_STATUS@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldr	w2, [x9]
	mov	x0, x20
	mov	w3, #0
	bl	_snd_ad1816a_out_mask
Lloh13:
	adrp	x8, _AD1816A_INTERRUPT_ENABLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AD1816A_INTERRUPT_ENABLE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	w2, [x22]
	mov	x0, x20
	mov	w3, #65535
	bl	_snd_ad1816a_write_mask
LBB0_4:
	ldr	w8, [x20]
	orr	w8, w8, w21
	str	w8, [x20]
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_5:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AD1816A_MODE_OPEN,4,2          ; @AD1816A_MODE_OPEN
	.comm	_AD1816A_INTERRUPT_STATUS,4,2   ; @AD1816A_INTERRUPT_STATUS
	.comm	_AD1816A_PLAYBACK_IRQ_PENDING,4,2 ; @AD1816A_PLAYBACK_IRQ_PENDING
	.comm	_AD1816A_INTERRUPT_ENABLE,4,2   ; @AD1816A_INTERRUPT_ENABLE
	.comm	_AD1816A_PLAYBACK_IRQ_ENABLE,4,2 ; @AD1816A_PLAYBACK_IRQ_ENABLE
	.comm	_AD1816A_CAPTURE_IRQ_PENDING,4,2 ; @AD1816A_CAPTURE_IRQ_PENDING
	.comm	_AD1816A_CAPTURE_IRQ_ENABLE,4,2 ; @AD1816A_CAPTURE_IRQ_ENABLE
	.comm	_AD1816A_TIMER_IRQ_PENDING,4,2  ; @AD1816A_TIMER_IRQ_PENDING
	.comm	_AD1816A_TIMER_IRQ_ENABLE,4,2   ; @AD1816A_TIMER_IRQ_ENABLE
	.no_dead_strip	_snd_ad1816a_open
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.snd_ad1816a_open
l_switch.table.snd_ad1816a_open:
	.quad	_AD1816A_TIMER_IRQ_PENDING
	.quad	_AD1816A_PLAYBACK_IRQ_PENDING
	.quad	_AD1816A_CAPTURE_IRQ_PENDING

	.p2align	3                               ; @switch.table.snd_ad1816a_open.1
l_switch.table.snd_ad1816a_open.1:
	.quad	_AD1816A_TIMER_IRQ_ENABLE
	.quad	_AD1816A_PLAYBACK_IRQ_ENABLE
	.quad	_AD1816A_CAPTURE_IRQ_ENABLE

.subsections_via_symbols
