	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_counter_pool_validate
_mlxsw_sp_counter_pool_validate:        ## @mlxsw_sp_counter_pool_validate
	.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
	movl	(%rdi), %edi
	movq	_COUNTER_POOL_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MLXSW_CORE_RES_GET
	movl	%eax, %r15d
	movq	_mlxsw_sp_counter_sub_pools@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	xorl	%r14d, %r14d
	movl	$0, %r13d
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addl	(%rdi,%rbx,8), %r13d
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_2
LBB0_3:
	movq	_MLXSW_SP_COUNTER_POOL_BANK_SIZE@GOTPCREL(%rip), %rcx
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	incl	%eax
	movq	_EINVAL@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	cmpl	%eax, %r13d
	cmovbel	%r14d, %ecx
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COUNTER_POOL_SIZE,4,2          ## @COUNTER_POOL_SIZE
	.comm	_mlxsw_sp_counter_sub_pools,8,3 ## @mlxsw_sp_counter_sub_pools
	.comm	_MLXSW_SP_COUNTER_POOL_BANK_SIZE,4,2 ## @MLXSW_SP_COUNTER_POOL_BANK_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mlxsw_sp_counter_pool_validate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_counter_pool_validate
_mlxsw_sp_counter_pool_validate:        ; @mlxsw_sp_counter_pool_validate
	.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
	ldr	w0, [x0]
Lloh0:
	adrp	x8, _COUNTER_POOL_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _COUNTER_POOL_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_MLXSW_CORE_RES_GET
	mov	x19, x0
Lloh3:
	adrp	x20, _mlxsw_sp_counter_sub_pools@GOTPAGE
Lloh4:
	ldr	x20, [x20, _mlxsw_sp_counter_sub_pools@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x22, #0
	mov	w21, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x20]
	ldr	x8, [x0, x22, lsl #3]
	add	w21, w21, w8
	add	x22, x22, #1
	bl	_ARRAY_SIZE
	cmp	x22, w0, sxtw
	b.lt	LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w21, #0
LBB0_4:
Lloh5:
	adrp	x8, _MLXSW_SP_COUNTER_POOL_BANK_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MLXSW_SP_COUNTER_POOL_BANK_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	udiv	w8, w19, w8
	add	w8, w8, #1
Lloh8:
	adrp	x9, _EINVAL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w21, w8
	csneg	w0, wzr, w9, ls
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_COUNTER_POOL_SIZE,4,2          ; @COUNTER_POOL_SIZE
	.comm	_mlxsw_sp_counter_sub_pools,8,3 ; @mlxsw_sp_counter_sub_pools
	.comm	_MLXSW_SP_COUNTER_POOL_BANK_SIZE,4,2 ; @MLXSW_SP_COUNTER_POOL_BANK_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mlxsw_sp_counter_pool_validate
.subsections_via_symbols
