	.file	"extr_atmel-tdes.c_atmel_tdes_dma_init.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"tx"
.LC1:
	.string	"rx"
.LC2:
	.string	"no DMA channel available\n"
	.text
	.p2align 4
	.type	atmel_tdes_dma_init, @function
atmel_tdes_dma_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	mov	edi, ebp
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	dma_cap_zero@PLT
	mov	edi, DWORD PTR DMA_SLAVE[rip]
	mov	esi, ebp
	call	dma_cap_set@PLT
	mov	rax, QWORD PTR [r12]
	mov	ecx, DWORD PTR [rbx]
	mov	edi, ebp
	mov	esi, DWORD PTR atmel_tdes_filter[rip]
	lea	r8, .LC0[rip]
	lea	rdx, 4[rax]
	call	dma_request_slave_channel_compat@PLT
	mov	QWORD PTR 8[rbx], rax
	test	rax, rax
	je	.L2
	mov	ecx, DWORD PTR [rbx]
	mov	rdx, QWORD PTR [r12]
	mov	DWORD PTR 24[rbx], 0
	mov	edi, ebp
	mov	eax, DWORD PTR DMA_MEM_TO_DEV[rip]
	mov	esi, DWORD PTR atmel_tdes_filter[rip]
	movabs	r13, 4294967297
	lea	r8, .LC1[rip]
	mov	QWORD PTR 16[rbx], r13
	mov	DWORD PTR 56[rbx], eax
	mov	rax, QWORD PTR TDES_IDATA1R[rip]
	add	rax, QWORD PTR 120[rbx]
	mov	QWORD PTR 48[rbx], rax
	mov	rax, QWORD PTR DMA_SLAVE_BUSWIDTH_4_BYTES[rip]
	mov	QWORD PTR 40[rbx], rax
	mov	QWORD PTR 32[rbx], rax
	call	dma_request_slave_channel_compat@PLT
	mov	QWORD PTR 112[rbx], rax
	test	rax, rax
	je	.L10
	mov	eax, DWORD PTR DMA_DEV_TO_MEM[rip]
	mov	QWORD PTR 64[rbx], r13
	mov	DWORD PTR 72[rbx], 0
	mov	DWORD PTR 104[rbx], eax
	mov	rax, QWORD PTR TDES_ODATA1R[rip]
	add	rax, QWORD PTR 120[rbx]
	mov	QWORD PTR 96[rbx], rax
	mov	rax, QWORD PTR DMA_SLAVE_BUSWIDTH_4_BYTES[rip]
	mov	QWORD PTR 88[rbx], rax
	mov	QWORD PTR 80[rbx], rax
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[rbx]
	call	dma_release_channel@PLT
.L2:
	mov	edi, DWORD PTR [rbx]
	lea	rsi, .LC2[rip]
	call	dev_warn@PLT
	mov	eax, DWORD PTR ENODEV[rip]
	add	rsp, 8
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	neg	eax
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	atmel_tdes_dma_init, .-atmel_tdes_dma_init
	.comm	atmel_tdes_filter,4,4
	.comm	TDES_ODATA1R,8,8
	.comm	TDES_IDATA1R,8,8
	.comm	ENODEV,4,4
	.comm	DMA_SLAVE_BUSWIDTH_4_BYTES,8,8
	.comm	DMA_SLAVE,4,4
	.comm	DMA_MEM_TO_DEV,4,4
	.comm	DMA_DEV_TO_MEM,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_atmel-tdes.c_atmel_tdes_dma_init.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"tx\000"
	.align	2
.LC1:
	.ascii	"rx\000"
	.align	2
.LC2:
	.ascii	"no DMA channel available\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	atmel_tdes_dma_init, %function
atmel_tdes_dma_init:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r5, #0
	mov	r6, r1
	mov	r4, r0
	sub	sp, sp, #12
	mov	r0, r5
	bl	dma_cap_zero
	ldr	r3, .L11
	mov	r1, r5
	ldr	r0, [r3]
	bl	dma_cap_set
	ldr	r8, .L11+4
	ldr	r2, [r6]
	ldr	ip, .L11+8
	ldr	r3, [r4]
	mov	r0, r5
	ldr	r1, [r8]
	add	r2, r2, #4
	str	ip, [sp]
	bl	dma_request_slave_channel_compat
	cmp	r0, r5
	str	r0, [r4, #4]
	beq	.L2
	mov	r7, #1
	ldr	r3, .L11+12
	ldr	r1, .L11+16
	ldr	r2, [r3]
	ldr	r3, [r4, #68]
	ldr	r9, .L11+20
	add	r3, r3, r2
	ldr	ip, [r1]
	ldr	r2, [r6]
	ldr	r0, [r9]
	str	r3, [r4, #28]
	ldr	r3, .L11+24
	str	r0, [r4, #24]
	str	r0, [r4, #20]
	str	ip, [r4, #32]
	str	r7, [r4, #8]
	str	r7, [r4, #12]
	str	r5, [r4, #16]
	str	r3, [sp]
	mov	r0, r5
	ldr	r1, [r8]
	ldr	r3, [r4]
	bl	dma_request_slave_channel_compat
	cmp	r0, r5
	str	r0, [r4, #64]
	beq	.L10
	ldr	r2, .L11+28
	ldr	r3, .L11+32
	ldr	r0, [r2]
	ldr	r1, [r3]
	ldr	r3, [r4, #68]
	ldr	r2, [r9]
	add	r3, r3, r0
	mov	r0, r5
	str	r2, [r4, #52]
	str	r2, [r4, #48]
	str	r7, [r4, #36]
	str	r7, [r4, #40]
	str	r5, [r4, #44]
	str	r3, [r4, #56]
	str	r1, [r4, #60]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L10:
	ldr	r0, [r4, #4]
	bl	dma_release_channel
.L2:
	ldr	r0, [r4]
	ldr	r1, .L11+36
	bl	dev_warn
	ldr	r3, .L11+40
	ldr	r0, [r3]
	rsb	r0, r0, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L12:
	.align	2
.L11:
	.word	DMA_SLAVE
	.word	atmel_tdes_filter
	.word	.LC0
	.word	TDES_IDATA1R
	.word	DMA_MEM_TO_DEV
	.word	DMA_SLAVE_BUSWIDTH_4_BYTES
	.word	.LC1
	.word	TDES_ODATA1R
	.word	DMA_DEV_TO_MEM
	.word	.LC2
	.word	ENODEV
	.size	atmel_tdes_dma_init, .-atmel_tdes_dma_init
	.comm	atmel_tdes_filter,4,4
	.comm	TDES_ODATA1R,4,4
	.comm	TDES_IDATA1R,4,4
	.comm	ENODEV,4,4
	.comm	DMA_SLAVE_BUSWIDTH_4_BYTES,4,4
	.comm	DMA_SLAVE,4,4
	.comm	DMA_MEM_TO_DEV,4,4
	.comm	DMA_DEV_TO_MEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
