	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ad1848_trigger
_ad1848_trigger:                        ## @ad1848_trigger
	.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, %ebx
	movq	_audio_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%edi, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax), %r12
	movq	8(%rax), %r15
	leaq	4(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	andl	(%r15), %ebx
	movq	%r15, %rdi
	movl	$9, %esi
	callq	_ad_read
	movl	(%r12), %edx
	movq	_OPEN_READ@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	je	LBB0_1
## %bb.2:
	movq	_PCM_ENABLE_INPUT@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_4
## %bb.3:
	movl	%eax, %ecx
	orb	$2, %cl
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %ecx
	jmp	LBB0_5
LBB0_4:
	movl	%eax, %ecx
	andb	$-3, %cl
LBB0_5:
	movq	_OPEN_WRITE@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_9
## %bb.6:
	movq	_PCM_ENABLE_OUTPUT@GOTPCREL(%rip), %rdx
	testl	%ebx, (%rdx)
	je	LBB0_8
## %bb.7:
	orb	$1, %cl
LBB0_9:
	cmpb	%al, %cl
	je	LBB0_11
LBB0_10:
	movzbl	%cl, %edx
	movq	%r15, %rdi
	movl	$9, %esi
	callq	_ad_write
	movq	%r15, %rdi
	callq	_ad_unmute
LBB0_11:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
LBB0_8:
	andb	$-2, %cl
	cmpb	%al, %cl
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.comm	_OPEN_READ,4,2                  ## @OPEN_READ
	.comm	_PCM_ENABLE_INPUT,4,2           ## @PCM_ENABLE_INPUT
	.comm	_OPEN_WRITE,4,2                 ## @OPEN_WRITE
	.comm	_PCM_ENABLE_OUTPUT,4,2          ## @PCM_ENABLE_OUTPUT
	.no_dead_strip	_ad1848_trigger
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ad1848_trigger
_ad1848_trigger:                        ; @ad1848_trigger
	.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
Lloh0:
	adrp	x8, _audio_devs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _audio_devs@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8, w0, sxtw #3]
	ldp	x22, x20, [x8]
	add	x19, x20, #4
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
	and	w21, w8, w21
	mov	x0, x20
	mov	w1, #9
	bl	_ad_read
	ldr	w9, [x22]
Lloh3:
	adrp	x8, _OPEN_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OPEN_READ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w9
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _PCM_ENABLE_INPUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCM_ENABLE_INPUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w21
	and	w8, w0, #0xfffffffd
	orr	w10, w0, #0x2
	csel	w8, w8, w10, eq
	b	LBB0_3
LBB0_2:
	mov	x8, x0
LBB0_3:
Lloh9:
	adrp	x10, _OPEN_WRITE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _OPEN_WRITE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.4:
Lloh12:
	adrp	x9, _PCM_ENABLE_OUTPUT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PCM_ENABLE_OUTPUT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	tst	w9, w21
	and	w9, w8, #0xfffffffe
	orr	w8, w8, #0x1
	csel	w8, w9, w8, eq
LBB0_5:
	cmp	w0, w8, uxtb
	b.eq	LBB0_7
; %bb.6:
	and	w2, w8, #0xff
	mov	x0, x20
	mov	w1, #9
	bl	_ad_write
	mov	x0, x20
	bl	_ad_unmute
LBB0_7:
	mov	x0, x19
	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
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_OPEN_READ,4,2                  ; @OPEN_READ
	.comm	_PCM_ENABLE_INPUT,4,2           ; @PCM_ENABLE_INPUT
	.comm	_OPEN_WRITE,4,2                 ; @OPEN_WRITE
	.comm	_PCM_ENABLE_OUTPUT,4,2          ; @PCM_ENABLE_OUTPUT
	.no_dead_strip	_ad1848_trigger
.subsections_via_symbols
