	.file	"extr_core.c_nvme_setup_rw.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	nvme_setup_rw, @function
nvme_setup_rw:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	mov	r12, rdi
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdx
	sub	rsp, 24
	.cfi_def_cfa_offset 64
	mov	r13, QWORD PTR 24[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	DWORD PTR [rsp], 0
	mov	eax, DWORD PTR [rsi]
	mov	DWORD PTR 4[rsp], 0
	test	DWORD PTR REQ_FUA[rip], eax
	je	.L2
	mov	edx, DWORD PTR NVME_RW_FUA[rip]
	mov	DWORD PTR [rsp], edx
.L2:
	mov	edx, DWORD PTR REQ_RAHEAD[rip]
	mov	ecx, DWORD PTR REQ_FAILFAST_DEV[rip]
	or	ecx, edx
	test	ecx, eax
	je	.L3
	mov	ecx, DWORD PTR NVME_RW_LR[rip]
	or	DWORD PTR [rsp], ecx
.L3:
	test	eax, edx
	je	.L4
	mov	eax, DWORD PTR NVME_RW_DSM_FREQ_PREFETCH[rip]
	mov	DWORD PTR 4[rsp], eax
.L4:
	mov	rdi, rbp
	call	rq_data_dir@PLT
	test	rax, rax
	mov	eax, DWORD PTR nvme_cmd_write[rip]
	cmove	eax, DWORD PTR nvme_cmd_read[rip]
	mov	DWORD PTR 48[rbx], eax
	mov	rax, QWORD PTR 16[r12]
	mov	edi, DWORD PTR [rax]
	call	cpu_to_le32@PLT
	mov	rdi, rbp
	mov	QWORD PTR 40[rbx], rax
	call	blk_rq_pos@PLT
	mov	rdi, r12
	mov	esi, eax
	call	nvme_block_nr@PLT
	mov	edi, eax
	call	cpu_to_le64@PLT
	mov	rdi, rbp
	mov	DWORD PTR 32[rbx], eax
	call	blk_rq_bytes@PLT
	mov	ecx, DWORD PTR [r12]
	sar	eax, cl
	lea	edi, -1[rax]
	call	cpu_to_le16@PLT
	mov	rdi, rbp
	mov	QWORD PTR 24[rbx], rax
	call	req_op@PLT
	cmp	rax, QWORD PTR REQ_OP_WRITE[rip]
	je	.L28
.L7:
	cmp	QWORD PTR 8[r12], 0
	je	.L26
	mov	rdi, rbp
	call	blk_integrity_rq@PLT
	mov	edi, DWORD PTR [rsp]
	test	eax, eax
	je	.L29
	mov	eax, DWORD PTR 4[r12]
	cmp	eax, 128
	je	.L14
.L32:
	sub	eax, 129
	cmp	eax, 1
	ja	.L9
	mov	eax, DWORD PTR NVME_RW_PRINFO_PRCHK_GUARD[rip]
	or	eax, DWORD PTR NVME_RW_PRINFO_PRCHK_REF[rip]
	or	edi, eax
	mov	DWORD PTR [rsp], edi
	mov	rdi, rbp
	call	t10_pi_ref_tag@PLT
	mov	edi, eax
	call	cpu_to_le32@PLT
	mov	QWORD PTR 16[rbx], rax
.L26:
	mov	edi, DWORD PTR [rsp]
.L9:
	call	cpu_to_le16@PLT
	mov	edi, DWORD PTR 4[rsp]
	mov	QWORD PTR 8[rbx], rax
	call	cpu_to_le32@PLT
	mov	QWORD PTR [rbx], rax
	xor	eax, eax
.L1:
	mov	rsi, QWORD PTR 8[rsp]
	xor	rsi, QWORD PTR fs:40
	jne	.L30
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	cmp	QWORD PTR 0[r13], 0
	je	.L7
	lea	rcx, 4[rsp]
	mov	rdx, rsp
	mov	rsi, rbp
	mov	rdi, r13
	call	nvme_assign_write_stream@PLT
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L29:
	mov	rdi, r12
	call	nvme_ns_has_pi@PLT
	xor	edi, edi
	test	eax, eax
	sete	dil
	call	WARN_ON_ONCE@PLT
	test	rax, rax
	jne	.L31
	mov	eax, DWORD PTR 4[r12]
	mov	edi, DWORD PTR [rsp]
	or	edi, DWORD PTR NVME_RW_PRINFO_PRACT[rip]
	mov	DWORD PTR [rsp], edi
	cmp	eax, 128
	jne	.L32
.L14:
	or	edi, DWORD PTR NVME_RW_PRINFO_PRCHK_GUARD[rip]
	mov	DWORD PTR [rsp], edi
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L31:
	mov	eax, DWORD PTR BLK_STS_NOTSUPP[rip]
	jmp	.L1
.L30:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	nvme_setup_rw, .-nvme_setup_rw
	.comm	nvme_cmd_write,4,4
	.comm	nvme_cmd_read,4,4
	.comm	REQ_RAHEAD,4,4
	.comm	REQ_OP_WRITE,8,8
	.comm	REQ_FUA,4,4
	.comm	REQ_FAILFAST_DEV,4,4
	.comm	NVME_RW_PRINFO_PRCHK_REF,4,4
	.comm	NVME_RW_PRINFO_PRCHK_GUARD,4,4
	.comm	NVME_RW_PRINFO_PRACT,4,4
	.comm	NVME_RW_LR,4,4
	.comm	NVME_RW_FUA,4,4
	.comm	NVME_RW_DSM_FREQ_PREFETCH,4,4
	.comm	BLK_STS_NOTSUPP,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_core.c_nvme_setup_rw.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	nvme_setup_rw, %function
nvme_setup_rw:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	mov	r5, r1
	mov	r4, r2
	ldr	r2, .L34
	sub	sp, sp, #20
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	mov	r1, #0
	mov	r6, r0
	ldr	r0, .L34+4
	ldr	r3, [r5]
	ldr	r0, [r0]
	str	r1, [sp, #4]
	tst	r3, r0
	ldrne	r2, .L34+8
	str	r1, [sp, #8]
	ldrne	r2, [r2]
	ldr	r1, .L34+12
	strne	r2, [sp, #4]
	ldr	r2, .L34+16
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	r7, [r6, #16]
	orr	r2, r1, r2
	tst	r2, r3
	ldrne	r0, .L34+20
	ldrne	r2, [sp, #4]
	ldrne	r0, [r0]
	orrne	r2, r2, r0
	strne	r2, [sp, #4]
	tst	r3, r1
	ldrne	r3, .L34+24
	mov	r0, r5
	ldrne	r3, [r3]
	strne	r3, [sp, #8]
	bl	rq_data_dir
	cmp	r0, #0
	ldrne	r3, .L34+28
	ldreq	r3, .L34+32
	ldr	r2, [r3]
	ldr	r3, [r6, #12]
	str	r2, [r4, #24]
	ldr	r0, [r3]
	bl	cpu_to_le32
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #20]
	bl	blk_rq_pos
	mov	r1, r0
	mov	r0, r6
	bl	nvme_block_nr
	bl	cpu_to_le64
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #16]
	bl	blk_rq_bytes
	ldr	r3, [r6]
	asr	r0, r0, r3
	sub	r0, r0, #1
	bl	cpu_to_le16
	mov	r3, r0
	mov	r0, r5
	str	r3, [r4, #12]
	bl	req_op
	ldr	r3, .L34+36
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L30
.L7:
	ldr	r3, [r6, #8]
	cmp	r3, #0
	bne	.L8
	ldr	r3, [sp, #4]
.L9:
	mov	r0, r3
	bl	cpu_to_le16
	mov	r3, r0
	ldr	r0, [sp, #8]
	str	r3, [r4, #4]
	bl	cpu_to_le32
	mov	r3, r0
	mov	r0, #0
	str	r3, [r4]
.L1:
	ldr	r3, .L34
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L31
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L8:
	mov	r0, r5
	bl	blk_integrity_rq
	cmp	r0, #0
	beq	.L10
	ldr	r2, [r6, #4]
	ldr	r3, [sp, #4]
	cmp	r2, #128
	beq	.L14
.L33:
	sub	r2, r2, #129
	cmp	r2, #1
	bhi	.L9
	ldr	r2, .L34+40
	ldr	r1, .L34+44
	ldr	r2, [r2]
	ldr	r1, [r1]
	mov	r0, r5
	orr	r2, r2, r1
	orr	r3, r2, r3
	str	r3, [sp, #4]
	bl	t10_pi_ref_tag
	bl	cpu_to_le32
	ldr	r3, [sp, #4]
	str	r0, [r4, #8]
	b	.L9
.L30:
	ldr	r3, [r7]
	cmp	r3, #0
	beq	.L7
	mov	r0, r7
	mov	r1, r5
	add	r3, sp, #8
	add	r2, sp, #4
	bl	nvme_assign_write_stream
	b	.L7
.L10:
	mov	r0, r6
	bl	nvme_ns_has_pi
	clz	r0, r0
	lsr	r0, r0, #5
	bl	WARN_ON_ONCE
	cmp	r0, #0
	bne	.L32
	ldr	r3, .L34+48
	ldr	r2, [sp, #4]
	ldr	r3, [r3]
	orr	r3, r2, r3
	ldr	r2, [r6, #4]
	str	r3, [sp, #4]
	cmp	r2, #128
	bne	.L33
.L14:
	ldr	r2, .L34+40
	ldr	r2, [r2]
	orr	r3, r3, r2
	str	r3, [sp, #4]
	b	.L9
.L32:
	ldr	r3, .L34+52
	ldr	r0, [r3]
	b	.L1
.L31:
	bl	__stack_chk_fail
.L35:
	.align	2
.L34:
	.word	.LC0
	.word	REQ_FUA
	.word	NVME_RW_FUA
	.word	REQ_RAHEAD
	.word	REQ_FAILFAST_DEV
	.word	NVME_RW_LR
	.word	NVME_RW_DSM_FREQ_PREFETCH
	.word	nvme_cmd_write
	.word	nvme_cmd_read
	.word	REQ_OP_WRITE
	.word	NVME_RW_PRINFO_PRCHK_GUARD
	.word	NVME_RW_PRINFO_PRCHK_REF
	.word	NVME_RW_PRINFO_PRACT
	.word	BLK_STS_NOTSUPP
	.size	nvme_setup_rw, .-nvme_setup_rw
	.comm	nvme_cmd_write,4,4
	.comm	nvme_cmd_read,4,4
	.comm	REQ_RAHEAD,4,4
	.comm	REQ_OP_WRITE,4,4
	.comm	REQ_FUA,4,4
	.comm	REQ_FAILFAST_DEV,4,4
	.comm	NVME_RW_PRINFO_PRCHK_REF,4,4
	.comm	NVME_RW_PRINFO_PRCHK_GUARD,4,4
	.comm	NVME_RW_PRINFO_PRACT,4,4
	.comm	NVME_RW_LR,4,4
	.comm	NVME_RW_FUA,4,4
	.comm	NVME_RW_DSM_FREQ_PREFETCH,4,4
	.comm	BLK_STS_NOTSUPP,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
