	.file	"extr_scsi_all.c_scsi_read_write.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	scsi_read_write
	.type	scsi_read_write, @function
scsi_read_write:
.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
	mov	r14, rcx
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, esi
	mov	rsi, r9
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, r8d
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	ecx, DWORD PTR SCSI_RW_READ[rip]
	and	r8d, DWORD PTR SCSI_RW_DIRMASK[rip]
	mov	rdx, QWORD PTR 136[rsp]
	mov	eax, DWORD PTR 96[rsp]
	mov	edi, DWORD PTR 104[rsp]
	mov	r10d, DWORD PTR 112[rsp]
	mov	QWORD PTR [rsp], rdx
	mov	edx, DWORD PTR 144[rsp]
	mov	r9, QWORD PTR 120[rsp]
	mov	r15d, DWORD PTR 128[rsp]
	mov	DWORD PTR 8[rsp], edx
	cmp	eax, 9
	jg	.L2
	mov	eax, edi
	and	eax, 2097151
	test	edi, -2097152
	je	.L31
.L3:
	test	r10d, -65536
	je	.L32
.L8:
	mov	eax, DWORD PTR READ_12[rip]
	cmp	r8d, ecx
	mov	QWORD PTR 32[rbp], rsi
	cmovne	eax, DWORD PTR WRITE_12[rip]
	mov	rsi, QWORD PTR 8[rbp]
	mov	DWORD PTR 20[rsp], r10d
	mov	QWORD PTR 24[rsp], r9
	mov	DWORD PTR 40[rbp], eax
	mov	DWORD PTR 16[rsp], ecx
	mov	DWORD PTR 12[rsp], r8d
	call	scsi_ulto4b@PLT
	mov	r10d, DWORD PTR 20[rsp]
	mov	rsi, QWORD PTR 0[rbp]
	mov	QWORD PTR 24[rbp], 0
	mov	edi, r10d
	call	scsi_ulto4b@PLT
