	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atlx_check_for_link
_atlx_check_for_link:                   ## @atlx_check_for_link
	.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	%rdi, %rbx
	movq	32(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$0, -44(%rbp)
	leaq	24(%rdi), %r15
	movq	%r15, %rdi
	callq	_spin_lock
	movl	$0, (%rbx)
	leaq	28(%rbx), %r12
	movq	_MII_BMSR@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	leaq	-44(%rbp), %r13
	movq	%r12, %rdi
	movq	%r13, %rdx
	callq	_atlx_read_phy_reg
	movl	(%r14), %esi
	movq	%r12, %rdi
	movq	%r13, %rdx
	callq	_atlx_read_phy_reg
	movq	%r15, %rdi
	callq	_spin_unlock
	movq	_BMSR_LSTATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	jne	LBB0_3
## %bb.1:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_netif_carrier_ok
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	16(%rbx), %rdi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movq	_SPEED_0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%r14, %rdi
	callq	_netif_carrier_off
LBB0_3:
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_schedule_work
	addq	$24, %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,4,2               ## @BMSR_LSTATUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s link is down\n"

	.comm	_SPEED_0,4,2                    ## @SPEED_0
	.no_dead_strip	_atlx_check_for_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atlx_check_for_link
_atlx_check_for_link:                   ; @atlx_check_for_link
	.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	x19, x0
	ldr	x20, [x0, #32]
	str	wzr, [sp, #12]
	add	x21, x0, #24
	mov	x0, x21
	bl	_spin_lock
	str	wzr, [x19]
	add	x22, x19, #28
Lloh0:
	adrp	x23, _MII_BMSR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MII_BMSR@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x22
	bl	_atlx_read_phy_reg
	ldr	w1, [x23]
	add	x2, sp, #12
	mov	x0, x22
	bl	_atlx_read_phy_reg
	mov	x0, x21
	bl	_spin_unlock
	ldr	w8, [sp, #12]
Lloh2:
	adrp	x9, _BMSR_LSTATUS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BMSR_LSTATUS@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_netif_carrier_ok
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x0, [x19, #16]
	ldr	w2, [x20]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
Lloh7:
	adrp	x8, _SPEED_0@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SPEED_0@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	x0, x20
	bl	_netif_carrier_off
LBB0_3:
	add	x0, x19, #4
	bl	_schedule_work
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_BMSR,4,2                   ; @MII_BMSR
	.comm	_BMSR_LSTATUS,4,2               ; @BMSR_LSTATUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s link is down\n"

	.comm	_SPEED_0,4,2                    ; @SPEED_0
	.no_dead_strip	_atlx_check_for_link
.subsections_via_symbols
