	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mv3310_read_status
_mv3310_read_status:                    ## @mv3310_read_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, %rbx
	movq	_SPEED_UNKNOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rdi)
	movq	_DUPLEX_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rdi)
	movl	24(%rdi), %edi
	callq	_linkmode_zero
	movq	$0, 16(%rbx)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 32(%rbx)
	movq	$0, 48(%rbx)
	movq	_MDIO_MMD_PCS@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	_MV_PCS_BASE_R@GOTPCREL(%rip), %rax
	movq	_MDIO_STAT1@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	addq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_phy_read_mmd
	testl	%eax, %eax
	js	LBB0_21
## %bb.1:
	movq	_MDIO_STAT1_LSTATUS@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.22:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mv3310_read_10gbr_status       ## TAILCALL
LBB0_2:
	movq	%rbx, %rdi
	callq	_genphy_c45_read_link
	testl	%eax, %eax
	js	LBB0_21
## %bb.3:
	movq	_MDIO_MMD_AN@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	(%r15), %rdx
	movq	%rbx, %rdi
	callq	_phy_read_mmd
	testl	%eax, %eax
	js	LBB0_21
## %bb.4:
	movq	_MDIO_AN_STAT1_COMPLETE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.5:
	movq	%rbx, %rdi
	callq	_genphy_c45_read_lpa
	testl	%eax, %eax
	js	LBB0_21
## %bb.6:
	movl	(%r12), %esi
	movq	_MV_AN_STAT1000@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_phy_read_mmd
	testl	%eax, %eax
	js	LBB0_21
## %bb.7:
	movl	24(%rbx), %edi
	movl	%eax, %esi
	callq	_mii_stat1000_mod_linkmode_lpa_t
	movq	8(%rbx), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_phy_resolve_aneg_linkmode
LBB0_9:
	movq	8(%rbx), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_genphy_c45_read_pma
	testl	%eax, %eax
	js	LBB0_21
LBB0_11:
	movq	(%rbx), %rax
	movq	_SPEED_10000@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	callq	_genphy_c45_read_mdix
	testl	%eax, %eax
	jns	LBB0_20
	jmp	LBB0_21
LBB0_13:
	movl	(%r14), %esi
	movq	_MV_PCS_PAIRSWAP@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_phy_read_mmd
	testl	%eax, %eax
	js	LBB0_21
## %bb.14:
	movq	_MV_PCS_PAIRSWAP_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%eax, %ecx
	cmpl	$128, %ecx
	jne	LBB0_15
## %bb.16:
	movq	_ETH_TP_MDI@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_15:
	movq	_ETH_TP_MDI_INVALID@GOTPCREL(%rip), %rax
LBB0_17:
	cmpl	$129, %ecx
	jne	LBB0_19
## %bb.18:
	movq	_ETH_TP_MDI_X@GOTPCREL(%rip), %rax
LBB0_19:
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
LBB0_20:
	movq	%rbx, %rdi
	callq	_mv3310_update_interface
	xorl	%eax, %eax
LBB0_21:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEED_UNKNOWN,8,3              ## @SPEED_UNKNOWN
	.comm	_DUPLEX_UNKNOWN,4,2             ## @DUPLEX_UNKNOWN
	.comm	_MDIO_MMD_PCS,4,2               ## @MDIO_MMD_PCS
	.comm	_MV_PCS_BASE_R,8,3              ## @MV_PCS_BASE_R
	.comm	_MDIO_STAT1,8,3                 ## @MDIO_STAT1
	.comm	_MDIO_STAT1_LSTATUS,4,2         ## @MDIO_STAT1_LSTATUS
	.comm	_MDIO_MMD_AN,4,2                ## @MDIO_MMD_AN
	.comm	_MDIO_AN_STAT1_COMPLETE,4,2     ## @MDIO_AN_STAT1_COMPLETE
	.comm	_MV_AN_STAT1000,8,3             ## @MV_AN_STAT1000
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.comm	_SPEED_10000,8,3                ## @SPEED_10000
	.comm	_MV_PCS_PAIRSWAP,8,3            ## @MV_PCS_PAIRSWAP
	.comm	_MV_PCS_PAIRSWAP_MASK,4,2       ## @MV_PCS_PAIRSWAP_MASK
	.comm	_ETH_TP_MDI_X,8,3               ## @ETH_TP_MDI_X
	.comm	_ETH_TP_MDI,8,3                 ## @ETH_TP_MDI
	.comm	_ETH_TP_MDI_INVALID,8,3         ## @ETH_TP_MDI_INVALID
	.no_dead_strip	_mv3310_read_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mv3310_read_status
_mv3310_read_status:                    ; @mv3310_read_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
Lloh0:
	adrp	x8, _SPEED_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SPEED_UNKNOWN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x0]
