	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvu_mbox_handler_npc_mcam_free_counter ## -- Begin function rvu_mbox_handler_npc_mcam_free_counter
	.p2align	4, 0x90
_rvu_mbox_handler_npc_mcam_free_counter: ## @rvu_mbox_handler_npc_mcam_free_counter
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	_BLKTYPE_NPC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_rvu_get_blkaddr
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	16(%rbx), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movl	8(%r15), %esi
	movq	(%r15), %rdx
	movq	%rbx, %rdi
	callq	_npc_mcam_verify_counter
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r12d
	movq	%r13, %rdi
	callq	_mutex_unlock
	jmp	LBB0_12
LBB0_1:
	movq	_NPC_MCAM_INVALID_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	jmp	LBB0_12
LBB0_4:
	movq	_NPC_MCAM_INVALID_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	40(%rbx), %rcx
	movq	(%r15), %rsi
	movl	%eax, (%rcx,%rsi,4)
	leaq	32(%rbx), %rdi
	callq	_rvu_free_rsrc
	xorl	%r12d, %r12d
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%rsi, %r12
	jae	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	24(%rbx), %rax
	movq	(%r15), %rcx
	cmpl	$0, (%rax,%rcx,4)
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	20(%rbx), %edi
	movq	%r12, %rdx
	callq	_find_next_bit
	movq	%r13, %rdi
	movq	(%rbx), %rsi
	cmpq	%rsi, %rax
	jae	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	8(%rbx), %rcx
	movq	(%rcx,%rax,8), %r8
	cmpq	(%r15), %r8
	jne	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %r12
	incq	%r12
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rax, %rcx
	callq	_npc_unmap_mcam_entry_and_cntr
	jmp	LBB0_5
LBB0_11:
	callq	_mutex_unlock
	xorl	%r12d, %r12d
LBB0_12:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLKTYPE_NPC,4,2                ## @BLKTYPE_NPC
	.comm	_NPC_MCAM_INVALID_REQ,4,2       ## @NPC_MCAM_INVALID_REQ
	.comm	_NPC_MCAM_INVALID_MAP,4,2       ## @NPC_MCAM_INVALID_MAP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvu_mbox_handler_npc_mcam_free_counter ; -- Begin function rvu_mbox_handler_npc_mcam_free_counter
	.p2align	2
_rvu_mbox_handler_npc_mcam_free_counter: ; @rvu_mbox_handler_npc_mcam_free_counter
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _BLKTYPE_NPC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLKTYPE_NPC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_rvu_get_blkaddr
	tbnz	w0, #31, LBB0_3
; %bb.1:
	mov	x23, x0
	add	x22, x21, #16
	mov	x0, x22
	bl	_mutex_lock
	ldr	w1, [x19, #8]
	ldr	x2, [x19]
	mov	x0, x21
	bl	_npc_mcam_verify_counter
	cbz	w0, LBB0_4
; %bb.2:
	mov	x24, x0
	mov	x0, x22
	bl	_mutex_unlock
	b	LBB0_12
LBB0_3:
Lloh3:
	adrp	x8, _NPC_MCAM_INVALID_REQ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NPC_MCAM_INVALID_REQ@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	b	LBB0_12
LBB0_4:
Lloh6:
	adrp	x8, _NPC_MCAM_INVALID_MAP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NPC_MCAM_INVALID_MAP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	ldr	x9, [x21, #40]
	ldr	x1, [x19]
	str	w8, [x9, x1, lsl #2]
	add	x0, x21, #32
	bl	_rvu_free_rsrc
	mov	x24, #0
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	x1, [x21]
LBB0_6:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x24, x1
	b.hs	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x21, #24]
	ldr	x9, [x19]
	ldr	w8, [x8, x9, lsl #2]
	cbz	w8, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w0, [x21, #20]
	mov	x2, x24
	bl	_find_next_bit
	ldr	x1, [x21]
	cmp	x0, x1
	b.hs	LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x3, x0
	ldr	x8, [x21, #8]
	ldr	x4, [x8, x0, lsl #3]
	ldr	x8, [x19]
	cmp	x4, x8
	b.ne	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x24, x3, #1
	mov	x0, x20
	mov	x1, x21
	mov	x2, x23
	bl	_npc_unmap_mcam_entry_and_cntr
	b	LBB0_5
LBB0_11:
	mov	x0, x22
	bl	_mutex_unlock
	mov	w24, #0
LBB0_12:
	mov	x0, x24
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BLKTYPE_NPC,4,2                ; @BLKTYPE_NPC
	.comm	_NPC_MCAM_INVALID_REQ,4,2       ; @NPC_MCAM_INVALID_REQ
	.comm	_NPC_MCAM_INVALID_MAP,4,2       ; @NPC_MCAM_INVALID_MAP
.subsections_via_symbols
