	.file	"extr_if_ale.c_ale_dma_free.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	ale_dma_free, @function
ale_dma_free:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	rdi, QWORD PTR 88[rdi]
	test	rdi, rdi
	je	.L2
	mov	edx, DWORD PTR ALE_TX_RING_CNT[rip]
	test	edx, edx
	jle	.L3
	xor	ebp, ebp
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rax, QWORD PTR 96[rbx]
	lea	r12, [rax+rbp*8]
	mov	rsi, QWORD PTR [r12]
	test	rsi, rsi
	je	.L4
	call	bus_dmamap_destroy@PLT
	mov	QWORD PTR [r12], 0
	mov	rdi, QWORD PTR 88[rbx]
.L4:
	add	rbp, 1
	cmp	DWORD PTR ALE_TX_RING_CNT[rip], ebp
	jg	.L5
.L3:
	call	bus_dma_tag_destroy@PLT
	mov	QWORD PTR 88[rbx], 0
.L2:
	mov	rdi, QWORD PTR 64[rbx]
	test	rdi, rdi
	je	.L6
	cmp	QWORD PTR [rbx], 0
	jne	.L63
	mov	rsi, QWORD PTR 72[rbx]
	test	rsi, rsi
	je	.L8
.L67:
	mov	edx, DWORD PTR 80[rbx]
	call	bus_dmamem_free@PLT
	mov	rdi, QWORD PTR 64[rbx]
.L8:
	mov	QWORD PTR [rbx], 0
	mov	QWORD PTR 72[rbx], 0
	call	bus_dma_tag_destroy@PLT
	mov	QWORD PTR 64[rbx], 0
.L6:
	mov	eax, DWORD PTR ALE_RX_PAGES[rip]
	test	eax, eax
	jle	.L15
	mov	rdx, QWORD PTR 56[rbx]
	xor	ebp, ebp
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rsi, QWORD PTR 48[rax]
	test	rsi, rsi
	je	.L14
	mov	edx, DWORD PTR 56[rax]
	call	bus_dmamem_free@PLT
	mov	rax, QWORD PTR 56[rbx]
	add	rax, r12
	mov	rdi, QWORD PTR 40[rax]
.L14:
	mov	QWORD PTR [rax], 0
	mov	QWORD PTR 48[rax], 0
	call	bus_dma_tag_destroy@PLT
	mov	rdx, QWORD PTR 56[rbx]
	mov	QWORD PTR 40[rdx+r12], 0
.L12:
	mov	eax, DWORD PTR ALE_RX_PAGES[rip]
	add	rbp, 1
	cmp	eax, ebp
	jle	.L64
.L9:
	mov	r12, rbp
	sal	r12, 6
	lea	rax, [rdx+r12]
	mov	rdi, QWORD PTR 40[rax]
	test	rdi, rdi
	je	.L12
	cmp	QWORD PTR [rax], 0
	je	.L13
	mov	esi, DWORD PTR 56[rax]
	call	bus_dmamap_unload@PLT
	mov	rax, QWORD PTR 56[rbx]
	add	rax, r12
	mov	rdi, QWORD PTR 40[rax]
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L15:
	mov	rdi, QWORD PTR 32[rbx]
	test	rdi, rdi
	je	.L11
	cmp	QWORD PTR 8[rbx], 0
	jne	.L65
	mov	rsi, QWORD PTR 40[rbx]
	test	rsi, rsi
	je	.L21
.L66:
	mov	edx, DWORD PTR 48[rbx]
	call	bus_dmamem_free@PLT
	mov	rdi, QWORD PTR 32[rbx]
.L21:
	mov	QWORD PTR 8[rbx], 0
	mov	QWORD PTR 40[rbx], 0
	call	bus_dma_tag_destroy@PLT
	mov	QWORD PTR 32[rbx], 0
.L11:
	mov	rdi, QWORD PTR 24[rbx]
	test	rdi, rdi
	je	.L22
	call	bus_dma_tag_destroy@PLT
	mov	QWORD PTR 24[rbx], 0
