	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_ac97c_capture_trigger
_atmel_ac97c_capture_trigger:           ## @atmel_ac97c_capture_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
	callq	_snd_pcm_substream_chip
	movq	%rax, %r15
	movq	_CAMR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rax, %rdi
	callq	_ac97c_readl
	movq	%rax, %r14
	addl	$-128, %ebx
	cmpl	$5, %ebx
	ja	LBB0_6
## %bb.1:
	movl	$28, %eax
	btl	%ebx, %eax
	jae	LBB0_4
## %bb.2:
	movl	4(%r15), %edi
	callq	_dw_dma_cyclic_start
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movq	_AC97C_CMR_CENA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	orq	%rax, %r14
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_4:
	movl	4(%r15), %edi
	callq	_dw_dma_cyclic_stop
	xorl	%ebx, %ebx
	cmpl	$1, (%r15)
	jg	LBB0_7
## %bb.5:
	movq	_AC97C_CMR_CENA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	notq	%rax
	andq	%rax, %r14
	jmp	LBB0_7
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	(%r12), %esi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_ac97c_writel
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CAMR,4,2                       ## @CAMR
	.comm	_AC97C_CMR_CENA,8,3             ## @AC97C_CMR_CENA
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_atmel_ac97c_capture_trigger
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_ac97c_capture_trigger
_atmel_ac97c_capture_trigger:           ; @atmel_ac97c_capture_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
	bl	_snd_pcm_substream_chip
	mov	x19, x0
Lloh0:
	adrp	x22, _CAMR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _CAMR@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_ac97c_readl
	mov	x20, x0
	sub	w8, w21, #128
	cmp	w8, #5
	b.hi	LBB0_7
; %bb.1:
	mov	w9, #1
	lsl	w8, w9, w8
	tst	w8, #0x1c
	b.eq	LBB0_4
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_dw_dma_cyclic_start
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.3:
Lloh2:
	adrp	x8, _AC97C_CMR_CENA@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AC97C_CMR_CENA@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	orr	x20, x8, x20
	b	LBB0_8
LBB0_4:
	ldr	w0, [x19, #4]
	bl	_dw_dma_cyclic_stop
	ldr	w8, [x19]
	cmp	w8, #1
	b.gt	LBB0_6
; %bb.5:
	mov	w21, #0
Lloh5:
	adrp	x8, _AC97C_CMR_CENA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AC97C_CMR_CENA@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	bic	x20, x20, x8
	b	LBB0_8
LBB0_6:
	mov	w21, #0
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_ac97c_writel
LBB0_9:
	mov	x0, x21
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_CAMR,4,2                       ; @CAMR
	.comm	_AC97C_CMR_CENA,8,3             ; @AC97C_CMR_CENA
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_atmel_ac97c_capture_trigger
.subsections_via_symbols
