	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp1_kvdl_part_init
_mlxsw_sp1_kvdl_part_init:              ## @mlxsw_sp1_kvdl_part_init
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movl	(%rdi), %edi
	callq	_priv_to_devlink
	movl	24(%r12), %esi
	leaq	-40(%rbp), %rdx
	movq	%rax, %rdi
	callq	_devlink_resource_size_get
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	16(%r12), %rdi
	subq	8(%r12), %rdi
	incq	%rdi
	movq	%rdi, -40(%rbp)
	jmp	LBB0_3
LBB0_1:
	movq	-40(%rbp), %rdi
LBB0_3:
	movl	(%r12), %esi
	callq	_div_u64
	movl	%eax, %edi
	callq	_BITS_TO_LONGS
                                        ## kill: def $eax killed $eax def $rax
	leal	4(,%rax,8), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r12, %rsi
	movl	$4, %edx
	callq	_memcpy
	testl	%r15d, %r15d
	jne	LBB0_7
## %bb.6:
	movq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_mlxsw_sp1_kvdl_part_update
	jmp	LBB0_7
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
LBB0_7:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mlxsw_sp1_kvdl_part_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp1_kvdl_part_init
_mlxsw_sp1_kvdl_part_init:              ; @mlxsw_sp1_kvdl_part_init
	.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	x19, x2
	mov	x20, x1
	ldr	w0, [x0]
	bl	_priv_to_devlink
	ldr	w1, [x20, #24]
	add	x2, sp, #8
	bl	_devlink_resource_size_get
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldp	x9, x8, [x20, #8]
	sub	x8, x8, x9
	add	x0, x8, #1
	str	x0, [sp, #8]
	b	LBB0_3
LBB0_2:
	ldr	x0, [sp, #8]
LBB0_3:
	ldr	w1, [x20]
	bl	_div_u64
	bl	_BITS_TO_LONGS
	mov	w8, #4
	bfi	w8, w0, #3, #29
Lloh0:
	adrp	x9, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x8
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.4:
	mov	x22, x0
	mov	x1, x20
	mov	w2, #4
	bl	_memcpy
	cbnz	w21, LBB0_7
; %bb.5:
	ldr	x2, [sp, #8]
	mov	x0, x22
	mov	x1, x19
	bl	_mlxsw_sp1_kvdl_part_update
	b	LBB0_7
LBB0_6:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x22, x0
LBB0_7:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mlxsw_sp1_kvdl_part_init
.subsections_via_symbols
