	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgbe_phy_link_status
_xgbe_phy_link_status:                  ## @xgbe_phy_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	8(%rdi), %r12
	movl	$0, (%rsi)
	movq	(%r12), %rax
	movq	_XGBE_PORT_MODE_SFP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	movq	%rsi, %rbx
	movq	%r15, %rdi
	callq	_xgbe_phy_sfp_detect
	cmpq	$0, 40(%r12)
	je	LBB0_3
## %bb.2:
	movl	$1, (%rbx)
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_3:
	xorl	%r14d, %r14d
	cmpq	$0, 32(%r12)
	jne	LBB0_13
## %bb.4:
	cmpq	$0, 24(%r12)
	jne	LBB0_13
LBB0_5:
	movq	16(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.6:
	callq	_phy_read_status
	xorl	%r14d, %r14d
	testl	%eax, %eax
	js	LBB0_13
## %bb.7:
	movq	(%r15), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	16(%r12), %rdi
	callq	_phy_aneg_done
	testl	%eax, %eax
	je	LBB0_13
LBB0_9:
	movq	16(%r12), %rax
	cmpl	$0, (%rax)
	je	LBB0_13
LBB0_10:
	movq	_MDIO_MMD_PCS@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_MDIO_STAT1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_XMDIO_READ
	movl	(%r14), %esi
	movl	(%rbx), %edx
	movq	%r15, %rdi
	callq	_XMDIO_READ
	movq	_MDIO_STAT1_LSTATUS@GOTPCREL(%rip), %rcx
	movl	$1, %r14d
	testl	%eax, (%rcx)
	jne	LBB0_13
## %bb.11:
	movq	8(%r12), %rax
	leaq	1(%rax), %rcx
	movq	%rcx, 8(%r12)
	movq	_XGBE_RRC_FREQUENCY@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	jle	LBB0_13
## %bb.12:
	movq	$0, 8(%r12)
	movq	%r15, %rdi
	callq	_xgbe_phy_rrc
LBB0_13:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_XGBE_PORT_MODE_SFP,8,3         ## @XGBE_PORT_MODE_SFP
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_MDIO_MMD_PCS,4,2               ## @MDIO_MMD_PCS
	.comm	_MDIO_STAT1,4,2                 ## @MDIO_STAT1
	.comm	_MDIO_STAT1_LSTATUS,4,2         ## @MDIO_STAT1_LSTATUS
	.comm	_XGBE_RRC_FREQUENCY,8,3         ## @XGBE_RRC_FREQUENCY
	.no_dead_strip	_xgbe_phy_link_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xgbe_phy_link_status
_xgbe_phy_link_status:                  ; @xgbe_phy_link_status
	.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	x19, x0
	ldr	x21, [x0, #8]
	str	wzr, [x1]
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _XGBE_PORT_MODE_SFP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _XGBE_PORT_MODE_SFP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	mov	x20, x1
	mov	x0, x19
	bl	_xgbe_phy_sfp_detect
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_3
; %bb.2:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_15
LBB0_3:
	ldr	x8, [x21, #32]
	cbnz	x8, LBB0_14
; %bb.4:
	ldr	x8, [x21, #24]
	cbnz	x8, LBB0_14
LBB0_5:
	ldr	x0, [x21, #16]
	cbz	x0, LBB0_10
; %bb.6:
	bl	_phy_read_status
	tbnz	w0, #31, LBB0_14
; %bb.7:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.8:
	ldr	x0, [x21, #16]
	bl	_phy_aneg_done
	cbz	w0, LBB0_15
LBB0_9:
	ldr	x8, [x21, #16]
	ldr	w8, [x8]
	cbz	w8, LBB0_14
LBB0_10:
Lloh6:
	adrp	x20, _MDIO_MMD_PCS@GOTPAGE
Lloh7:
	ldr	x20, [x20, _MDIO_MMD_PCS@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh8:
	adrp	x22, _MDIO_STAT1@GOTPAGE
Lloh9:
	ldr	x22, [x22, _MDIO_STAT1@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_XMDIO_READ
	ldr	w1, [x20]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_XMDIO_READ
Lloh10:
	adrp	x8, _MDIO_STAT1_LSTATUS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MDIO_STAT1_LSTATUS@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_12
; %bb.11:
	mov	w0, #1
	b	LBB0_15
LBB0_12:
	ldr	x8, [x21, #8]
	add	x9, x8, #1
	str	x9, [x21, #8]
Lloh13:
	adrp	x9, _XGBE_RRC_FREQUENCY@GOTPAGE
Lloh14:
	ldr	x9, [x9, _XGBE_RRC_FREQUENCY@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.le	LBB0_14
; %bb.13:
	str	xzr, [x21, #8]
	mov	x0, x19
	bl	_xgbe_phy_rrc
LBB0_14:
	mov	w0, #0
LBB0_15:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_XGBE_PORT_MODE_SFP,8,3         ; @XGBE_PORT_MODE_SFP
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_MDIO_MMD_PCS,4,2               ; @MDIO_MMD_PCS
	.comm	_MDIO_STAT1,4,2                 ; @MDIO_STAT1
	.comm	_MDIO_STAT1_LSTATUS,4,2         ; @MDIO_STAT1_LSTATUS
	.comm	_XGBE_RRC_FREQUENCY,8,3         ; @XGBE_RRC_FREQUENCY
	.no_dead_strip	_xgbe_phy_link_status
.subsections_via_symbols
