	.file	"extr_lpfc_hbadisc.c_lpfc_register_fcf.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	lpfc_register_fcf, @function
lpfc_register_fcf:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	lea	rbp, 8[rdi]
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdi
	mov	rdi, rbp
	call	spin_lock_irq@PLT
	mov	eax, DWORD PTR 24[rbx]
	test	DWORD PTR FCF_AVAILABLE[rip], eax
	je	.L12
	test	DWORD PTR FCF_REGISTERED[rip], eax
	je	.L3
	mov	edx, DWORD PTR FCF_SCAN_DONE[rip]
	or	edx, DWORD PTR FCF_IN_USE[rip]
	or	eax, edx
	mov	rdx, QWORD PTR 16[rbx]
	mov	rcx, QWORD PTR LPFC_FLOGI[rip]
	mov	DWORD PTR 24[rbx], eax
	mov	eax, DWORD PTR FCF_TS_INPROG[rip]
	not	eax
	and	eax, DWORD PTR [rbx]
	mov	DWORD PTR [rbx], eax
	cmp	QWORD PTR [rdx], rcx
	je	.L11
	mov	edx, DWORD PTR 8[rdx]
	test	DWORD PTR FC_FABRIC[rip], edx
	jne	.L14
.L11:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, rbp
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	spin_unlock_irq@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	mov	rdi, rbp
	call	spin_unlock_irq@PLT
	mov	edi, DWORD PTR 4[rbx]
	mov	esi, DWORD PTR GFP_KERNEL[rip]
	call	mempool_alloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L15
	mov	rsi, rax
	mov	rdi, rbx
	call	lpfc_reg_fcfi@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	rsi, r12
	mov	rdi, rbx
	mov	edx, DWORD PTR MBX_NOWAIT[rip]
	mov	QWORD PTR 8[r12], rax
	mov	eax, DWORD PTR lpfc_mbx_cmpl_reg_fcfi[rip]
	mov	DWORD PTR [r12], eax
	call	lpfc_sli_issue_mbox@PLT
	cmp	DWORD PTR MBX_NOT_FINISHED[rip], eax
	je	.L16
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	rdi, rbp
	call	spin_lock_irq@PLT
.L12:
	mov	eax, DWORD PTR FCF_TS_INPROG[rip]
	or	eax, DWORD PTR FCF_RR_INPROG[rip]
	mov	rdi, rbp
	not	eax
	and	DWORD PTR [rbx], eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	spin_unlock_irq@PLT
	.p2align 4,,10
	.p2align 3
.L14:
	.cfi_restore_state
	or	eax, DWORD PTR FCF_RR_INPROG[rip]
	mov	rdi, rbp
	mov	DWORD PTR [rbx], eax
	call	spin_unlock_irq@PLT
	mov	rdi, QWORD PTR 16[rbx]
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	lpfc_initial_flogi@PLT
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	rdi, rbp
	call	spin_lock_irq@PLT
	mov	eax, DWORD PTR FCF_TS_INPROG[rip]
	mov	rdi, rbp
	or	eax, DWORD PTR FCF_RR_INPROG[rip]
	not	eax
	and	DWORD PTR [rbx], eax
	call	spin_unlock_irq@PLT
	mov	esi, DWORD PTR 4[rbx]
	mov	rdi, r12
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	mempool_free@PLT
	.cfi_endproc
.LFE0:
	.size	lpfc_register_fcf, .-lpfc_register_fcf
	.comm	lpfc_mbx_cmpl_reg_fcfi,4,4
	.comm	MBX_NOWAIT,4,4
	.comm	MBX_NOT_FINISHED,4,4
	.comm	LPFC_FLOGI,8,8
	.comm	GFP_KERNEL,4,4
	.comm	FC_FABRIC,4,4
	.comm	FCF_TS_INPROG,4,4
	.comm	FCF_SCAN_DONE,4,4
	.comm	FCF_RR_INPROG,4,4
	.comm	FCF_REGISTERED,4,4
	.comm	FCF_IN_USE,4,4
	.comm	FCF_AVAILABLE,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_hbadisc.c_lpfc_register_fcf.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	lpfc_register_fcf, %function
