	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp2_resources_kvd_register
_mlxsw_sp2_resources_kvd_register:      ## @mlxsw_sp2_resources_kvd_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_priv_to_devlink
	movq	%rax, %r14
	movq	_KVD_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_MLXSW_CORE_RES_GET
	movl	%eax, %ebx
	movq	_MLXSW_SP_KVD_GRANULARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_DEVLINK_RESOURCE_UNIT_ENTRY@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-32(%rbp), %r15
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%ebx, %edx
	callq	_devlink_resource_size_params_init
	movq	_MLXSW_SP_RESOURCE_NAME_KVD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MLXSW_SP_RESOURCE_KVD@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_DEVLINK_RESOURCE_ID_PARENT_TOP@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	movl	%ebx, %edx
	movq	%r15, %r9
	callq	_devlink_resource_register
	jmp	LBB0_3
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_KVD_SIZE,4,2                   ## @KVD_SIZE
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MLXSW_SP_KVD_GRANULARITY,4,2   ## @MLXSW_SP_KVD_GRANULARITY
	.comm	_DEVLINK_RESOURCE_UNIT_ENTRY,4,2 ## @DEVLINK_RESOURCE_UNIT_ENTRY
	.comm	_MLXSW_SP_RESOURCE_NAME_KVD,4,2 ## @MLXSW_SP_RESOURCE_NAME_KVD
	.comm	_MLXSW_SP_RESOURCE_KVD,4,2      ## @MLXSW_SP_RESOURCE_KVD
	.comm	_DEVLINK_RESOURCE_ID_PARENT_TOP,4,2 ## @DEVLINK_RESOURCE_ID_PARENT_TOP
	.no_dead_strip	_mlxsw_sp2_resources_kvd_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp2_resources_kvd_register
_mlxsw_sp2_resources_kvd_register:      ; @mlxsw_sp2_resources_kvd_register
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	bl	_priv_to_devlink
	mov	x19, x0
Lloh0:
	adrp	x21, _KVD_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _KVD_SIZE@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w1, [x21]
	mov	x0, x20
	bl	_MLXSW_CORE_RES_GET
	mov	x20, x0
Lloh2:
	adrp	x8, _MLXSW_SP_KVD_GRANULARITY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MLXSW_SP_KVD_GRANULARITY@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
Lloh5:
	adrp	x8, _DEVLINK_RESOURCE_UNIT_ENTRY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DEVLINK_RESOURCE_UNIT_ENTRY@GOTPAGEOFF]
Lloh7:
	ldr	w4, [x8]
	add	x0, sp, #8
	mov	x1, x20
	mov	x2, x20
	bl	_devlink_resource_size_params_init
Lloh8:
	adrp	x8, _MLXSW_SP_RESOURCE_NAME_KVD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLXSW_SP_RESOURCE_NAME_KVD@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _MLXSW_SP_RESOURCE_KVD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MLXSW_SP_RESOURCE_KVD@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
Lloh14:
	adrp	x8, _DEVLINK_RESOURCE_ID_PARENT_TOP@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DEVLINK_RESOURCE_ID_PARENT_TOP@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	add	x5, sp, #8
	mov	x0, x19
	mov	x2, x20
	bl	_devlink_resource_register
	b	LBB0_3
LBB0_2:
Lloh17:
	adrp	x8, _EIO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_KVD_SIZE,4,2                   ; @KVD_SIZE
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MLXSW_SP_KVD_GRANULARITY,4,2   ; @MLXSW_SP_KVD_GRANULARITY
	.comm	_DEVLINK_RESOURCE_UNIT_ENTRY,4,2 ; @DEVLINK_RESOURCE_UNIT_ENTRY
	.comm	_MLXSW_SP_RESOURCE_NAME_KVD,4,2 ; @MLXSW_SP_RESOURCE_NAME_KVD
	.comm	_MLXSW_SP_RESOURCE_KVD,4,2      ; @MLXSW_SP_RESOURCE_KVD
	.comm	_DEVLINK_RESOURCE_ID_PARENT_TOP,4,2 ; @DEVLINK_RESOURCE_ID_PARENT_TOP
	.no_dead_strip	_mlxsw_sp2_resources_kvd_register
.subsections_via_symbols
