	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sx_port_set_link_ksettings
_mlxsw_sx_port_set_link_ksettings:      ## @mlxsw_sx_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_netdev_priv
	movq	%rax, %r15
	movq	8(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	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, %r14
	movl	(%rbx), %r12d
	movl	16(%rbx), %esi
	leaq	-64(%rbp), %rdi
	callq	_ethtool_convert_link_mode_to_legacy_u32
	movq	8(%rbx), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	-64(%rbp), %edi
	callq	_mlxsw_sx_to_ptys_advert_link
	jmp	LBB0_3
LBB0_2:
	movl	%r12d, %edi
	callq	_mlxsw_sx_to_ptys_speed
LBB0_3:
	movl	%eax, %r13d
	movl	(%r15), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_mlxsw_reg_ptys_eth_pack
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ebx
	movq	_ptys@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_mlxsw_reg_query
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_err
LBB0_17:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_19
## %bb.18:
	movl	%r12d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%r12d, %r12d
	leaq	-72(%rbp), %rsi
	leaq	-68(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	callq	_mlxsw_reg_ptys_eth_unpack
	andl	-72(%rbp), %r13d
	je	LBB0_6
## %bb.7:
	cmpl	-68(%rbp), %r13d
	je	LBB0_17
## %bb.8:
	movl	(%r15), %esi
	movq	%r14, %rdi
	movl	%r13d, %edx
	movl	$1, %ecx
	callq	_mlxsw_reg_ptys_eth_pack
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ebx
	movq	_ptys@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_mlxsw_reg_write
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_16
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_17
LBB0_10:
	leaq	-60(%rbp), %rsi
	movq	%r15, %rdi
	callq	_mlxsw_sx_port_oper_status_get
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_16
LBB0_12:
	cmpl	$0, -60(%rbp)
	je	LBB0_17
## %bb.13:
	xorl	%r12d, %r12d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_mlxsw_sx_port_admin_status_set
	testl	%eax, %eax
	jne	LBB0_15
## %bb.14:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_mlxsw_sx_port_admin_status_set
	testl	%eax, %eax
	je	LBB0_17
LBB0_15:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
LBB0_16:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_netdev_err
	movl	%ebx, %r12d
	jmp	LBB0_17
LBB0_19:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_REG_PTYS_LEN,4,2         ## @MLXSW_REG_PTYS_LEN
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_ptys,4,2                       ## @ptys
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get proto"

L_.str.1:                               ## @.str.1
	.asciz	"Not supported proto admin requested"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Failed to set proto admin"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to get oper status"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to set admin status"

	.no_dead_strip	_mlxsw_sx_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_sx_port_set_link_ksettings
_mlxsw_sx_port_set_link_ksettings:      ; @mlxsw_sx_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, #32
	mov	x23, x1
	mov	x19, 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	x20, x0
	ldr	x24, [x0, #8]
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	x21, x9, x8
	mov	sp, x21
	ldr	w22, [x23]
	ldr	w1, [x23, #16]
	sub	x0, x29, #84
	bl	_ethtool_convert_link_mode_to_legacy_u32
	ldr	x8, [x23, #8]
Lloh8:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldur	w0, [x29, #-84]
	bl	_mlxsw_sx_to_ptys_advert_link
	b	LBB0_3
LBB0_2:
	mov	x0, x22
	bl	_mlxsw_sx_to_ptys_speed
LBB0_3:
	mov	x23, x0
	ldr	w1, [x20]
	mov	x0, x21
	mov	w2, #0
	mov	w3, #0
	bl	_mlxsw_reg_ptys_eth_pack
	ldr	w22, [x24]
Lloh11:
	adrp	x25, _ptys@GOTPAGE
Lloh12:
	ldr	x25, [x25, _ptys@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x22
	mov	x2, x21
	bl	_mlxsw_reg_query
	cbz	w0, LBB0_8
; %bb.4:
	mov	x22, x0
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
LBB0_5:
	mov	x0, x19
	bl	_netdev_err
LBB0_6:
	ldur	x8, [x29, #-72]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.7:
	mov	x0, x22
	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_8:
	sub	x1, x29, #76
	sub	x2, x29, #80
	mov	x0, x21
	mov	x3, #0
	bl	_mlxsw_reg_ptys_eth_unpack
	ldur	w8, [x29, #-76]
	ands	w2, w8, w23
	b.eq	LBB0_11
; %bb.9:
	ldur	w8, [x29, #-80]
	cmp	w2, w8
	b.ne	LBB0_12
LBB0_10:
	mov	w22, #0
	b	LBB0_6
LBB0_11:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_6
LBB0_12:
	ldr	w1, [x20]
	mov	x0, x21
	mov	w3, #1
	bl	_mlxsw_reg_ptys_eth_pack
	ldr	w22, [x24]
	ldr	w0, [x25]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x22
	mov	x2, x21
	bl	_mlxsw_reg_write
	cbz	w0, LBB0_14
; %bb.13:
	mov	x22, x0
Lloh23:
	adrp	x1, l_.str.2@PAGE
Lloh24:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_14:
	sub	x1, x29, #88
	mov	x0, x20
	bl	_mlxsw_sx_port_oper_status_get
	cbz	w0, LBB0_16
; %bb.15:
	mov	x22, x0
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_5
LBB0_16:
	ldur	w8, [x29, #-88]
	cbz	w8, LBB0_10
; %bb.17:
	mov	x0, x20
	mov	w1, #0
	bl	_mlxsw_sx_port_admin_status_set
	cbz	w0, LBB0_19
; %bb.18:
	mov	x22, x0
	b	LBB0_20
LBB0_19:
	mov	x0, x20
	mov	w1, #1
	bl	_mlxsw_sx_port_admin_status_set
	mov	x22, x0
	cbz	w0, LBB0_6
LBB0_20:
Lloh27:
	adrp	x1, l_.str.4@PAGE
Lloh28:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_REG_PTYS_LEN,4,2         ; @MLXSW_REG_PTYS_LEN
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_ptys,4,2                       ; @ptys
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get proto"

l_.str.1:                               ; @.str.1
	.asciz	"Not supported proto admin requested"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Failed to set proto admin"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to get oper status"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to set admin status"

	.no_dead_strip	_mlxsw_sx_port_set_link_ksettings
.subsections_via_symbols
