	.file	"extr_ca0106_main.c_snd_ca0106_pcm_prepare_capture.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	snd_ca0106_pcm_prepare_capture, @function
snd_ca0106_pcm_prepare_capture:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	snd_pcm_substream_chip@PLT
	mov	r15, QWORD PTR [rbx]
	mov	ebx, DWORD PTR HCFG_CAPTURE_S32_LE[rip]
	mov	rbp, rax
	mov	rax, QWORD PTR 32[r15]
	mov	r12d, DWORD PTR [rax]
	mov	eax, DWORD PTR [r15]
	cmp	eax, 96000
	je	.L5
	cmp	eax, 192000
	je	.L6
	cmp	eax, 44100
	mov	r8d, 0
	mov	ecx, 16384
	mov	DWORD PTR 12[rsp], 2
	cmovne	ecx, r8d
	mov	r13d, ecx
.L2:
	cmp	DWORD PTR 4[r15], 128
	mov	edi, 0
	cmove	edi, ebx
	not	ebx
	mov	r14d, edi
	mov	rdi, QWORD PTR HCFG[rip]
	add	rdi, QWORD PTR 8[rbp]
	call	inl@PLT
	mov	edi, ebx
	mov	rsi, QWORD PTR HCFG[rip]
	add	rsi, QWORD PTR 8[rbp]
	and	edi, eax
	or	edi, r14d
	call	outl@PLT
	xor	edx, edx
	mov	esi, 113
	mov	rdi, rbp
	call	snd_ca0106_ptr_read@PLT
	xor	edx, edx
	mov	esi, 113
	mov	rdi, rbp
	and	ah, 63
	mov	ecx, eax
	or	ecx, r13d
	call	snd_ca0106_ptr_write@PLT
	mov	rax, QWORD PTR 0[rbp]
	cmp	DWORD PTR [rax], 1
	je	.L11
.L4:
	mov	edx, r12d
	mov	rdi, rbp
	xor	ecx, ecx
	mov	esi, 19
	call	snd_ca0106_ptr_write@PLT
	mov	ecx, DWORD PTR 12[r15]
	mov	edx, r12d
	mov	rdi, rbp
	mov	esi, DWORD PTR CAPTURE_DMA_ADDR[rip]
	call	snd_ca0106_ptr_write@PLT
	mov	esi, DWORD PTR 8[r15]
	mov	rdi, r15
	call	frames_to_bytes@PLT
	mov	esi, DWORD PTR CAPTURE_BUFFER_SIZE[rip]
	mov	edx, r12d
	mov	rdi, rbp
	sal	eax, 16
	mov	ecx, eax
	call	snd_ca0106_ptr_write@PLT
	mov	esi, DWORD PTR CAPTURE_POINTER[rip]
	mov	edx, r12d
	xor	ecx, ecx
	mov	rdi, rbp
	call	snd_ca0106_ptr_write@PLT
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	DWORD PTR 12[rsp], 10
	mov	r13d, 49152
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L11:
	mov	edx, DWORD PTR 12[rsp]
	mov	esi, DWORD PTR ADC_MASTER[rip]
	mov	rdi, rbp
	call	snd_ca0106_i2c_write@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L5:
	mov	DWORD PTR 12[rsp], 10
	mov	r13d, 32768
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	snd_ca0106_pcm_prepare_capture, .-snd_ca0106_pcm_prepare_capture
	.comm	table_base,4,4
	.comm	HCFG_CAPTURE_S32_LE,4,4
	.comm	HCFG,8,8
	.comm	CAPTURE_POINTER,4,4
	.comm	CAPTURE_DMA_ADDR,4,4
	.comm	CAPTURE_BUFFER_SIZE,4,4
	.comm	ADC_MASTER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ca0106_main.c_snd_ca0106_pcm_prepare_capture.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	snd_ca0106_pcm_prepare_capture, %function
snd_ca0106_pcm_prepare_capture:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r0
	bl	snd_pcm_substream_chip
	ldr	r5, [r5]
	ldr	ip, .L12
	ldr	r3, [r5]
	ldr	r1, [r5, #32]
	ldr	r2, .L12+4
	cmp	r3, ip
	mov	r4, r0
	ldr	r6, [r1]
	ldr	r9, [r2]
	beq	.L5
	ldr	r2, .L12+8
	cmp	r3, r2
	beq	.L6
	ldr	r8, .L12+12
	mov	r7, #2
	cmp	r3, r8
	moveq	r8, #16384
	movne	r8, #0
.L2:
	ldr	r10, .L12+16
	ldr	r3, [r5, #4]
	ldr	r2, [r10]
	ldr	r0, [r4, #4]
	cmp	r3, #128
	add	r0, r0, r2
	moveq	fp, r9
	movne	fp, #0
	bl	inl
	ldr	r3, [r10]
	ldr	r1, [r4, #4]
	bic	r0, r0, r9
	add	r1, r1, r3
	orr	r0, r0, fp
	bl	outl
	mov	r2, #0
	mov	r1, #113
	mov	r0, r4
	bl	snd_ca0106_ptr_read
	bic	r0, r0, #49152
	orr	r3, r0, r8
	mov	r2, #0
	mov	r1, #113
	mov	r0, r4
	bl	snd_ca0106_ptr_write
	ldr	r3, [r4]
	ldr	r3, [r3]
	cmp	r3, #1
	beq	.L11
.L4:
	mov	r2, r6
	mov	r3, #0
	mov	r1, #19
	mov	r0, r4
	bl	snd_ca0106_ptr_write
	ldr	r2, .L12+20
	ldr	r3, [r5, #12]
	ldr	r1, [r2]
	mov	r0, r4
	mov	r2, r6
	bl	snd_ca0106_ptr_write
	ldr	r3, .L12+24
	ldr	r1, [r5, #8]
	mov	r0, r5
	ldr	r5, [r3]
	bl	frames_to_bytes
	mov	r1, r5
	mov	r2, r6
	lsl	r3, r0, #16
	mov	r0, r4
	bl	snd_ca0106_ptr_write
	ldr	r3, .L12+28
	mov	r2, r6
	ldr	r1, [r3]
	mov	r0, r4
	mov	r3, #0
	bl	snd_ca0106_ptr_write
	mov	r0, #0
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L6:
	mov	r8, #49152
	mov	r7, #10
	b	.L2
.L11:
	ldr	r3, .L12+32
	mov	r2, r7
	mov	r0, r4
	ldr	r1, [r3]
	bl	snd_ca0106_i2c_write
	b	.L4
.L5:
	mov	r8, #32768
	mov	r7, #10
	b	.L2
.L13:
	.align	2
.L12:
	.word	96000
	.word	HCFG_CAPTURE_S32_LE
	.word	192000
	.word	44100
	.word	HCFG
	.word	CAPTURE_DMA_ADDR
	.word	CAPTURE_BUFFER_SIZE
	.word	CAPTURE_POINTER
	.word	ADC_MASTER
	.size	snd_ca0106_pcm_prepare_capture, .-snd_ca0106_pcm_prepare_capture
	.comm	table_base,4,4
	.comm	HCFG_CAPTURE_S32_LE,4,4
	.comm	HCFG,4,4
	.comm	CAPTURE_POINTER,4,4
	.comm	CAPTURE_DMA_ADDR,4,4
	.comm	CAPTURE_BUFFER_SIZE,4,4
	.comm	ADC_MASTER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
