	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rvu_mbox_handler_npc_mcam_shift_entry ## -- Begin function rvu_mbox_handler_npc_mcam_shift_entry
	.p2align	4, 0x90
_rvu_mbox_handler_npc_mcam_shift_entry: ## @rvu_mbox_handler_npc_mcam_shift_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
	subq	$72, %rsp
	.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, %rbx
	movq	(%rdi), %r13
	movq	24(%rsi), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	_BLKTYPE_NPC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	xorl	%edx, %edx
	callq	_rvu_get_blkaddr
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	(%rbx), %rdx
	movq	_NPC_MCAM_MAX_SHIFTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	jbe	LBB0_3
LBB0_1:
	movq	_NPC_MCAM_INVALID_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_18
LBB0_3:
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	leaq	8(%r13), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	cmpq	$0, (%rbx)
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.5:
	xorl	%esi, %esi
	movq	_NPC_MCAM_INVALID_MAP@GOTPCREL(%rip), %r15
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	movq	%r12, %rcx
	movl	$1, %r8d
	callq	_npc_enable_mcam_entry
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	callq	_npc_enable_mcam_entry
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	incq	%rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpq	(%rbx), %rsi
	movq	_NPC_MCAM_INVALID_MAP@GOTPCREL(%rip), %r15
	jae	LBB0_15
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	movq	(%rax,%rsi,8), %rdx
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	(%rcx,%rsi,8), %r12
	movq	%r13, %rdi
	movq	-104(%rbp), %rbx                ## 8-byte Reload
	movq	%rbx, %rsi
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	callq	_npc_mcam_verify_entry
	testl	%eax, %eax
	jne	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_npc_mcam_verify_entry
	testl	%eax, %eax
	jne	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r13), %rax
	movq	(%rax,%r12,8), %rax
	cmpq	(%r15), %rax
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	-68(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edx
	movq	%r12, %rcx
	xorl	%r8d, %r8d
	callq	_npc_enable_mcam_entry
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rcx
	movq	%r12, %r8
	callq	_npc_copy_mcam_entry
	movq	(%r13), %rax
	movq	(%rax,%r14,8), %r14
	movq	_NPC_MCAM_INVALID_MAP@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=1
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%r14, %r8
	callq	_npc_unmap_mcam_entry_and_cntr
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movl	%r15d, %edx
	movq	%r12, %rcx
	movq	%r14, %r8
	callq	_npc_map_mcam_entry_and_cntr
	jmp	LBB0_14
LBB0_4:
	xorl	%esi, %esi
	xorl	%r14d, %r14d
LBB0_15:
	cmpq	(%rbx), %rsi
	je	LBB0_17
LBB0_16:
	movq	_NPC_MCAM_PERM_DENIED@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rsi, (%rax)
LBB0_17:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_18:
	movl	%r14d, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%eax, %r14d
	jmp	LBB0_8
LBB0_11:
	movq	_NPC_MCAM_PERM_DENIED@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_8:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	cmpq	(%rbx), %rsi
	jne	LBB0_16
	jmp	LBB0_17
	.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_MAX_SHIFTS,8,3        ## @NPC_MCAM_MAX_SHIFTS
	.comm	_NPC_MCAM_INVALID_MAP,8,3       ## @NPC_MCAM_INVALID_MAP
	.comm	_NPC_MCAM_PERM_DENIED,4,2       ## @NPC_MCAM_PERM_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_shift_entry ; -- Begin function rvu_mbox_handler_npc_mcam_shift_entry
	.p2align	2
_rvu_mbox_handler_npc_mcam_shift_entry: ; @rvu_mbox_handler_npc_mcam_shift_entry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	ldr	x23, [x0]
	ldr	x24, [x1, #24]
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_2
; %bb.1:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _NPC_MCAM_MAX_SHIFTS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NPC_MCAM_MAX_SHIFTS@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ls	LBB0_3
LBB0_2:
Lloh6:
	adrp	x8, _NPC_MCAM_INVALID_REQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NPC_MCAM_INVALID_REQ@GOTPAGEOFF]
Lloh8:
	ldr	w28, [x8]
	b	LBB0_19
LBB0_3:
	mov	x25, x0
	add	x26, x23, #8
	mov	x0, x26
	bl	_mutex_lock
	ldr	x8, [x20]
	cbz	x8, LBB0_11
; %bb.4:
	stp	x26, x19, [sp]                  ; 16-byte Folded Spill
	mov	x21, #0
Lloh9:
	adrp	x19, _NPC_MCAM_INVALID_MAP@GOTPAGE
Lloh10:
	ldr	x19, [x19, _NPC_MCAM_INVALID_MAP@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	mov	x1, x23
	mov	x2, x25
	mov	x3, x27
	mov	w4, #1
	bl	_npc_enable_mcam_entry
	mov	x0, x22
	mov	x1, x23
	mov	x2, x25
	mov	x3, x26
	mov	w4, #0
	bl	_npc_enable_mcam_entry
	add	x21, x21, #1
	ldr	x8, [x20]
	cmp	x21, x8
	b.hs	LBB0_13
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x8, x21, #3
	ldp	x9, x10, [x20, #8]
	ldr	x26, [x9, x8]
	ldr	x27, [x10, x8]
	mov	x0, x23
	mov	x1, x24
	mov	x2, x26
	bl	_npc_mcam_verify_entry
	cbnz	w0, LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	mov	x1, x24
	mov	x2, x27
	bl	_npc_mcam_verify_entry
	cbnz	w0, LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x23]
	ldr	x8, [x8, x27, lsl #3]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	mov	x1, x23
	mov	x2, x25
	mov	x3, x27
	mov	w4, #0
	bl	_npc_enable_mcam_entry
	mov	x0, x22
	mov	x1, x23
	mov	x2, x25
	mov	x3, x26
	mov	x4, x27
	bl	_npc_copy_mcam_entry
	ldr	x8, [x23]
	ldr	x28, [x8, x26, lsl #3]
	ldr	x8, [x19]
	cmp	x28, x8
	b.eq	LBB0_5
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x22
	mov	x1, x23
	mov	x2, x25
	mov	x3, x26
	mov	x4, x28
	bl	_npc_unmap_mcam_entry_and_cntr
	mov	x0, x22
	mov	x1, x23
	mov	x2, x25
	mov	x3, x27
	mov	x4, x28
	bl	_npc_map_mcam_entry_and_cntr
	b	LBB0_5
LBB0_11:
	mov	x21, #0
	mov	w28, #0
	b	LBB0_16
LBB0_12:
	mov	x28, x0
	b	LBB0_15
LBB0_13:
	mov	w28, #0
	b	LBB0_15
LBB0_14:
Lloh11:
	adrp	x8, _NPC_MCAM_PERM_DENIED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NPC_MCAM_PERM_DENIED@GOTPAGEOFF]
Lloh13:
	ldr	w28, [x8]
LBB0_15:
	ldp	x26, x19, [sp]                  ; 16-byte Folded Reload
LBB0_16:
	ldr	x8, [x20]
	cmp	x21, x8
	b.eq	LBB0_18
; %bb.17:
Lloh14:
	adrp	x8, _NPC_MCAM_PERM_DENIED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NPC_MCAM_PERM_DENIED@GOTPAGEOFF]
Lloh16:
	ldr	w28, [x8]
	str	x21, [x19]
LBB0_18:
	mov	x0, x26
	bl	_mutex_unlock
LBB0_19:
	mov	x0, x28
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.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_MAX_SHIFTS,8,3        ; @NPC_MCAM_MAX_SHIFTS
	.comm	_NPC_MCAM_INVALID_MAP,8,3       ; @NPC_MCAM_INVALID_MAP
	.comm	_NPC_MCAM_PERM_DENIED,4,2       ; @NPC_MCAM_PERM_DENIED
.subsections_via_symbols
