	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1_set_link_ksettings
_atl1_set_link_ksettings:               ## @atl1_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	callq	_netdev_priv
	movq	%rax, %rbx
	movq	%rax, %r14
	movl	8(%rax), %edi
	movl	12(%rax), %r12d
	callq	_netif_running
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%r14, %rdi
	callq	_netif_msg_link
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	(%r14), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
LBB0_3:
	movq	%r14, %rdi
	callq	_atl1_down
LBB0_4:
	movq	(%r15), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_MEDIA_TYPE_AUTO_SENSOR@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_6:
	movq	8(%r15), %rax
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.7:
	movq	16(%r15), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.17:
	movq	_MEDIA_TYPE_1000M_FULL@GOTPCREL(%rip), %rax
	jmp	LBB0_18
LBB0_13:
	movq	_SPEED_100@GOTPCREL(%rip), %rsi
	movq	16(%r15), %rcx
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	(%rsi), %rax
	jne	LBB0_15
## %bb.14:
	xorl	%eax, %eax
	cmpq	%rdx, %rcx
	sete	%al
	addl	$129, %eax
	jmp	LBB0_19
LBB0_8:
	movq	%r14, %rdi
	callq	_netif_msg_link
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	(%r14), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_11
LBB0_15:
	movl	$128, %eax
	cmpq	%rdx, %rcx
	je	LBB0_19
## %bb.16:
	movq	_MEDIA_TYPE_10M_HALF@GOTPCREL(%rip), %rax
LBB0_18:
	movl	(%rax), %eax
LBB0_19:
	addq	$12, %rbx
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_atl1_phy_setup_autoneg_adv
	testq	%rax, %rax
	je	LBB0_22
## %bb.20:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_netif_msg_link
	testq	%rax, %rax
	je	LBB0_11