.L22:
	mov	rdi, QWORD PTR 16[rbx]
	test	rdi, rdi
	je	.L1
	call	bus_dma_tag_destroy@PLT
	mov	QWORD PTR 16[rbx], 0
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L64:
	.cfi_restore_state
	test	eax, eax
	jle	.L15
	xor	ebp, ebp
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rsi, QWORD PTR 24[rax]
	test	rsi, rsi
	je	.L18
	mov	edx, DWORD PTR 32[rax]
	call	bus_dmamem_free@PLT
	mov	rax, QWORD PTR 56[rbx]
	add	rax, r12
	mov	rdi, QWORD PTR 16[rax]
.L18:
	mov	QWORD PTR 8[rax], 0
	mov	QWORD PTR 24[rax], 0
	call	bus_dma_tag_destroy@PLT
	mov	rdx, QWORD PTR 56[rbx]
	mov	QWORD PTR 16[rdx+r12], 0
.L16:
	add	rbp, 1
	cmp	DWORD PTR ALE_RX_PAGES[rip], ebp
	jle	.L15
.L19:
	mov	r12, rbp
	sal	r12, 6
	lea	rax, [rdx+r12]
	mov	rdi, QWORD PTR 16[rax]
	test	rdi, rdi
	je	.L16
	cmp	QWORD PTR 8[rax], 0
	je	.L17
	mov	esi, DWORD PTR 32[rax]
	call	bus_dmamap_unload@PLT
	mov	rax, QWORD PTR 56[rbx]
	add	rax, r12
	mov	rdi, QWORD PTR 16[rax]
	jmp	.L17
	.p2align 4,,10
	.p2align 3
.L65:
	mov	esi, DWORD PTR 48[rbx]
	call	bus_dmamap_unload@PLT
	mov	rsi, QWORD PTR 40[rbx]
	mov	rdi, QWORD PTR 32[rbx]
	test	rsi, rsi
	jne	.L66
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L63:
	mov	esi, DWORD PTR 80[rbx]
	call	bus_dmamap_unload@PLT
	mov	rsi, QWORD PTR 72[rbx]
	mov	rdi, QWORD PTR 64[rbx]
	test	rsi, rsi
	jne	.L67
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	ale_dma_free, .-ale_dma_free
	.comm	ALE_TX_RING_CNT,4,4
	.comm	ALE_RX_PAGES,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_if_ale.c_ale_dma_free.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	ale_dma_free, %function
