	.file	"extr_dma-sh.c_sh_dmac_enable_dma.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sh_dmac_enable_dma, @function
sh_dmac_enable_dma:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	rax, QWORD PTR dma_base_addr[rip]
	mov	rbx, rdi
	mov	rdx, QWORD PTR [rdi]
	mov	rdi, QWORD PTR CHCR[rip]
	add	rdi, QWORD PTR [rax+rdx*8]
	call	ctrl_inl@PLT
	or	eax, DWORD PTR CHCR_DE[rip]
	mov	edi, eax
	mov	eax, DWORD PTR 8[rbx]
	test	DWORD PTR DMA_TEI_CAPABLE[rip], eax
	je	.L2
	or	edi, DWORD PTR CHCR_IE[rip]
.L2:
	mov	rdx, QWORD PTR [rbx]
	mov	rax, QWORD PTR dma_base_addr[rip]
	mov	rsi, QWORD PTR CHCR[rip]
	add	rsi, QWORD PTR [rax+rdx*8]
	call	ctrl_outl@PLT
	mov	eax, DWORD PTR 8[rbx]
	test	DWORD PTR DMA_TEI_CAPABLE[rip], eax
	jne	.L9
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	mov	rdi, QWORD PTR [rbx]
	call	get_dmte_irq@PLT
	pop	rbx
	.cfi_def_cfa_offset 8
	mov	edi, eax
	jmp	enable_irq@PLT
	.cfi_endproc
.LFE0:
	.size	sh_dmac_enable_dma, .-sh_dmac_enable_dma
	.comm	dma_base_addr,8,8
	.comm	DMA_TEI_CAPABLE,4,4
	.comm	CHCR_IE,4,4
	.comm	CHCR_DE,4,4
	.comm	CHCR,8,8
	.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_dma-sh.c_sh_dmac_enable_dma.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sh_dmac_enable_dma, %function
sh_dmac_enable_dma:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r7, .L9
	ldr	r2, [r0]
	ldr	r3, [r7]
	ldr	r6, .L9+4
	mov	r4, r0
	ldr	r0, [r3, r2, lsl #2]
	ldr	r3, [r6]
	ldr	r5, .L9+8
	add	r0, r0, r3
	bl	ctrl_inl
	ldr	r3, .L9+12
	ldr	r1, [r4, #4]
	ldr	r2, [r5]
	ldr	r3, [r3]
	tst	r1, r2
	orr	r0, r0, r3
	ldrne	r3, .L9+16
	ldr	r2, [r7]
	ldrne	r3, [r3]
	ldr	r1, [r4]
	orrne	r0, r0, r3
	ldr	r1, [r2, r1, lsl #2]
	ldr	r3, [r6]
	add	r1, r1, r3
	bl	ctrl_outl
	ldr	r3, [r5]
	ldr	r2, [r4, #4]
	tst	r2, r3
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r0, [r4]
	bl	get_dmte_irq
	pop	{r4, r5, r6, r7, r8, lr}
	b	enable_irq
.L10:
	.align	2
.L9:
	.word	dma_base_addr
	.word	CHCR
	.word	DMA_TEI_CAPABLE
	.word	CHCR_DE
	.word	CHCR_IE
	.size	sh_dmac_enable_dma, .-sh_dmac_enable_dma
	.comm	dma_base_addr,4,4
	.comm	DMA_TEI_CAPABLE,4,4
	.comm	CHCR_IE,4,4
	.comm	CHCR_DE,4,4
	.comm	CHCR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
