	.file	"extr_target_core_transport.c_target_setup_cmd_from_cdb.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Received SCSI CDB with command_size: %d that exceeds SCSI_MAX_VARLEN_CDB_SIZE: %d\n"
	.align 8
.LC1:
	.string	"Unable to allocate cmd->t_task_cdb %u > sizeof(cmd->__t_task_cdb): %lu ops\n"
	.align 8
.LC2:
	.string	"%s/%s: Unsupported SCSI Opcode 0x%02x, sending CHECK_CONDITION.\n"
	.text
	.p2align 4
	.globl	target_setup_cmd_from_cdb
	.type	target_setup_cmd_from_cdb, @function
target_setup_cmd_from_cdb:
.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
	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, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	r12, QWORD PTR 48[rdi]
	mov	rdi, rsi
	call	scsi_command_size@PLT
	mov	r13, QWORD PTR SCSI_MAX_VARLEN_CDB_SIZE[rip]
	mov	rdi, rbp
	cdqe
	cmp	rax, r13
	ja	.L9
	call	scsi_command_size@PLT
	cmp	eax, 8
	ja	.L10
	mov	rax, QWORD PTR 40[rbx]
	mov	QWORD PTR 16[rbx], rax
.L5:
	mov	rdi, rbp
	call	scsi_command_size@PLT
	mov	rdi, QWORD PTR 16[rbx]
	mov	rsi, rbp
	mov	edx, eax
	call	memcpy@PLT
	mov	rdi, rbx
	call	trace_target_sequencer_start@PLT
	mov	rax, QWORD PTR [r12]
	mov	rdi, rbx
	call	[QWORD PTR [rax]]
	cmp	QWORD PTR TCM_UNSUPPORTED_SCSI_OPCODE[rip], rax
	mov	r12, rax
	je	.L11
