	.file	"extr_audio_codec.c_gbaudio_module_enable_tx.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d:DATA connection missing\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Failed to fetch dai_stream pointer\n"
	.section	.rodata.str1.1
.LC2:
	.string	"reg_cport failed:%d\n"
.LC3:
	.string	"Dynamic Register %d DAI\n"
.LC4:
	.string	"set_pcm failed:%d\n"
.LC5:
	.string	"Dynamic hw_params %d DAI\n"
.LC6:
	.string	"set_tx_data_size failed:%d\n"
.LC7:
	.string	"activate_tx failed:%d\n"
.LC8:
	.string	"Dynamic prepare %d DAI\n"
	.text
	.p2align 4
	.type	gbaudio_module_enable_tx, @function
gbaudio_module_enable_tx:
.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
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	mov	esi, edx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rdi, rbp
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	call	find_data@PLT
	test	rax, rax
	je	.L14
	mov	rdx, QWORD PTR SNDRV_PCM_STREAM_PLAYBACK[rip]
	mov	rbx, rax
	mov	rax, QWORD PTR [rax]
	mov	esi, r12d
	mov	rdi, r14
	mov	r13d, DWORD PTR [rax+rdx*4]
	call	find_dai_stream_params@PLT
	mov	r15, rax
	test	rax, rax
	je	.L15
	cmp	DWORD PTR GBAUDIO_CODEC_STARTUP[rip], r13d
	jg	.L16
	cmp	DWORD PTR GBAUDIO_CODEC_HWPARAMS[rip], r13d
	jg	.L17
.L7:
	xor	r12d, r12d
	cmp	DWORD PTR GBAUDIO_CODEC_PREPARE[rip], r13d
	jg	.L18
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L16:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbx]
	mov	ecx, DWORD PTR AUDIO_APBRIDGEA_DIRECTION_TX[rip]
	xor	esi, esi
	mov	r14, QWORD PTR 8[rdi]
	mov	rdx, r14
	call	gb_audio_apbridgea_register_cport@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L19
	mov	rax, QWORD PTR [rbx]
	mov	rdx, QWORD PTR SNDRV_PCM_STREAM_PLAYBACK[rip]
	lea	rsi, .LC3[rip]
	mov	ecx, DWORD PTR GBAUDIO_CODEC_STARTUP[rip]
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	edi, DWORD PTR 0[rbp]
	mov	rdx, r14
	call	dev_dbg@PLT
	cmp	DWORD PTR GBAUDIO_CODEC_HWPARAMS[rip], r13d
	jle	.L7
.L17:
	mov	rax, QWORD PTR 8[rbx]
	mov	ecx, DWORD PTR 4[r15]
	mov	edx, DWORD PTR 12[r15]
	mov	edi, DWORD PTR 4[rbp]
	mov	r14, QWORD PTR [rax]
	mov	r9d, DWORD PTR [r15]
	mov	r8d, DWORD PTR 8[r15]
	mov	rsi, r14
	call	gb_audio_gb_set_pcm@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L20
	mov	rdx, QWORD PTR SNDRV_PCM_STREAM_PLAYBACK[rip]
	mov	rax, QWORD PTR [rbx]
	xor	r12d, r12d
	lea	rsi, .LC5[rip]
	mov	ecx, DWORD PTR GBAUDIO_CODEC_HWPARAMS[rip]
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	edi, DWORD PTR 0[rbp]
	mov	rdx, r14
	call	dev_dbg@PLT
	cmp	DWORD PTR GBAUDIO_CODEC_PREPARE[rip], r13d
	jle	.L1
