	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sky2_set_link_ksettings
_sky2_set_link_ksettings:               ## @sky2_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	callq	_netdev_priv
	movq	%rax, %r15
	movq	16(%rax), %r13
	movq	%r13, %rdi
	callq	_sky2_supported_modes
	movl	%eax, %r12d
	movl	16(%rbx), %esi
	leaq	-44(%rbp), %rdi
	callq	_ethtool_convert_link_mode_to_legacy_u32
	movq	(%rbx), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.1:
	notl	%r12d
	testl	%r12d, -44(%rbp)
	jne	LBB0_2
## %bb.3:
	movq	%r13, %rdi
	callq	_sky2_is_copper
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:
	movq	_ADVERTISED_FIBRE@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_7:
	movl	8(%rbx), %eax
	cmpl	$130, %eax
	je	LBB0_18
## %bb.8:
	cmpl	$129, %eax
	je	LBB0_14
## %bb.9:
	cmpl	$128, %eax
	jne	LBB0_2
## %bb.10:
	movl	12(%rbx), %ecx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_12
## %bb.11:
	movq	_SUPPORTED_1000baseT_Full@GOTPCREL(%rip), %rdx
	testl	%r12d, (%rdx)
	jne	LBB0_23
	jmp	LBB0_2
LBB0_18:
	movl	12(%rbx), %ecx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_20
## %bb.19:
	movq	_SUPPORTED_10baseT_Full@GOTPCREL(%rip), %rdx
	testl	%r12d, (%rdx)
	jne	LBB0_23
	jmp	LBB0_2
LBB0_14:
	movl	12(%rbx), %ecx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_16
## %bb.15:
	movq	_SUPPORTED_100baseT_Full@GOTPCREL(%rip), %rdx
	testl	%r12d, (%rdx)
	jne	LBB0_23
	jmp	LBB0_2
LBB0_4:
	movq	_ADVERTISED_TP@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	orl	-44(%rbp), %eax
	movq	_ADVERTISED_Autoneg@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r15)
	movq	_SKY2_FLAG_AUTO_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 12(%r15)
	movq	$-1, 4(%r15)
	jmp	LBB0_24
LBB0_12:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_2
## %bb.13:
	movq	_SUPPORTED_1000baseT_Half@GOTPCREL(%rip), %rdx
	testl	%r12d, (%rdx)
	jne	LBB0_23
	jmp	LBB0_2
LBB0_20:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_2
## %bb.21:
	movq	_SUPPORTED_10baseT_Half@GOTPCREL(%rip), %rdx
	testl	%r12d, (%rdx)
	jne	LBB0_23
	jmp	LBB0_2
LBB0_16:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jne	LBB0_2
## %bb.17:
	movq	_SUPPORTED_100baseT_Half@GOTPCREL(%rip), %rdx
	testl	%r12d, (%rdx)
	je	LBB0_2
LBB0_23:
	movl	%eax, 8(%r15)
	movl	%ecx, 4(%r15)
	movq	_SKY2_FLAG_AUTO_SPEED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 12(%r15)
LBB0_24:
	movq	%r14, %rdi
	callq	_netif_running
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_26
## %bb.25:
	movq	%r15, %rdi
	callq	_sky2_phy_reinit
	movq	%r14, %rdi
	callq	_sky2_set_multicast
	jmp	LBB0_26
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ADVERTISED_TP,4,2              ## @ADVERTISED_TP
	.comm	_ADVERTISED_Autoneg,4,2         ## @ADVERTISED_Autoneg
	.comm	_ADVERTISED_FIBRE,4,2           ## @ADVERTISED_FIBRE
	.comm	_SKY2_FLAG_AUTO_SPEED,4,2       ## @SKY2_FLAG_AUTO_SPEED
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_SUPPORTED_1000baseT_Full,4,2   ## @SUPPORTED_1000baseT_Full
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_SUPPORTED_1000baseT_Half,4,2   ## @SUPPORTED_1000baseT_Half
	.comm	_SUPPORTED_100baseT_Full,4,2    ## @SUPPORTED_100baseT_Full
	.comm	_SUPPORTED_100baseT_Half,4,2    ## @SUPPORTED_100baseT_Half
	.comm	_SUPPORTED_10baseT_Full,4,2     ## @SUPPORTED_10baseT_Full
	.comm	_SUPPORTED_10baseT_Half,4,2     ## @SUPPORTED_10baseT_Half
	.no_dead_strip	_sky2_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 sky2_set_link_ksettings
