	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_nexthop_group_refresh
_mlxsw_sp_nexthop_group_refresh:        ## @mlxsw_sp_nexthop_group_refresh
	.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, %r12
	movq	%rdi, %r14
	cmpl	$0, 40(%rsi)
	je	LBB0_4
## %bb.1:
	movl	(%r12), %ecx
	testl	%ecx, %ecx
	jle	LBB0_18
## %bb.2:
	movq	24(%r12), %r8
	cmpl	$1, %ecx
	jne	LBB0_5
## %bb.3:
	xorl	%esi, %esi
	xorl	%edx, %edx
LBB0_13:
	testb	$1, %cl
	je	LBB0_17
## %bb.14:
	leaq	(%rsi,%rsi,2), %rax
	movq	(%r8,%rax,8), %rcx
	cmpq	8(%r8,%rax,8), %rcx
	je	LBB0_17
## %bb.15:
	movl	$1, %edx
	testq	%rcx, %rcx
	je	LBB0_17
## %bb.16:
	movl	$1, 16(%r8,%rax,8)
LBB0_17:
	testl	%edx, %edx
	je	LBB0_18
## %bb.20:
	movq	%r12, %rdi
	callq	_mlxsw_sp_nexthop_group_normalize
	movq	32(%r12), %rax
	testq	%rax, %rax
	je	LBB0_31
## %bb.21:
	movq	%rax, -56(%rbp)
	leaq	-56(%rbp), %rsi
	movq	%r14, %rdi
	callq	_mlxsw_sp_fix_adj_grp_size
	testl	%eax, %eax
	jne	LBB0_31
## %bb.22:
	movq	_MLXSW_SP_KVDL_ENTRY_TYPE_ADJ@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	-56(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	movq	%r14, %rdi
	callq	_mlxsw_sp_kvdl_alloc
	testl	%eax, %eax
	je	LBB0_24
## %bb.23:
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_30
LBB0_18:
	movq	%r14, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_mlxsw_sp_nexthop_group_update
	testl	%eax, %eax
	je	LBB0_43
LBB0_19:
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
LBB0_30:
	callq	_dev_warn
LBB0_31:
	movl	(%r12), %edx
	movl	4(%r12), %r15d
	movl	$0, 4(%r12)
	testl	%edx, %edx
	jle	LBB0_39
## %bb.32:
	movq	24(%r12), %rax
	leaq	-1(%rdx), %rsi
	movl	%edx, %ecx
	andl	$3, %ecx
	cmpq	$3, %rsi
	jae	LBB0_34
## %bb.33:
	xorl	%esi, %esi
	jmp	LBB0_36
LBB0_4:
	movq	%r14, %rdi
	movq	%r12, %rsi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlxsw_sp_nexthop_fib_entries_update ## TAILCALL
LBB0_5:
	movl	%ecx, %edi
	andl	$-2, %edi
	leaq	40(%r8), %rax
	xorl	%esi, %esi
	xorl	%edx, %edx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	$2, %rsi
	addq	$48, %rax
	cmpq	%rsi, %rdi
	je	LBB0_13
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	-40(%rax), %rbx
	cmpq	-32(%rax), %rbx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, -24(%rax)
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-16(%rax), %rbx
	cmpq	-8(%rax), %rbx
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edx
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, (%rax)
	jmp	LBB0_12
LBB0_34:
	andl	$-4, %edx
	leaq	80(%rax), %rdi
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_35:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, -72(%rdi)
	movq	$0, -48(%rdi)
	movq	$0, -24(%rdi)
	movq	$0, (%rdi)
	addq	$4, %rsi
	addq	$96, %rdi
	cmpq	%rsi, %rdx
	jne	LBB0_35
LBB0_36:
	testq	%rcx, %rcx
	je	LBB0_39
## %bb.37:
	leaq	(%rsi,%rsi,2), %rdx
	leaq	(%rax,%rdx,8), %rax
	addq	$8, %rax
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_38:                                ## =>This Inner Loop Header: Depth=1
	movq	$0, (%rax,%rdx)
	addq	$24, %rdx
	cmpq	%rdx, %rcx
	jne	LBB0_38
LBB0_39:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mlxsw_sp_nexthop_fib_entries_update
	testl	%eax, %eax
	je	LBB0_41
## %bb.40:
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_warn
LBB0_41:
	testl	%r15d, %r15d
	je	LBB0_43
## %bb.42:
	movq	_MLXSW_SP_KVDL_ENTRY_TYPE_ADJ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r12), %rdx
	movl	8(%r12), %ecx
	movq	%r14, %rdi
	callq	_mlxsw_sp_kvdl_free
LBB0_43:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movl	4(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	8(%r12), %ebx
	movq	16(%r12), %r15
	movl	$1, 4(%r12)
	movl	-60(%rbp), %eax
	movl	%eax, 8(%r12)
	movq	-56(%rbp), %rax
	movq	%rax, 16(%r12)
	movq	%r12, %rdi
	callq	_mlxsw_sp_nexthop_group_rebalance
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	$1, %edx
	callq	_mlxsw_sp_nexthop_group_update
	testl	%eax, %eax
	jne	LBB0_19
## %bb.25:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_26
## %bb.28:
	movq	%r15, %rax
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%ebx, %r15d
	movl	%ebx, %edx
	movq	%rax, %rbx
	movq	%rax, %rcx
	callq	_mlxsw_sp_adj_index_mass_update
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r13), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	callq	_mlxsw_sp_kvdl_free
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_44
## %bb.29:
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_30
LBB0_26:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mlxsw_sp_nexthop_fib_entries_update
	testl	%eax, %eax
	je	LBB0_43
