	.file	"extr_target_core_xcopy.c_target_parse_xcopy_cmd.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"transport_kmap_data_sg() failed in target_do_xcopy\n"
	.align 8
.LC1:
	.string	"XCOPY descriptor list length %u exceeds maximum %u\n"
	.align 8
.LC2:
	.string	"XCOPY with non zero inline data length\n"
	.align 8
.LC3:
	.string	"XCOPY parameter truncation: data length %u too small for tdll: %hu sdll: %u inline_dl: %u\n"
	.align 8
.LC4:
	.string	"Processing XCOPY with list_id: 0x%02x list_id_usage: 0x%02x tdll: %hu sdll: %u inline_dl: %u\n"
	.align 8
.LC5:
	.string	"XCOPY: Processed %d segment descriptors, length: %u\n"
	.align 8
.LC6:
	.string	"XCOPY: Non matching src_dev block_size: %u + dst_dev block_size: %u currently unsupported\n"
	.align 8
.LC7:
	.string	"XCOPY: Processed %d target descriptors, length: %u\n"
	.text
	.p2align 4
	.type	target_parse_xcopy_cmd, @function
target_parse_xcopy_cmd:
.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, rdi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r13, QWORD PTR 16[rdi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR TCM_INVALID_PARAMETER_LIST[rip]
	mov	rdi, r13
	mov	DWORD PTR 20[rsp], eax
	call	transport_kmap_data_sg@PLT
	test	rax, rax
	je	.L13
	mov	rbx, rax
	movzx	eax, BYTE PTR [rax]
	lea	rdi, 2[rbx]
	movzx	r14d, BYTE PTR 1[rbx]
	mov	BYTE PTR 8[rsp], al
	call	get_unaligned_be16@PLT
	lea	rdi, 8[rbx]
	movzx	r15d, ax
	call	get_unaligned_be32@PLT
	movzx	edx, WORD PTR RCR_OP_MAX_DESC_LIST_LEN[rip]
	lea	esi, [r15+rax]
	cmp	esi, edx
	ja	.L14
	lea	rdi, 12[rbx]
	mov	DWORD PTR 12[rsp], eax
	call	get_unaligned_be32@PLT
	mov	r11d, DWORD PTR 12[rsp]
	test	eax, eax
	jne	.L15
	mov	rax, QWORD PTR XCOPY_HDR_LEN[rip]
	mov	edx, r11d
	mov	rsi, QWORD PTR 0[r13]
	add	rax, r15
	add	rax, rdx
	cmp	rsi, rax
	jl	.L16
	mov	edx, r14d
	movzx	esi, BYTE PTR 8[rsp]
	mov	r8d, r11d
	xor	r9d, r9d
	shr	edx, 3
	mov	ecx, r15d
	lea	rdi, .LC4[rip]
	xor	eax, eax
	and	edx, 3
	mov	DWORD PTR 8[rsp], r11d
	lea	r14, 20[rsp]
	call	pr_debug@PLT
	mov	r11d, DWORD PTR 8[rsp]
	mov	rsi, r12
	mov	r8, r14
	lea	rdx, 16[rbx+r15]
	mov	rdi, r13
	mov	ecx, r11d
	call	target_xcopy_parse_segment_descriptors@PLT
	mov	esi, eax
	test	eax, eax
	jle	.L5
	mov	edx, DWORD PTR XCOPY_SEGMENT_DESC_LEN[rip]
	lea	rdi, .LC5[rip]
	imul	edx, eax
	xor	eax, eax
	call	pr_debug@PLT
	lea	rdx, 16[rbx]
	mov	r8, r14
	mov	ecx, r15d
	mov	rsi, r12
	mov	rdi, r13
	call	target_xcopy_parse_target_descriptors@PLT
	test	eax, eax
	jle	.L5
	mov	rdx, QWORD PTR 8[r12]
	mov	rsi, QWORD PTR [rdx]
	mov	rdx, QWORD PTR [r12]
	mov	rdx, QWORD PTR [rdx]
	cmp	rsi, rdx
	je	.L9
	lea	rdi, .LC6[rip]
	xor	eax, eax
	call	pr_err@PLT
	mov	rdi, r12
	call	xcopy_pt_undepend_remotedev@PLT
	mov	eax, DWORD PTR TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE[rip]
	mov	DWORD PTR 20[rsp], eax
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rdi, r13
	call	transport_kunmap_data_sg@PLT
	mov	eax, DWORD PTR 20[rsp]
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L17
	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
	ret
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	pr_err@PLT
	mov	eax, DWORD PTR TCM_PARAMETER_LIST_LENGTH_ERROR[rip]
	mov	DWORD PTR 20[rsp], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L15:
	lea	rdi, .LC2[rip]
	xor	eax, eax
	call	pr_err@PLT
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L13:
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	pr_err@PLT
	mov	eax, DWORD PTR TCM_OUT_OF_RESOURCES[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L16:
	xor	r8d, r8d
	mov	ecx, r11d
	mov	edx, r15d
	xor	eax, eax
	lea	rdi, .LC3[rip]
	call	pr_err@PLT
	mov	eax, DWORD PTR TCM_PARAMETER_LIST_LENGTH_ERROR[rip]
	mov	DWORD PTR 20[rsp], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L9:
	mov	edx, DWORD PTR XCOPY_TARGET_DESC_LEN[rip]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	imul	edx, eax
	xor	eax, eax
	call	pr_debug@PLT
	mov	rdi, r13
	call	transport_kunmap_data_sg@PLT
	mov	eax, DWORD PTR TCM_NO_SENSE[rip]
	jmp	.L1
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	target_parse_xcopy_cmd, .-target_parse_xcopy_cmd
	.comm	XCOPY_TARGET_DESC_LEN,4,4
	.comm	XCOPY_SEGMENT_DESC_LEN,4,4
	.comm	XCOPY_HDR_LEN,8,8
	.comm	TCM_PARAMETER_LIST_LENGTH_ERROR,4,4
	.comm	TCM_OUT_OF_RESOURCES,4,4
	.comm	TCM_NO_SENSE,4,4
	.comm	TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE,4,4
	.comm	TCM_INVALID_PARAMETER_LIST,4,4
	.comm	RCR_OP_MAX_DESC_LIST_LEN,2,2
	.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_target_core_xcopy.c_target_parse_xcopy_cmd.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"transport_kmap_data_sg() failed in target_do_xcopy\012"
	.ascii	"\000"
	.align	2
.LC1:
	.ascii	"XCOPY descriptor list length %u exceeds maximum %u\012"
	.ascii	"\000"
	.align	2
.LC2:
	.ascii	"XCOPY with non zero inline data length\012\000"
	.align	2
.LC3:
	.ascii	"XCOPY parameter truncation: data length %u too smal"
	.ascii	"l for tdll: %hu sdll: %u inline_dl: %u\012\000"
	.align	2
.LC4:
	.ascii	"Processing XCOPY with list_id: 0x%02x list_id_usage"
	.ascii	": 0x%02x tdll: %hu sdll: %u inline_dl: %u\012\000"
	.align	2
.LC5:
	.ascii	"XCOPY: Processed %d segment descriptors, length: %u"
	.ascii	"\012\000"
	.align	2
.LC6:
	.ascii	"XCOPY: Non matching src_dev block_size: %u + dst_de"
	.ascii	"v block_size: %u currently unsupported\012\000"
	.align	2
.LC7:
	.ascii	"XCOPY: Processed %d target descriptors, length: %u\012"
	.ascii	"\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC8:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	target_parse_xcopy_cmd, %function
target_parse_xcopy_cmd:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	ldr	r3, .L18
	ldr	r8, [r0, #8]
	ldr	r3, [r3]
	ldr	r2, .L18+4
	sub	sp, sp, #16
	mov	r6, r0
	mov	r0, r8
	ldr	r2, [r2]
	str	r2, [sp, #12]
	mov	r2,#0
	str	r3, [sp, #8]
	bl	transport_kmap_data_sg
	subs	r4, r0, #0
	beq	.L13
	add	r0, r4, #2
	ldrb	r10, [r4]	@ zero_extendqisi2
	ldrb	r9, [r4, #1]	@ zero_extendqisi2
	bl	get_unaligned_be16
	mov	r5, r0
	add	r0, r4, #8
	bl	get_unaligned_be32
	ldr	r3, .L18+8
	add	r1, r5, r0
	ldrh	r2, [r3]
	mov	r7, r0
	cmp	r1, r2
	bhi	.L14
	add	r0, r4, #12
	bl	get_unaligned_be32
	cmp	r0, #0
	bne	.L15
	ldr	r3, .L18+12
	ldr	r1, [r8]
	ldr	r3, [r3]
	add	r3, r5, r3
	add	r3, r3, r7
	cmp	r1, r3
	bcc	.L16
	asr	r2, r9, #3
	mov	r1, r10
	mov	r3, r5
	and	r2, r2, #3
	str	r0, [sp, #4]
	str	r7, [sp]
	ldr	r0, .L18+16
	bl	pr_debug
	add	r9, sp, #8
	add	r2, r5, #16
	add	r2, r4, r2
	mov	r3, r7
	mov	r1, r6
	mov	r0, r8
	str	r9, [sp]
	bl	target_xcopy_parse_segment_descriptors
	subs	r2, r0, #0
	ble	.L5
	ldr	r3, .L18+20
	mov	r1, r2
	ldr	r3, [r3]
	ldr	r0, .L18+24
	mul	r2, r3, r2
	bl	pr_debug
	mov	r3, r5
	mov	r1, r6
	mov	r0, r8
	str	r9, [sp]
	add	r2, r4, #16
	bl	target_xcopy_parse_target_descriptors
	subs	r3, r0, #0
	ble	.L5
	ldr	r1, [r6, #4]
	ldr	r2, [r6]
	ldr	r1, [r1]
	ldr	r2, [r2]
	cmp	r1, r2
	beq	.L9
	ldr	r0, .L18+28
	bl	pr_err
	mov	r0, r6
	bl	xcopy_pt_undepend_remotedev
	ldr	r3, .L18+32
	ldr	r3, [r3]
	str	r3, [sp, #8]
.L5:
	mov	r0, r8
	bl	transport_kunmap_data_sg
	ldr	r0, [sp, #8]
.L1:
	ldr	r3, .L18+4
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L14:
	ldr	r0, .L18+36
	bl	pr_err
	ldr	r3, .L18+40
	ldr	r3, [r3]
	str	r3, [sp, #8]
	b	.L5
.L15:
	ldr	r0, .L18+44
	bl	pr_err
	b	.L5
.L13:
	ldr	r0, .L18+48
	bl	pr_err
	ldr	r3, .L18+52
	ldr	r0, [r3]
	b	.L1
.L16:
	mov	r3, r7
	str	r0, [sp]
	mov	r2, r5
	ldr	r0, .L18+56
	bl	pr_err
	ldr	r3, .L18+40
	ldr	r3, [r3]
	str	r3, [sp, #8]
	b	.L5
.L9:
	ldr	r2, .L18+60
	mov	r1, r3
	ldr	r2, [r2]
	ldr	r0, .L18+64
	mul	r2, r3, r2
	bl	pr_debug
	mov	r0, r8
	bl	transport_kunmap_data_sg
	ldr	r3, .L18+68
	ldr	r0, [r3]
	b	.L1
.L17:
	bl	__stack_chk_fail
.L19:
	.align	2
.L18:
	.word	TCM_INVALID_PARAMETER_LIST
	.word	.LC8
	.word	RCR_OP_MAX_DESC_LIST_LEN
	.word	XCOPY_HDR_LEN
	.word	.LC4
	.word	XCOPY_SEGMENT_DESC_LEN
	.word	.LC5
	.word	.LC6
	.word	TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE
	.word	.LC1
	.word	TCM_PARAMETER_LIST_LENGTH_ERROR
	.word	.LC2
	.word	.LC0
	.word	TCM_OUT_OF_RESOURCES
	.word	.LC3
	.word	XCOPY_TARGET_DESC_LEN
	.word	.LC7
	.word	TCM_NO_SENSE
	.size	target_parse_xcopy_cmd, .-target_parse_xcopy_cmd
	.comm	XCOPY_TARGET_DESC_LEN,4,4
	.comm	XCOPY_SEGMENT_DESC_LEN,4,4
	.comm	XCOPY_HDR_LEN,4,4
	.comm	TCM_PARAMETER_LIST_LENGTH_ERROR,4,4
	.comm	TCM_OUT_OF_RESOURCES,4,4
	.comm	TCM_NO_SENSE,4,4
	.comm	TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE,4,4
	.comm	TCM_INVALID_PARAMETER_LIST,4,4
	.comm	RCR_OP_MAX_DESC_LIST_LEN,2,2
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
