	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sx_port_get_link_ksettings
_mlxsw_sx_port_get_link_ksettings:      ## @mlxsw_sx_port_get_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	8(%rax), %r15
	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, %r13
	movl	(%rbx), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_mlxsw_reg_ptys_eth_pack
	movl	(%r15), %ebx
	movq	_ptys@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r13, %rdx
	callq	_mlxsw_reg_query
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_netdev_err
	jmp	LBB0_5
LBB0_2:
	leaq	-56(%rbp), %rsi
	leaq	-60(%rbp), %rdx
	leaq	-52(%rbp), %rcx
	movq	%r13, %rdi
	callq	_mlxsw_reg_ptys_eth_unpack
	movl	-56(%rbp), %edi
	callq	_mlxsw_sx_from_ptys_supported_port
	movl	%eax, %r13d
	movl	-56(%rbp), %edi
	callq	_mlxsw_sx_from_ptys_supported_link
	movl	%eax, %ebx
	orl	%r13d, %ebx
	movq	_SUPPORTED_Pause@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_SUPPORTED_Asym_Pause@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	-60(%rbp), %edi
	callq	_mlxsw_sx_from_ptys_advert_link
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_netif_carrier_ok
	movl	-52(%rbp), %esi
	movl	%eax, %edi
	movq	%r14, %rdx
	callq	_mlxsw_sx_from_ptys_speed_duplex
	movl	-52(%rbp), %edi
	testl	%edi, %edi
	jne	LBB0_4
## %bb.3:
	movl	-56(%rbp), %edi
LBB0_4:
	movl	%edi, -52(%rbp)
	callq	_mlxsw_sx_port_connector_port
	movl	%eax, 12(%r14)
	movl	-52(%rbp), %edi
	callq	_mlxsw_sx_from_ptys_advert_link
	movl	%eax, %r12d
	movl	8(%r14), %edi
	movl	%ebx, %esi
	callq	_ethtool_convert_legacy_u32_to_link_mode
	movl	4(%r14), %edi
	movl	%r13d, %esi
	callq	_ethtool_convert_legacy_u32_to_link_mode
	movl	(%r14), %edi
	movl	%r12d, %esi
	callq	_ethtool_convert_legacy_u32_to_link_mode
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_REG_PTYS_LEN,4,2         ## @MLXSW_REG_PTYS_LEN
	.comm	_ptys,4,2                       ## @ptys
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get proto"

	.comm	_SUPPORTED_Pause,4,2            ## @SUPPORTED_Pause
	.comm	_SUPPORTED_Asym_Pause,4,2       ## @SUPPORTED_Asym_Pause
	.no_dead_strip	_mlxsw_sx_port_get_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_get_link_ksettings
_mlxsw_sx_port_get_link_ksettings:      ; @mlxsw_sx_port_get_link_ksettings
	.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
	sub	sp, sp, #32
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_netdev_priv
	ldr	x20, [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	x22, x9, x8
	mov	sp, x22
	ldr	w1, [x0]
	mov	x0, x22
	mov	w2, #0
	mov	w3, #0
	bl	_mlxsw_reg_ptys_eth_pack
	ldr	w20, [x20]
Lloh8:
	adrp	x8, _ptys@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ptys@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x20
	mov	x2, x22
	bl	_mlxsw_reg_query
	mov	x20, x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_netdev_err
	b	LBB0_3
LBB0_2:
	sub	x1, x29, #60
	sub	x2, x29, #64
	sub	x3, x29, #68
	mov	x0, x22
	bl	_mlxsw_reg_ptys_eth_unpack
	ldur	w0, [x29, #-60]
	bl	_mlxsw_sx_from_ptys_supported_port
	mov	x22, x0
	ldur	w0, [x29, #-60]
	bl	_mlxsw_sx_from_ptys_supported_link
	orr	w8, w0, w22
Lloh13:
	adrp	x9, _SUPPORTED_Pause@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SUPPORTED_Pause@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh16:
	adrp	x9, _SUPPORTED_Asym_Pause@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SUPPORTED_Asym_Pause@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w22, w8, w9
	ldur	w0, [x29, #-64]
	bl	_mlxsw_sx_from_ptys_advert_link
	mov	x23, x0
	mov	x0, x21
	bl	_netif_carrier_ok
	ldur	w1, [x29, #-68]
	mov	x2, x19
	bl	_mlxsw_sx_from_ptys_speed_duplex
	ldur	w8, [x29, #-68]
	ldur	w9, [x29, #-60]
	cmp	w8, #0
	csel	w0, w9, w8, eq
	stur	w0, [x29, #-68]
	bl	_mlxsw_sx_port_connector_port
	str	w0, [x19, #12]
	ldur	w0, [x29, #-68]
	bl	_mlxsw_sx_from_ptys_advert_link
	mov	x21, x0
	ldr	w0, [x19, #8]
	mov	x1, x22
	bl	_ethtool_convert_legacy_u32_to_link_mode
	ldr	w0, [x19, #4]
	mov	x1, x23
	bl	_ethtool_convert_legacy_u32_to_link_mode
	ldr	w0, [x19]
	mov	x1, x21
	bl	_ethtool_convert_legacy_u32_to_link_mode
LBB0_3:
	ldur	x8, [x29, #-56]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x20
	sub	sp, x29, #48
	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_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_REG_PTYS_LEN,4,2         ; @MLXSW_REG_PTYS_LEN
	.comm	_ptys,4,2                       ; @ptys
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get proto"

	.comm	_SUPPORTED_Pause,4,2            ; @SUPPORTED_Pause
	.comm	_SUPPORTED_Asym_Pause,4,2       ; @SUPPORTED_Asym_Pause
	.no_dead_strip	_mlxsw_sx_port_get_link_ksettings
.subsections_via_symbols
