	.file	"extr_fc_fcp.c_fc_queuecommand.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	fc_queuecommand
	.type	fc_queuecommand, @function
fc_queuecommand:
.LFB0:
	.cfi_startproc
	endbr64
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rsi
	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
	sub	rsp, 16
	.cfi_def_cfa_offset 64
	mov	rdi, QWORD PTR 24[rdi]
	call	scsi_target@PLT
	mov	edi, eax
	call	starget_to_rport@PLT
	mov	rbx, rax
	mov	rax, QWORD PTR 24[rbp]
	mov	edi, DWORD PTR [rax]
	call	shost_priv@PLT
	mov	rdi, rbx
	mov	r12, rax
	call	fc_remote_port_chkready@PLT
	test	eax, eax
	jne	.L17
	mov	rdx, QWORD PTR [rbx]
	cmp	QWORD PTR [rdx], 0
	je	.L18
	mov	rdi, r12
	call	fc_fcp_lport_queue_ready@PLT
	test	eax, eax
	jne	.L5
	cmp	QWORD PTR 8[r12], 0
	jne	.L19
.L15:
	mov	eax, DWORD PTR SCSI_MLQUEUE_HOST_BUSY[rip]
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	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
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	edx, DWORD PTR DID_IMM_RETRY[rip]
	mov	DWORD PTR 12[rsp], eax
	mov	rdi, rbp
	sal	edx, 16
	mov	DWORD PTR 0[rbp], edx
	call	r13
	mov	eax, DWORD PTR 12[rsp]
.L1:
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	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
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	DWORD PTR 0[rbp], eax
	mov	rdi, rbp
	call	r13
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 48
	xor	eax, eax
	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
	.p2align 4,,10
	.p2align 3
.L5:
	.cfi_restore_state
	mov	esi, DWORD PTR GFP_ATOMIC[rip]
	mov	rdi, r12
	call	fc_fcp_pkt_alloc@PLT
	mov	r14, rax
	test	rax, rax
	je	.L15
	mov	QWORD PTR 40[rax], rbp
	mov	rdi, rbp
	mov	QWORD PTR 32[rax], rbx
	mov	QWORD PTR 8[rbp], r13
	call	scsi_bufflen@PLT
	mov	QWORD PTR 24[r14], 0
	mov	QWORD PTR 16[r14], rax
	xor	eax, eax
	call	get_cpu@PLT
	mov	edi, DWORD PTR [r12]
	mov	esi, eax
	call	per_cpu_ptr@PLT
	mov	rdx, QWORD PTR 16[rbp]
	cmp	rdx, QWORD PTR DMA_FROM_DEVICE[rip]
	je	.L20
	cmp	rdx, QWORD PTR DMA_TO_DEVICE[rip]
	je	.L21
	mov	QWORD PTR 8[r14], 0
	add	DWORD PTR [rax], 1
.L9:
	xor	eax, eax
	call	put_cpu@PLT
	mov	rsi, r14
	mov	rdi, r12
	call	fc_fcp_pkt_send@PLT
	test	eax, eax
	je	.L1
	mov	eax, DWORD PTR FC_SRB_FREE[rip]
	mov	rdi, r14
	mov	DWORD PTR [r14], eax
	call	fc_fcp_pkt_release@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L19:
	mov	rdi, r12
	call	fc_fcp_can_queue_ramp_down@PLT
	jmp	.L15
	.p2align 4,,10
	.p2align 3
.L20:
	mov	rdx, QWORD PTR FC_SRB_READ[rip]
	mov	QWORD PTR 8[r14], rdx
	mov	rdx, QWORD PTR 16[r14]
	add	DWORD PTR 16[rax], 1
	add	DWORD PTR 12[rax], edx
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rdx, QWORD PTR FC_SRB_WRITE[rip]
	mov	QWORD PTR 8[r14], rdx
	mov	rdx, QWORD PTR 16[r14]
	add	DWORD PTR 8[rax], 1
	add	DWORD PTR 4[rax], edx
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	fc_queuecommand, .-fc_queuecommand
	.comm	SCSI_MLQUEUE_HOST_BUSY,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	FC_SRB_WRITE,8,8
	.comm	FC_SRB_READ,8,8
	.comm	FC_SRB_FREE,4,4
	.comm	DMA_TO_DEVICE,8,8
	.comm	DMA_FROM_DEVICE,8,8
	.comm	DID_IMM_RETRY,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_fc_fcp.c_fc_queuecommand.c"
	.text
	.align	2
	.global	fc_queuecommand
	.syntax unified
	.arm
	.fpu softvfp
	.type	fc_queuecommand, %function
