	.file	"extr_mpt3sas_warpdrive.c_mpt3sas_setup_direct_io.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mpt3sas_setup_direct_io
	.type	mpt3sas_setup_direct_io, @function
mpt3sas_setup_direct_io:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	rdi, rsi
	mov	r15, rsi
	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, rcx
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR [rsi]
	mov	r13, QWORD PTR [rax]
	call	scsi_cmd_priv@PLT
	cmp	QWORD PTR READ_10[rip], r13
	mov	r14, rax
	je	.L2
	cmp	QWORD PTR WRITE_10[rip], r13
	je	.L2
	cmp	QWORD PTR READ_16[rip], r13
	je	.L3
	cmp	QWORD PTR WRITE_16[rip], r13
	je	.L3
.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
.L2:
	.cfi_restore_state
	mov	rax, QWORD PTR [r12]
	lea	rdi, 8[rax]
	call	get_unaligned_be32@PLT
	mov	ebx, eax
.L10:
	mov	rdi, r15
	call	scsi_bufflen@PLT
	mov	ecx, DWORD PTR 0[rbp]
	sar	eax, cl
	lea	edx, -1[rbx+rax]
	cmp	edx, DWORD PTR 4[rbp]
	jg	.L1
	mov	edx, DWORD PTR 8[rbp]
	lea	r15d, -1[rdx]
	and	r15d, ebx
	add	eax, r15d
	cmp	eax, edx
	jg	.L1
	mov	ecx, DWORD PTR 12[rbp]
	mov	rsi, QWORD PTR 16[rbp]
	sar	ebx, cl
	mov	DWORD PTR 12[rsp], ecx
	mov	edi, ebx
	call	sector_div@PLT
	mov	rdx, QWORD PTR 24[rbp]
	mov	ecx, DWORD PTR 12[rsp]
	cdqe
	mov	edi, DWORD PTR [rdx+rax*4]
	sal	ebx, cl
	add	r15d, ebx
	call	cpu_to_le16@PLT
	mov	rbp, QWORD PTR [r12]
	mov	DWORD PTR 8[r12], eax
	add	rbp, 8
	cmp	QWORD PTR READ_10[rip], r13
	je	.L7
	cmp	QWORD PTR WRITE_10[rip], r13
	jne	.L8
.L7:
	mov	edi, r15d
	call	lower_32_bits@PLT
	mov	rsi, rbp
	mov	edi, eax
	call	put_unaligned_be32@PLT
.L9:
	mov	DWORD PTR [r14], 1
	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
.L3:
	.cfi_restore_state
	mov	rax, QWORD PTR [r12]
	lea	rdi, 8[rax]
	call	get_unaligned_be64@PLT
	mov	ebx, eax
	jmp	.L10
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rsi, rbp
	mov	edi, r15d
	call	put_unaligned_be64@PLT
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	mpt3sas_setup_direct_io, .-mpt3sas_setup_direct_io
	.comm	WRITE_16,8,8
	.comm	WRITE_10,8,8
	.comm	READ_16,8,8
	.comm	READ_10,8,8
	.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_mpt3sas_warpdrive.c_mpt3sas_setup_direct_io.c"
	.text
	.align	2
	.global	mpt3sas_setup_direct_io
	.syntax unified
	.arm
	.fpu softvfp
	.type	mpt3sas_setup_direct_io, %function
mpt3sas_setup_direct_io:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r5, r1
	ldr	r1, [r1]
	mov	r0, r5
	mov	r7, r3
	ldr	r8, [r1]
	mov	r4, r2
	bl	scsi_cmd_priv
	ldr	r10, .L13
	mov	r9, r0
	ldr	r3, [r10]
	cmp	r3, r8
	beq	.L2
	ldr	r3, .L13+4
	ldr	r3, [r3]
	cmp	r3, r8
	beq	.L2
	ldr	r3, .L13+8
	ldr	r3, [r3]
	cmp	r3, r8
	beq	.L3
	ldr	r3, .L13+12
	ldr	r3, [r3]
	cmp	r3, r8
	popne	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	ldr	r0, [r7]
	add	r0, r0, #8
	bl	get_unaligned_be64
	mov	r6, r0
	b	.L9
.L2:
	ldr	r0, [r7]
	add	r0, r0, #8
	bl	get_unaligned_be32
	mov	r6, r0
.L9:
	mov	r0, r5
	bl	scsi_bufflen
	ldr	r2, [r4]
	ldr	r1, [r4, #4]
	asr	r2, r0, r2
	add	r3, r6, r2
	sub	r3, r3, #1
	cmp	r3, r1
	popgt	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	r3, [r4, #8]
	sub	r5, r3, #1
	and	r5, r5, r6
	add	r2, r2, r5
	cmp	r2, r3
	popgt	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	ldr	fp, [r4, #12]
	ldr	r1, [r4, #16]
	asr	r6, r6, fp
	mov	r0, r6
	bl	sector_div
	ldr	r3, [r4, #20]
	add	r6, r5, r6, lsl fp
	ldr	r0, [r3, r0, lsl #2]
	bl	cpu_to_le16
	ldr	r3, [r10]
	str	r0, [r7, #4]
	cmp	r3, r8
	beq	.L6
	ldr	r3, .L13+4
	ldr	r3, [r3]
	cmp	r3, r8
	bne	.L7
.L6:
	mov	r0, r6
	bl	lower_32_bits
	ldr	r1, [r7]
	add	r1, r1, #8
	bl	put_unaligned_be32
.L8:
	mov	r3, #1
	str	r3, [r9]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L7:
	ldr	r1, [r7]
	mov	r0, r6
	add	r1, r1, #8
	bl	put_unaligned_be64
	b	.L8
.L14:
	.align	2
.L13:
	.word	READ_10
	.word	WRITE_10
	.word	READ_16
	.word	WRITE_16
	.size	mpt3sas_setup_direct_io, .-mpt3sas_setup_direct_io
	.comm	WRITE_16,4,4
	.comm	WRITE_10,4,4
	.comm	READ_16,4,4
	.comm	READ_10,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