## %bb.21:
	movq	(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
LBB0_11:
	testl	%ebx, %ebx
	je	LBB0_34
## %bb.12:
	negl	%ebx
	movl	%r12d, 12(%r14)
	movl	8(%r14), %edi
	callq	_netif_running
	testq	%rax, %rax
	jne	LBB0_35
	jmp	LBB0_41
LBB0_22:
	movl	(%rbx), %eax
	movq	_MEDIA_TYPE_AUTO_SENSOR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_24
## %bb.23:
	movq	_MEDIA_TYPE_1000M_FULL@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_24
## %bb.25:
	cmpl	$128, %eax
	je	LBB0_30
## %bb.26:
	cmpl	$129, %eax
	je	LBB0_32
## %bb.27:
	cmpl	$130, %eax
	jne	LBB0_31
## %bb.28:
	movq	_MII_CR_FULL_DUPLEX@GOTPCREL(%rip), %rax
	movq	_MII_CR_SPEED_100@GOTPCREL(%rip), %rcx
	jmp	LBB0_29
LBB0_24:
	movq	_MII_CR_AUTO_NEG_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MII_CR_RESET@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_30:
	movq	_MII_CR_FULL_DUPLEX@GOTPCREL(%rip), %rax
	movq	_MII_CR_SPEED_10@GOTPCREL(%rip), %rcx
LBB0_29:
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MII_CR_RESET@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_32:
	movq	_MII_CR_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MII_CR_SPEED_100@GOTPCREL(%rip), %rax
	jmp	LBB0_33
LBB0_31:
	movq	_MII_CR_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MII_CR_SPEED_10@GOTPCREL(%rip), %rax
LBB0_33:
	orl	(%rax), %edx
	movq	_MII_BMCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_atl1_write_phy_reg
LBB0_34:
	movl	8(%r14), %edi
	callq	_netif_running
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_38
LBB0_35:
	movq	%r14, %rdi
	callq	_netif_msg_link
	testq	%rax, %rax
	je	LBB0_37
## %bb.36:
	movq	(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_dev_dbg
LBB0_37:
	movq	%r14, %rdi
	callq	_atl1_up
	jmp	LBB0_41
LBB0_38:
	movq	%r14, %rdi
	callq	_netif_msg_link
	testq	%rax, %rax
	je	LBB0_40
## %bb.39:
	movq	(%r14), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_dbg
LBB0_40:
	movq	%r14, %rdi
	callq	_atl1_reset
	xorl	%ebx, %ebx
LBB0_41:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ethtool shutting down adapter\n"

	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_MEDIA_TYPE_AUTO_SENSOR,4,2     ## @MEDIA_TYPE_AUTO_SENSOR
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
L_.str.1:                               ## @.str.1
	.asciz	"1000M half is invalid\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MEDIA_TYPE_1000M_FULL,4,2      ## @MEDIA_TYPE_1000M_FULL
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_MEDIA_TYPE_10M_HALF,4,2        ## @MEDIA_TYPE_10M_HALF
L_.str.2:                               ## @.str.2
	.asciz	"invalid ethtool speed/duplex setting\n"

	.comm	_MII_CR_RESET,4,2               ## @MII_CR_RESET
	.comm	_MII_CR_AUTO_NEG_EN,4,2         ## @MII_CR_AUTO_NEG_EN
	.comm	_MII_CR_FULL_DUPLEX,4,2         ## @MII_CR_FULL_DUPLEX
	.comm	_MII_CR_SPEED_100,4,2           ## @MII_CR_SPEED_100
	.comm	_MII_CR_SPEED_10,4,2            ## @MII_CR_SPEED_10
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
L_.str.3:                               ## @.str.3
	.asciz	"ethtool starting adapter\n"

L_.str.4:                               ## @.str.4
	.asciz	"ethtool resetting adapter\n"

	.no_dead_strip	_atl1_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 atl1_set_link_ksettings
_atl1_set_link_ksettings:               ; @atl1_set_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	x21, x1
	bl	_netdev_priv
	mov	x19, x0
	mov	x20, x0
	ldr	w22, [x20, #12]!
	ldr	w0, [x0, #8]
	bl	_netif_running
	cbz	x0, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_netif_msg_link
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
LBB0_3:
	mov	x0, x19
	bl	_atl1_down
LBB0_4:
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
Lloh5:
	adrp	x8, _MEDIA_TYPE_AUTO_SENSOR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MEDIA_TYPE_AUTO_SENSOR@GOTPAGEOFF]
	b	LBB0_9
LBB0_6:
	ldr	x8, [x21, #8]
Lloh7:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.7:
	ldr	x8, [x21, #16]
Lloh10:
	adrp	x9, _DUPLEX_FULL@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DUPLEX_FULL@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_23
; %bb.8:
Lloh13:
	adrp	x8, _MEDIA_TYPE_1000M_FULL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MEDIA_TYPE_1000M_FULL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
LBB0_10:
	str	w8, [x20]
	mov	x0, x20
	bl	_atl1_phy_setup_autoneg_adv
	cbz	x0, LBB0_15
; %bb.11:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w20, [x8]
	mov	x0, x19
	bl	_netif_msg_link
	cbz	x0, LBB0_13
; %bb.12:
	ldr	x0, [x19]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
LBB0_13:
	cbz	w20, LBB0_31
LBB0_14:
	neg	w20, w20
	str	w22, [x19, #12]
	ldr	w0, [x19, #8]
	bl	_netif_running
	cbnz	x0, LBB0_33
	b	LBB0_39
LBB0_15:
	ldr	w8, [x20]
Lloh20:
	adrp	x9, _MEDIA_TYPE_AUTO_SENSOR@GOTPAGE
Lloh21:
	ldr	x9, [x9, _MEDIA_TYPE_AUTO_SENSOR@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
Lloh23:
	adrp	x10, _MEDIA_TYPE_1000M_FULL@GOTPAGE
Lloh24:
	ldr	x10, [x10, _MEDIA_TYPE_1000M_FULL@GOTPAGEOFF]
Lloh25:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_19
; %bb.16:
Lloh26:
	adrp	x8, _MII_CR_AUTO_NEG_EN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MII_CR_AUTO_NEG_EN@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	b	LBB0_29
LBB0_17:
Lloh29:
	adrp	x9, _SPEED_100@GOTPAGE
Lloh30:
	ldr	x9, [x9, _SPEED_100@GOTPAGEOFF]
Lloh31:
	ldr	x11, [x9]
	ldr	x9, [x21, #16]
Lloh32:
	adrp	x10, _DUPLEX_FULL@GOTPAGE
Lloh33:
	ldr	x10, [x10, _DUPLEX_FULL@GOTPAGEOFF]
Lloh34:
	ldr	x10, [x10]
	cmp	x8, x11
	b.ne	LBB0_26
; %bb.18:
	cmp	x9, x10
	mov	w8, #129
	cinc	w8, w8, eq
	b	LBB0_10
LBB0_19:
	cmp	w8, #128
	b.eq	LBB0_27
; %bb.20:
	cmp	w8, #129
	b.eq	LBB0_40
; %bb.21:
	cmp	w8, #130
	b.ne	LBB0_41
; %bb.22:
Lloh35:
	adrp	x8, _MII_CR_FULL_DUPLEX@GOTPAGE
Lloh36:
	ldr	x8, [x8, _MII_CR_FULL_DUPLEX@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
Lloh38:
	adrp	x9, _MII_CR_SPEED_100@GOTPAGE
Lloh39:
	ldr	x9, [x9, _MII_CR_SPEED_100@GOTPAGEOFF]
	b	LBB0_28
LBB0_23:
	mov	x0, x19
	bl	_netif_msg_link
	cbz	x0, LBB0_25
; %bb.24:
	ldr	x0, [x19]
Lloh40:
	adrp	x1, l_.str.1@PAGE
Lloh41:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
LBB0_25:
Lloh42:
	adrp	x8, _EINVAL@GOTPAGE
Lloh43:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh44:
	ldr	w20, [x8]
	cbnz	w20, LBB0_14
	b	LBB0_31
LBB0_26:
Lloh45:
	adrp	x8, _MEDIA_TYPE_10M_HALF@GOTPAGE
Lloh46:
	ldr	x8, [x8, _MEDIA_TYPE_10M_HALF@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	cmp	x9, x10
	mov	w9, #128
	csel	w8, w9, w8, eq
	b	LBB0_10
LBB0_27:
Lloh48:
	adrp	x8, _MII_CR_FULL_DUPLEX@GOTPAGE
Lloh49:
	ldr	x8, [x8, _MII_CR_FULL_DUPLEX@GOTPAGEOFF]
Lloh50:
	ldr	w8, [x8]
Lloh51:
	adrp	x9, _MII_CR_SPEED_10@GOTPAGE
Lloh52:
	ldr	x9, [x9, _MII_CR_SPEED_10@GOTPAGEOFF]
LBB0_28:
	ldr	w9, [x9]
	orr	w8, w9, w8
LBB0_29:
Lloh53:
	adrp	x9, _MII_CR_RESET@GOTPAGE
Lloh54:
	ldr	x9, [x9, _MII_CR_RESET@GOTPAGEOFF]
LBB0_30:
	ldr	w9, [x9]
	orr	w2, w8, w9
Lloh55:
	adrp	x8, _MII_BMCR@GOTPAGE
Lloh56:
	ldr	x8, [x8, _MII_BMCR@GOTPAGEOFF]
Lloh57:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_atl1_write_phy_reg
LBB0_31:
	ldr	w0, [x19, #8]
	bl	_netif_running
	cbz	x0, LBB0_36
; %bb.32:
	mov	w20, #0
LBB0_33:
	mov	x0, x19
	bl	_netif_msg_link
	cbz	x0, LBB0_35
; %bb.34:
	ldr	x0, [x19]
Lloh58:
	adrp	x1, l_.str.3@PAGE
Lloh59:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
LBB0_35:
	mov	x0, x19
	bl	_atl1_up
	b	LBB0_39
LBB0_36:
	mov	x0, x19
	bl	_netif_msg_link
	cbz	x0, LBB0_38
; %bb.37:
	ldr	x0, [x19]
Lloh60:
	adrp	x1, l_.str.4@PAGE
Lloh61:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
LBB0_38:
	mov	x0, x19
	bl	_atl1_reset
	mov	w20, #0
LBB0_39:
	mov	x0, x20
	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
LBB0_40:
Lloh62:
	adrp	x8, _MII_CR_RESET@GOTPAGE
Lloh63:
	ldr	x8, [x8, _MII_CR_RESET@GOTPAGEOFF]
Lloh64:
	ldr	w8, [x8]
Lloh65:
	adrp	x9, _MII_CR_SPEED_100@GOTPAGE
Lloh66:
	ldr	x9, [x9, _MII_CR_SPEED_100@GOTPAGEOFF]
	b	LBB0_30
LBB0_41:
Lloh67:
	adrp	x8, _MII_CR_RESET@GOTPAGE
Lloh68:
	ldr	x8, [x8, _MII_CR_RESET@GOTPAGEOFF]
Lloh69:
	ldr	w8, [x8]
Lloh70:
	adrp	x9, _MII_CR_SPEED_10@GOTPAGE
Lloh71:
	ldr	x9, [x9, _MII_CR_SPEED_10@GOTPAGEOFF]
	b	LBB0_30
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpLdrGot	Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGot	Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ethtool shutting down adapter\n"

	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_MEDIA_TYPE_AUTO_SENSOR,4,2     ; @MEDIA_TYPE_AUTO_SENSOR
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
l_.str.1:                               ; @.str.1
	.asciz	"1000M half is invalid\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MEDIA_TYPE_1000M_FULL,4,2      ; @MEDIA_TYPE_1000M_FULL
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_MEDIA_TYPE_10M_HALF,4,2        ; @MEDIA_TYPE_10M_HALF
l_.str.2:                               ; @.str.2
	.asciz	"invalid ethtool speed/duplex setting\n"

	.comm	_MII_CR_RESET,4,2               ; @MII_CR_RESET
	.comm	_MII_CR_AUTO_NEG_EN,4,2         ; @MII_CR_AUTO_NEG_EN
	.comm	_MII_CR_FULL_DUPLEX,4,2         ; @MII_CR_FULL_DUPLEX
	.comm	_MII_CR_SPEED_100,4,2           ; @MII_CR_SPEED_100
	.comm	_MII_CR_SPEED_10,4,2            ; @MII_CR_SPEED_10
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
l_.str.3:                               ; @.str.3
	.asciz	"ethtool starting adapter\n"

l_.str.4:                               ; @.str.4
	.asciz	"ethtool resetting adapter\n"

	.no_dead_strip	_atl1_set_link_ksettings
.subsections_via_symbols
