	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function marvell_read_link
_marvell_read_link:                     ## @marvell_read_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	xorl	%r14d, %r14d
	cmpq	$0, 16(%rdi)
	je	LBB0_12
## %bb.1:
	movq	%rdi, %rbx
	movq	_MII_M1011_PHY_SPEC_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sungem_phy_read
	movq	_MII_M1011_PHY_SPEC_STATUS_RESOLVED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.3:
	movq	_MII_M1011_PHY_SPEC_STATUS_1000@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	movq	_MII_M1011_PHY_SPEC_STATUS_100@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	jne	LBB0_4
## %bb.5:
	movq	_SPEED_10@GOTPCREL(%rip), %rdx
	testl	%ecx, %ecx
	jne	LBB0_7
	jmp	LBB0_8
LBB0_2:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_4:
	movq	_SPEED_100@GOTPCREL(%rip), %rdx
	testl	%ecx, %ecx
	je	LBB0_8
LBB0_7:
	movq	_SPEED_1000@GOTPCREL(%rip), %rdx
LBB0_8:
	movl	(%rdx), %ecx
	movl	%ecx, 8(%rbx)
	movq	_MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	jne	LBB0_9
## %bb.10:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_9:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
LBB0_11:
	movl	(%rcx), %ecx
	movl	%ecx, 4(%rbx)
	movq	_MII_M1011_PHY_SPEC_STATUS_TX_PAUSE@GOTPCREL(%rip), %rcx
	movq	_MII_M1011_PHY_SPEC_STATUS_RX_PAUSE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	notl	%eax
	xorl	%ecx, %ecx
	testl	%eax, %edx
	sete	%cl
	movl	%ecx, (%rbx)
LBB0_12:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_M1011_PHY_SPEC_STATUS,4,2  ## @MII_M1011_PHY_SPEC_STATUS
	.comm	_MII_M1011_PHY_SPEC_STATUS_RESOLVED,4,2 ## @MII_M1011_PHY_SPEC_STATUS_RESOLVED
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_MII_M1011_PHY_SPEC_STATUS_1000,4,2 ## @MII_M1011_PHY_SPEC_STATUS_1000
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_MII_M1011_PHY_SPEC_STATUS_100,4,2 ## @MII_M1011_PHY_SPEC_STATUS_100
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX,4,2 ## @MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX
	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_MII_M1011_PHY_SPEC_STATUS_TX_PAUSE,4,2 ## @MII_M1011_PHY_SPEC_STATUS_TX_PAUSE
	.comm	_MII_M1011_PHY_SPEC_STATUS_RX_PAUSE,4,2 ## @MII_M1011_PHY_SPEC_STATUS_RX_PAUSE
	.no_dead_strip	_marvell_read_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function marvell_read_link
_marvell_read_link:                     ; @marvell_read_link
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _MII_M1011_PHY_SPEC_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_M1011_PHY_SPEC_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_sungem_phy_read
Lloh3:
	adrp	x9, _MII_M1011_PHY_SPEC_STATUS_RESOLVED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MII_M1011_PHY_SPEC_STATUS_RESOLVED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w0
	b.eq	LBB0_4
; %bb.2:
	mov	x8, x0
	mov	w0, #0
Lloh6:
	adrp	x9, _MII_M1011_PHY_SPEC_STATUS_1000@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MII_M1011_PHY_SPEC_STATUS_1000@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _MII_M1011_PHY_SPEC_STATUS_100@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MII_M1011_PHY_SPEC_STATUS_100@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
Lloh12:
	adrp	x11, _SPEED_10@GOTPAGE
Lloh13:
	ldr	x11, [x11, _SPEED_10@GOTPAGEOFF]
	tst	w10, w8
Lloh14:
	adrp	x10, _SPEED_100@GOTPAGE
Lloh15:
	ldr	x10, [x10, _SPEED_100@GOTPAGEOFF]
	csel	x10, x11, x10, eq
Lloh16:
	adrp	x11, _SPEED_1000@GOTPAGE
Lloh17:
	ldr	x11, [x11, _SPEED_1000@GOTPAGEOFF]
	tst	w9, w8
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
	str	w9, [x19, #8]
Lloh18:
	adrp	x9, _MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX@GOTPAGE
Lloh19:
	ldr	x9, [x9, _MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
Lloh21:
	adrp	x10, _DUPLEX_HALF@GOTPAGE
Lloh22:
	ldr	x10, [x10, _DUPLEX_HALF@GOTPAGEOFF]
Lloh23:
	adrp	x11, _DUPLEX_FULL@GOTPAGE
Lloh24:
	ldr	x11, [x11, _DUPLEX_FULL@GOTPAGEOFF]
	tst	w9, w8
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
Lloh25:
	adrp	x10, _MII_M1011_PHY_SPEC_STATUS_TX_PAUSE@GOTPAGE
Lloh26:
	ldr	x10, [x10, _MII_M1011_PHY_SPEC_STATUS_TX_PAUSE@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
Lloh28:
	adrp	x11, _MII_M1011_PHY_SPEC_STATUS_RX_PAUSE@GOTPAGE
Lloh29:
	ldr	x11, [x11, _MII_M1011_PHY_SPEC_STATUS_RX_PAUSE@GOTPAGEOFF]
Lloh30:
	ldr	w11, [x11]
	orr	w10, w11, w10
	bics	wzr, w10, w8
	cset	w8, eq
	stp	w8, w9, [x19]
	b	LBB0_5
LBB0_3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh31:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_M1011_PHY_SPEC_STATUS,4,2  ; @MII_M1011_PHY_SPEC_STATUS
	.comm	_MII_M1011_PHY_SPEC_STATUS_RESOLVED,4,2 ; @MII_M1011_PHY_SPEC_STATUS_RESOLVED
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_MII_M1011_PHY_SPEC_STATUS_1000,4,2 ; @MII_M1011_PHY_SPEC_STATUS_1000
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_MII_M1011_PHY_SPEC_STATUS_100,4,2 ; @MII_M1011_PHY_SPEC_STATUS_100
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX,4,2 ; @MII_M1011_PHY_SPEC_STATUS_FULLDUPLEX
	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_MII_M1011_PHY_SPEC_STATUS_TX_PAUSE,4,2 ; @MII_M1011_PHY_SPEC_STATUS_TX_PAUSE
	.comm	_MII_M1011_PHY_SPEC_STATUS_RX_PAUSE,4,2 ; @MII_M1011_PHY_SPEC_STATUS_RX_PAUSE
	.no_dead_strip	_marvell_read_link
.subsections_via_symbols
