	.file	"extr_rvu_npc.c_rvu_mbox_handler_npc_mcam_free_entry.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	rvu_mbox_handler_npc_mcam_free_entry
	.type	rvu_mbox_handler_npc_mcam_free_entry, @function
rvu_mbox_handler_npc_mcam_free_entry:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	xor	edx, edx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rsi
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r13, QWORD PTR 16[rsi]
	mov	esi, DWORD PTR BLKTYPE_NPC[rip]
	mov	r14, QWORD PTR [rdi]
	call	rvu_get_blkaddr@PLT
	test	eax, eax
	js	.L8
	mov	rsi, r13
	mov	rdi, rbp
	mov	r12d, eax
	call	is_nixlf_attached@PLT
	test	eax, eax
	jne	.L4
.L8:
	mov	r13d, DWORD PTR NPC_MCAM_INVALID_REQ[rip]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L4:
	.cfi_restore_state
	lea	r15, 8[r14]
	mov	rdi, r15
	call	mutex_lock@PLT
	cmp	QWORD PTR 8[rbx], 0
	jne	.L10
	mov	rdx, QWORD PTR [rbx]
	mov	rsi, r13
	mov	rdi, r14
	call	npc_mcam_verify_entry@PLT
	mov	r13d, eax
	test	eax, eax
	je	.L11
.L6:
	mov	rdi, r15
	call	mutex_unlock@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	rcx, r13
	mov	edx, r12d
	mov	rsi, r14
	mov	rdi, rbp
	call	npc_mcam_free_all_entries@PLT
	xor	r13d, r13d
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rdx, QWORD PTR [rbx]
	mov	rax, QWORD PTR 16[r14]
	mov	rdi, r14
	mov	QWORD PTR [rax+rdx*8], 0
	mov	rsi, QWORD PTR [rbx]
	call	npc_mcam_clear_bit@PLT
	mov	rcx, QWORD PTR [rbx]
	xor	r8d, r8d
	mov	edx, r12d
	mov	rsi, r14
	mov	rdi, rbp
	call	npc_enable_mcam_entry@PLT
	mov	rcx, QWORD PTR [rbx]
	mov	rax, QWORD PTR [r14]
	mov	r8, QWORD PTR [rax+rcx*8]
	cmp	QWORD PTR NPC_MCAM_INVALID_MAP[rip], r8
	je	.L6
	mov	edx, r12d
	mov	rsi, r14
	mov	rdi, rbp
	call	npc_unmap_mcam_entry_and_cntr@PLT
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	rvu_mbox_handler_npc_mcam_free_entry, .-rvu_mbox_handler_npc_mcam_free_entry
	.comm	NPC_MCAM_INVALID_REQ,4,4
	.comm	NPC_MCAM_INVALID_MAP,8,8
	.comm	BLKTYPE_NPC,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_rvu_npc.c_rvu_mbox_handler_npc_mcam_free_entry.c"
	.text
	.align	2
	.global	rvu_mbox_handler_npc_mcam_free_entry
	.syntax unified
	.arm
	.fpu softvfp
	.type	rvu_mbox_handler_npc_mcam_free_entry, %function
rvu_mbox_handler_npc_mcam_free_entry:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r7, r1
	ldr	r3, .L12
	mov	r2, #0
	ldr	r1, [r3]
	sub	sp, sp, #12
	mov	r4, r0
	ldr	r6, [r7, #8]
	ldr	r8, [r0]
	bl	rvu_get_blkaddr
	subs	r5, r0, #0
	blt	.L8
	mov	r1, r6
	mov	r0, r4
	bl	is_nixlf_attached
	cmp	r0, #0
	bne	.L4
.L8:
	ldr	r3, .L12+4
	ldr	r6, [r3]
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L4:
	add	r9, r8, #4
	mov	r0, r9
	bl	mutex_lock
	ldr	r3, [r7, #4]
	cmp	r3, #0
	bne	.L10
	mov	r1, r6
	mov	r0, r8
	ldr	r2, [r7]
	bl	npc_mcam_verify_entry
	subs	r6, r0, #0
	beq	.L11
.L6:
	mov	r0, r9
	bl	mutex_unlock
	mov	r0, r6
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, pc}
.L10:
	mov	r3, r6
	mov	r2, r5
	mov	r1, r8
	mov	r0, r4
	bl	npc_mcam_free_all_entries
	mov	r6, #0
	b	.L6
.L11:
	ldr	r2, [r7]
	ldr	r3, [r8, #8]
	mov	r0, r8
	str	r6, [r3, r2, lsl #2]
	ldr	r1, [r7]
	bl	npc_mcam_clear_bit
	str	r6, [sp]
	mov	r2, r5
	mov	r1, r8
	ldr	r3, [r7]
	mov	r0, r4
	bl	npc_enable_mcam_entry
	ldr	r3, [r7]
	ldr	r2, [r8]
	ldr	r1, .L12+8
	ldr	r2, [r2, r3, lsl #2]
	ldr	r1, [r1]
	cmp	r1, r2
	beq	.L6
	str	r2, [sp]
	mov	r1, r8
	mov	r2, r5
	mov	r0, r4
	bl	npc_unmap_mcam_entry_and_cntr
	b	.L6
.L13:
	.align	2
.L12:
	.word	BLKTYPE_NPC
	.word	NPC_MCAM_INVALID_REQ
	.word	NPC_MCAM_INVALID_MAP
	.size	rvu_mbox_handler_npc_mcam_free_entry, .-rvu_mbox_handler_npc_mcam_free_entry
	.comm	NPC_MCAM_INVALID_REQ,4,4
	.comm	NPC_MCAM_INVALID_MAP,4,4
	.comm	BLKTYPE_NPC,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