.L18:
	mov	rax, QWORD PTR 8[rbx]
	mov	edi, DWORD PTR 4[rbp]
	mov	edx, 192
	mov	r13, QWORD PTR [rax]
	mov	rsi, r13
	call	gb_audio_gb_set_tx_data_size@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L21
	mov	edi, DWORD PTR 4[rbp]
	mov	rsi, r13
	call	gb_audio_gb_activate_tx@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L22
	mov	rax, QWORD PTR [rbx]
	mov	ecx, DWORD PTR GBAUDIO_CODEC_PREPARE[rip]
	lea	rsi, .LC8[rip]
	mov	rdx, QWORD PTR SNDRV_PCM_STREAM_PLAYBACK[rip]
	mov	DWORD PTR [rax+rdx*4], ecx
	mov	edi, DWORD PTR 0[rbp]
	mov	rdx, r13
	call	dev_dbg@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L19:
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, eax
	lea	rsi, .LC2[rip]
	call	dev_err_ratelimited@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L20:
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, eax
	lea	rsi, .LC4[rip]
	call	dev_err_ratelimited@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, r12d
	lea	rsi, .LC0[rip]
	xor	eax, eax
	call	dev_err@PLT
	mov	r12d, DWORD PTR ENODEV[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L15:
	mov	edi, DWORD PTR [r14]
	lea	rsi, .LC1[rip]
	xor	eax, eax
	call	dev_err@PLT
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L21:
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, eax
	lea	rsi, .LC6[rip]
	call	dev_err_ratelimited@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edi, DWORD PTR 0[rbp]
	mov	edx, eax
	lea	rsi, .LC7[rip]
	call	dev_err_ratelimited@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	gbaudio_module_enable_tx, .-gbaudio_module_enable_tx
	.comm	SNDRV_PCM_STREAM_PLAYBACK,8,8
	.comm	GBAUDIO_CODEC_STARTUP,4,4
	.comm	GBAUDIO_CODEC_PREPARE,4,4
	.comm	GBAUDIO_CODEC_HWPARAMS,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.comm	AUDIO_APBRIDGEA_DIRECTION_TX,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_audio_codec.c_gbaudio_module_enable_tx.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%d:DATA connection missing\012\000"
	.align	2
.LC1:
	.ascii	"Failed to fetch dai_stream pointer\012\000"
	.align	2
.LC2:
	.ascii	"reg_cport failed:%d\012\000"
	.align	2
.LC3:
	.ascii	"Dynamic Register %d DAI\012\000"
	.align	2
.LC4:
	.ascii	"set_pcm failed:%d\012\000"
	.align	2
.LC5:
	.ascii	"Dynamic hw_params %d DAI\012\000"
	.align	2
.LC6:
	.ascii	"set_tx_data_size failed:%d\012\000"
	.align	2
.LC7:
	.ascii	"activate_tx failed:%d\012\000"
	.align	2
.LC8:
	.ascii	"Dynamic prepare %d DAI\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	gbaudio_module_enable_tx, %function
gbaudio_module_enable_tx:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r1
	mov	r8, r0
	mov	r1, r2
	mov	r0, r6
	sub	sp, sp, #12
	mov	r4, r2
	bl	find_data
	subs	r5, r0, #0
	beq	.L14
	ldr	r9, .L23
	ldr	r3, [r5]
	ldr	r2, [r9]
	mov	r1, r4
	mov	r0, r8
	ldr	r10, [r3, r2, lsl #2]
	bl	find_dai_stream_params
	subs	r7, r0, #0
	beq	.L15
	ldr	r8, .L23+4
	ldr	r3, [r8]
	cmp	r3, r10
	bgt	.L16
	ldr	r8, .L23+8
	ldr	r3, [r8]
	cmp	r3, r10
	bgt	.L17
.L7:
	ldr	r7, .L23+12
	ldr	r3, [r7]
	cmp	r3, r10
	movle	r4, #0
	bgt	.L18
.L1:
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r0, [r5, #4]
	ldr	r3, .L23+16
	ldr	fp, [r0, #4]
	mov	r1, #0
	mov	r2, fp
	ldr	r3, [r3]
	bl	gb_audio_apbridgea_register_cport
	subs	r4, r0, #0
	bne	.L19
	ldr	r0, [r8]
	ldr	r1, [r9]
	ldr	r3, [r5]
	ldr	r8, .L23+8
	str	r0, [r3, r1, lsl #2]
	mov	r2, fp
	ldr	r0, [r6]
	ldr	r1, .L23+20
	bl	dev_dbg
	ldr	r3, [r8]
	cmp	r3, r10
	ble	.L7
.L17:
	ldr	r3, [r5, #4]
	ldr	r1, [r7]
	ldr	fp, [r3]
	ldr	r2, [r7, #12]
	ldr	r3, [r7, #4]
	str	r1, [sp, #4]
	ldr	r1, [r7, #8]
	str	r1, [sp]
	ldr	r0, [r6, #4]
	mov	r1, fp
	bl	gb_audio_gb_set_pcm
	subs	r4, r0, #0
	bne	.L20
	ldr	r0, [r8]
	ldr	r1, [r9]
	ldr	r3, [r5]
	mov	r2, fp
	str	r0, [r3, r1, lsl #2]
	ldr	r0, [r6]
	ldr	r1, .L23+24
	bl	dev_dbg
	b	.L7
.L18:
	ldr	r3, [r5, #4]
	mov	r2, #192
	ldr	r8, [r3]
	ldr	r0, [r6, #4]
	mov	r1, r8
	bl	gb_audio_gb_set_tx_data_size
	subs	r4, r0, #0
	bne	.L21
	mov	r1, r8
	ldr	r0, [r6, #4]
	bl	gb_audio_gb_activate_tx
	subs	r4, r0, #0
	bne	.L22
	ldr	r0, [r7]
	ldr	r1, [r9]
	ldr	r3, [r5]
	mov	r2, r8
	str	r0, [r3, r1, lsl #2]
	ldr	r0, [r6]
	ldr	r1, .L23+28
	bl	dev_dbg
	b	.L1
.L19:
	mov	r2, r4
	ldr	r0, [r6]
	ldr	r1, .L23+32
	bl	dev_err_ratelimited
	b	.L1
.L20:
	mov	r2, r4
	ldr	r0, [r6]
	ldr	r1, .L23+36
	bl	dev_err_ratelimited
	b	.L1
.L14:
	mov	r2, r4
	ldr	r0, [r6]
	ldr	r1, .L23+40
	bl	dev_err
	ldr	r3, .L23+44
	ldr	r0, [r3]
	rsb	r4, r0, #0
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	ldr	r0, [r8]
	ldr	r1, .L23+48
	bl	dev_err
	ldr	r3, .L23+52
	ldr	r0, [r3]
	rsb	r4, r0, #0
	b	.L1
.L21:
	mov	r2, r4
	ldr	r0, [r6]
	ldr	r1, .L23+56
	bl	dev_err_ratelimited
	b	.L1
.L22:
	mov	r2, r4
	ldr	r0, [r6]
	ldr	r1, .L23+60
	bl	dev_err_ratelimited
	b	.L1
.L24:
	.align	2
.L23:
	.word	SNDRV_PCM_STREAM_PLAYBACK
	.word	GBAUDIO_CODEC_STARTUP
	.word	GBAUDIO_CODEC_HWPARAMS
	.word	GBAUDIO_CODEC_PREPARE
	.word	AUDIO_APBRIDGEA_DIRECTION_TX
	.word	.LC3
	.word	.LC5
	.word	.LC8
	.word	.LC2
	.word	.LC4
	.word	.LC0
	.word	ENODEV
	.word	.LC1
	.word	EINVAL
	.word	.LC6
	.word	.LC7
	.size	gbaudio_module_enable_tx, .-gbaudio_module_enable_tx
	.comm	SNDRV_PCM_STREAM_PLAYBACK,4,4
	.comm	GBAUDIO_CODEC_STARTUP,4,4
	.comm	GBAUDIO_CODEC_PREPARE,4,4
	.comm	GBAUDIO_CODEC_HWPARAMS,4,4
	.comm	ENODEV,4,4
	.comm	EINVAL,4,4
	.comm	AUDIO_APBRIDGEA_DIRECTION_TX,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
