	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp1_kvdl_resources_register ## -- Begin function mlxsw_sp1_kvdl_resources_register
	.p2align	4, 0x90
_mlxsw_sp1_kvdl_resources_register:     ## @mlxsw_sp1_kvdl_resources_register
	.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	%rdi, %rbx
	callq	_priv_to_devlink
	movq	%rax, %r14
	movq	_KVD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_MLXSW_CORE_RES_GET
	movq	%rax, %r15
	movq	_KVD_SINGLE_MIN_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_MLXSW_CORE_RES_GET
	movq	%rax, %r12
	movq	_KVD_DOUBLE_MIN_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_MLXSW_CORE_RES_GET
	addq	%r12, %rax
	subq	%rax, %r15
	movq	_MLXSW_SP1_KVDL_SINGLE_ALLOC_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_DEVLINK_RESOURCE_UNIT_ENTRY@GOTPCREL(%rip), %r12
	movl	(%r12), %r8d
	leaq	_mlxsw_sp1_kvdl_resources_register.size_params(%rip), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_devlink_resource_size_params_init
	movq	_MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_SINGLES@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLXSW_SP1_KVDL_SINGLE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MLXSW_SP_RESOURCE_KVD_LINEAR_SINGLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MLXSW_SP_RESOURCE_KVD_LINEAR@GOTPCREL(%rip), %r13
	movl	(%r13), %r8d
	movq	%r14, %rdi
	movq	%rbx, %r9
	callq	_devlink_resource_register
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_MLXSW_SP1_KVDL_CHUNKS_ALLOC_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r12), %r8d
	leaq	_mlxsw_sp1_kvdl_resources_register.size_params(%rip), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_devlink_resource_size_params_init
	movq	_MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_CHUNKS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLXSW_SP1_KVDL_CHUNKS_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MLXSW_SP_RESOURCE_KVD_LINEAR_CHUNKS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r13), %r8d
	movq	%r14, %rdi
	movq	%rbx, %r9
	callq	_devlink_resource_register
	testl	%eax, %eax
	je	LBB0_3
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_MLXSW_SP1_KVDL_LARGE_CHUNKS_ALLOC_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r12), %r8d
	leaq	_mlxsw_sp1_kvdl_resources_register.size_params(%rip), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_devlink_resource_size_params_init
	movq	_MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_LARGE_CHUNKS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLXSW_SP1_KVDL_LARGE_CHUNKS_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MLXSW_SP_RESOURCE_KVD_LINEAR_LARGE_CHUNKS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r13), %r8d
	movq	%r14, %rdi
	movq	%rbx, %r9
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_devlink_resource_register      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_mlxsw_sp1_kvdl_resources_register.size_params,4,2 ## @mlxsw_sp1_kvdl_resources_register.size_params
	.comm	_KVD_SIZE,4,2                   ## @KVD_SIZE
	.comm	_KVD_SINGLE_MIN_SIZE,4,2        ## @KVD_SINGLE_MIN_SIZE
	.comm	_KVD_DOUBLE_MIN_SIZE,4,2        ## @KVD_DOUBLE_MIN_SIZE
	.comm	_MLXSW_SP1_KVDL_SINGLE_ALLOC_SIZE,4,2 ## @MLXSW_SP1_KVDL_SINGLE_ALLOC_SIZE
	.comm	_DEVLINK_RESOURCE_UNIT_ENTRY,4,2 ## @DEVLINK_RESOURCE_UNIT_ENTRY
	.comm	_MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_SINGLES,4,2 ## @MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_SINGLES
	.comm	_MLXSW_SP1_KVDL_SINGLE_SIZE,4,2 ## @MLXSW_SP1_KVDL_SINGLE_SIZE
	.comm	_MLXSW_SP_RESOURCE_KVD_LINEAR_SINGLE,4,2 ## @MLXSW_SP_RESOURCE_KVD_LINEAR_SINGLE
	.comm	_MLXSW_SP_RESOURCE_KVD_LINEAR,4,2 ## @MLXSW_SP_RESOURCE_KVD_LINEAR
	.comm	_MLXSW_SP1_KVDL_CHUNKS_ALLOC_SIZE,4,2 ## @MLXSW_SP1_KVDL_CHUNKS_ALLOC_SIZE
	.comm	_MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_CHUNKS,4,2 ## @MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_CHUNKS
	.comm	_MLXSW_SP1_KVDL_CHUNKS_SIZE,4,2 ## @MLXSW_SP1_KVDL_CHUNKS_SIZE
	.comm	_MLXSW_SP_RESOURCE_KVD_LINEAR_CHUNKS,4,2 ## @MLXSW_SP_RESOURCE_KVD_LINEAR_CHUNKS
	.comm	_MLXSW_SP1_KVDL_LARGE_CHUNKS_ALLOC_SIZE,4,2 ## @MLXSW_SP1_KVDL_LARGE_CHUNKS_ALLOC_SIZE
	.comm	_MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_LARGE_CHUNKS,4,2 ## @MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_LARGE_CHUNKS
	.comm	_MLXSW_SP1_KVDL_LARGE_CHUNKS_SIZE,4,2 ## @MLXSW_SP1_KVDL_LARGE_CHUNKS_SIZE
	.comm	_MLXSW_SP_RESOURCE_KVD_LINEAR_LARGE_CHUNKS,4,2 ## @MLXSW_SP_RESOURCE_KVD_LINEAR_LARGE_CHUNKS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp1_kvdl_resources_register ; -- Begin function mlxsw_sp1_kvdl_resources_register
	.p2align	2
