	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function waveartist_start_input
_waveartist_start_input:                ## @waveartist_start_input
	.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
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movq	_audio_devs@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rax
	movslq	%edi, %r13
	movq	(%rax,%r13,8), %rax
	movq	8(%rax), %r14
	movq	16(%rax), %r12
	movq	_debug_flg@GOTPCREL(%rip), %rax
	movq	_DEBUG_IN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %edx
	callq	_printk
	movq	_audio_devs@GOTPCREL(%rip), %rdx
LBB0_2:
	movq	_AFMT_S16_LE@GOTPCREL(%rip), %rax
	movq	_AFMT_S16_BE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%r12)
	setne	%cl
	shrl	%cl, %ebx
	cmpl	$2, 4(%r12)
	setge	%cl
	shrl	%cl, %ebx
	decl	%ebx
	movl	(%r14), %eax
	movq	_PCM_ENABLE_INPUT@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	testl	%eax, %ecx
	je	LBB0_7
## %bb.3:
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.4:
	movq	(%rdx), %rdx
	movq	(%rdx,%r13,8), %rdx
	movq	_DMA_AUTOMODE@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	(%rdx), %esi
	je	LBB0_7
## %bb.5:
	cmpl	4(%r14), %ebx
	jne	LBB0_7
## %bb.6:
	orl	%eax, %ecx
	movl	%ecx, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_waveartist_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	_WACMD_INPUTSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_waveartist_cmd2
	movl	%ebx, 4(%r14)
	movl	(%r12), %eax
	orl	%eax, (%r14)
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	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_IN,4,2                   ## @DEBUG_IN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"waveartist: start input, buf=0x%lx, count=0x%x...\n"

	.comm	_AFMT_S16_LE,4,2                ## @AFMT_S16_LE
	.comm	_AFMT_S16_BE,4,2                ## @AFMT_S16_BE
	.comm	_PCM_ENABLE_INPUT,4,2           ## @PCM_ENABLE_INPUT
	.comm	_DMA_AUTOMODE,4,2               ## @DMA_AUTOMODE
	.comm	_waveartist_lock,4,2            ## @waveartist_lock
	.comm	_WACMD_INPUTSIZE,4,2            ## @WACMD_INPUTSIZE
	.no_dead_strip	_waveartist_start_input
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function waveartist_start_input
_waveartist_start_input:                ; @waveartist_start_input
	.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	x21, x3
	mov	x22, x2
	mov	x20, x0
Lloh0:
	adrp	x23, _audio_devs@GOTPAGE
Lloh1:
	ldr	x23, [x23, _audio_devs@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	x8, [x8, w0, sxtw #3]
Lloh2:
	adrp	x9, _debug_flg@GOTPAGE
Lloh3:
	ldr	x9, [x9, _debug_flg@GOTPAGEOFF]
	ldp	x19, x24, [x8, #8]
Lloh4:
	ldr	w8, [x9]
Lloh5:
	adrp	x9, _DEBUG_IN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DEBUG_IN@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x22
	bl	_printk
LBB0_2:
Lloh10:
	adrp	x8, _AFMT_S16_LE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _AFMT_S16_LE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _AFMT_S16_BE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AFMT_S16_BE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldp	w9, w10, [x24]
	tst	w8, w9
	cset	w8, ne
	lsr	w8, w22, w8
	cmp	w10, #1
	cset	w9, gt
	lsr	w8, w8, w9
	sub	w22, w8, #1
	ldr	w8, [x19]
Lloh16:
	adrp	x24, _PCM_ENABLE_INPUT@GOTPAGE
Lloh17:
	ldr	x24, [x24, _PCM_ENABLE_INPUT@GOTPAGEOFF]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.3:
	cbz	w21, LBB0_7
; %bb.4:
	sxtw	x10, w20
	ldr	x11, [x23]
	ldr	x10, [x11, x10, lsl #3]
	ldr	w10, [x10]
Lloh18:
	adrp	x11, _DMA_AUTOMODE@GOTPAGE
Lloh19:
	ldr	x11, [x11, _DMA_AUTOMODE@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	and	w10, w11, w10
	cbz	w10, LBB0_7
; %bb.5:
	ldr	w10, [x19, #4]
	cmp	w22, w10
	b.ne	LBB0_7
; %bb.6:
	orr	w8, w9, w8
	str	w8, [x19]
	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
LBB0_7:
Lloh21:
	adrp	x20, _waveartist_lock@GOTPAGE
Lloh22:
	ldr	x20, [x20, _waveartist_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh23:
	adrp	x8, _WACMD_INPUTSIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _WACMD_INPUTSIZE@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x22
	bl	_waveartist_cmd2
	ldr	w8, [x24]
	ldr	w9, [x19]
	orr	w8, w9, w8
	stp	w8, w22, [x19]
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_audio_devs,8,3                 ; @audio_devs
	.comm	_debug_flg,4,2                  ; @debug_flg
	.comm	_DEBUG_IN,4,2                   ; @DEBUG_IN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"waveartist: start input, buf=0x%lx, count=0x%x...\n"

	.comm	_AFMT_S16_LE,4,2                ; @AFMT_S16_LE
	.comm	_AFMT_S16_BE,4,2                ; @AFMT_S16_BE
	.comm	_PCM_ENABLE_INPUT,4,2           ; @PCM_ENABLE_INPUT
	.comm	_DMA_AUTOMODE,4,2               ; @DMA_AUTOMODE
	.comm	_waveartist_lock,4,2            ; @waveartist_lock
	.comm	_WACMD_INPUTSIZE,4,2            ; @WACMD_INPUTSIZE
	.no_dead_strip	_waveartist_start_input
.subsections_via_symbols