Lloh3:
	adrp	x8, _DUPLEX_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DUPLEX_UNKNOWN@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x0, #56]
	ldr	w0, [x0, #24]
	bl	_linkmode_zero
	str	xzr, [x19, #16]
	stp	xzr, xzr, [x19, #40]
	str	xzr, [x19, #32]
Lloh6:
	adrp	x20, _MDIO_MMD_PCS@GOTPAGE
Lloh7:
	ldr	x20, [x20, _MDIO_MMD_PCS@GOTPAGEOFF]
Lloh8:
	adrp	x8, _MV_PCS_BASE_R@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MV_PCS_BASE_R@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh10:
	ldr	x8, [x8]
Lloh11:
	adrp	x21, _MDIO_STAT1@GOTPAGE
Lloh12:
	ldr	x21, [x21, _MDIO_STAT1@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x2, x9, x8
	mov	x0, x19
	bl	_phy_read_mmd
	mov	x1, x0
	tbnz	w0, #31, LBB0_15
; %bb.1:
Lloh13:
	adrp	x8, _MDIO_STAT1_LSTATUS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MDIO_STAT1_LSTATUS@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	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
	b	_mv3310_read_10gbr_status
LBB0_3:
	mov	x0, x19
	bl	_genphy_c45_read_link
	tbnz	w0, #31, LBB0_14
; %bb.4:
Lloh16:
	adrp	x22, _MDIO_MMD_AN@GOTPAGE
Lloh17:
	ldr	x22, [x22, _MDIO_MMD_AN@GOTPAGEOFF]
	ldr	w1, [x22]
	ldr	x2, [x21]
	mov	x0, x19
	bl	_phy_read_mmd
	mov	x1, x0
	tbnz	w0, #31, LBB0_15
; %bb.5:
Lloh18:
	adrp	x8, _MDIO_AN_STAT1_COMPLETE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MDIO_AN_STAT1_COMPLETE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_10
; %bb.6:
	mov	x0, x19
	bl	_genphy_c45_read_lpa
	tbnz	w0, #31, LBB0_14
; %bb.7:
	ldr	w1, [x22]
Lloh21:
	adrp	x8, _MV_AN_STAT1000@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MV_AN_STAT1000@GOTPAGEOFF]
Lloh23:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_phy_read_mmd
	mov	x1, x0
	tbnz	w0, #31, LBB0_15
; %bb.8:
	ldr	w0, [x19, #24]
	bl	_mii_stat1000_mod_linkmode_lpa_t
	ldr	x8, [x19, #8]
Lloh24:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_phy_resolve_aneg_linkmode
LBB0_10:
	ldr	x8, [x19, #8]
Lloh27:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh28:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_12
; %bb.11:
	mov	x0, x19
	bl	_genphy_c45_read_pma
	tbnz	w0, #31, LBB0_14
LBB0_12:
	ldr	x8, [x19]
Lloh30:
	adrp	x9, _SPEED_10000@GOTPAGE
Lloh31:
	ldr	x9, [x9, _SPEED_10000@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.13:
	mov	x0, x19
	bl	_genphy_c45_read_mdix
	tbz	w0, #31, LBB0_18
LBB0_14:
	mov	x1, x0
LBB0_15:
	mov	x0, x1
	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
LBB0_16:
	ldr	w1, [x20]
Lloh33:
	adrp	x8, _MV_PCS_PAIRSWAP@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MV_PCS_PAIRSWAP@GOTPAGEOFF]
Lloh35:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_phy_read_mmd
	mov	x1, x0
	tbnz	w0, #31, LBB0_15
; %bb.17:
Lloh36:
	adrp	x8, _MV_PCS_PAIRSWAP_MASK@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MV_PCS_PAIRSWAP_MASK@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	and	w8, w8, w1
Lloh39:
	adrp	x9, _ETH_TP_MDI_X@GOTPAGE
Lloh40:
	ldr	x9, [x9, _ETH_TP_MDI_X@GOTPAGEOFF]
Lloh41:
	adrp	x10, _ETH_TP_MDI@GOTPAGE
Lloh42:
	ldr	x10, [x10, _ETH_TP_MDI@GOTPAGEOFF]
Lloh43:
	adrp	x11, _ETH_TP_MDI_INVALID@GOTPAGE
Lloh44:
	ldr	x11, [x11, _ETH_TP_MDI_INVALID@GOTPAGEOFF]
	cmp	w8, #128
	csel	x10, x10, x11, eq
	cmp	w8, #129
	csel	x8, x9, x10, eq
	ldr	x8, [x8]
	str	x8, [x19, #16]
LBB0_18:
	mov	x0, x19
	bl	_mv3310_update_interface
	mov	w1, #0
	b	LBB0_15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEED_UNKNOWN,8,3              ; @SPEED_UNKNOWN
	.comm	_DUPLEX_UNKNOWN,4,2             ; @DUPLEX_UNKNOWN
	.comm	_MDIO_MMD_PCS,4,2               ; @MDIO_MMD_PCS
	.comm	_MV_PCS_BASE_R,8,3              ; @MV_PCS_BASE_R
	.comm	_MDIO_STAT1,8,3                 ; @MDIO_STAT1
	.comm	_MDIO_STAT1_LSTATUS,4,2         ; @MDIO_STAT1_LSTATUS
	.comm	_MDIO_MMD_AN,4,2                ; @MDIO_MMD_AN
	.comm	_MDIO_AN_STAT1_COMPLETE,4,2     ; @MDIO_AN_STAT1_COMPLETE
	.comm	_MV_AN_STAT1000,8,3             ; @MV_AN_STAT1000
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.comm	_SPEED_10000,8,3                ; @SPEED_10000
	.comm	_MV_PCS_PAIRSWAP,8,3            ; @MV_PCS_PAIRSWAP
	.comm	_MV_PCS_PAIRSWAP_MASK,4,2       ; @MV_PCS_PAIRSWAP_MASK
	.comm	_ETH_TP_MDI_X,8,3               ; @ETH_TP_MDI_X
	.comm	_ETH_TP_MDI,8,3                 ; @ETH_TP_MDI
	.comm	_ETH_TP_MDI_INVALID,8,3         ; @ETH_TP_MDI_INVALID
	.no_dead_strip	_mv3310_read_status
.subsections_via_symbols