.L29:
	mov	QWORD PTR 16[rbp], 0
	mov	edi, DWORD PTR 4[rbp]
	movsx	rdx, r15d
	mov	esi, DWORD PTR CAM_DEBUG_SUBTRACE[rip]
	call	CAM_DEBUG@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	ecx, DWORD PTR 16[rsp]
	mov	eax, 48
	mov	r9, QWORD PTR 24[rsp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L2:
	cmp	eax, 11
	jle	.L3
	cmp	eax, 15
	jle	.L8
	cmp	r8d, ecx
	mov	eax, DWORD PTR READ_16[rip]
	cmovne	eax, DWORD PTR WRITE_16[rip]
	mov	QWORD PTR 32[rbp], rsi
	mov	esi, DWORD PTR 24[rbp]
	mov	QWORD PTR 24[rsp], r9
	mov	DWORD PTR 40[rbp], eax
	mov	DWORD PTR 16[rsp], ecx
	mov	DWORD PTR 12[rsp], r8d
	mov	DWORD PTR 20[rsp], r10d
	call	scsi_u64to8b@PLT
	mov	r10d, DWORD PTR 20[rsp]
	mov	rsi, QWORD PTR 8[rbp]
	mov	QWORD PTR 16[rbp], 0
	mov	edi, r10d
	call	scsi_ulto4b@PLT
	mov	r9, QWORD PTR 24[rsp]
	mov	ecx, DWORD PTR 16[rsp]
	mov	QWORD PTR 0[rbp], 0
	mov	r8d, DWORD PTR 12[rsp]
	mov	eax, 48
.L6:
	cmp	r8d, ecx
	mov	ecx, DWORD PTR CAM_DIR_IN[rip]
	cmovne	ecx, DWORD PTR CAM_DIR_OUT[rip]
	test	DWORD PTR SCSI_RW_BIO[rip], ebx
	je	.L18
	or	ecx, DWORD PTR CAM_DATA_BIO[rip]
.L18:
	mov	ebx, DWORD PTR 8[rsp]
	mov	QWORD PTR 112[rsp], rax
	mov	r8, r14
	mov	rdx, r13
	mov	rax, QWORD PTR [rsp]
	mov	DWORD PTR 96[rsp], r15d
	mov	esi, r12d
	mov	rdi, rbp
	mov	DWORD PTR 120[rsp], ebx
	mov	QWORD PTR 104[rsp], rax
	add	rsp, 40
	.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
	jmp	cam_fill_csio@PLT
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	movzx	r11d, r10b
	test	r10d, -256
	jne	.L3
	test	rsi, rsi
	jne	.L3
	cmp	r8d, ecx
	mov	edx, DWORD PTR READ_6[rip]
	mov	rsi, QWORD PTR 8[rbp]
	mov	edi, eax
	cmovne	edx, DWORD PTR WRITE_6[rip]
	mov	QWORD PTR 24[rsp], r9
	mov	DWORD PTR 16[rsp], ecx
	mov	DWORD PTR 24[rbp], edx
	mov	DWORD PTR 12[rsp], r8d
	mov	DWORD PTR 20[rsp], r11d
	call	scsi_ulto3b@PLT
	mov	r11d, DWORD PTR 20[rsp]
	mov	edi, DWORD PTR 4[rbp]
	movsx	rdx, r15d
	mov	QWORD PTR 16[rbp], 0
	mov	esi, DWORD PTR CAM_DEBUG_SUBTRACE[rip]
	mov	DWORD PTR 0[rbp], r11d
	call	CAM_DEBUG@PLT
	mov	r8d, DWORD PTR 12[rsp]
	mov	ecx, DWORD PTR 16[rsp]
	mov	eax, 32
	mov	r9, QWORD PTR 24[rsp]
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L32:
	cmp	r8d, ecx
	mov	eax, DWORD PTR READ_10[rip]
	mov	QWORD PTR 32[rbp], rsi
	cmovne	eax, DWORD PTR WRITE_10[rip]
	mov	rsi, QWORD PTR 8[rbp]
	mov	DWORD PTR 20[rsp], r10d
	mov	QWORD PTR 24[rsp], r9
	mov	DWORD PTR 40[rbp], eax
	mov	DWORD PTR 16[rsp], ecx
	mov	DWORD PTR 12[rsp], r8d
	call	scsi_ulto4b@PLT
	mov	r10d, DWORD PTR 20[rsp]
	mov	rsi, QWORD PTR 0[rbp]
	mov	QWORD PTR 24[rbp], 0
	mov	edi, r10d
	call	scsi_ulto2b@PLT
	jmp	.L29
	.cfi_endproc
.LFE0:
	.size	scsi_read_write, .-scsi_read_write
	.comm	WRITE_6,4,4
	.comm	WRITE_16,4,4
	.comm	WRITE_12,4,4
	.comm	WRITE_10,4,4
	.comm	SCSI_RW_READ,4,4
	.comm	SCSI_RW_DIRMASK,4,4
	.comm	SCSI_RW_BIO,4,4
	.comm	READ_6,4,4
	.comm	READ_16,4,4
	.comm	READ_12,4,4
	.comm	READ_10,4,4
	.comm	CAM_DIR_OUT,4,4
	.comm	CAM_DIR_IN,4,4
	.comm	CAM_DEBUG_SUBTRACE,4,4
	.comm	CAM_DATA_BIO,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_scsi_all.c_scsi_read_write.c"
	.text
	.align	2
	.global	scsi_read_write
	.syntax unified
	.arm
	.fpu softvfp
	.type	scsi_read_write, %function
scsi_read_write:
	@ args = 36, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	sub	sp, sp, #28
	mov	r6, r1
	ldr	r1, [sp, #84]
	ldr	lr, .L30
	str	r1, [sp, #8]
	ldr	r1, [sp, #92]
	ldr	ip, [sp, #72]
	ldr	r5, [lr]
	ldr	r9, [sp, #64]
	ldr	lr, .L30+4
	str	r1, [sp, #12]
	ldr	r1, [sp, #96]
	cmp	ip, #9
	mov	r4, r0
	mov	r7, r2
	str	r3, [sp, #4]
	ldr	r2, [sp, #68]
	ldr	r3, [lr]
	ldr	r0, [sp, #76]
	ldr	r8, [sp, #80]
	ldr	r10, [sp, #88]
	and	r5, r5, r9
	str	r1, [sp, #16]
	bgt	.L2
	bic	r1, r0, #-16777216
	bic	r1, r1, #14680064
	cmp	r1, r0
	beq	.L28
.L3:
	lsl	r1, r8, #16
	lsr	r1, r1, #16
	cmp	r1, r8
	beq	.L29
.L8:
	mov	fp, #0
	cmp	r5, r3
	ldreq	r1, .L30+8
	ldrne	r1, .L30+12
	ldr	r1, [r1]
	str	r2, [r4, #16]
	str	r1, [r4, #20]
	ldr	r1, [r4, #4]
	str	r3, [sp, #20]
	bl	scsi_ulto4b
	mov	r0, r8
	ldr	r1, [r4]
	str	fp, [r4, #12]
	bl	scsi_ulto4b
.L26:
	ldr	r2, .L30+16
	ldr	r0, [r4, #4]
	ldr	r1, [r2]
	str	fp, [r4, #8]
	mov	r2, r10
	bl	CAM_DEBUG
	mov	r1, #24
	ldr	r3, [sp, #20]
	b	.L6
.L2:
	cmp	ip, #11
	ble	.L3
	cmp	ip, #15
	ble	.L8
	mov	fp, #0
	cmp	r5, r3
	ldreq	r1, .L30+20
	ldrne	r1, .L30+24
	ldr	r1, [r1]
	str	r2, [r4, #16]
	str	r1, [r4, #20]
	ldr	r1, [r4, #12]
	str	r3, [sp, #20]
	bl	scsi_u64to8b
	ldr	r1, [r4, #4]
	mov	r0, r8
	str	fp, [r4, #8]
	bl	scsi_ulto4b
	mov	r1, #24
	ldr	r3, [sp, #20]
	str	fp, [r4]
.L6:
	ldr	r2, .L30+28
	cmp	r5, r3
	ldr	r2, [r2]
	ldreq	r3, .L30+32
	ldrne	r3, .L30+36
	tst	r9, r2
	ldrne	r2, .L30+40
	ldr	r3, [r3]
	ldrne	r2, [r2]
	mov	r0, r4
	orrne	r3, r3, r2
	ldr	r2, [sp, #16]
	str	r1, [sp, #80]
	str	r2, [sp, #84]
	ldr	r2, [sp, #12]
	mov	r1, r6
	str	r2, [sp, #76]
	ldr	r2, [sp, #8]
	str	r10, [sp, #72]
	str	r2, [sp, #68]
	ldr	r2, [sp, #4]
	str	r2, [sp, #64]
	mov	r2, r7
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	cam_fill_csio
.L28:
	bics	r1, r8, #255
	moveq	r1, #1
	movne	r1, #0
	cmp	r2, #0
	movne	r1, #0
	cmp	r1, #0
	and	fp, r8, #255
	beq	.L3
	cmp	r5, r3
	ldreq	r2, .L30+44
	ldrne	r2, .L30+48
	ldr	r1, [r4, #4]
	ldr	r2, [r2]
	str	r3, [sp, #20]
	str	r2, [r4, #12]
	bl	scsi_ulto3b
	mov	r1, #0
	ldr	r2, .L30+16
	str	r1, [r4, #8]
	ldr	r0, [r4, #4]
	ldr	r1, [r2]
	str	fp, [r4]
	mov	r2, r10
	bl	CAM_DEBUG
	mov	r1, #16
	ldr	r3, [sp, #20]
	b	.L6
.L29:
	mov	fp, #0
	cmp	r5, r3
	ldreq	r1, .L30+52
	ldrne	r1, .L30+56
	ldr	r1, [r1]
	str	r2, [r4, #16]
	str	r1, [r4, #20]
	ldr	r1, [r4, #4]
	str	r3, [sp, #20]
	bl	scsi_ulto4b
	mov	r0, r8
	ldr	r1, [r4]
	str	fp, [r4, #12]
	bl	scsi_ulto2b
	b	.L26
.L31:
	.align	2
.L30:
	.word	SCSI_RW_DIRMASK
	.word	SCSI_RW_READ
	.word	READ_12
	.word	WRITE_12
	.word	CAM_DEBUG_SUBTRACE
	.word	READ_16
	.word	WRITE_16
	.word	SCSI_RW_BIO
	.word	CAM_DIR_IN
	.word	CAM_DIR_OUT
	.word	CAM_DATA_BIO
	.word	READ_6
	.word	WRITE_6
	.word	READ_10
	.word	WRITE_10
	.size	scsi_read_write, .-scsi_read_write
	.comm	WRITE_6,4,4
	.comm	WRITE_16,4,4
	.comm	WRITE_12,4,4
	.comm	WRITE_10,4,4
	.comm	SCSI_RW_READ,4,4
	.comm	SCSI_RW_DIRMASK,4,4
	.comm	SCSI_RW_BIO,4,4
	.comm	READ_6,4,4
	.comm	READ_16,4,4
	.comm	READ_12,4,4
	.comm	READ_10,4,4
	.comm	CAM_DIR_OUT,4,4
	.comm	CAM_DIR_IN,4,4
	.comm	CAM_DEBUG_SUBTRACE,4,4
	.comm	CAM_DATA_BIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
