	.file	"extr_sprd-mcdt.c_sprd_mcdt_init_chans.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sprd_mcdt_init_chans, @function
sprd_mcdt_init_chans:
.LFB0:
	.cfi_startproc
	endbr64
	mov	eax, DWORD PTR MCDT_CHANNEL_NUM[rip]
	test	eax, eax
	jle	.L10
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14, rdi
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	lea	r12, sprd_mcdt_list_mutex[rip]
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	xor	ebx, ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L15:
	mov	ecx, DWORD PTR SPRD_MCDT_ADC_CHAN[rip]
	add	rdx, QWORD PTR MCDT_CH0_RXD[rip]
	mov	DWORD PTR [rax], ebx
	mov	DWORD PTR 24[rax], ecx
	lea	ecx, 0[0+rbx*4]
	movsx	rcx, ecx
	add	rdx, rcx
	mov	QWORD PTR 16[rax], rdx
.L4:
	mov	QWORD PTR 8[rax], r14
	lea	rbp, 4[rax]
	add	rbx, 1
	mov	rdi, rbp
	call	INIT_LIST_HEAD@PLT
	mov	rdi, r12
	call	mutex_lock@PLT
	lea	rsi, sprd_mcdt_chan_list[rip]
	mov	rdi, rbp
	call	list_add_tail@PLT
	mov	rdi, r12
	call	mutex_unlock@PLT
	cmp	DWORD PTR MCDT_CHANNEL_NUM[rip], ebx
	jle	.L14
.L2:
	mov	ecx, DWORD PTR MCDT_ADC_CHANNEL_NUM[rip]
	mov	rax, rbx
	mov	rdx, QWORD PTR 0[r13]
	sal	rax, 5
	add	rax, QWORD PTR [r14]
	cmp	ecx, ebx
	jg	.L15
	mov	esi, ebx
	add	rdx, QWORD PTR MCDT_CH0_TXD[rip]
	sub	esi, ecx
	mov	ecx, esi
	mov	DWORD PTR [rax], esi
	mov	esi, DWORD PTR SPRD_MCDT_DAC_CHAN[rip]
	sal	ecx, 2
	movsx	rcx, ecx
	mov	DWORD PTR 24[rax], esi
	add	rdx, rcx
	mov	QWORD PTR 16[rax], rdx
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L14:
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	ret
	.cfi_endproc
.LFE0:
	.size	sprd_mcdt_init_chans, .-sprd_mcdt_init_chans
	.comm	sprd_mcdt_list_mutex,4,4
	.comm	sprd_mcdt_chan_list,4,4
	.comm	SPRD_MCDT_DAC_CHAN,4,4
	.comm	SPRD_MCDT_ADC_CHAN,4,4
	.comm	MCDT_CHANNEL_NUM,4,4
	.comm	MCDT_CH0_TXD,8,8
	.comm	MCDT_CH0_RXD,8,8
	.comm	MCDT_ADC_CHANNEL_NUM,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_sprd-mcdt.c_sprd_mcdt_init_chans.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sprd_mcdt_init_chans, %function
sprd_mcdt_init_chans:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	fp, .L11
	mov	r10, r0
	ldr	r0, [fp]
	cmp	r0, #0
	pople	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	r5, #0
	mov	r8, r1
	mov	r4, r5
	ldr	r7, .L11+4
	ldr	r9, .L11+8
	b	.L2
.L10:
	ldr	r1, .L11+12
	ldr	r1, [r1]
	str	r4, [r0, r5]
	add	r3, r3, r1
	ldr	r1, .L11+16
	add	r3, r3, r4, lsl #2
	ldr	r1, [r1]
	str	r3, [r2, #12]
	str	r1, [r2, #16]
.L4:
	add	r6, r2, #4
	str	r10, [r2, #8]
	mov	r0, r6
	bl	INIT_LIST_HEAD
	mov	r0, r7
	bl	mutex_lock
	mov	r1, r9
	mov	r0, r6
	bl	list_add_tail
	mov	r0, r7
	bl	mutex_unlock
	ldr	r3, [fp]
	add	r4, r4, #1
	cmp	r3, r4
	add	r5, r5, #20
	pople	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, .L11+20
	ldr	r0, [r10]
	ldr	r1, [r3]
	add	r2, r0, r5
	cmp	r1, r4
	ldr	r3, [r8]
	bgt	.L10
	ldr	ip, .L11+24
	sub	r1, r4, r1
	ldr	ip, [ip]
	add	r3, r3, ip
	ldr	ip, .L11+28
	add	r3, r3, r1, lsl #2
	ldr	ip, [ip]
	str	r1, [r0, r5]
	str	r3, [r2, #12]
	str	ip, [r2, #16]
	b	.L4
.L12:
	.align	2
.L11:
	.word	MCDT_CHANNEL_NUM
	.word	sprd_mcdt_list_mutex
	.word	sprd_mcdt_chan_list
	.word	MCDT_CH0_RXD
	.word	SPRD_MCDT_ADC_CHAN
	.word	MCDT_ADC_CHANNEL_NUM
	.word	MCDT_CH0_TXD
	.word	SPRD_MCDT_DAC_CHAN
	.size	sprd_mcdt_init_chans, .-sprd_mcdt_init_chans
	.comm	sprd_mcdt_list_mutex,4,4
	.comm	sprd_mcdt_chan_list,4,4
	.comm	SPRD_MCDT_DAC_CHAN,4,4
	.comm	SPRD_MCDT_ADC_CHAN,4,4
	.comm	MCDT_CHANNEL_NUM,4,4
	.comm	MCDT_CH0_TXD,4,4
	.comm	MCDT_CH0_RXD,4,4
	.comm	MCDT_ADC_CHANNEL_NUM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
