	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function mlxsw_sp_lpm_init
LCPI0_0:
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	1                               ## 0x1
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_1:
	.quad	2                               ## 0x2
	.quad	2                               ## 0x2
LCPI0_2:
	.quad	4                               ## 0x4
	.quad	4                               ## 0x4
LCPI0_3:
	.quad	6                               ## 0x6
	.quad	6                               ## 0x6
LCPI0_4:
	.quad	8                               ## 0x8
	.quad	8                               ## 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_mlxsw_sp_lpm_init:                     ## @mlxsw_sp_lpm_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	%rdi, %r14
	movl	$0, -40(%rbp)
	movl	8(%rdi), %edi
	movq	_MAX_LPM_TREES@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movl	8(%r14), %edi
	movl	(%rbx), %esi
	callq	_MLXSW_CORE_RES_GET
	movq	_MLXSW_SP_LPM_TREE_MIN@GOTPCREL(%rip), %rbx
	subl	(%rbx), %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$8, %esi
	callq	_kcalloc
	movq	(%r14), %rcx
	movq	%rax, 8(%rcx)
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movl	(%rcx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_21
## %bb.3:
	cmpl	$4, %ecx
	jb	LBB0_4
## %bb.8:
	leaq	8(%rbx), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_11
## %bb.9:
	leaq	(%rax,%rcx,8), %rdx
	cmpq	_MLXSW_SP_LPM_TREE_MIN@GOTPCREL(%rip), %rdx
	jbe	LBB0_11
LBB0_4:
	xorl	%edx, %edx
LBB0_17:
	movq	%rdx, %r8
	notq	%r8
	addq	%rcx, %r8
	movq	%rcx, %rdi
	andq	$3, %rdi
	je	LBB0_19
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rsi
	addq	%rdx, %rsi
	movq	%rsi, (%rax,%rdx,8)
	incq	%rdx
	decq	%rdi
	jne	LBB0_18
LBB0_19:
	cmpq	$3, %r8
	jb	LBB0_21
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rsi
	addq	%rdx, %rsi
	movq	%rsi, (%rax,%rdx,8)
	movq	(%rbx), %rsi
	addq	%rdx, %rsi
	incq	%rsi
	movq	%rsi, 8(%rax,%rdx,8)
	movq	(%rbx), %rsi
	leaq	2(%rsi,%rdx), %rsi
	movq	%rsi, 16(%rax,%rdx,8)
	movq	(%rbx), %rsi
	addq	%rdx, %rsi
	addq	$3, %rsi
	movq	%rsi, 24(%rax,%rdx,8)
	addq	$4, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_20
	jmp	LBB0_21
LBB0_5:
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_11:
	movl	%ecx, %edx
	andl	$-4, %edx
	leaq	-4(%rdx), %rsi
	movq	%rsi, %r8
	shrq	$2, %r8
	incq	%r8
	testq	%rsi, %rsi
	je	LBB0_28
## %bb.12:
	movq	%r8, %rsi
	andq	$-2, %rsi
	movq	(%rbx), %xmm0                   ## xmm0 = mem[0],zero
	pshufd	$68, %xmm0, %xmm1               ## xmm1 = xmm0[0,1,0,1]
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
	xorl	%edi, %edi
	movdqa	LCPI0_1(%rip), %xmm2            ## xmm2 = [2,2]
	movdqa	LCPI0_2(%rip), %xmm3            ## xmm3 = [4,4]
	movdqa	LCPI0_3(%rip), %xmm4            ## xmm4 = [6,6]
	movdqa	LCPI0_4(%rip), %xmm5            ## xmm5 = [8,8]
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm0, %xmm6
	paddq	%xmm1, %xmm6
	movdqa	%xmm6, %xmm7
	paddq	%xmm2, %xmm7
	movdqu	%xmm6, (%rax,%rdi,8)
	movdqu	%xmm7, 16(%rax,%rdi,8)
	movdqa	%xmm6, %xmm7
	paddq	%xmm3, %xmm7
	paddq	%xmm4, %xmm6
	movdqu	%xmm7, 32(%rax,%rdi,8)
	movdqu	%xmm6, 48(%rax,%rdi,8)
	addq	$8, %rdi
	paddq	%xmm5, %xmm0
	addq	$-2, %rsi
	jne	LBB0_13
## %bb.14:
	testb	$1, %r8b
	je	LBB0_16
LBB0_15:
	movq	(%rbx), %xmm1                   ## xmm1 = mem[0],zero
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm0, %xmm1
	movdqa	LCPI0_1(%rip), %xmm0            ## xmm0 = [2,2]
	paddq	%xmm1, %xmm0
	movdqu	%xmm1, (%rax,%rdi,8)
	movdqu	%xmm0, 16(%rax,%rdi,8)
LBB0_16:
	cmpq	%rcx, %rdx
	jne	LBB0_17
LBB0_21:
	movq	_MLXSW_SP_L3_PROTO_IPV4@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_mlxsw_sp_lpm_tree_get
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_25
LBB0_23:
	movq	(%r14), %rax
	movq	16(%rax), %rax
	movq	(%r15), %rcx
	movq	%rbx, (%rax,%rcx,8)
	movq	_MLXSW_SP_L3_PROTO_IPV6@GOTPCREL(%rip), %r12
	movq	(%r12), %rdx
	leaq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_mlxsw_sp_lpm_tree_get
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_27
## %bb.24:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	(%r14), %rax
	movq	16(%rax), %rax
	movq	(%r15), %rcx
	movq	(%rax,%rcx,8), %rsi
	movq	%r14, %rdi
	callq	_mlxsw_sp_lpm_tree_put
LBB0_25:
	movq	(%r14), %rax
	movq	8(%rax), %rdi
	callq	_kfree
LBB0_26:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	movq	(%r14), %rax
	movq	16(%rax), %rax
	movq	(%r12), %rcx
	movq	%rbx, (%rax,%rcx,8)
	xorl	%ebx, %ebx
	jmp	LBB0_26
LBB0_28:
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
	xorl	%edi, %edi
	testb	$1, %r8b
	jne	LBB0_15
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_LPM_TREES,4,2              ## @MAX_LPM_TREES
	.comm	_EIO,4,2                        ## @EIO
	.comm	_MLXSW_SP_LPM_TREE_MIN,8,3      ## @MLXSW_SP_LPM_TREE_MIN
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MLXSW_SP_L3_PROTO_IPV4,8,3     ## @MLXSW_SP_L3_PROTO_IPV4
	.comm	_MLXSW_SP_L3_PROTO_IPV6,8,3     ## @MLXSW_SP_L3_PROTO_IPV6
	.no_dead_strip	_mlxsw_sp_lpm_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function mlxsw_sp_lpm_init
lCPI0_0:
	.quad	0                               ; 0x0
	.quad	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_mlxsw_sp_lpm_init:                     ; @mlxsw_sp_lpm_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	str	wzr, [sp, #8]
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x20, _MAX_LPM_TREES@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MAX_LPM_TREES@GOTPAGEOFF]
	ldr	w1, [x20]
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x19, #8]
	ldr	w1, [x20]
	bl	_MLXSW_CORE_RES_GET
Lloh2:
	adrp	x20, _MLXSW_SP_LPM_TREE_MIN@GOTPAGE
Lloh3:
	ldr	x20, [x20, _MLXSW_SP_LPM_TREE_MIN@GOTPAGEOFF]
	ldr	w8, [x20]
	sub	w0, w0, w8
	ldr	x8, [x19]
	str	w0, [x8]
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kcalloc
	ldr	x8, [x19]
	str	x0, [x8, #8]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.3:
	cmp	w8, #8
	b.hs	LBB0_8
; %bb.4:
	mov	x9, #0
	b	LBB0_13
LBB0_5:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_19
LBB0_8:
	add	x9, x0, x8, lsl #3
	add	x10, x20, #8
	cmp	x0, x10
	ccmp	x9, x20, #0, lo
	b.hi	LBB0_12
; %bb.9:
	and	x9, x8, #0xfffffff8
	ld1r.2d	{ v0 }, [x20]
Lloh11:
	adrp	x10, lCPI0_0@PAGE
Lloh12:
	ldr	q1, [x10, lCPI0_0@PAGEOFF]
	add	x10, x0, #32
	mov	w11, #2
	dup.2d	v2, x11
	mov	w11, #4
	dup.2d	v3, x11
	mov	w11, #6
	dup.2d	v4, x11
	mov	w11, #8
	dup.2d	v5, x11
	mov	x11, x9
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	add.2d	v6, v1, v0
	add.2d	v7, v0, v1
	add.2d	v16, v6, v2
	add.2d	v17, v6, v3
	add.2d	v6, v6, v4
	stp	q7, q16, [x10, #-32]
	stp	q17, q6, [x10], #64
	add.2d	v1, v1, v5
	subs	x11, x11, #8
	b.ne	LBB0_10
; %bb.11:
	cmp	x9, x8
	b.ne	LBB0_13
	b	LBB0_14
LBB0_12:
	mov	x9, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x20]
	add	x10, x10, x9
	str	x10, [x0, x9, lsl #3]
	add	x9, x9, #1
	cmp	x8, x9
	b.ne	LBB0_13
LBB0_14:
Lloh13:
	adrp	x22, _MLXSW_SP_L3_PROTO_IPV4@GOTPAGE
Lloh14:
	ldr	x22, [x22, _MLXSW_SP_L3_PROTO_IPV4@GOTPAGEOFF]
	ldr	x2, [x22]
	add	x1, sp, #8
	mov	x0, x19
	bl	_mlxsw_sp_lpm_tree_get
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_16
; %bb.15:
	mov	x0, x20
	bl	_PTR_ERR
	mov	x20, x0
	b	LBB0_18
LBB0_16:
	ldr	x8, [x19]
	ldr	x8, [x8, #16]
	ldr	x9, [x22]
	str	x20, [x8, x9, lsl #3]
Lloh15:
	adrp	x23, _MLXSW_SP_L3_PROTO_IPV6@GOTPAGE
Lloh16:
	ldr	x23, [x23, _MLXSW_SP_L3_PROTO_IPV6@GOTPAGEOFF]
	ldr	x2, [x23]
	add	x1, sp, #8
	mov	x0, x19
	bl	_mlxsw_sp_lpm_tree_get
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_20
; %bb.17:
	mov	x0, x21
	bl	_PTR_ERR
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x8, [x8, #16]
	ldr	x9, [x22]
	ldr	x1, [x8, x9, lsl #3]
	mov	x0, x19
	bl	_mlxsw_sp_lpm_tree_put
LBB0_18:
	ldr	x8, [x19]
	ldr	x0, [x8, #8]
	bl	_kfree
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_20:
	mov	w20, #0
	ldr	x8, [x19]
	ldr	x8, [x8, #16]
	ldr	x9, [x23]
	str	x21, [x8, x9, lsl #3]
	b	LBB0_19
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdr	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_LPM_TREES,4,2              ; @MAX_LPM_TREES
	.comm	_EIO,4,2                        ; @EIO
	.comm	_MLXSW_SP_LPM_TREE_MIN,8,3      ; @MLXSW_SP_LPM_TREE_MIN
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MLXSW_SP_L3_PROTO_IPV4,8,3     ; @MLXSW_SP_L3_PROTO_IPV4
	.comm	_MLXSW_SP_L3_PROTO_IPV6,8,3     ; @MLXSW_SP_L3_PROTO_IPV6
	.no_dead_strip	_mlxsw_sp_lpm_init
.subsections_via_symbols
