	.file	"extr_xdma_fdt_test.c_xdmatest_test.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"test"
.LC1:
	.string	"Can't find xDMA controller.\n"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC2:
	.string	"Can't alloc virtual DMA channel.\n"
	.align 8
.LC3:
	.string	"Can't setup xDMA interrupt handler.\n"
	.align 8
.LC4:
	.string	"Can't configure virtual channel.\n"
	.text
	.p2align 4
	.type	xdmatest_test, @function
xdmatest_test:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	lea	rsi, .LC0[rip]
	push	rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	mov	edi, DWORD PTR 24[rdi]
	call	xdma_ofw_get@PLT
	mov	QWORD PTR 104[rbx], rax
	test	rax, rax
	je	.L12
	mov	rdi, rax
	call	xdma_channel_alloc@PLT
	mov	QWORD PTR 16[rbx], rax
	mov	rdi, rax
	test	rax, rax
	je	.L13
	mov	esi, DWORD PTR xdmatest_intr[rip]
	lea	rcx, 96[rbx]
	mov	rdx, rbx
	call	xdma_setup_intr@PLT
	test	eax, eax
	jne	.L14
	mov	esi, DWORD PTR 88[rbx]
	mov	edi, DWORD PTR 92[rbx]
	mov	edx, DWORD PTR BUS_DMASYNC_PREWRITE[rip]
	call	bus_dmamap_sync@PLT
	mov	esi, DWORD PTR 80[rbx]
	mov	edi, DWORD PTR 84[rbx]
	mov	edx, DWORD PTR BUS_DMASYNC_PREWRITE[rip]
	call	bus_dmamap_sync@PLT
	mov	ecx, DWORD PTR [rbx]
	test	ecx, ecx
	jle	.L6
	mov	rdi, QWORD PTR 8[rbx]
	mov	rsi, QWORD PTR 72[rbx]
	xor	eax, eax
	.p2align 4,,10
	.p2align 3
.L7:
	movzx	edx, al
	mov	DWORD PTR [rdi+rax*4], edx
	mov	ecx, DWORD PTR [rbx]
	mov	QWORD PTR [rsi+rax*8], 0
	add	rax, 1
	cmp	ecx, eax
	jg	.L7
.L6:
	mov	eax, DWORD PTR XR_TYPE_PHYS_ADDR[rip]
	mov	esi, DWORD PTR 32[rbx]
	mov	DWORD PTR 44[rbx], ecx
	mov	edx, DWORD PTR 28[rbx]
	mov	rdi, QWORD PTR 16[rbx]
	mov	DWORD PTR 48[rbx], 1
	mov	DWORD PTR 64[rbx], eax
	mov	eax, DWORD PTR XDMA_MEM_TO_MEM[rip]
	mov	DWORD PTR 56[rbx], esi
	mov	DWORD PTR 60[rbx], eax
	movabs	rax, 17179869188
	mov	DWORD PTR 52[rbx], edx
	mov	QWORD PTR 36[rbx], rax
	call	xdma_request@PLT
	mov	r12d, eax
	test	eax, eax
	jne	.L15
	mov	rdi, QWORD PTR 16[rbx]
	call	xdma_begin@PLT
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	mov	edi, DWORD PTR 24[rbx]
	lea	rsi, .LC3[rip]
	mov	r12d, -1
	call	device_printf@PLT
	jmp	.L1
.L15:
	mov	edi, DWORD PTR 24[rbx]
	lea	rsi, .LC4[rip]
	mov	r12d, -1
	call	device_printf@PLT
	jmp	.L1
.L13:
	mov	edi, DWORD PTR 24[rbx]
	lea	rsi, .LC2[rip]
	mov	r12d, -1
	call	device_printf@PLT
	jmp	.L1
