	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function marvell_read_status_page_an
_marvell_read_status_page_an:           ## @marvell_read_status_page_an
	.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
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	_MII_M1011_PHY_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_phy_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_21
## %bb.1:
	movq	_MII_LPA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_phy_read
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	_MII_STAT1000@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_phy_read
	movl	%eax, %r13d
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_MII_M1011_PHY_STATUS_FULLDUPLEX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	jne	LBB0_6
## %bb.7:
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_2:
	movl	%r14d, %ebx
	jmp	LBB0_21
LBB0_4:
	movl	%r13d, %ebx
	jmp	LBB0_21
LBB0_6:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
LBB0_8:
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	_MII_M1011_PHY_STATUS_SPD_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movq	$0, 8(%r12)
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.10:
	movq	_SPEED_100@GOTPCREL(%rip), %rcx
	cmpl	$128, %eax
	je	LBB0_12
	jmp	LBB0_13
LBB0_9:
	movq	_SPEED_10@GOTPCREL(%rip), %rcx
	cmpl	$128, %eax
	jne	LBB0_13
LBB0_12:
	movq	_SPEED_1000@GOTPCREL(%rip), %rcx
LBB0_13:
	movl	(%rcx), %eax
	movl	%eax, 20(%r12)
	movl	16(%r12), %edi
	movl	%r14d, %esi
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.16:
	callq	_fiber_lpa_mod_linkmode_lpa_t
	movq	(%r12), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.17:
	movq	_LPA_PAUSE_FIBER@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_18
## %bb.19:
	movq	_LPA_PAUSE_ASYM_FIBER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r14d, %eax
	setne	%al
	movl	$1, 8(%r12)
	jmp	LBB0_20
LBB0_14:
	callq	_mii_lpa_to_linkmode_lpa_t
	movl	16(%r12), %edi
	movl	%r13d, %esi
	callq	_mii_stat1000_mod_linkmode_lpa_t
	movq	(%r12), %rax
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.15:
	movq	_LPA_PAUSE_CAP@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%r14d, %eax
	setne	%cl
	movl	%ecx, 8(%r12)
	movq	_LPA_PAUSE_ASYM@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	setne	%al
	jmp	LBB0_20
LBB0_18:
	movl	$0, 8(%r12)
	xorl	%eax, %eax
LBB0_20:
	movzbl	%al, %eax
	movl	%eax, 12(%r12)
	xorl	%ebx, %ebx
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_M1011_PHY_STATUS,4,2       ## @MII_M1011_PHY_STATUS
	.comm	_MII_LPA,4,2                    ## @MII_LPA
	.comm	_MII_STAT1000,4,2               ## @MII_STAT1000
	.comm	_MII_M1011_PHY_STATUS_FULLDUPLEX,4,2 ## @MII_M1011_PHY_STATUS_FULLDUPLEX
	.comm	_DUPLEX_FULL,8,3                ## @DUPLEX_FULL
	.comm	_DUPLEX_HALF,8,3                ## @DUPLEX_HALF
	.comm	_MII_M1011_PHY_STATUS_SPD_MASK,4,2 ## @MII_M1011_PHY_STATUS_SPD_MASK
	.comm	_SPEED_1000,4,2                 ## @SPEED_1000
	.comm	_SPEED_100,4,2                  ## @SPEED_100
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_LPA_PAUSE_CAP,4,2              ## @LPA_PAUSE_CAP
	.comm	_LPA_PAUSE_ASYM,4,2             ## @LPA_PAUSE_ASYM
	.comm	_LPA_PAUSE_FIBER,4,2            ## @LPA_PAUSE_FIBER
	.comm	_LPA_PAUSE_ASYM_FIBER,4,2       ## @LPA_PAUSE_ASYM_FIBER
	.no_dead_strip	_marvell_read_status_page_an
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function marvell_read_status_page_an
_marvell_read_status_page_an:           ; @marvell_read_status_page_an
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _MII_M1011_PHY_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_M1011_PHY_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_phy_read
	mov	x23, x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
Lloh3:
	adrp	x8, _MII_LPA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MII_LPA@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	mov	x20, x0
	tbnz	w0, #31, LBB0_14
; %bb.2:
Lloh6:
	adrp	x8, _MII_STAT1000@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MII_STAT1000@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_phy_read
	mov	x22, x0
	tbnz	w0, #31, LBB0_8
