	.file	"extr_eesox.c_eesoxscsi_dma_setup.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	eesoxscsi_dma_setup, @function
eesoxscsi_dma_setup:
.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
	mov	r12, rdx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rcx
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r13, QWORD PTR [rdi]
	call	scsi_get_device@PLT
	mov	r15d, DWORD PTR 8[r13]
	cmp	DWORD PTR NO_DMA[rip], r15d
	je	.L2
	cmp	QWORD PTR fasdma_real_all[rip], rbx
	mov	r14, rax
	je	.L3
	cmp	DWORD PTR 0[rbp], 511
	jg	.L3
.L2:
	mov	rax, QWORD PTR fasdma_pseudo[rip]
	add	rsp, 8
	.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
.L3:
	.cfi_restore_state
	mov	edx, DWORD PTR NR_SG[rip]
	mov	rdi, QWORD PTR 0[r13]
	mov	rsi, rbp
	call	copy_SCp_to_sg@PLT
	cmp	QWORD PTR DMA_OUT[rip], r12
	mov	ebx, eax
	je	.L9
	mov	ecx, DWORD PTR DMA_FROM_DEVICE[rip]
	mov	ebp, DWORD PTR DMA_MODE_READ[rip]
.L5:
	mov	rsi, QWORD PTR 0[r13]
	mov	edx, ebx
	mov	rdi, r14
	call	dma_map_sg@PLT
	mov	edi, r15d
	call	disable_dma@PLT
	mov	rsi, QWORD PTR 0[r13]
	mov	edx, ebx
	mov	edi, r15d
	call	set_dma_sg@PLT
	mov	esi, ebp
	mov	edi, r15d
	call	set_dma_mode@PLT
	mov	edi, r15d
	call	enable_dma@PLT
	mov	rax, QWORD PTR fasdma_real_all[rip]
	add	rsp, 8
	.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
.L9:
	.cfi_restore_state
	mov	ecx, DWORD PTR DMA_TO_DEVICE[rip]
	mov	ebp, DWORD PTR DMA_MODE_WRITE[rip]
	jmp	.L5
	.cfi_endproc
.LFE0:
	.size	eesoxscsi_dma_setup, .-eesoxscsi_dma_setup
	.comm	fasdma_real_all,8,8
	.comm	fasdma_pseudo,8,8
	.comm	NR_SG,4,4
	.comm	NO_DMA,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_OUT,8,8
	.comm	DMA_MODE_WRITE,4,4
	.comm	DMA_MODE_READ,4,4
	.comm	DMA_FROM_DEVICE,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_eesox.c_eesoxscsi_dma_setup.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	eesoxscsi_dma_setup, %function
eesoxscsi_dma_setup:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r3
	ldr	r9, [r0]
	mov	r4, r1
	mov	r7, r2
	bl	scsi_get_device
	ldr	r3, .L9
	ldr	r8, [r9, #4]
	ldr	r3, [r3]
	cmp	r3, r8
	beq	.L2
	ldr	r10, .L9+4
	mov	r6, r0
	ldr	r3, [r10]
	cmp	r3, r5
	beq	.L3
	ldr	r3, [r4]
	cmp	r3, #512
	bge	.L3
.L2:
	ldr	r3, .L9+8
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L3:
	ldr	r3, .L9+12
	mov	r1, r4
	ldr	r2, [r3]
	ldr	r0, [r9]
	bl	copy_SCp_to_sg
	mov	r4, r0
	ldr	r3, .L9+16
	ldr	r1, [r9]
	ldr	r3, [r3]
	mov	r0, r6
	cmp	r3, r7
	ldreq	r2, .L9+20
	ldrne	r2, .L9+24
	ldreq	r3, .L9+28
	ldrne	r3, .L9+32
	ldr	r5, [r2]
	ldr	r3, [r3]
	mov	r2, r4
	bl	dma_map_sg
	mov	r0, r8
	bl	disable_dma
	mov	r2, r4
	ldr	r1, [r9]
	mov	r0, r8
	bl	set_dma_sg
	mov	r1, r5
	mov	r0, r8
	bl	set_dma_mode
	mov	r0, r8
	bl	enable_dma
	ldr	r0, [r10]
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L10:
	.align	2
.L9:
	.word	NO_DMA
	.word	fasdma_real_all
	.word	fasdma_pseudo
	.word	NR_SG
	.word	DMA_OUT
	.word	DMA_MODE_WRITE
	.word	DMA_MODE_READ
	.word	DMA_TO_DEVICE
	.word	DMA_FROM_DEVICE
	.size	eesoxscsi_dma_setup, .-eesoxscsi_dma_setup
	.comm	fasdma_real_all,4,4
	.comm	fasdma_pseudo,4,4
	.comm	NR_SG,4,4
	.comm	NO_DMA,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_OUT,4,4
	.comm	DMA_MODE_WRITE,4,4
	.comm	DMA_MODE_READ,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
