	.file	"extr_dmacHw.c_dmacHw_initDma.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	dmacHw_initDma
	.type	dmacHw_initDma, @function
dmacHw_initDma:
.LFB0:
	.cfi_startproc
	endbr64
	sub	rsp, 8
	.cfi_def_cfa_offset 16
	xor	edi, edi
	call	dmacHw_GET_NUM_CHANNEL@PLT
	mov	edi, 1
	mov	DWORD PTR dmaChannelCount_0[rip], eax
	call	dmacHw_GET_NUM_CHANNEL@PLT
	mov	edi, DWORD PTR chipcHw_REG_BUS_CLOCK_DMAC0[rip]
	mov	DWORD PTR dmaChannelCount_1[rip], eax
	call	chipcHw_busInterfaceClockEnable@PLT
	mov	edi, DWORD PTR chipcHw_REG_BUS_CLOCK_DMAC1[rip]
	call	chipcHw_busInterfaceClockEnable@PLT
	mov	edx, DWORD PTR dmaChannelCount_1[rip]
	add	edx, DWORD PTR dmaChannelCount_0[rip]
	cmp	edx, DWORD PTR dmacHw_MAX_CHANNEL_COUNT[rip]
	jg	.L13
.L2:
	mov	rdi, QWORD PTR dmacHw_gCblk[rip]
	sal	edx, 2
	xor	esi, esi
	call	memset@PLT
	movsx	rdi, DWORD PTR dmaChannelCount_0[rip]
	test	edi, edi
	jle	.L7
	mov	rdx, QWORD PTR dmacHw_gCblk[rip]
	lea	esi, -1[rdi]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L6:
	mov	rcx, rax
	mov	DWORD PTR [rdx+rax*8], 0
	mov	DWORD PTR 4[rdx+rax*8], eax
	add	rax, 1
	cmp	rcx, rsi
	jne	.L6
.L7:
	mov	eax, DWORD PTR dmaChannelCount_1[rip]
	test	eax, eax
	jle	.L1
	lea	esi, -1[rax]
	mov	rax, QWORD PTR dmacHw_gCblk[rip]
	lea	rdx, [rax+rdi*8]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rcx, rax
	mov	DWORD PTR [rdx+rax*8], 1
	mov	DWORD PTR 4[rdx+rax*8], eax
	add	rax, 1
	cmp	rsi, rcx
	jne	.L8
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	xor	edi, edi
	call	dmacHw_ASSERT@PLT
	mov	edx, DWORD PTR dmaChannelCount_1[rip]
	add	edx, DWORD PTR dmaChannelCount_0[rip]
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	dmacHw_initDma, .-dmacHw_initDma
	.comm	dmacHw_gCblk,8,8
	.comm	dmacHw_MAX_CHANNEL_COUNT,4,4
	.comm	dmaChannelCount_1,4,4
	.comm	dmaChannelCount_0,4,4
	.comm	chipcHw_REG_BUS_CLOCK_DMAC1,4,4
	.comm	chipcHw_REG_BUS_CLOCK_DMAC0,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_dmacHw.c_dmacHw_initDma.c"
	.text
	.align	2
	.global	dmacHw_initDma
	.syntax unified
	.arm
	.fpu softvfp
	.type	dmacHw_initDma, %function
dmacHw_initDma:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r0, #0
	bl	dmacHw_GET_NUM_CHANNEL
	mov	r3, r0
	ldr	r6, .L15
	mov	r0, #1
	str	r3, [r6]
	bl	dmacHw_GET_NUM_CHANNEL
	mov	r3, r0
	ldr	r2, .L15+4
	ldr	r5, .L15+8
	ldr	r0, [r2]
	str	r3, [r5]
	bl	chipcHw_busInterfaceClockEnable
	ldr	r3, .L15+12
	ldr	r0, [r3]
	bl	chipcHw_busInterfaceClockEnable
	ldr	r3, .L15+16
	ldr	r2, [r6]
	ldr	r1, [r5]
	ldr	r3, [r3]
	add	r2, r2, r1
	cmp	r2, r3
	bgt	.L14
.L2:
	ldr	r4, .L15+20
	mov	r1, #0
	ldr	r0, [r4]
	lsl	r2, r2, #2
	bl	memset
	ldr	r1, [r6]
	cmp	r1, #0
	ble	.L7
	mov	r3, #0
	mov	ip, r3
	ldr	r2, [r4]
	add	r0, r2, #4
.L6:
	str	ip, [r2, r3, lsl #3]
	str	r3, [r0, r3, lsl #3]
	add	r3, r3, #1
	cmp	r3, r1
	bne	.L6
.L7:
	ldr	r0, [r5]
	cmp	r0, #0
	pople	{r4, r5, r6, pc}
	mov	r3, #0
	mov	ip, #1
	ldr	r2, [r4]
	add	r2, r2, r1, lsl #3
	add	r1, r2, #4
.L8:
	str	ip, [r2, r3, lsl #3]
	str	r3, [r1, r3, lsl #3]
	add	r3, r3, #1
	cmp	r3, r0
	bne	.L8
	pop	{r4, r5, r6, pc}
.L14:
	mov	r0, #0
	bl	dmacHw_ASSERT
	ldr	r2, [r6]
	ldr	r3, [r5]
	add	r2, r2, r3
	b	.L2
.L16:
	.align	2
.L15:
	.word	dmaChannelCount_0
	.word	chipcHw_REG_BUS_CLOCK_DMAC0
	.word	dmaChannelCount_1
	.word	chipcHw_REG_BUS_CLOCK_DMAC1
	.word	dmacHw_MAX_CHANNEL_COUNT
	.word	dmacHw_gCblk
	.size	dmacHw_initDma, .-dmacHw_initDma
	.comm	dmacHw_gCblk,4,4
	.comm	dmacHw_MAX_CHANNEL_COUNT,4,4
	.comm	dmaChannelCount_1,4,4
	.comm	dmaChannelCount_0,4,4
	.comm	chipcHw_REG_BUS_CLOCK_DMAC1,4,4
	.comm	chipcHw_REG_BUS_CLOCK_DMAC0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
