	.file	"extr_lpfc_scsi.c_lpfc_slave_alloc.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"0704 At limitation of %d preallocated command buffers\n"
	.align 8
.LC1:
	.string	"0705 Allocation request of %d command buffers will exceed max of %d.  Reducing allocation request to %d.\n"
	.align 8
.LC2:
	.string	"0708 Allocation request of %d command buffers did not succeed.  Allocated %d buffers.\n"
	.text
	.p2align 4
	.type	lpfc_slave_alloc, @function
lpfc_slave_alloc:
.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
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR 8[rdi]
	mov	r12, QWORD PTR [rax]
	mov	r13, QWORD PTR 8[r12]
	call	scsi_target@PLT
	mov	edi, eax
	call	starget_to_rport@PLT
	test	rax, rax
	je	.L4
	mov	rdi, rax
	mov	rbp, rax
	call	fc_remote_port_chkready@PLT
	test	rax, rax
	je	.L13
.L4:
	mov	eax, DWORD PTR ENXIO[rip]
	neg	eax
.L1:
	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
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	eax, DWORD PTR 0[rbp]
	lea	rdi, 8[r13]
	mov	DWORD PTR [rbx], eax
	call	atomic_inc_return@PLT
	mov	ecx, DWORD PTR [r12]
	mov	ebp, DWORD PTR 0[r13]
	lea	ebx, 2[rcx]
	imul	eax, ebx
	cmp	eax, ebp
	jl	.L11
	mov	r9d, DWORD PTR 4[r13]
	mov	eax, r9d
	sub	eax, DWORD PTR LPFC_DISC_IOCB_BUFF_COUNT[rip]
	cmp	eax, ebp
	jle	.L14
	lea	edx, 0[rbp+rbx]
	cmp	eax, edx
	jl	.L15
.L7:
	mov	esi, ebx
	mov	rdi, r12
	call	lpfc_new_scsi_buf@PLT
	mov	ebp, eax
	cmp	ebx, eax
	je	.L8
	mov	edx, DWORD PTR LOG_FCP[rip]
	mov	r9d, eax
	mov	r8d, ebx
	mov	rdi, r12
	mov	esi, DWORD PTR KERN_ERR[rip]
	lea	rcx, .LC2[rip]
	xor	eax, eax
	call	lpfc_printf_vlog@PLT
.L8:
	test	ebp, ebp
	jle	.L11
	add	DWORD PTR 0[r13], ebp
.L11:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	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
.L15:
	.cfi_restore_state
	mov	eax, r9d
	sub	rsp, 8
	.cfi_def_cfa_offset 56
	mov	edx, DWORD PTR LOG_FCP[rip]
	mov	r8d, ebx
	sub	eax, ebp
	mov	esi, DWORD PTR KERN_WARNING[rip]
	lea	rcx, .LC1[rip]
	mov	rdi, r12
	push	rax
	.cfi_def_cfa_offset 64
	xor	eax, eax
	call	lpfc_printf_vlog@PLT
	mov	ebx, DWORD PTR 4[r13]
	pop	rax
	.cfi_def_cfa_offset 56
	pop	rdx
	.cfi_def_cfa_offset 48
	sub	ebx, ebp
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L14:
	mov	edx, DWORD PTR LOG_FCP[rip]
	mov	r8d, ebp
	mov	rdi, r12
	xor	eax, eax
	mov	esi, DWORD PTR KERN_WARNING[rip]
	lea	rcx, .LC0[rip]
	call	lpfc_printf_vlog@PLT
	xor	eax, eax
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	lpfc_slave_alloc, .-lpfc_slave_alloc
	.comm	LPFC_DISC_IOCB_BUFF_COUNT,4,4
	.comm	LOG_FCP,4,4
	.comm	KERN_WARNING,4,4
	.comm	KERN_ERR,4,4
	.comm	ENXIO,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_lpfc_scsi.c_lpfc_slave_alloc.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"0704 At limitation of %d preallocated command buffe"
	.ascii	"rs\012\000"
	.align	2
.LC1:
	.ascii	"0705 Allocation request of %d command buffers will "
	.ascii	"exceed max of %d.  Reducing allocation request to %"
	.ascii	"d.\012\000"
	.align	2
.LC2:
	.ascii	"0708 Allocation request of %d command buffers did n"
	.ascii	"ot succeed.  Allocated %d buffers.\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lpfc_slave_alloc, %function
lpfc_slave_alloc:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	ldr	r3, [r0, #4]
	sub	sp, sp, #16
	ldr	r7, [r3]
	mov	r5, r0
	ldr	r8, [r7, #4]
	bl	scsi_target
	bl	starget_to_rport
	subs	r6, r0, #0
	beq	.L4
	bl	fc_remote_port_chkready
	subs	r4, r0, #0
	beq	.L12
.L4:
	ldr	r3, .L15
	ldr	r4, [r3]
	rsb	r4, r4, #0
.L1:
	mov	r0, r4
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L12:
	ldr	r3, [r6]
	add	r0, r8, #8
	str	r3, [r5]
	bl	atomic_inc_return
	ldr	r5, [r7]
	ldr	r6, [r8]
	add	r5, r5, #2
	mul	r0, r5, r0
	cmp	r0, r6
	blt	.L1
	ldr	r3, .L15+4
	ldr	r2, [r8, #4]
	ldr	r3, [r3]
	sub	r3, r2, r3
	cmp	r3, r6
	ble	.L13
	add	r1, r6, r5
	cmp	r3, r1
	blt	.L14
.L7:
	mov	r1, r5
	mov	r0, r7
	bl	lpfc_new_scsi_buf
	cmp	r5, r0
	mov	r6, r0
	beq	.L8
	stm	sp, {r5, r6}
	ldr	r3, .L15+8
	ldr	r2, .L15+12
	ldr	r1, [r3]
	mov	r0, r7
	ldr	r2, [r2]
	ldr	r3, .L15+16
	bl	lpfc_printf_vlog
.L8:
	cmp	r6, #0
	ldrgt	r0, [r8]
	addgt	r6, r0, r6
	mov	r0, r4
	strgt	r6, [r8]
	add	sp, sp, #16
	@ sp needed
	pop	{r4, r5, r6, r7, r8, pc}
.L14:
	sub	r0, r2, r6
	ldr	r1, .L15+12
	ldr	r3, .L15+20
	str	r0, [sp, #8]
	str	r5, [sp]
	str	r2, [sp, #4]
	ldr	r2, [r1]
	mov	r0, r7
	ldr	r1, [r3]
	ldr	r3, .L15+24
	bl	lpfc_printf_vlog
	ldr	r5, [r8, #4]
	sub	r5, r5, r6
	b	.L7
.L13:
	ldr	r3, .L15+20
	ldr	r2, .L15+12
	str	r6, [sp]
	ldr	r1, [r3]
	mov	r0, r7
	ldr	r2, [r2]
	ldr	r3, .L15+28
	bl	lpfc_printf_vlog
	b	.L1
.L16:
	.align	2
.L15:
	.word	ENXIO
	.word	LPFC_DISC_IOCB_BUFF_COUNT
	.word	KERN_ERR
	.word	LOG_FCP
	.word	.LC2
	.word	KERN_WARNING
	.word	.LC1
	.word	.LC0
	.size	lpfc_slave_alloc, .-lpfc_slave_alloc
	.comm	LPFC_DISC_IOCB_BUFF_COUNT,4,4
	.comm	LOG_FCP,4,4
	.comm	KERN_WARNING,4,4
	.comm	KERN_ERR,4,4
	.comm	ENXIO,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
