	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atl1c_check_link_status
_atl1c_check_link_status:               ## @atl1c_check_link_status
	.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	%rdi, %r12
	leaq	40(%rdi), %r13
	movq	24(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	32(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	16(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_MII_BMSR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-80(%rbp), %r14
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_atl1c_read_phy_reg
	movl	(%r15), %esi
	movq	%r13, %rdi
	movq	%r14, %rdx
	callq	_atl1c_read_phy_reg
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	_BMSR_LSTATUS@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, -80(%rbp)
	je	LBB0_1
## %bb.5:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	$0, (%r13)
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	leaq	-72(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	movq	%r13, %rdi
	callq	_atl1c_get_speed_and_duplex
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movl	%r14d, %edi
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_13
## %bb.6:
	movq	-72(%rbp), %rsi
	cmpq	%rsi, (%r12)
	jne	LBB0_7
## %bb.8:
	movq	-64(%rbp), %rax
	cmpq	%rax, 8(%r12)
	movq	%r15, %rbx
	jne	LBB0_9
	jmp	LBB0_11
LBB0_1:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_netif_carrier_off
	movq	%rbx, %rdi
	callq	_netif_stop_queue
	movl	$1, (%r13)
	movq	%r13, %rdi
	callq	_atl1c_reset_mac
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%r12, %rdi
	callq	_netif_msg_hw
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_warn
LBB0_4:
	movq	_SPEED_0@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	callq	_atl1c_set_aspm
	movq	(%rbx), %rsi
	movq	%r13, %rdi
	callq	_atl1c_post_phy_linkchg
	movq	%r12, %rdi
	callq	_atl1c_reset_dma_ring
	movq	%r12, %rdi
	callq	_atl1c_configure
	jmp	LBB0_13
LBB0_7:
	movq	-64(%rbp), %rax
	movq	%r15, %rbx
LBB0_9:
	movq	%rsi, (%r12)
	movq	%rax, 8(%r12)
	movq	%r13, %rdi
	callq	_atl1c_set_aspm
	movq	-72(%rbp), %rsi
	movq	%r13, %rdi
	callq	_atl1c_post_phy_linkchg
	movq	%r12, %rdi
	callq	_atl1c_start_mac
	movq	%r12, %rdi
	callq	_netif_msg_link
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_atl1c_driver_name@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%rbx), %ecx
	movq	(%r12), %r8
	movq	8(%r12), %rax
	movq	_FULL_DUPLEX@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %r9
	cmoveq	%rax, %r9
	leaq	L_.str.1(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_info
LBB0_11:
	movq	%rbx, %rdi
	callq	_netif_carrier_ok
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movq	%r15, %rdi
	callq	_netif_carrier_on
LBB0_13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_BMSR,4,2                   ## @MII_BMSR
	.comm	_BMSR_LSTATUS,8,3               ## @BMSR_LSTATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset mac failed\n"

	.comm	_SPEED_0,8,3                    ## @SPEED_0
L_.str.1:                               ## @.str.1
	.asciz	"%s: %s NIC Link is Up<%d Mbps %s>\n"

	.comm	_atl1c_driver_name,4,2          ## @atl1c_driver_name
	.comm	_FULL_DUPLEX,8,3                ## @FULL_DUPLEX
L_.str.2:                               ## @.str.2
	.asciz	"Full Duplex"

L_.str.3:                               ## @.str.3
	.asciz	"Half Duplex"

	.no_dead_strip	_atl1c_check_link_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atl1c_check_link_status
_atl1c_check_link_status:               ; @atl1c_check_link_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x19, x0
	add	x22, x0, #40
	ldp	x20, x21, [x0, #24]
	add	x23, x0, #16
	mov	x0, x23
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x24, _MII_BMSR@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MII_BMSR@GOTPAGEOFF]
	ldr	w1, [x24]
	add	x2, sp, #8
	mov	x0, x22
	bl	_atl1c_read_phy_reg
	ldr	w1, [x24]
	add	x2, sp, #8
	mov	x0, x22
	bl	_atl1c_read_phy_reg
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	ldr	x8, [sp, #8]
Lloh2:
	adrp	x9, _BMSR_LSTATUS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BMSR_LSTATUS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	tst	x9, x8
	b.eq	LBB0_4
; %bb.1:
	str	wzr, [x22]
	mov	x0, x23
	bl	_spin_lock_irqsave
	add	x1, sp, #24
	add	x2, sp, #16
	mov	x0, x22
	bl	_atl1c_get_speed_and_duplex
	mov	x24, x0
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	mov	x0, x24
	bl	_unlikely
	cbnz	x0, LBB0_13
; %bb.2:
	ldr	x8, [x19]
	ldr	x1, [sp, #24]
	cmp	x8, x1
	b.ne	LBB0_8
; %bb.3:
	ldr	x9, [x19, #8]
	ldr	x8, [sp, #16]
	cmp	x9, x8
	b.ne	LBB0_9
	b	LBB0_11
LBB0_4:
	mov	x0, x21
	bl	_netif_carrier_off
	mov	x0, x21
	bl	_netif_stop_queue
	mov	w8, #1
	str	w8, [x22]
	mov	x0, x22
	bl	_atl1c_reset_mac
	cbz	x0, LBB0_7
; %bb.5:
	mov	x0, x19
	bl	_netif_msg_hw
	cbz	x0, LBB0_7
; %bb.6:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
LBB0_7:
Lloh7:
	adrp	x20, _SPEED_0@GOTPAGE
Lloh8:
	ldr	x20, [x20, _SPEED_0@GOTPAGEOFF]
	ldr	x1, [x20]
	mov	x0, x22
	bl	_atl1c_set_aspm
	ldr	x1, [x20]
	mov	x0, x22
	bl	_atl1c_post_phy_linkchg
	mov	x0, x19
	bl	_atl1c_reset_dma_ring
	mov	x0, x19
	bl	_atl1c_configure
	b	LBB0_13
LBB0_8:
	ldr	x8, [sp, #16]
LBB0_9:
	stp	x1, x8, [x19]
	mov	x0, x22
	bl	_atl1c_set_aspm
	ldr	x1, [sp, #24]
	mov	x0, x22
	bl	_atl1c_post_phy_linkchg
	mov	x0, x19
	bl	_atl1c_start_mac
	mov	x0, x19
	bl	_netif_msg_link
	cbz	x0, LBB0_11
; %bb.10:
Lloh9:
	adrp	x8, _atl1c_driver_name@GOTPAGE
Lloh10:
	ldr	x8, [x8, _atl1c_driver_name@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	ldr	w3, [x21]
	ldp	x4, x8, [x19]
Lloh12:
	adrp	x9, _FULL_DUPLEX@GOTPAGE
Lloh13:
	ldr	x9, [x9, _FULL_DUPLEX@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
Lloh15:
	adrp	x10, l_.str.3@PAGE
Lloh16:
	add	x10, x10, l_.str.3@PAGEOFF
Lloh17:
	adrp	x11, l_.str.2@PAGE
Lloh18:
	add	x11, x11, l_.str.2@PAGEOFF
	cmp	x8, x9
	csel	x5, x11, x10, eq
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_info
LBB0_11:
	mov	x0, x21
	bl	_netif_carrier_ok
	cbnz	w0, LBB0_13
; %bb.12:
	mov	x0, x21
	bl	_netif_carrier_on
LBB0_13:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_BMSR,4,2                   ; @MII_BMSR
	.comm	_BMSR_LSTATUS,8,3               ; @BMSR_LSTATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset mac failed\n"

	.comm	_SPEED_0,8,3                    ; @SPEED_0
l_.str.1:                               ; @.str.1
	.asciz	"%s: %s NIC Link is Up<%d Mbps %s>\n"

	.comm	_atl1c_driver_name,4,2          ; @atl1c_driver_name
	.comm	_FULL_DUPLEX,8,3                ; @FULL_DUPLEX
l_.str.2:                               ; @.str.2
	.asciz	"Full Duplex"

l_.str.3:                               ; @.str.3
	.asciz	"Half Duplex"

	.no_dead_strip	_atl1c_check_link_status
.subsections_via_symbols