## %bb.27:
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_30
LBB0_44:
	movq	%r12, %rdi
	callq	_mlxsw_sp_nexthop_fib_entries_refresh
	jmp	LBB0_43
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to update neigh MAC in adjacency table.\n"

	.comm	_MLXSW_SP_KVDL_ENTRY_TYPE_ADJ,4,2 ## @MLXSW_SP_KVDL_ENTRY_TYPE_ADJ
L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate KVD linear area for nexthop group.\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to add adjacency index to fib entries.\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to mass-update adjacency index for nexthop group.\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to set traps for fib entries.\n"

	.no_dead_strip	_mlxsw_sp_nexthop_group_refresh
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_nexthop_group_refresh
_mlxsw_sp_nexthop_group_refresh:        ; @mlxsw_sp_nexthop_group_refresh
	.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, x1
	mov	x20, x0
	ldr	w8, [x1, #40]
	cbz	w8, LBB0_18
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.2:
	mov	w9, #0
	ldr	x10, [x19, #24]
	add	x10, x10, #8
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x10, x10, #24
	subs	x8, x8, #1
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x11, x12, [x10, #-8]
	cmp	x11, x12
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w9, #1
	cbz	x11, LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	str	w9, [x10, #8]
	b	LBB0_3
LBB0_7:
	cbz	w9, LBB0_12
; %bb.8:
	mov	x0, x19
	bl	_mlxsw_sp_nexthop_group_normalize
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_15
; %bb.9:
	str	x8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x20
	bl	_mlxsw_sp_fix_adj_grp_size
	cbnz	w0, LBB0_15
; %bb.10:
Lloh0:
	adrp	x24, _MLXSW_SP_KVDL_ENTRY_TYPE_ADJ@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MLXSW_SP_KVDL_ENTRY_TYPE_ADJ@GOTPAGEOFF]
	ldr	w1, [x24]
	ldr	x2, [sp, #8]
	add	x3, sp, #4
	mov	x0, x20
	bl	_mlxsw_sp_kvdl_alloc
	cbz	w0, LBB0_29
; %bb.11:
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_12:
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_mlxsw_sp_nexthop_group_update
	cbz	w0, LBB0_28
LBB0_13:
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
LBB0_14:
	bl	_dev_warn
LBB0_15:
	ldp	w8, w21, [x19]
	str	wzr, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.16:
	ldr	x9, [x19, #24]
	cmp	w8, #4
	b.hs	LBB0_19
; %bb.17:
	mov	x10, #0
	b	LBB0_22
LBB0_18:
	mov	x0, x20
	mov	x1, x19
	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
	b	_mlxsw_sp_nexthop_fib_entries_update
LBB0_19:
	and	x10, x8, #0xfffffffc
	add	x11, x9, #56
	mov	x12, x10
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	stur	xzr, [x11, #-48]
	stur	xzr, [x11, #-24]
	str	xzr, [x11]
	str	xzr, [x11, #24]
	add	x11, x11, #96
	subs	x12, x12, #4
	b.ne	LBB0_20
; %bb.21:
	cmp	x10, x8
	b.eq	LBB0_24
LBB0_22:
	mov	w11, #24
	madd	x9, x10, x11, x9
	add	x9, x9, #8
	sub	x8, x8, x10
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	str	xzr, [x9], #24
	subs	x8, x8, #1
	b.ne	LBB0_23
LBB0_24:
	mov	x0, x20
	mov	x1, x19
	bl	_mlxsw_sp_nexthop_fib_entries_update
	cbz	w0, LBB0_26
; %bb.25:
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str.4@PAGE
Lloh7:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_warn
LBB0_26:
	cbz	w21, LBB0_28
; %bb.27:
Lloh8:
	adrp	x8, _MLXSW_SP_KVDL_ENTRY_TYPE_ADJ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MLXSW_SP_KVDL_ENTRY_TYPE_ADJ@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	x2, [x19, #16]
	ldr	w3, [x19, #8]
	mov	x0, x20
	bl	_mlxsw_sp_kvdl_free
LBB0_28:
	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_29:
	ldp	w23, w21, [x19, #4]
	ldr	x22, [x19, #16]
	mov	w8, #1
	ldr	w9, [sp, #4]
	stp	w8, w9, [x19, #4]
	ldr	x8, [sp, #8]
	str	x8, [x19, #16]
	mov	x0, x19
	bl	_mlxsw_sp_nexthop_group_rebalance
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	bl	_mlxsw_sp_nexthop_group_update
	cbnz	w0, LBB0_13
; %bb.30:
	mov	x0, x20
	mov	x1, x19
	cbz	w23, LBB0_33
; %bb.31:
	mov	x2, x21
	mov	x3, x22
	bl	_mlxsw_sp_adj_index_mass_update
	mov	x23, x0
	ldr	w1, [x24]
	mov	x0, x20
	mov	x2, x22
	mov	x3, x21
	bl	_mlxsw_sp_kvdl_free
	cbz	w23, LBB0_35
; %bb.32:
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_33:
	bl	_mlxsw_sp_nexthop_fib_entries_update
	cbz	w0, LBB0_28
; %bb.34:
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_35:
	mov	x0, x19
	bl	_mlxsw_sp_nexthop_fib_entries_refresh
	b	LBB0_28
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to update neigh MAC in adjacency table.\n"

	.comm	_MLXSW_SP_KVDL_ENTRY_TYPE_ADJ,4,2 ; @MLXSW_SP_KVDL_ENTRY_TYPE_ADJ
l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate KVD linear area for nexthop group.\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to add adjacency index to fib entries.\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to mass-update adjacency index for nexthop group.\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to set traps for fib entries.\n"

	.no_dead_strip	_mlxsw_sp_nexthop_group_refresh
.subsections_via_symbols