.L12:
	mov	edi, DWORD PTR 24[rbx]
	lea	rsi, .LC1[rip]
	mov	r12d, -1
	call	device_printf@PLT
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	xdmatest_test, .-xdmatest_test
	.comm	xdmatest_intr,4,4
	.comm	XR_TYPE_PHYS_ADDR,4,4
	.comm	XDMA_MEM_TO_MEM,4,4
	.comm	BUS_DMASYNC_PREWRITE,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_xdma_fdt_test.c_xdmatest_test.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"test\000"
	.align	2
.LC1:
	.ascii	"Can't find xDMA controller.\012\000"
	.align	2
.LC2:
	.ascii	"Can't alloc virtual DMA channel.\012\000"
	.align	2
.LC3:
	.ascii	"Can't setup xDMA interrupt handler.\012\000"
	.align	2
.LC4:
	.ascii	"Can't configure virtual channel.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xdmatest_test, %function
xdmatest_test:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r1, .L16
	mov	r5, r0
	ldr	r0, [r0, #12]
	bl	xdma_ofw_get
	subs	r3, r0, #0
	str	r0, [r5, #80]
	beq	.L12
	bl	xdma_channel_alloc
	cmp	r0, #0
	str	r0, [r5, #8]
	beq	.L13
	ldr	r2, .L16+4
	add	r3, r5, #76
	ldr	r1, [r2]
	mov	r2, r5
	bl	xdma_setup_intr
	subs	r4, r0, #0
	bne	.L14
	ldr	r6, .L16+8
	ldr	r1, [r5, #68]
	ldr	r2, [r6]
	ldr	r0, [r5, #72]
	bl	bus_dmamap_sync
	ldr	r2, [r6]
	ldr	r1, [r5, #60]
	ldr	r0, [r5, #64]
	bl	bus_dmamap_sync
	ldr	r3, [r5]
	cmp	r3, #0
	ble	.L6
	mov	r0, r4
	ldr	r1, [r5, #4]
	ldr	r2, [r5, #56]
	sub	r1, r1, #4
	sub	r2, r2, #4
.L7:
	and	r3, r4, #255
	str	r3, [r1, #4]!
	ldr	r3, [r5]
	add	r4, r4, #1
	cmp	r3, r4
	str	r0, [r2, #4]!
	bgt	.L7
.L6:
	mov	r0, #4
	mov	ip, #1
	ldr	r1, .L16+12
	ldr	r2, .L16+16
	ldr	r1, [r1]
	ldr	r2, [r2]
	str	r1, [r5, #52]
	str	r2, [r5, #48]
	ldr	r1, [r5, #20]
	ldr	r2, [r5, #16]
	str	r0, [r5, #24]
	str	r0, [r5, #28]
	str	r3, [r5, #32]
	ldr	r0, [r5, #8]
	str	ip, [r5, #36]
	str	r1, [r5, #44]
	str	r2, [r5, #40]
	bl	xdma_request
	subs	r4, r0, #0
	bne	.L15
	ldr	r0, [r5, #8]
	bl	xdma_begin
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, pc}
.L14:
	ldr	r0, [r5, #12]
	ldr	r1, .L16+20
	bl	device_printf
	mvn	r4, #0
	b	.L1
.L15:
	ldr	r0, [r5, #12]
	ldr	r1, .L16+24
	bl	device_printf
	mvn	r4, #0
	b	.L1
.L13:
	ldr	r0, [r5, #12]
	ldr	r1, .L16+28
	bl	device_printf
	mvn	r4, #0
	b	.L1
.L12:
	ldr	r0, [r5, #12]
	ldr	r1, .L16+32
	bl	device_printf
	mvn	r4, #0
	b	.L1
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	xdmatest_intr
	.word	BUS_DMASYNC_PREWRITE
	.word	XR_TYPE_PHYS_ADDR
	.word	XDMA_MEM_TO_MEM
	.word	.LC3
	.word	.LC4
	.word	.LC2
	.word	.LC1
	.size	xdmatest_test, .-xdmatest_test
	.comm	xdmatest_intr,4,4
	.comm	XR_TYPE_PHYS_ADDR,4,4
	.comm	XDMA_MEM_TO_MEM,4,4
	.comm	BUS_DMASYNC_PREWRITE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
