	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alx_check_link
_alx_check_link:                        ## @alx_check_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	leaq	12(%rdi), %r14
	movq	%r14, %rdi
	callq	_alx_clear_phy_intr
	movl	12(%r15), %r13d
	movq	%r14, %rdi
	callq	_alx_read_phy_link
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	leaq	4(%r15), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	_ALX_ISR_PHY@GOTPCREL(%rip), %rax
	movl	8(%r15), %edx
	orl	(%rax), %edx
	movl	%edx, 8(%r15)
	movq	_ALX_IMR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_alx_write_mem32
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movl	12(%r15), %eax
	cmpl	%eax, %r13d
	je	LBB0_8
## %bb.2:
	movq	_SPEED_UNKNOWN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_3
## %bb.5:
	movq	%r15, %rdi
	callq	_alx_netif_stop
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %edx
	leaq	L_.str.1(%rip), %rcx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_netif_info
	movq	%r14, %rdi
	callq	_alx_reset_mac
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_alx_irq_disable
	movq	%r15, %rdi
	callq	_alx_reinit_rings
	testl	%eax, %eax
	je	LBB0_9
LBB0_7:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_alx_schedule_reset             ## TAILCALL
LBB0_3:
	movq	_link@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r15), %r12d
	movq	%r14, %rdi
	callq	_alx_speed_desc
	leaq	L_.str(%rip), %rcx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%r12d, %edx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_netif_info
	movq	%r14, %rdi
	callq	_alx_post_phy_link
	movq	%r14, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_alx_enable_aspm
	movq	%r14, %rdi
	callq	_alx_start_mac
	movq	_SPEED_UNKNOWN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_8
## %bb.4:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_alx_netif_start                ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, %rdi
	callq	_alx_configure
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_alx_enable_aspm
	movq	%r14, %rdi
	callq	_alx_post_phy_link
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_alx_irq_enable                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ALX_ISR_PHY,4,2                ## @ALX_ISR_PHY
	.comm	_ALX_IMR,4,2                    ## @ALX_IMR
	.comm	_SPEED_UNKNOWN,4,2              ## @SPEED_UNKNOWN
	.comm	_link,4,2                       ## @link
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NIC Up: %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"Link Down\n"

	.no_dead_strip	_alx_check_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alx_check_link
_alx_check_link:                        ; @alx_check_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
	add	x20, x0, #12
	mov	x0, x20
	bl	_alx_clear_phy_intr
	ldr	w23, [x19, #12]
	mov	x0, x20
	bl	_alx_read_phy_link
	tbnz	w0, #31, LBB0_5
; %bb.1:
	add	x21, x19, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _ALX_ISR_PHY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ALX_ISR_PHY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w2, w9, w8
	str	w2, [x19, #8]
Lloh3:
	adrp	x8, _ALX_IMR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ALX_IMR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_alx_write_mem32
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	w8, [x19, #12]
	cmp	w23, w8
	b.eq	LBB0_8
; %bb.2:
Lloh6:
	adrp	x24, _SPEED_UNKNOWN@GOTPAGE
Lloh7:
	ldr	x24, [x24, _SPEED_UNKNOWN@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w8, w9
	b.ne	LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_alx_netif_stop
Lloh8:
	adrp	x8, _link@GOTPAGE
Lloh9:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldr	w2, [x19]
Lloh11:
	adrp	x3, l_.str.1@PAGE
Lloh12:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_netif_info
	mov	x0, x20
	bl	_alx_reset_mac
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_alx_irq_disable
	mov	x0, x19
	bl	_alx_reinit_rings
	cbz	w0, LBB0_9
LBB0_5:
	mov	x0, x19
	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
	b	_alx_schedule_reset
LBB0_6:
Lloh13:
	adrp	x8, _link@GOTPAGE
Lloh14:
	ldr	x8, [x8, _link@GOTPAGEOFF]
Lloh15:
	ldr	w21, [x8]
	ldr	w22, [x19]
	mov	x0, x20
	bl	_alx_speed_desc
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh16:
	adrp	x3, l_.str@PAGE
Lloh17:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_netif_info
	mov	x0, x20
	bl	_alx_post_phy_link
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	bl	_alx_enable_aspm
	mov	x0, x20
	bl	_alx_start_mac
	ldr	w8, [x24]
	cmp	w23, w8
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	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
	b	_alx_netif_start
LBB0_8:
	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
LBB0_9:
	mov	x0, x19
	bl	_alx_configure
	mov	x0, x20
	mov	w1, #0
	mov	w2, #1
	bl	_alx_enable_aspm
	mov	x0, x20
	bl	_alx_post_phy_link
	mov	x0, x19
	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
	b	_alx_irq_enable
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ALX_ISR_PHY,4,2                ; @ALX_ISR_PHY
	.comm	_ALX_IMR,4,2                    ; @ALX_IMR
	.comm	_SPEED_UNKNOWN,4,2              ; @SPEED_UNKNOWN
	.comm	_link,4,2                       ; @link
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NIC Up: %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"Link Down\n"

	.no_dead_strip	_alx_check_link
.subsections_via_symbols
