	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp_acl_tcam_priority_get ## -- Begin function mlxsw_sp_acl_tcam_priority_get
	.p2align	4, 0x90
_mlxsw_sp_acl_tcam_priority_get:        ## @mlxsw_sp_acl_tcam_priority_get
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	testl	%ecx, %ecx
	je	LBB0_1
## %bb.2:
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movq	_KVD_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movl	(%rbx), %edi
	movl	(%r12), %esi
	callq	_MLXSW_CORE_RES_GET
	decq	%rax
	subq	(%r14), %rax
	jle	LBB0_6
## %bb.7:
	movq	%rax, (%r15)
	jmp	LBB0_8
LBB0_1:
	movq	$0, (%r15)
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_4
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_4:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KVD_SIZE,4,2                   ## @KVD_SIZE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp_acl_tcam_priority_get ; -- Begin function mlxsw_sp_acl_tcam_priority_get
	.p2align	2
_mlxsw_sp_acl_tcam_priority_get:        ; @mlxsw_sp_acl_tcam_priority_get
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	cbz	w3, LBB0_4
; %bb.1:
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x22, _KVD_SIZE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _KVD_SIZE@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_5
; %bb.2:
	ldr	w0, [x21]
	ldr	w1, [x22]
	bl	_MLXSW_CORE_RES_GET
	sub	x8, x0, #1
	ldr	x9, [x20]
	subs	x8, x8, x9
	b.le	LBB0_6
; %bb.3:
	mov	w0, #0
	str	x8, [x19]
	b	LBB0_8
LBB0_4:
	mov	w0, #0
	str	xzr, [x19]
	b	LBB0_8
LBB0_5:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_KVD_SIZE,4,2                   ; @KVD_SIZE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