_mlxsw_sp1_kvdl_resources_register:     ; @mlxsw_sp1_kvdl_resources_register
	.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	x20, x0
	bl	_priv_to_devlink
	mov	x19, x0
Lloh0:
	adrp	x8, _KVD_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KVD_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_MLXSW_CORE_RES_GET
	mov	x21, x0
Lloh3:
	adrp	x8, _KVD_SINGLE_MIN_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _KVD_SINGLE_MIN_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_MLXSW_CORE_RES_GET
	mov	x22, x0
Lloh6:
	adrp	x8, _KVD_DOUBLE_MIN_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _KVD_DOUBLE_MIN_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_MLXSW_CORE_RES_GET
	add	x8, x22, x0
	sub	x20, x21, x8
Lloh9:
	adrp	x8, _MLXSW_SP1_KVDL_SINGLE_ALLOC_SIZE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLXSW_SP1_KVDL_SINGLE_ALLOC_SIZE@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
Lloh12:
	adrp	x22, _DEVLINK_RESOURCE_UNIT_ENTRY@GOTPAGE
Lloh13:
	ldr	x22, [x22, _DEVLINK_RESOURCE_UNIT_ENTRY@GOTPAGEOFF]
	ldr	w4, [x22]
Lloh14:
	adrp	x21, _mlxsw_sp1_kvdl_resources_register.size_params@PAGE
Lloh15:
	add	x21, x21, _mlxsw_sp1_kvdl_resources_register.size_params@PAGEOFF
	mov	x0, x21
	mov	w1, #0
	mov	x2, x20
	bl	_devlink_resource_size_params_init
Lloh16:
	adrp	x8, _MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_SINGLES@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_SINGLES@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
Lloh19:
	adrp	x8, _MLXSW_SP1_KVDL_SINGLE_SIZE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MLXSW_SP1_KVDL_SINGLE_SIZE@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
Lloh22:
	adrp	x8, _MLXSW_SP_RESOURCE_KVD_LINEAR_SINGLE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MLXSW_SP_RESOURCE_KVD_LINEAR_SINGLE@GOTPAGEOFF]
Lloh24:
	ldr	w3, [x8]
Lloh25:
	adrp	x23, _MLXSW_SP_RESOURCE_KVD_LINEAR@GOTPAGE
Lloh26:
	ldr	x23, [x23, _MLXSW_SP_RESOURCE_KVD_LINEAR@GOTPAGEOFF]
	ldr	w4, [x23]
	mov	x0, x19
	mov	x5, x21
	bl	_devlink_resource_register
	cbnz	w0, LBB0_2
; %bb.1:
Lloh27:
	adrp	x8, _MLXSW_SP1_KVDL_CHUNKS_ALLOC_SIZE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MLXSW_SP1_KVDL_CHUNKS_ALLOC_SIZE@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
	ldr	w4, [x22]
Lloh30:
	adrp	x21, _mlxsw_sp1_kvdl_resources_register.size_params@PAGE
Lloh31:
	add	x21, x21, _mlxsw_sp1_kvdl_resources_register.size_params@PAGEOFF
	mov	x0, x21
	mov	w1, #0
	mov	x2, x20
	bl	_devlink_resource_size_params_init
Lloh32:
	adrp	x8, _MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_CHUNKS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_CHUNKS@GOTPAGEOFF]
Lloh34:
	adrp	x9, _MLXSW_SP1_KVDL_CHUNKS_SIZE@GOTPAGE
