	.file	"extr_isp_pci.c_dma2.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	dma2, @function
dma2:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	test	ecx, ecx
	jne	.L16
	mov	r15, QWORD PTR 16[rdi]
	mov	rbp, QWORD PTR 8[rdi]
	mov	r13, rsi
	mov	r12d, edx
	mov	r14d, DWORD PTR ISP_NOXFR[rip]
	test	edx, edx
	je	.L5
	mov	edx, DWORD PTR CAM_DIR_IN[rip]
	mov	eax, DWORD PTR 8[rbp]
	and	eax, DWORD PTR CAM_DIR_MASK[rip]
	mov	rdi, QWORD PTR XPT_CONT_TARGET_IO[rip]
	cmp	eax, edx
	mov	r14d, DWORD PTR ISP_FROM_DEVICE[rip]
	cmovne	r14d, DWORD PTR ISP_TO_DEVICE[rip]
	cmp	QWORD PTR 16[rbp], rdi
	mov	rdi, rbp
	sete	cl
	cmp	eax, edx
	mov	edx, DWORD PTR BUS_DMASYNC_PREREAD[rip]
	sete	al
	cmp	cl, al
	cmove	edx, DWORD PTR BUS_DMASYNC_PREWRITE[rip]
	mov	DWORD PTR 8[rsp], edx
	call	PISP_PCMD@PLT
	mov	edx, DWORD PTR 8[rsp]
	mov	edi, DWORD PTR [r15]
	mov	esi, DWORD PTR [rax]
	call	bus_dmamap_sync@PLT
.L5:
	mov	rdx, QWORD PTR 0[rbp]
	mov	rdi, rbp
	mov	QWORD PTR 8[rsp], rdx
	call	XS_XFRLEN@PLT
	sub	rsp, 8
	.cfi_def_cfa_offset 88
	mov	esi, DWORD PTR 4[rbx]
	mov	ecx, r12d
	mov	rdx, QWORD PTR 16[rsp]
	mov	r8d, eax
	mov	r9d, r14d
	mov	rdi, r15
	push	rdx
	.cfi_def_cfa_offset 96
	mov	rdx, r13
	call	isp_send_cmd@PLT
	pop	rdx
	.cfi_def_cfa_offset 88
	pop	rcx
	.cfi_def_cfa_offset 80
	cmp	eax, 128
	je	.L1
	cmp	eax, 129
	je	.L17
	mov	eax, DWORD PTR EIO[rip]
	mov	DWORD PTR [rbx], eax
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	eax, DWORD PTR MUSHERR_NOQENTRIES[rip]
	mov	DWORD PTR [rbx], eax
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	DWORD PTR [rdi], ecx
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	dma2, .-dma2
	.comm	XPT_CONT_TARGET_IO,8,8
	.comm	MUSHERR_NOQENTRIES,4,4
	.comm	ISP_TO_DEVICE,4,4
	.comm	ISP_NOXFR,4,4
	.comm	ISP_FROM_DEVICE,4,4
	.comm	EIO,4,4
	.comm	CAM_DIR_MASK,4,4
	.comm	CAM_DIR_IN,4,4
	.comm	BUS_DMASYNC_PREWRITE,4,4
	.comm	BUS_DMASYNC_PREREAD,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_isp_pci.c_dma2.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	dma2, %function
dma2:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	ip, r3, #0
	mov	r4, r0
	sub	sp, sp, #20
	strne	ip, [r0]
	bne	.L1
	cmp	r2, #0
	mov	r6, r1
	mov	r5, r2
	ldr	r8, [r0, #12]
	ldr	r7, [r0, #8]
	beq	.L16
	ldr	r3, .L17
	ldr	r1, .L17+4
	ldr	r2, [r3]
	ldr	r3, [r7, #4]
	ldr	r1, [r1]
	and	r3, r3, r2
	cmp	r3, r1
	ldreq	r2, .L17+8
	ldrne	r2, .L17+12
	ldr	r0, .L17+16
	ldr	r9, [r2]
	ldr	r0, [r0]
	ldr	r2, [r7, #8]
	sub	r3, r3, r1
	sub	r2, r2, r0
	clz	r3, r3
	clz	r2, r2
	lsr	r3, r3, #5
	lsr	r2, r2, #5
	cmp	r2, r3
	ldrne	r3, .L17+20
	ldreq	r3, .L17+24
	mov	r0, r7
	ldr	fp, [r3]
	ldr	r10, [r8]
	bl	PISP_PCMD
	mov	r2, fp
	ldr	r1, [r0]
	mov	r0, r10
	bl	bus_dmamap_sync
.L5:
	mov	r0, r7
	ldr	r10, [r4, #4]
	bl	XS_XFRLEN
	ldr	r3, [r7]
	mov	r1, r10
	stm	sp, {r0, r9}
	str	r3, [sp, #8]
	mov	r2, r6
	mov	r3, r5
	mov	r0, r8
	bl	isp_send_cmd
	cmp	r0, #128
	beq	.L1
	cmp	r0, #129
	ldreq	r3, .L17+28
	ldrne	r3, .L17+32
	ldr	r3, [r3]
	str	r3, [r4]
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	ldr	r3, .L17+36
	ldr	r9, [r3]
	b	.L5
.L18:
	.align	2
.L17:
	.word	CAM_DIR_MASK
	.word	CAM_DIR_IN
	.word	ISP_FROM_DEVICE
	.word	ISP_TO_DEVICE
	.word	XPT_CONT_TARGET_IO
	.word	BUS_DMASYNC_PREREAD
	.word	BUS_DMASYNC_PREWRITE
	.word	MUSHERR_NOQENTRIES
	.word	EIO
	.word	ISP_NOXFR
	.size	dma2, .-dma2
	.comm	XPT_CONT_TARGET_IO,4,4
	.comm	MUSHERR_NOQENTRIES,4,4
	.comm	ISP_TO_DEVICE,4,4
	.comm	ISP_NOXFR,4,4
	.comm	ISP_FROM_DEVICE,4,4
	.comm	EIO,4,4
	.comm	CAM_DIR_MASK,4,4
	.comm	CAM_DIR_IN,4,4
	.comm	BUS_DMASYNC_PREWRITE,4,4
	.comm	BUS_DMASYNC_PREREAD,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