; %bb.3:
Lloh9:
	adrp	x8, _MII_M1011_PHY_STATUS_FULLDUPLEX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MII_M1011_PHY_STATUS_FULLDUPLEX@GOTPAGEOFF]
Lloh11:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
Lloh13:
	adrp	x24, _DUPLEX_FULL@GOTPAGE
Lloh14:
	ldr	x24, [x24, _DUPLEX_FULL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w23
	csel	x8, x9, x24, eq
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _MII_M1011_PHY_STATUS_SPD_MASK@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MII_M1011_PHY_STATUS_SPD_MASK@GOTPAGEOFF]
	str	x8, [x19]
Lloh18:
	ldr	w8, [x9]
	and	w8, w8, w23
Lloh19:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
	str	xzr, [x19, #8]
Lloh21:
	adrp	x10, _SPEED_100@GOTPAGE
Lloh22:
	ldr	x10, [x10, _SPEED_100@GOTPAGEOFF]
Lloh23:
	adrp	x11, _SPEED_10@GOTPAGE
Lloh24:
	ldr	x11, [x11, _SPEED_10@GOTPAGEOFF]
	cmp	w8, #129
	csel	x10, x10, x11, eq
	cmp	w8, #128
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	str	w8, [x19, #20]
	ldr	w0, [x19, #16]
	mov	x1, x20
	cbz	w21, LBB0_9
; %bb.4:
	bl	_fiber_lpa_mod_linkmode_lpa_t
	ldr	x8, [x19]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.5:
Lloh25:
	adrp	x8, _LPA_PAUSE_FIBER@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LPA_PAUSE_FIBER@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.6:
Lloh28:
	adrp	x8, _LPA_PAUSE_ASYM_FIBER@GOTPAGE
Lloh29:
	ldr	x8, [x8, _LPA_PAUSE_ASYM_FIBER@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	tst	w8, w20
	cset	w8, ne
	mov	w9, #1
	str	w9, [x19, #8]
	b	LBB0_13
LBB0_7:
	mov	x20, x23
	b	LBB0_14
LBB0_8:
	mov	x20, x22
	b	LBB0_14
LBB0_9:
	bl	_mii_lpa_to_linkmode_lpa_t
	ldr	w0, [x19, #16]
	mov	x1, x22
	bl	_mii_stat1000_mod_linkmode_lpa_t
	ldr	x8, [x19]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
Lloh31:
	adrp	x8, _LPA_PAUSE_CAP@GOTPAGE
Lloh32:
	ldr	x8, [x8, _LPA_PAUSE_CAP@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	tst	w8, w20
	cset	w8, ne
	str	w8, [x19, #8]
Lloh34:
	adrp	x8, _LPA_PAUSE_ASYM@GOTPAGE
Lloh35:
	ldr	x8, [x8, _LPA_PAUSE_ASYM@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	tst	w8, w20
	cset	w8, ne
	b	LBB0_13
LBB0_11:
	mov	w20, #0
	b	LBB0_14
LBB0_12:
	mov	w8, #0
	str	wzr, [x19, #8]
LBB0_13:
	mov	w20, #0
	str	w8, [x19, #12]
LBB0_14:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_M1011_PHY_STATUS,4,2       ; @MII_M1011_PHY_STATUS
	.comm	_MII_LPA,4,2                    ; @MII_LPA
	.comm	_MII_STAT1000,4,2               ; @MII_STAT1000
	.comm	_MII_M1011_PHY_STATUS_FULLDUPLEX,4,2 ; @MII_M1011_PHY_STATUS_FULLDUPLEX
	.comm	_DUPLEX_FULL,8,3                ; @DUPLEX_FULL
	.comm	_DUPLEX_HALF,8,3                ; @DUPLEX_HALF
	.comm	_MII_M1011_PHY_STATUS_SPD_MASK,4,2 ; @MII_M1011_PHY_STATUS_SPD_MASK
	.comm	_SPEED_1000,4,2                 ; @SPEED_1000
	.comm	_SPEED_100,4,2                  ; @SPEED_100
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_LPA_PAUSE_CAP,4,2              ; @LPA_PAUSE_CAP
	.comm	_LPA_PAUSE_ASYM,4,2             ; @LPA_PAUSE_ASYM
	.comm	_LPA_PAUSE_FIBER,4,2            ; @LPA_PAUSE_FIBER
	.comm	_LPA_PAUSE_ASYM_FIBER,4,2       ; @LPA_PAUSE_ASYM_FIBER
	.no_dead_strip	_marvell_read_status_page_an
.subsections_via_symbols