Lloh35:
	ldr	x9, [x9, _MLXSW_SP1_KVDL_CHUNKS_SIZE@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
Lloh37:
	ldr	w2, [x9]
Lloh38:
	adrp	x8, _MLXSW_SP_RESOURCE_KVD_LINEAR_CHUNKS@GOTPAGE
Lloh39:
	ldr	x8, [x8, _MLXSW_SP_RESOURCE_KVD_LINEAR_CHUNKS@GOTPAGEOFF]
Lloh40:
	ldr	w3, [x8]
	ldr	w4, [x23]
	mov	x0, x19
	mov	x5, x21
	bl	_devlink_resource_register
	cbz	w0, LBB0_3
LBB0_2:
	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_3:
Lloh41:
	adrp	x8, _MLXSW_SP1_KVDL_LARGE_CHUNKS_ALLOC_SIZE@GOTPAGE
Lloh42:
	ldr	x8, [x8, _MLXSW_SP1_KVDL_LARGE_CHUNKS_ALLOC_SIZE@GOTPAGEOFF]
Lloh43:
	ldr	w3, [x8]
	ldr	w4, [x22]
Lloh44:
	adrp	x21, _mlxsw_sp1_kvdl_resources_register.size_params@PAGE
Lloh45:
	add	x21, x21, _mlxsw_sp1_kvdl_resources_register.size_params@PAGEOFF
	mov	x0, x21
	mov	w1, #0
	mov	x2, x20
	bl	_devlink_resource_size_params_init
Lloh46:
	adrp	x8, _MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_LARGE_CHUNKS@GOTPAGE
Lloh47:
	ldr	x8, [x8, _MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_LARGE_CHUNKS@GOTPAGEOFF]
Lloh48:
	adrp	x9, _MLXSW_SP1_KVDL_LARGE_CHUNKS_SIZE@GOTPAGE
Lloh49:
	ldr	x9, [x9, _MLXSW_SP1_KVDL_LARGE_CHUNKS_SIZE@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
Lloh51:
	ldr	w2, [x9]
Lloh52:
	adrp	x8, _MLXSW_SP_RESOURCE_KVD_LINEAR_LARGE_CHUNKS@GOTPAGE
Lloh53:
	ldr	x8, [x8, _MLXSW_SP_RESOURCE_KVD_LINEAR_LARGE_CHUNKS@GOTPAGEOFF]
Lloh54:
	ldr	w3, [x8]
	ldr	w4, [x23]
	mov	x0, x19
	mov	x5, x21
	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	_devlink_resource_register
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh36
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh50
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_mlxsw_sp1_kvdl_resources_register.size_params,4,2 ; @mlxsw_sp1_kvdl_resources_register.size_params
	.comm	_KVD_SIZE,4,2                   ; @KVD_SIZE
	.comm	_KVD_SINGLE_MIN_SIZE,4,2        ; @KVD_SINGLE_MIN_SIZE
	.comm	_KVD_DOUBLE_MIN_SIZE,4,2        ; @KVD_DOUBLE_MIN_SIZE
	.comm	_MLXSW_SP1_KVDL_SINGLE_ALLOC_SIZE,4,2 ; @MLXSW_SP1_KVDL_SINGLE_ALLOC_SIZE
	.comm	_DEVLINK_RESOURCE_UNIT_ENTRY,4,2 ; @DEVLINK_RESOURCE_UNIT_ENTRY
	.comm	_MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_SINGLES,4,2 ; @MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_SINGLES
	.comm	_MLXSW_SP1_KVDL_SINGLE_SIZE,4,2 ; @MLXSW_SP1_KVDL_SINGLE_SIZE
	.comm	_MLXSW_SP_RESOURCE_KVD_LINEAR_SINGLE,4,2 ; @MLXSW_SP_RESOURCE_KVD_LINEAR_SINGLE
	.comm	_MLXSW_SP_RESOURCE_KVD_LINEAR,4,2 ; @MLXSW_SP_RESOURCE_KVD_LINEAR
	.comm	_MLXSW_SP1_KVDL_CHUNKS_ALLOC_SIZE,4,2 ; @MLXSW_SP1_KVDL_CHUNKS_ALLOC_SIZE
	.comm	_MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_CHUNKS,4,2 ; @MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_CHUNKS
	.comm	_MLXSW_SP1_KVDL_CHUNKS_SIZE,4,2 ; @MLXSW_SP1_KVDL_CHUNKS_SIZE
	.comm	_MLXSW_SP_RESOURCE_KVD_LINEAR_CHUNKS,4,2 ; @MLXSW_SP_RESOURCE_KVD_LINEAR_CHUNKS
	.comm	_MLXSW_SP1_KVDL_LARGE_CHUNKS_ALLOC_SIZE,4,2 ; @MLXSW_SP1_KVDL_LARGE_CHUNKS_ALLOC_SIZE
	.comm	_MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_LARGE_CHUNKS,4,2 ; @MLXSW_SP_RESOURCE_NAME_KVD_LINEAR_LARGE_CHUNKS
	.comm	_MLXSW_SP1_KVDL_LARGE_CHUNKS_SIZE,4,2 ; @MLXSW_SP1_KVDL_LARGE_CHUNKS_SIZE
	.comm	_MLXSW_SP_RESOURCE_KVD_LINEAR_LARGE_CHUNKS,4,2 ; @MLXSW_SP_RESOURCE_KVD_LINEAR_LARGE_CHUNKS
.subsections_via_symbols