lpfc_register_fcf:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r4, r0
	add	r5, r0, #8
	mov	r0, r5
	bl	spin_lock_irq
	ldr	r2, .L15
	ldr	r3, [r4, #16]
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L11
	ldr	r2, .L15+4
	ldr	r2, [r2]
	tst	r3, r2
	beq	.L3
	ldr	r0, .L15+8
	ldr	r2, .L15+12
	ldr	ip, [r0]
	ldr	r2, [r2]
	ldr	lr, .L15+16
	ldr	r1, [r4, #12]
	ldr	r0, .L15+20
	orr	r2, r2, ip
	ldr	lr, [lr]
	ldr	ip, [r1]
	ldr	r0, [r0]
	orr	r3, r2, r3
	ldr	r2, [r4]
	cmp	ip, r0
	bic	r2, r2, lr
	str	r3, [r4, #16]
	str	r2, [r4]
	beq	.L4
	ldr	r3, .L15+24
	ldr	r1, [r1, #4]
	ldr	r3, [r3]
	tst	r1, r3
	bne	.L13
.L4:
	mov	r0, r5
	pop	{r4, r5, r6, lr}
	b	spin_unlock_irq
.L3:
	mov	r0, r5
	bl	spin_unlock_irq
	ldr	r3, .L15+28
	ldr	r0, [r4, #4]
	ldr	r1, [r3]
	bl	mempool_alloc
	subs	r6, r0, #0
	beq	.L14
	mov	r1, r6
	mov	r0, r4
	bl	lpfc_reg_fcfi
	ldr	r3, .L15+32
	ldr	r2, [r4, #12]
	ldr	r1, [r3]
	ldr	r3, .L15+36
	stm	r6, {r1, r2}
	mov	r0, r4
	ldr	r2, [r3]
	mov	r1, r6
	bl	lpfc_sli_issue_mbox
	ldr	r3, .L15+40
	ldr	r3, [r3]
	cmp	r3, r0
	popne	{r4, r5, r6, pc}
	mov	r0, r5
	bl	spin_lock_irq
	ldr	r3, .L15+44
	ldr	r2, .L15+16
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, [r4]
	orr	r2, r2, r1
	bic	r3, r3, r2
	mov	r0, r5
	str	r3, [r4]
	bl	spin_unlock_irq
	mov	r0, r6
	ldr	r1, [r4, #4]
	pop	{r4, r5, r6, lr}
	b	mempool_free
.L14:
	mov	r0, r5
	bl	spin_lock_irq
.L11:
	ldr	r3, .L15+44
	ldr	r2, .L15+16
	ldr	r1, [r3]
	ldr	r2, [r2]
	ldr	r3, [r4]
	orr	r2, r2, r1
	bic	r3, r3, r2
	mov	r0, r5
	str	r3, [r4]
	pop	{r4, r5, r6, lr}
	b	spin_unlock_irq
.L13:
	ldr	r3, .L15+44
	mov	r0, r5
	ldr	r3, [r3]
	orr	r2, r3, r2
	str	r2, [r4]
	bl	spin_unlock_irq
	ldr	r0, [r4, #12]
	pop	{r4, r5, r6, lr}
	b	lpfc_initial_flogi
.L16:
	.align	2
.L15:
	.word	FCF_AVAILABLE
	.word	FCF_REGISTERED
	.word	FCF_IN_USE
	.word	FCF_SCAN_DONE
	.word	FCF_TS_INPROG
	.word	LPFC_FLOGI
	.word	FC_FABRIC
	.word	GFP_KERNEL
	.word	lpfc_mbx_cmpl_reg_fcfi
	.word	MBX_NOWAIT
	.word	MBX_NOT_FINISHED
	.word	FCF_RR_INPROG
	.size	lpfc_register_fcf, .-lpfc_register_fcf
	.comm	lpfc_mbx_cmpl_reg_fcfi,4,4
	.comm	MBX_NOWAIT,4,4
	.comm	MBX_NOT_FINISHED,4,4
	.comm	LPFC_FLOGI,4,4
	.comm	GFP_KERNEL,4,4
	.comm	FC_FABRIC,4,4
	.comm	FCF_TS_INPROG,4,4
	.comm	FCF_SCAN_DONE,4,4
	.comm	FCF_RR_INPROG,4,4
	.comm	FCF_REGISTERED,4,4
	.comm	FCF_IN_USE,4,4
	.comm	FCF_AVAILABLE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