fc_queuecommand:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r5, r0
	ldr	r0, [r0, #12]
	mov	r7, r1
	bl	scsi_target
	bl	starget_to_rport
	ldr	r3, [r5, #12]
	mov	r8, r0
	ldr	r0, [r3]
	bl	shost_priv
	mov	r6, r0
	mov	r0, r8
	bl	fc_remote_port_chkready
	subs	r4, r0, #0
	bne	.L20
	ldr	r3, [r8]
	ldr	r3, [r3]
	cmp	r3, #0
	beq	.L21
	mov	r0, r6
	bl	fc_fcp_lport_queue_ready
	cmp	r0, #0
	bne	.L5
	ldr	r3, [r6, #4]
	cmp	r3, #0
	bne	.L22
.L18:
	ldr	r3, .L25
	ldr	r4, [r3]
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L21:
	ldr	r3, .L25+4
	mov	r0, r5
	ldr	r3, [r3]
	lsl	r3, r3, #16
	str	r3, [r5]
	blx	r7
.L1:
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L20:
	str	r4, [r5]
	mov	r4, #0
	mov	r0, r5
	blx	r7
	mov	r0, r4
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L5:
	ldr	r3, .L25+8
	mov	r0, r6
	ldr	r1, [r3]
	bl	fc_fcp_pkt_alloc
	subs	r9, r0, #0
	beq	.L18
	str	r5, [r9, #20]
	str	r8, [r9, #16]
	mov	r0, r5
	str	r7, [r5, #4]
	bl	scsi_bufflen
	str	r4, [r9, #12]
	str	r0, [r9, #8]
	ldr	r7, [r6]
	bl	get_cpu
	mov	r1, r0
	mov	r0, r7
	bl	per_cpu_ptr
	ldr	r2, .L25+12
	ldr	r3, [r5, #8]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L23
	ldr	r2, .L25+16
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L24
	ldr	r3, [r0]
	str	r4, [r9, #4]
	add	r3, r3, #1
	str	r3, [r0]
.L9:
	bl	put_cpu
	mov	r1, r9
	mov	r0, r6
	bl	fc_fcp_pkt_send
	subs	r4, r0, #0
	beq	.L1
	ldr	r3, .L25+20
	mov	r0, r9
	ldr	r3, [r3]
	str	r3, [r9]
	bl	fc_fcp_pkt_release
	b	.L18
.L22:
	mov	r0, r6
	bl	fc_fcp_can_queue_ramp_down
	b	.L18
.L23:
	ldr	r1, .L25+24
	ldr	r2, [r0, #16]
	ldr	r3, [r0, #12]
	ldr	ip, [r9, #8]
	ldr	r1, [r1]
	add	r2, r2, #1
	add	r3, r3, ip
	str	r1, [r9, #4]
	str	r2, [r0, #16]
	str	r3, [r0, #12]
	b	.L9
.L24:
	ldr	r1, .L25+28
	ldr	r2, [r0, #8]
	ldr	r3, [r0, #4]
	ldr	ip, [r9, #8]
	ldr	r1, [r1]
	add	r2, r2, #1
	add	r3, r3, ip
	str	r1, [r9, #4]
	str	r2, [r0, #8]
	str	r3, [r0, #4]
	b	.L9
.L26:
	.align	2
.L25:
	.word	SCSI_MLQUEUE_HOST_BUSY
	.word	DID_IMM_RETRY
	.word	GFP_ATOMIC
	.word	DMA_FROM_DEVICE
	.word	DMA_TO_DEVICE
	.word	FC_SRB_FREE
	.word	FC_SRB_READ
	.word	FC_SRB_WRITE
	.size	fc_queuecommand, .-fc_queuecommand
	.comm	SCSI_MLQUEUE_HOST_BUSY,4,4
	.comm	GFP_ATOMIC,4,4
	.comm	FC_SRB_WRITE,4,4
	.comm	FC_SRB_READ,4,4
	.comm	FC_SRB_FREE,4,4
	.comm	DMA_TO_DEVICE,4,4
	.comm	DMA_FROM_DEVICE,4,4
	.comm	DID_IMM_RETRY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
