	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_nexthop4_group_create
_mlxsw_sp_nexthop4_group_create:        ## @mlxsw_sp_nexthop4_group_create
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_fib_info_num_path
	movl	%eax, %ebx
	movq	_nexthops@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_struct_size
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%r13, 40(%rax)
	movq	%rax, %rdi
	addq	$32, %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_INIT_LIST_HEAD
	movq	_arp_tbl@GOTPCREL(%rip), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, 24(%rcx)
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_mlxsw_sp_fi_is_gateway
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 16(%rcx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	movq	%r13, %rdi
	callq	_fib_info_hold
	movq	%r14, %rbx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	cmpl	$0, (%r12)
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_4
## %bb.5:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rbx
	addq	%r15, %rbx
	movq	%r13, %rdi
	movl	%r14d, %esi
	callq	_fib_info_nh
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%rbx, %rdx
	movq	%rax, %rcx
	callq	_mlxsw_sp_nexthop4_init
	testl	%eax, %eax
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%r14
	movl	(%r12), %eax
	addq	$4, %r15
	cmpq	%rax, %r14
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jb	LBB0_6
## %bb.8:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_2
LBB0_4:
	xorl	%r14d, %r14d
LBB0_9:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_mlxsw_sp_nexthop_group_insert
	movl	%eax, %r13d
	testl	%eax, %eax
	movq	%rbx, %r12
	jne	LBB0_12
## %bb.10:
	movq	%r12, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_mlxsw_sp_nexthop_group_refresh
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	%eax, %r13d
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_12:
	testl	%r14d, %r14d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jle	LBB0_15
## %bb.13:
	movl	%r14d, %ebx
	incq	%rbx
	.p2align	4, 0x90
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %esi
	shlq	$2, %rsi
	addq	8(%r15), %rsi
	movq	%r12, %rdi
	callq	_mlxsw_sp_nexthop4_fini
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_14
LBB0_15:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_fib_info_put
	movq	%r15, %rdi
	callq	_kfree
	movl	%r13d, %edi
LBB0_2:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_nexthops,4,2                   ## @nexthops
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_arp_tbl,4,2                    ## @arp_tbl
	.no_dead_strip	_mlxsw_sp_nexthop4_group_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_nexthop4_group_create
_mlxsw_sp_nexthop4_group_create:        ; @mlxsw_sp_nexthop4_group_create
	.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	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_fib_info_num_path
	mov	x22, x0
Lloh0:
	adrp	x8, _nexthops@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nexthops@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x0
	bl	_struct_size
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x21, x0
	str	x19, [x0, #40]
	add	x0, x0, #32
	bl	_INIT_LIST_HEAD
Lloh6:
	adrp	x8, _arp_tbl@GOTPAGE
Lloh7:
	ldr	x8, [x8, _arp_tbl@GOTPAGEOFF]
	str	x8, [x21, #24]
	mov	x0, x20
	mov	x1, x19
	bl	_mlxsw_sp_fi_is_gateway
	str	w0, [x21, #16]
	str	w22, [x21]
	mov	x0, x19
	bl	_fib_info_hold
	ldr	w8, [x21]
	cbz	w8, LBB0_6
; %bb.2:
	mov	x24, #0
	mov	x22, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	add	x23, x8, x24
	mov	x0, x19
	mov	x1, x22
	bl	_fib_info_nh
	mov	x3, x0
	mov	x0, x20
	mov	x1, x21
	mov	x2, x23
	bl	_mlxsw_sp_nexthop4_init
	cbnz	w0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	ldr	w8, [x21]
	add	x24, x24, #4
	cmp	x22, x8
	b.lo	LBB0_3
	b	LBB0_7
LBB0_5:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_6:
	mov	w22, #0
LBB0_7:
	mov	x0, x20
	mov	x1, x21
	bl	_mlxsw_sp_nexthop_group_insert
	mov	x23, x0
	cbnz	w0, LBB0_10
; %bb.8:
	mov	x0, x20
	mov	x1, x21
	bl	_mlxsw_sp_nexthop_group_refresh
	mov	x0, 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
	ret
LBB0_9:
	mov	x23, x0
LBB0_10:
	cmp	w22, #1
	b.lt	LBB0_13
; %bb.11:
	mov	w8, w22
	add	x22, x8, #1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	sub	w8, w22, #2
	ldr	x9, [x21, #8]
	add	x1, x9, w8, uxtw #2
	mov	x0, x20
	bl	_mlxsw_sp_nexthop4_fini
	sub	x22, x22, #1
	cmp	x22, #1
	b.hi	LBB0_12
LBB0_13:
	mov	x0, x19
	bl	_fib_info_put
	mov	x0, x21
	bl	_kfree
	mov	x0, x23
LBB0_14:
	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	_ERR_PTR
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_nexthops,4,2                   ; @nexthops
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_arp_tbl,4,2                    ; @arp_tbl
	.no_dead_strip	_mlxsw_sp_nexthop4_group_create
.subsections_via_symbols