_sky2_set_link_ksettings:               ; @sky2_set_link_ksettings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x23, [x0, #16]
	mov	x0, x23
	bl	_sky2_supported_modes
	mov	x21, x0
	ldr	w1, [x22, #16]
	add	x0, sp, #12
	bl	_ethtool_convert_link_mode_to_legacy_u32
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [sp, #12]
	bics	wzr, w8, w21
	b.ne	LBB0_22
; %bb.2:
	mov	x0, x23
	bl	_sky2_is_copper
Lloh3:
	adrp	x8, _ADVERTISED_FIBRE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADVERTISED_FIBRE@GOTPAGEOFF]
Lloh5:
	adrp	x9, _ADVERTISED_TP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ADVERTISED_TP@GOTPAGEOFF]
	ldr	w10, [sp, #12]
	cmp	x0, #0
	csel	x8, x8, x9, eq
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _ADVERTISED_Autoneg@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ADVERTISED_Autoneg@GOTPAGEOFF]
	orr	w8, w8, w10
Lloh9:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x20]
Lloh10:
	adrp	x8, _SKY2_FLAG_AUTO_SPEED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SKY2_FLAG_AUTO_SPEED@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	w9, [x20, #12]
	orr	w8, w9, w8
	str	w8, [x20, #12]
	movi.2d	v0, #0xffffffffffffffff
	stur	d0, [x20, #4]
	b	LBB0_20
LBB0_3:
	ldr	w8, [x22, #8]
	cmp	w8, #130
	b.eq	LBB0_8
; %bb.4:
	cmp	w8, #129
	b.eq	LBB0_10
; %bb.5:
	cmp	w8, #128
	b.ne	LBB0_22
; %bb.6:
	ldr	w9, [x22, #12]
Lloh13:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh14:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_12
; %bb.7:
Lloh16:
	adrp	x10, _SUPPORTED_1000baseT_Full@GOTPAGE
Lloh17:
	ldr	x10, [x10, _SUPPORTED_1000baseT_Full@GOTPAGEOFF]
	b	LBB0_18
LBB0_8:
	ldr	w9, [x22, #12]
Lloh18:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh19:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_14
; %bb.9:
Lloh21:
	adrp	x10, _SUPPORTED_10baseT_Full@GOTPAGE
Lloh22:
	ldr	x10, [x10, _SUPPORTED_10baseT_Full@GOTPAGEOFF]
	b	LBB0_18
LBB0_10:
	ldr	w9, [x22, #12]
Lloh23:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh24:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_16
; %bb.11:
Lloh26:
	adrp	x10, _SUPPORTED_100baseT_Full@GOTPAGE
Lloh27:
	ldr	x10, [x10, _SUPPORTED_100baseT_Full@GOTPAGEOFF]
	b	LBB0_18
LBB0_12:
Lloh28:
	adrp	x10, _DUPLEX_HALF@GOTPAGE
Lloh29:
	ldr	x10, [x10, _DUPLEX_HALF@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_22
; %bb.13:
Lloh31:
	adrp	x10, _SUPPORTED_1000baseT_Half@GOTPAGE
Lloh32:
	ldr	x10, [x10, _SUPPORTED_1000baseT_Half@GOTPAGEOFF]
	b	LBB0_18
LBB0_14:
Lloh33:
	adrp	x10, _DUPLEX_HALF@GOTPAGE
Lloh34:
	ldr	x10, [x10, _DUPLEX_HALF@GOTPAGEOFF]
Lloh35:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_22
; %bb.15:
Lloh36:
	adrp	x10, _SUPPORTED_10baseT_Half@GOTPAGE
Lloh37:
	ldr	x10, [x10, _SUPPORTED_10baseT_Half@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:
Lloh38:
	adrp	x10, _DUPLEX_HALF@GOTPAGE
Lloh39:
	ldr	x10, [x10, _DUPLEX_HALF@GOTPAGEOFF]
Lloh40:
	ldr	w10, [x10]
	cmp	w9, w10
	b.ne	LBB0_22
; %bb.17:
Lloh41:
	adrp	x10, _SUPPORTED_100baseT_Half@GOTPAGE
Lloh42:
	ldr	x10, [x10, _SUPPORTED_100baseT_Half@GOTPAGEOFF]
LBB0_18:
	ldr	w10, [x10]
	tst	w10, w21
	b.eq	LBB0_22
; %bb.19:
	stp	w9, w8, [x20, #4]
Lloh43:
	adrp	x8, _SKY2_FLAG_AUTO_SPEED@GOTPAGE
Lloh44:
	ldr	x8, [x8, _SKY2_FLAG_AUTO_SPEED@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	ldr	w9, [x20, #12]
	bic	w8, w9, w8
	str	w8, [x20, #12]
LBB0_20:
	mov	x0, x19
	bl	_netif_running
	cbz	x0, LBB0_23
; %bb.21:
	mov	x0, x20
	bl	_sky2_phy_reinit
	mov	x0, x19
	bl	_sky2_set_multicast
	mov	w0, #0
	b	LBB0_23
LBB0_22:
Lloh46:
	adrp	x8, _EINVAL@GOTPAGE
Lloh47:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_23:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ADVERTISED_TP,4,2              ; @ADVERTISED_TP
	.comm	_ADVERTISED_Autoneg,4,2         ; @ADVERTISED_Autoneg
	.comm	_ADVERTISED_FIBRE,4,2           ; @ADVERTISED_FIBRE
	.comm	_SKY2_FLAG_AUTO_SPEED,4,2       ; @SKY2_FLAG_AUTO_SPEED
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_SUPPORTED_1000baseT_Full,4,2   ; @SUPPORTED_1000baseT_Full
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_SUPPORTED_1000baseT_Half,4,2   ; @SUPPORTED_1000baseT_Half
	.comm	_SUPPORTED_100baseT_Full,4,2    ; @SUPPORTED_100baseT_Full
	.comm	_SUPPORTED_100baseT_Half,4,2    ; @SUPPORTED_100baseT_Half
	.comm	_SUPPORTED_10baseT_Full,4,2     ; @SUPPORTED_10baseT_Full
	.comm	_SUPPORTED_10baseT_Half,4,2     ; @SUPPORTED_10baseT_Half
	.no_dead_strip	_sky2_set_link_ksettings
.subsections_via_symbols
