	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_port_set_link_ksettings
_mlxsw_sp_port_set_link_ksettings:      ## @mlxsw_sp_port_set_link_ksettings
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_netdev_priv
	movq	%rax, %r13
	movq	16(%rax), %r12
	movq	_MLXSW_REG_PTYS_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	8(%r12), %rax
	movl	4(%r13), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	callq	*16(%rax)
	movl	(%r12), %ebx
	movq	_ptys@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r15, %rdx
	callq	_mlxsw_reg_query
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_1
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	movl	%r14d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r13, %rbx
	leaq	-52(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	callq	*24(%r13)
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movl	4(%rdx), %eax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	sete	%r14b
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	jne	LBB0_3
## %bb.2:
	movl	8(%rbx), %esi
	movq	%r12, %rdi
	callq	*(%r13)
	jmp	LBB0_4
LBB0_3:
	movl	8(%rbx), %esi
	movl	(%rdx), %edx
	movq	%r12, %rdi
	callq	*8(%r13)
LBB0_4:
	andl	-52(%rbp), %eax
	movl	$0, %r15d
	je	LBB0_5
## %bb.6:
	movb	%r14b, %r15b
	movl	4(%rbx), %edx
	movq	%r12, %rdi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%eax, %ecx
	movl	%r15d, %r8d
	callq	*16(%r13)
	movl	(%r12), %r12d
	movq	_ptys@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%r12d, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_mlxsw_reg_write
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.7:
	movl	%r15d, (%rbx)
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_netif_running
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_mlxsw_sp_port_admin_status_set
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_mlxsw_sp_port_admin_status_set
	jmp	LBB0_9
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_9
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_REG_PTYS_LEN,4,2         ## @MLXSW_REG_PTYS_LEN
	.comm	_ptys,4,2                       ## @ptys
	.comm	_AUTONEG_ENABLE,4,2             ## @AUTONEG_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No supported speed requested\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mlxsw_sp_port_set_link_ksettings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_port_set_link_ksettings
_mlxsw_sp_port_set_link_ksettings:      ; @mlxsw_sp_port_set_link_ksettings
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #16
	mov	x23, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	bl	_netdev_priv
	mov	x19, x0
	ldr	x21, [x0, #16]
Lloh3:
	adrp	x8, _MLXSW_REG_PTYS_LEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLXSW_REG_PTYS_LEN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	ldr	x25, [x21, #8]
	ldr	x8, [x25, #16]
	ldr	w2, [x0, #4]
	mov	x0, x21
	mov	x1, x22
	mov	w3, #0
	mov	w4, #0
	blr	x8
	ldr	w24, [x21]
Lloh8:
	adrp	x26, _ptys@GOTPAGE
Lloh9:
	ldr	x26, [x26, _ptys@GOTPAGEOFF]
	ldr	w0, [x26]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x24
	mov	x2, x22
	bl	_mlxsw_reg_query
	cbz	w0, LBB0_3
LBB0_1:
	ldur	x8, [x29, #-72]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.2:
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	x8, [x25, #24]
	sub	x2, x29, #76
	mov	x0, x21
	mov	x1, x22
	mov	x3, #0
	mov	x4, #0
	blr	x8
	ldr	w8, [x23, #4]
Lloh13:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w24, eq
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x25]
	ldr	w1, [x19, #8]
	mov	x0, x21
	mov	x2, x23
	blr	x8
	b	LBB0_6
LBB0_5:
	ldr	x8, [x25, #8]
	ldr	w1, [x19, #8]
	ldr	w2, [x23]
	mov	x0, x21
	blr	x8
LBB0_6:
	ldur	w8, [x29, #-76]
	ands	w3, w8, w0
	b.eq	LBB0_10
; %bb.7:
	ldr	x8, [x25, #16]
	ldr	w2, [x19, #4]
	mov	x0, x21
	mov	x1, x22
	mov	x4, x24
	blr	x8
	ldr	w21, [x21]
	ldr	w0, [x26]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x21
	mov	x2, x22
	bl	_mlxsw_reg_write
	cbnz	w0, LBB0_1
; %bb.8:
	str	w24, [x19]
	mov	x0, x20
	bl	_netif_running
	cbz	w0, LBB0_1
; %bb.9:
	mov	x0, x19
	mov	w1, #0
	bl	_mlxsw_sp_port_admin_status_set
	mov	x0, x19
	mov	w1, #1
	bl	_mlxsw_sp_port_admin_status_set
	mov	w0, #0
	b	LBB0_1
LBB0_10:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_netdev_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_1
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_REG_PTYS_LEN,4,2         ; @MLXSW_REG_PTYS_LEN
	.comm	_ptys,4,2                       ; @ptys
	.comm	_AUTONEG_ENABLE,4,2             ; @AUTONEG_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No supported speed requested\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mlxsw_sp_port_set_link_ksettings
.subsections_via_symbols
