	.file	"extr_bfad_bsg.c_bfad_iocmd_fabric_get_lports.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	bfad_iocmd_fabric_get_lports, @function
bfad_iocmd_fabric_get_lports:
.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
	mov	rbp, rdi
	mov	edi, edx
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rsi
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rdx, QWORD PTR [rsi]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], rdx
	test	rdx, rdx
	jne	.L2
	mov	rax, QWORD PTR BFA_STATUS_EINVAL[rip]
	mov	QWORD PTR 8[rsi], rax
.L3:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L9
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	xor	eax, eax
	pop	rbx
	.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
.L2:
	.cfi_restore_state
	sal	edx, 2
	mov	esi, 24
	call	bfad_chk_iocmd_sz@PLT
	cmp	rax, QWORD PTR BFA_STATUS_OK[rip]
	je	.L4
	mov	rax, QWORD PTR BFA_STATUS_VERSION_FAIL[rip]
	mov	QWORD PTR 8[rbx], rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L4:
	xor	esi, esi
	mov	rdi, rbp
	lea	r12, 24[rbx]
	call	spin_lock_irqsave@PLT
	mov	esi, DWORD PTR 16[rbx]
	lea	rdi, 4[rbp]
	call	bfa_fcs_vf_lookup@PLT
	mov	rdi, rax
	test	rax, rax
	je	.L10
	mov	rdx, rsp
	mov	rsi, r12
	call	bfa_fcs_vf_get_ports@PLT
	xor	esi, esi
	mov	rdi, rbp
	call	spin_unlock_irqrestore@PLT
	mov	rax, QWORD PTR [rsp]
	mov	QWORD PTR [rbx], rax
	mov	rax, QWORD PTR BFA_STATUS_OK[rip]
	mov	QWORD PTR 8[rbx], rax
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L10:
	xor	esi, esi
	mov	rdi, rbp
	call	spin_unlock_irqrestore@PLT
	mov	rax, QWORD PTR BFA_STATUS_UNKNOWN_VFID[rip]
	mov	QWORD PTR 8[rbx], rax
	jmp	.L3
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	bfad_iocmd_fabric_get_lports, .-bfad_iocmd_fabric_get_lports
	.comm	BFA_STATUS_VERSION_FAIL,8,8
	.comm	BFA_STATUS_UNKNOWN_VFID,8,8
	.comm	BFA_STATUS_OK,8,8
	.comm	BFA_STATUS_EINVAL,8,8
	.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_bfad_bsg.c_bfad_iocmd_fabric_get_lports.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	bfad_iocmd_fabric_get_lports, %function
bfad_iocmd_fabric_get_lports:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	ldr	r3, [r1]
	mov	r5, r0
	mov	r0, r2
	ldr	r2, .L11
	sub	sp, sp, #8
	cmp	r3, #0
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	mov	r4, r1
	str	r3, [sp]
	bne	.L2
	ldr	r3, .L11+4
	ldr	r3, [r3]
	str	r3, [r1, #4]
.L3:
	ldr	r3, .L11
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L9
	mov	r0, #0
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L2:
	lsl	r2, r3, #2
	mov	r1, #12
	bl	bfad_chk_iocmd_sz
	ldr	r6, .L11+8
	ldr	r3, [r6]
	cmp	r0, r3
	ldrne	r3, .L11+12
	ldrne	r3, [r3]
	strne	r3, [r4, #4]
	bne	.L3
.L4:
	mov	r1, #0
	mov	r0, r5
	bl	spin_lock_irqsave
	ldr	r1, [r4, #8]
	add	r0, r5, #4
	bl	bfa_fcs_vf_lookup
	cmp	r0, #0
	add	r1, r4, #12
	beq	.L10
	mov	r2, sp
	bl	bfa_fcs_vf_get_ports
	mov	r0, r5
	mov	r1, #0
	bl	spin_unlock_irqrestore
	ldr	r2, [r6]
	ldr	r3, [sp]
	str	r2, [r4, #4]
	str	r3, [r4]
	b	.L3
.L10:
	mov	r0, r5
	mov	r1, #0
	bl	spin_unlock_irqrestore
	ldr	r3, .L11+16
	ldr	r3, [r3]
	str	r3, [r4, #4]
	b	.L3
.L9:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	.LC0
	.word	BFA_STATUS_EINVAL
	.word	BFA_STATUS_OK
	.word	BFA_STATUS_VERSION_FAIL
	.word	BFA_STATUS_UNKNOWN_VFID
	.size	bfad_iocmd_fabric_get_lports, .-bfad_iocmd_fabric_get_lports
	.comm	BFA_STATUS_VERSION_FAIL,4,4
	.comm	BFA_STATUS_UNKNOWN_VFID,4,4
	.comm	BFA_STATUS_OK,4,4
	.comm	BFA_STATUS_EINVAL,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
