	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function waveartist_trigger
_waveartist_trigger:                    ## @waveartist_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -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), %r15
	movq	8(%rax), %r14
	movq	_debug_flg@GOTPCREL(%rip), %rax
	movq	_DEBUG_TRIGGER@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_6
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_printk
	movq	_PCM_ENABLE_INPUT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	callq	_printk
LBB0_3:
	movq	_PCM_ENABLE_OUTPUT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	callq	_printk
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	callq	_printk
LBB0_6:
	movq	_waveartist_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock_irqsave
	andl	(%r14), %ebx
	movl	(%r15), %eax
	movq	_OPEN_READ@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.7:
	movq	_PCM_ENABLE_INPUT@GOTPCREL(%rip), %rcx
	testl	%ebx, (%rcx)
	je	LBB0_9
## %bb.8:
	movq	_WACMD_INPUTSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_waveartist_cmd1
	movl	(%r15), %eax
LBB0_9:
	movq	_OPEN_WRITE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_12
## %bb.10:
	movq	_PCM_ENABLE_OUTPUT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_12
## %bb.11:
	movq	_WACMD_OUTPUTSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_waveartist_cmd1
LBB0_12:
	movq	_waveartist_lock@GOTPCREL(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_audio_devs,8,3                 ## @audio_devs
	.comm	_debug_flg,4,2                  ## @debug_flg
	.comm	_DEBUG_TRIGGER,4,2              ## @DEBUG_TRIGGER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wavnc: audio trigger "

	.comm	_PCM_ENABLE_INPUT,4,2           ## @PCM_ENABLE_INPUT
L_.str.1:                               ## @.str.1
	.asciz	"in "

	.comm	_PCM_ENABLE_OUTPUT,4,2          ## @PCM_ENABLE_OUTPUT
L_.str.2:                               ## @.str.2
	.asciz	"out"

L_.str.3:                               ## @.str.3
	.asciz	"\n"

	.comm	_waveartist_lock,4,2            ## @waveartist_lock
	.comm	_OPEN_READ,4,2                  ## @OPEN_READ
	.comm	_WACMD_INPUTSTART,4,2           ## @WACMD_INPUTSTART
	.comm	_OPEN_WRITE,4,2                 ## @OPEN_WRITE
	.comm	_WACMD_OUTPUTSTART,4,2          ## @WACMD_OUTPUTSTART
	.no_dead_strip	_waveartist_trigger
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function waveartist_trigger
_waveartist_trigger:                    ; @waveartist_trigger
	.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	x20, 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, x19, [x8]
Lloh3:
	adrp	x8, _debug_flg@GOTPAGE
Lloh4:
	ldr	x8, [x8, _debug_flg@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _DEBUG_TRIGGER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DEBUG_TRIGGER@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x23, _PCM_ENABLE_INPUT@GOTPAGE
Lloh10:
	ldr	x23, [x23, _PCM_ENABLE_INPUT@GOTPAGEOFF]
Lloh11:
	adrp	x21, _PCM_ENABLE_OUTPUT@GOTPAGE
Lloh12:
	ldr	x21, [x21, _PCM_ENABLE_OUTPUT@GOTPAGEOFF]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
	ldr	w8, [x23]
	tst	w8, w20
	b.eq	LBB0_3
; %bb.2:
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
LBB0_3:
	ldr	w8, [x21]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printk
LBB0_5:
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printk
LBB0_6:
Lloh21:
	adrp	x0, _waveartist_lock@GOTPAGE
Lloh22:
	ldr	x0, [x0, _waveartist_lock@GOTPAGEOFF]
	bl	_spin_lock_irqsave
	ldr	w8, [x19]
	and	w20, w8, w20
	ldr	w8, [x22]
Lloh23:
	adrp	x9, _OPEN_READ@GOTPAGE
Lloh24:
	ldr	x9, [x9, _OPEN_READ@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
	ldr	w9, [x23]
	tst	w9, w20
	b.eq	LBB0_9
; %bb.8:
Lloh26:
	adrp	x8, _WACMD_INPUTSTART@GOTPAGE
Lloh27:
	ldr	x8, [x8, _WACMD_INPUTSTART@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_waveartist_cmd1
	ldr	w8, [x22]
LBB0_9:
Lloh29:
	adrp	x9, _OPEN_WRITE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _OPEN_WRITE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_12
; %bb.10:
	ldr	w8, [x21]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.11:
Lloh32:
	adrp	x8, _WACMD_OUTPUTSTART@GOTPAGE
Lloh33:
	ldr	x8, [x8, _WACMD_OUTPUTSTART@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_waveartist_cmd1
LBB0_12:
Lloh35:
	adrp	x0, _waveartist_lock@GOTPAGE
Lloh36:
	ldr	x0, [x0, _waveartist_lock@GOTPAGEOFF]
	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
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_debug_flg,4,2                  ; @debug_flg
	.comm	_DEBUG_TRIGGER,4,2              ; @DEBUG_TRIGGER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wavnc: audio trigger "

	.comm	_PCM_ENABLE_INPUT,4,2           ; @PCM_ENABLE_INPUT
l_.str.1:                               ; @.str.1
	.asciz	"in "

	.comm	_PCM_ENABLE_OUTPUT,4,2          ; @PCM_ENABLE_OUTPUT
l_.str.2:                               ; @.str.2
	.asciz	"out"

l_.str.3:                               ; @.str.3
	.asciz	"\n"

	.comm	_waveartist_lock,4,2            ; @waveartist_lock
	.comm	_OPEN_READ,4,2                  ; @OPEN_READ
	.comm	_WACMD_INPUTSTART,4,2           ; @WACMD_INPUTSTART
	.comm	_OPEN_WRITE,4,2                 ; @OPEN_WRITE
	.comm	_WACMD_OUTPUTSTART,4,2          ; @WACMD_OUTPUTSTART
	.no_dead_strip	_waveartist_trigger
.subsections_via_symbols