.L6:
	test	r12, r12
	jne	.L1
	mov	rdi, rbx
	call	transport_check_alloc_task_attr@PLT
	mov	r12, rax
	test	rax, rax
	je	.L12
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	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
.L10:
	.cfi_restore_state
	mov	r13d, DWORD PTR GFP_KERNEL[rip]
	mov	rdi, rbp
	call	scsi_command_size@PLT
	mov	edi, eax
	mov	esi, r13d
	call	kzalloc@PLT
	mov	QWORD PTR 16[rbx], rax
	test	rax, rax
	jne	.L5
	mov	rdi, rbp
	call	scsi_command_size@PLT
	mov	edx, 8
	lea	rdi, .LC1[rip]
	mov	esi, eax
	call	pr_err@PLT
	mov	r12, QWORD PTR TCM_OUT_OF_RESOURCES[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L9:
	call	scsi_command_size@PLT
	mov	rdx, r13
	lea	rdi, .LC0[rip]
	mov	esi, eax
	call	pr_err@PLT
	mov	r12, QWORD PTR TCM_INVALID_CDB_FIELD[rip]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	mov	rax, r12
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L12:
	.cfi_restore_state
	mov	eax, DWORD PTR SCF_SUPPORTED_SAM_OPCODE[rip]
	or	DWORD PTR 8[rbx], eax
	mov	rdi, QWORD PTR [rbx]
	call	atomic_long_inc@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	mov	rax, r12
	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
.L11:
	.cfi_restore_state
	mov	rax, QWORD PTR 24[rbx]
	mov	rcx, QWORD PTR 16[rbx]
	lea	rdi, .LC2[rip]
	mov	rdx, QWORD PTR [rax]
	mov	rax, QWORD PTR 32[rbx]
	mov	ecx, DWORD PTR [rcx]
	mov	edx, DWORD PTR [rdx]
	mov	esi, DWORD PTR [rax]
	call	pr_warn_ratelimited@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	target_setup_cmd_from_cdb, .-target_setup_cmd_from_cdb
	.comm	TCM_UNSUPPORTED_SCSI_OPCODE,8,8
	.comm	TCM_OUT_OF_RESOURCES,8,8
	.comm	TCM_INVALID_CDB_FIELD,8,8
	.comm	SCSI_MAX_VARLEN_CDB_SIZE,8,8
	.comm	SCF_SUPPORTED_SAM_OPCODE,4,4
	.comm	GFP_KERNEL,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_target_core_transport.c_target_setup_cmd_from_cdb.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Received SCSI CDB with command_size: %d that exceed"
	.ascii	"s SCSI_MAX_VARLEN_CDB_SIZE: %d\012\000"
	.align	2
.LC1:
	.ascii	"Unable to allocate cmd->t_task_cdb %u > sizeof(cmd-"
	.ascii	">__t_task_cdb): %lu ops\012\000"
	.align	2
.LC2:
	.ascii	"%s/%s: Unsupported SCSI Opcode 0x%02x, sending CHEC"
	.ascii	"K_CONDITION.\012\000"
	.text
	.align	2
	.global	target_setup_cmd_from_cdb
	.syntax unified
	.arm
	.fpu softvfp
	.type	target_setup_cmd_from_cdb, %function
target_setup_cmd_from_cdb:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r4, r0
	mov	r0, r1
	mov	r5, r1
	ldr	r7, [r4, #24]
	bl	scsi_command_size
	ldr	r6, .L13
	ldr	r3, [r6]
	cmp	r0, r3
	mov	r0, r5
	bhi	.L9
	bl	scsi_command_size
	cmp	r0, #4
	bhi	.L10
	ldr	r6, [r4, #20]
	str	r6, [r4, #8]
.L5:
	mov	r0, r5
	bl	scsi_command_size
	mov	r1, r5
	mov	r2, r0
	mov	r0, r6
	bl	memcpy
	mov	r0, r4
	bl	trace_target_sequencer_start
	ldr	r3, [r7]
	mov	r0, r4
	ldr	r3, [r3]
	blx	r3
	ldr	r3, .L13+4
	mov	r5, r0
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L11
.L6:
	cmp	r5, #0
	bne	.L1
	mov	r0, r4
	bl	transport_check_alloc_task_attr
	subs	r5, r0, #0
	beq	.L12
.L1:
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L10:
	mov	r0, r5
	bl	scsi_command_size
	ldr	r3, .L13+8
	ldr	r1, [r3]
	bl	kzalloc
	cmp	r0, #0
	mov	r6, r0
	str	r0, [r4, #8]
	bne	.L5
	mov	r0, r5
	bl	scsi_command_size
	mov	r2, #4
	mov	r1, r0
	ldr	r0, .L13+12
	bl	pr_err
	ldr	r3, .L13+16
	ldr	r5, [r3]
	b	.L1
.L9:
	bl	scsi_command_size
	ldr	r2, [r6]
	mov	r1, r0
	ldr	r0, .L13+20
	bl	pr_err
	ldr	r3, .L13+24
	ldr	r5, [r3]
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r2, .L13+28
	ldr	r3, [r4, #4]
	ldr	r2, [r2]
	ldr	r0, [r4]
	orr	r3, r3, r2
	str	r3, [r4, #4]
	bl	atomic_long_inc
	mov	r0, r5
	pop	{r4, r5, r6, r7, r8, pc}
.L11:
	ldr	r2, [r4, #12]
	ldr	r3, [r4, #8]
	ldr	r1, [r4, #16]
	ldr	r2, [r2]
	ldr	r3, [r3]
	ldr	r2, [r2]
	ldr	r1, [r1]
	ldr	r0, .L13+32
	bl	pr_warn_ratelimited
	b	.L6
.L14:
	.align	2
.L13:
	.word	SCSI_MAX_VARLEN_CDB_SIZE
	.word	TCM_UNSUPPORTED_SCSI_OPCODE
	.word	GFP_KERNEL
	.word	.LC1
	.word	TCM_OUT_OF_RESOURCES
	.word	.LC0
	.word	TCM_INVALID_CDB_FIELD
	.word	SCF_SUPPORTED_SAM_OPCODE
	.word	.LC2
	.size	target_setup_cmd_from_cdb, .-target_setup_cmd_from_cdb
	.comm	TCM_UNSUPPORTED_SCSI_OPCODE,4,4
	.comm	TCM_OUT_OF_RESOURCES,4,4
	.comm	TCM_INVALID_CDB_FIELD,4,4
	.comm	SCSI_MAX_VARLEN_CDB_SIZE,4,4
	.comm	SCF_SUPPORTED_SAM_OPCODE,4,4
	.comm	GFP_KERNEL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
