	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sky2_get_link_ksettings
_sky2_get_link_ksettings:               ## @sky2_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	callq	_netdev_priv
	movq	%rax, %r14
	movq	16(%rax), %r15
	movq	%r15, %rdi
	callq	_sky2_supported_modes
	movl	%eax, %r12d
	movq	_PHY_ADDR_MARV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	%r15, %rdi
	callq	_sky2_is_copper
	leaq	12(%r14), %rcx
	testq	%rax, %rax
	cmoveq	_SPEED_1000@GOTPCREL(%rip), %rcx
	movq	_SUPPORTED_Autoneg@GOTPCREL(%rip), %rax
	movq	_SUPPORTED_TP@GOTPCREL(%rip), %rdx
	cmoveq	_SUPPORTED_FIBRE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movq	_PORT_TP@GOTPCREL(%rip), %rdx
	cmoveq	_PORT_FIBRE@GOTPCREL(%rip), %rdx
	orl	(%rax), %esi
	movl	(%rdx), %eax
	movl	(%rcx), %ecx
	movl	%ecx, 20(%rbx)
	movl	%eax, 16(%rbx)
	orl	%r12d, %esi
	movl	(%r14), %r15d
	movq	_SKY2_FLAG_AUTO_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	4(%r14), %eax
	jne	LBB0_1
## %bb.2:
	movq	_AUTONEG_DISABLE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	movl	8(%r14), %eax
	movl	%eax, 8(%rbx)
	movl	4(%rbx), %edi
	callq	_ethtool_convert_legacy_u32_to_link_mode
	movl	(%rbx), %edi
	movl	%r15d, %esi
	callq	_ethtool_convert_legacy_u32_to_link_mode
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHY_ADDR_MARV,4,2              ## @PHY_ADDR_MARV
	.comm	_PORT_TP,4,2                    ## @PORT_TP
	.comm	_SUPPORTED_Autoneg,4,2          ## @SUPPORTED_Autoneg
	.comm	_SUPPORTED_TP,4,2               ## @SUPPORTED_TP
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_PORT_FIBRE,4,2                 ## @PORT_FIBRE
	.comm	_SUPPORTED_FIBRE,4,2            ## @SUPPORTED_FIBRE
	.comm	_SKY2_FLAG_AUTO_SPEED,4,2       ## @SKY2_FLAG_AUTO_SPEED
	.comm	_AUTONEG_ENABLE,4,2             ## @AUTONEG_ENABLE
	.comm	_AUTONEG_DISABLE,4,2            ## @AUTONEG_DISABLE
	.no_dead_strip	_sky2_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 sky2_get_link_ksettings
_sky2_get_link_ksettings:               ; @sky2_get_link_ksettings
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	bl	_netdev_priv
	mov	x20, x0
	ldr	x21, [x0, #16]
	mov	x0, x21
	bl	_sky2_supported_modes
	mov	x22, x0
Lloh0:
	adrp	x8, _PHY_ADDR_MARV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHY_ADDR_MARV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	mov	x0, x21
	bl	_sky2_is_copper
	add	x8, x20, #12
Lloh3:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
Lloh5:
	adrp	x9, _SUPPORTED_Autoneg@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SUPPORTED_Autoneg@GOTPAGEOFF]
Lloh7:
	adrp	x10, _SUPPORTED_FIBRE@GOTPAGE
Lloh8:
	ldr	x10, [x10, _SUPPORTED_FIBRE@GOTPAGEOFF]
Lloh9:
	adrp	x11, _SUPPORTED_TP@GOTPAGE
Lloh10:
	ldr	x11, [x11, _SUPPORTED_TP@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	csel	x10, x10, x11, eq
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh12:
	adrp	x10, _PORT_FIBRE@GOTPAGE
Lloh13:
	ldr	x10, [x10, _PORT_FIBRE@GOTPAGEOFF]
Lloh14:
	adrp	x11, _PORT_TP@GOTPAGE
Lloh15:
	ldr	x11, [x11, _PORT_TP@GOTPAGEOFF]
	csel	x10, x10, x11, eq
	ldr	w10, [x10]
	ldr	w8, [x8]
	stp	w10, w8, [x19, #16]
	orr	w1, w9, w22
	ldp	w21, w8, [x20]
Lloh16:
	adrp	x9, _SKY2_FLAG_AUTO_SPEED@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SKY2_FLAG_AUTO_SPEED@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _AUTONEG_ENABLE@GOTPAGE
Lloh20:
	ldr	x10, [x10, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh21:
	adrp	x11, _AUTONEG_DISABLE@GOTPAGE
Lloh22:
	ldr	x11, [x11, _AUTONEG_DISABLE@GOTPAGEOFF]
	tst	w9, w8
	csel	x8, x11, x10, eq
	ldr	w8, [x8]
	ldr	w9, [x20, #8]
	stp	w9, w8, [x19, #8]
	ldr	w0, [x19, #4]
	bl	_ethtool_convert_legacy_u32_to_link_mode
	ldr	w0, [x19]
	mov	x1, x21
	bl	_ethtool_convert_legacy_u32_to_link_mode
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh11
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PHY_ADDR_MARV,4,2              ; @PHY_ADDR_MARV
	.comm	_PORT_TP,4,2                    ; @PORT_TP
	.comm	_SUPPORTED_Autoneg,4,2          ; @SUPPORTED_Autoneg
	.comm	_SUPPORTED_TP,4,2               ; @SUPPORTED_TP
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_PORT_FIBRE,4,2                 ; @PORT_FIBRE
	.comm	_SUPPORTED_FIBRE,4,2            ; @SUPPORTED_FIBRE
	.comm	_SKY2_FLAG_AUTO_SPEED,4,2       ; @SKY2_FLAG_AUTO_SPEED
	.comm	_AUTONEG_ENABLE,4,2             ; @AUTONEG_ENABLE
	.comm	_AUTONEG_DISABLE,4,2            ; @AUTONEG_DISABLE
	.no_dead_strip	_sky2_get_link_ksettings
.subsections_via_symbols
