	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_nexthop4_init
_mlxsw_sp_nexthop4_init:                ## @mlxsw_sp_nexthop4_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %rbx
	movq	%rdi, %r14
	movq	16(%rcx), %r13
	movq	%rsi, 24(%rdx)
	movq	%rcx, 16(%rdx)
	movl	$1, (%rdx)
	leaq	8(%rdx), %rdi
	leaq	8(%rcx), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mlxsw_sp_nexthop_insert
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_1
LBB0_7:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mlxsw_sp_nexthop_counter_alloc
	leaq	4(%rbx), %rdi
	movq	(%r14), %rsi
	callq	_list_add_tail
	xorl	%r12d, %r12d
	testq	%r13, %r13
	je	LBB0_7
## %bb.2:
	movq	%r13, %rdi
	callq	___in_dev_get_rtnl
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, %rdi
	callq	_IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_RTNH_F_LINKDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r15)
	jne	LBB0_7
LBB0_5:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_mlxsw_sp_nexthop4_type_init
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r15d
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_mlxsw_sp_nexthop_remove
	movl	%r15d, %r12d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_RTNH_F_LINKDOWN,4,2            ## @RTNH_F_LINKDOWN
	.no_dead_strip	_mlxsw_sp_nexthop4_init
.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_init
_mlxsw_sp_nexthop4_init:                ; @mlxsw_sp_nexthop4_init
	.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	x21, x3
	mov	x19, x2
	mov	x20, x0
	ldr	x22, [x3, #16]
	stp	x3, x1, [x2, #16]
	mov	w8, #1
	str	w8, [x2]
	add	x0, x2, #8
	add	x1, x3, #8
	mov	w2, #4
	bl	_memcpy
	mov	x0, x20
	mov	x1, x19
	bl	_mlxsw_sp_nexthop_insert
	mov	x23, x0
	cbnz	w0, LBB0_8
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_mlxsw_sp_nexthop_counter_alloc
	add	x0, x19, #4
	ldr	x1, [x20]
	bl	_list_add_tail
	cbz	x22, LBB0_5
; %bb.2:
	mov	x0, x22
	bl	___in_dev_get_rtnl
	cbz	x0, LBB0_6
; %bb.3:
	bl	_IN_DEV_IGNORE_ROUTES_WITH_LINKDOWN
	cbz	x0, LBB0_6
; %bb.4:
	ldr	w8, [x21, #4]
Lloh0:
	adrp	x9, _RTNH_F_LINKDOWN@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RTNH_F_LINKDOWN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
LBB0_5:
	mov	w23, #0
	b	LBB0_8
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_mlxsw_sp_nexthop4_type_init
	mov	x23, x0
	cbz	w0, LBB0_8
; %bb.7:
	mov	x0, x20
	mov	x1, x19
	bl	_mlxsw_sp_nexthop_remove
LBB0_8:
	mov	x0, x23
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RTNH_F_LINKDOWN,4,2            ; @RTNH_F_LINKDOWN
	.no_dead_strip	_mlxsw_sp_nexthop4_init
.subsections_via_symbols
