	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvu_mbox_handler_npc_mcam_alloc_entry ## -- Begin function rvu_mbox_handler_npc_mcam_alloc_entry
	.p2align	4, 0x90
_rvu_mbox_handler_npc_mcam_alloc_entry: ## @rvu_mbox_handler_npc_mcam_alloc_entry
	.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	%rdx, %r14
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movl	28(%rsi), %r12d
	movq	_BLKTYPE_NPC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_rvu_get_blkaddr
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_NPC_MCAM_ENTRY_INVALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	movq	$0, (%r14)
	movq	(%r13), %rax
	movl	8(%r13), %ecx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	cmpl	(%r15), %ecx
	jge	LBB0_1
LBB0_4:
	testl	%ecx, %ecx
	jne	LBB0_6
## %bb.5:
	movq	_NPC_MCAM_HIGHER_PRIO@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_1
LBB0_6:
	movl	(%r15), %edx
	decl	%edx
	cmpl	%edx, %ecx
	jne	LBB0_8
## %bb.7:
	movq	_NPC_MCAM_LOWER_PRIO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
LBB0_1:
	movq	_NPC_MCAM_INVALID_REQ@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpl	$0, 24(%r13)
	jne	LBB0_10
## %bb.9:
	movq	16(%r13), %rax
	movq	_NPC_MAX_NONCONTIG_ENTRIES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_1
LBB0_10:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_is_nixlf_attached
	testl	%eax, %eax
	je	LBB0_11
## %bb.13:
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%r13, %rdx
	movq	%r14, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_npc_mcam_alloc_entries         ## TAILCALL
LBB0_11:
	movq	_NPC_MCAM_ALLOC_DENIED@GOTPCREL(%rip), %rax
	jmp	LBB0_12
	.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_ENTRY_INVALID,4,2     ## @NPC_MCAM_ENTRY_INVALID
	.comm	_NPC_MCAM_HIGHER_PRIO,8,3       ## @NPC_MCAM_HIGHER_PRIO
	.comm	_NPC_MCAM_LOWER_PRIO,8,3        ## @NPC_MCAM_LOWER_PRIO
	.comm	_NPC_MAX_NONCONTIG_ENTRIES,8,3  ## @NPC_MAX_NONCONTIG_ENTRIES
	.comm	_NPC_MCAM_ALLOC_DENIED,4,2      ## @NPC_MCAM_ALLOC_DENIED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvu_mbox_handler_npc_mcam_alloc_entry ; -- Begin function rvu_mbox_handler_npc_mcam_alloc_entry
	.p2align	2
_rvu_mbox_handler_npc_mcam_alloc_entry: ; @rvu_mbox_handler_npc_mcam_alloc_entry
	.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, x2
	mov	x20, x1
	mov	x23, x0
	ldr	x21, [x0]
	ldr	w22, [x1, #28]
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_8
; %bb.1:
Lloh3:
	adrp	x8, _NPC_MCAM_ENTRY_INVALID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NPC_MCAM_ENTRY_INVALID@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	str	xzr, [x19]
	ldr	x8, [x20]
	ldr	w9, [x20, #8]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	w10, [x21]
	cmp	w9, w10
	b.ge	LBB0_8
LBB0_3:
	cbnz	w9, LBB0_5
; %bb.4:
Lloh6:
	adrp	x10, _NPC_MCAM_HIGHER_PRIO@GOTPAGE
Lloh7:
	ldr	x10, [x10, _NPC_MCAM_HIGHER_PRIO@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x10
	b.eq	LBB0_8
LBB0_5:
	ldr	w10, [x21]
	sub	w10, w10, #1
Lloh9:
	adrp	x11, _NPC_MCAM_LOWER_PRIO@GOTPAGE
Lloh10:
	ldr	x11, [x11, _NPC_MCAM_LOWER_PRIO@GOTPAGEOFF]
Lloh11:
	ldr	x11, [x11]
	cmp	w9, w10
	ccmp	x8, x11, #0, eq
	b.eq	LBB0_8
; %bb.6:
	ldr	w8, [x20, #24]
	cbnz	w8, LBB0_10
; %bb.7:
	ldr	x8, [x20, #16]
Lloh12:
	adrp	x9, _NPC_MAX_NONCONTIG_ENTRIES@GOTPAGE
Lloh13:
	ldr	x9, [x9, _NPC_MAX_NONCONTIG_ENTRIES@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_10
LBB0_8:
Lloh15:
	adrp	x8, _NPC_MCAM_INVALID_REQ@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NPC_MCAM_INVALID_REQ@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	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
LBB0_10:
	mov	x0, x23
	mov	x1, x22
	bl	_is_nixlf_attached
	cbz	w0, LBB0_12
; %bb.11:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	x3, x19
	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
	b	_npc_mcam_alloc_entries
LBB0_12:
Lloh17:
	adrp	x8, _NPC_MCAM_ALLOC_DENIED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _NPC_MCAM_ALLOC_DENIED@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.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_ENTRY_INVALID,4,2     ; @NPC_MCAM_ENTRY_INVALID
	.comm	_NPC_MCAM_HIGHER_PRIO,8,3       ; @NPC_MCAM_HIGHER_PRIO
	.comm	_NPC_MCAM_LOWER_PRIO,8,3        ; @NPC_MCAM_LOWER_PRIO
	.comm	_NPC_MAX_NONCONTIG_ENTRIES,8,3  ; @NPC_MAX_NONCONTIG_ENTRIES
	.comm	_NPC_MCAM_ALLOC_DENIED,4,2      ; @NPC_MCAM_ALLOC_DENIED
.subsections_via_symbols
