	.file	"extr_request.c_sci_stp_optimized_request_construct.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	sci_stp_optimized_request_construct, @function
sci_stp_optimized_request_construct:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	r14d, edx
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13d, ecx
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	mov	r12, QWORD PTR [rdi]
	mov	rbx, rsi
	mov	rsi, r12
	call	scu_sata_reqeust_construct_task_context@PLT
	mov	rdi, rbp
	call	sci_request_build_sgl@PLT
	cmp	DWORD PTR DMA_TO_DEVICE[rip], r13d
	mov	DWORD PTR 8[r12], r14d
	jne	.L2
	add	rbx, QWORD PTR SCU_TASK_TYPE_DMA_OUT[rip]
	sub	rbx, QWORD PTR SCU_TASK_TYPE_DMA_IN[rip]
.L2:
	mov	QWORD PTR [r12], rbx
	pop	rbx
	.cfi_def_cfa_offset 40
	pop	rbp
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	sci_stp_optimized_request_construct, .-sci_stp_optimized_request_construct
	.comm	SCU_TASK_TYPE_DMA_OUT,8,8
	.comm	SCU_TASK_TYPE_DMA_IN,8,8
	.comm	DMA_TO_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_request.c_sci_stp_optimized_request_construct.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	sci_stp_optimized_request_construct, %function
sci_stp_optimized_request_construct:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r6, r3
	mov	r7, r2
	ldr	r8, [r0]
	mov	r5, r1
	mov	r1, r8
	bl	scu_sata_reqeust_construct_task_context
	mov	r0, r4
	bl	sci_request_build_sgl
	ldr	r3, .L5
	str	r7, [r8, #4]
	ldr	r3, [r3]
	cmp	r3, r6
	bne	.L2
	ldr	r3, .L5+4
	ldr	r2, .L5+8
	ldr	r3, [r3]
	ldr	r2, [r2]
	sub	r3, r3, r2
	add	r5, r5, r3
.L2:
	str	r5, [r8]
	pop	{r4, r5, r6, r7, r8, pc}
.L6:
	.align	2
.L5:
	.word	DMA_TO_DEVICE
	.word	SCU_TASK_TYPE_DMA_OUT
	.word	SCU_TASK_TYPE_DMA_IN
	.size	sci_stp_optimized_request_construct, .-sci_stp_optimized_request_construct
	.comm	SCU_TASK_TYPE_DMA_OUT,4,4
	.comm	SCU_TASK_TYPE_DMA_IN,4,4
	.comm	DMA_TO_DEVICE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