ale_dma_free:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	ldr	r0, [r0, #44]
	cmp	r0, #0
	beq	.L2
	ldr	r7, .L80
	ldr	r3, [r7]
	cmp	r3, #0
	ble	.L3
	mov	r5, #0
	mov	r8, r5
.L5:
	ldr	r6, [r4, #48]
	ldr	r1, [r6, r5, lsl #2]
	cmp	r1, #0
	beq	.L4
	bl	bus_dmamap_destroy
	ldr	r0, [r4, #44]
	str	r8, [r6, r5, lsl #2]
.L4:
	ldr	r3, [r7]
	add	r5, r5, #1
	cmp	r3, r5
	bgt	.L5
.L3:
	bl	bus_dma_tag_destroy
	mov	r3, #0
	str	r3, [r4, #44]
.L2:
	ldr	r0, [r4, #32]
	cmp	r0, #0
	beq	.L6
	ldr	r3, [r4]
	cmp	r3, #0
	bne	.L75
	ldr	r1, [r4, #36]
	cmp	r1, #0
	beq	.L8
.L79:
	ldr	r2, [r4, #40]
	bl	bus_dmamem_free
	ldr	r0, [r4, #32]
.L8:
	mov	r5, #0
	str	r5, [r4]
	str	r5, [r4, #36]
	bl	bus_dma_tag_destroy
	str	r5, [r4, #32]
.L6:
	ldr	r5, .L80+4
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L15
	mov	r6, #0
	ldr	r2, [r4, #28]
	mov	r8, r6
	b	.L9
.L13:
	ldr	r1, [r3, #24]
	cmp	r1, #0
	beq	.L14
	ldr	r2, [r3, #28]
	bl	bus_dmamem_free
	ldr	r3, [r4, #28]
	add	r3, r3, r7
	ldr	r0, [r3, #20]
.L14:
	str	r8, [r3]
	str	r8, [r3, #24]
	bl	bus_dma_tag_destroy
	ldr	r2, [r4, #28]
	add	r7, r2, r7
	str	r8, [r7, #20]
.L12:
	ldr	r3, [r5]
	add	r6, r6, #1
	cmp	r3, r6
	ble	.L76
.L9:
	add	r3, r2, r6, lsl #5
	ldr	r0, [r3, #20]
	lsl	r7, r6, #5
	cmp	r0, #0
	beq	.L12
	ldr	r2, [r2, r6, lsl #5]
	cmp	r2, #0
	beq	.L13
	ldr	r1, [r3, #28]
	bl	bus_dmamap_unload
	ldr	r3, [r4, #28]
	add	r3, r3, r7
	ldr	r0, [r3, #20]
	b	.L13
.L15:
	ldr	r0, [r4, #16]
	cmp	r0, #0
	beq	.L11
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bne	.L77
	ldr	r1, [r4, #20]
	cmp	r1, #0
	beq	.L21
.L78:
	ldr	r2, [r4, #24]
	bl	bus_dmamem_free
	ldr	r0, [r4, #16]
.L21:
	mov	r5, #0
	str	r5, [r4, #4]
	str	r5, [r4, #20]
	bl	bus_dma_tag_destroy
	str	r5, [r4, #16]
.L11:
	ldr	r0, [r4, #12]
	cmp	r0, #0
	beq	.L22
	bl	bus_dma_tag_destroy
	mov	r3, #0
	str	r3, [r4, #12]
.L22:
	ldr	r0, [r4, #8]
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	bl	bus_dma_tag_destroy
	mov	r3, #0
	str	r3, [r4, #8]
	pop	{r4, r5, r6, r7, r8, pc}
.L76:
	cmp	r3, #0
	ble	.L15
	mov	r8, #0
	mov	r7, r8
	b	.L19
.L17:
	ldr	r1, [r3, #12]
	cmp	r1, #0
	beq	.L18
	ldr	r2, [r3, #16]
	bl	bus_dmamem_free
	ldr	r3, [r4, #28]
	add	r3, r3, r6
	ldr	r0, [r3, #8]
.L18:
	str	r7, [r3, #4]
	str	r7, [r3, #12]
	bl	bus_dma_tag_destroy
	ldr	r2, [r4, #28]
	add	r6, r2, r6
	str	r7, [r6, #8]
.L16:
	ldr	r3, [r5]
	cmp	r3, r8
	ble	.L15
.L19:
	add	r3, r2, r8, lsl #5
	ldr	r0, [r3, #8]
	lsl	r6, r8, #5
	cmp	r0, #0
	add	r8, r8, #1
	beq	.L16
	ldr	r2, [r3, #4]
	cmp	r2, #0
	beq	.L17
	ldr	r1, [r3, #16]
	bl	bus_dmamap_unload
	ldr	r3, [r4, #28]
	add	r3, r3, r6
	ldr	r0, [r3, #8]
	b	.L17
.L77:
	ldr	r1, [r4, #24]
	bl	bus_dmamap_unload
	ldr	r1, [r4, #20]
	ldr	r0, [r4, #16]
	cmp	r1, #0
	bne	.L78
	b	.L21
.L75:
	ldr	r1, [r4, #40]
	bl	bus_dmamap_unload
	ldr	r1, [r4, #36]
	ldr	r0, [r4, #32]
	cmp	r1, #0
	bne	.L79
	b	.L8
.L81:
	.align	2
.L80:
	.word	ALE_TX_RING_CNT
	.word	ALE_RX_PAGES
	.size	ale_dma_free, .-ale_dma_free
	.comm	ALE_TX_RING_CNT,4,4
	.comm	ALE_RX_PAGES,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
