	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcm_phy_downshift_get          ## -- Begin function bcm_phy_downshift_get
	.p2align	4, 0x90
_bcm_phy_downshift_get:                 ## @bcm_phy_downshift_get
	.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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_MII_BCM54XX_AUXCTL_SHDWSEL_MISC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bcm54xx_auxctl_read
	testl	%eax, %eax
	js	LBB0_7
## %bb.1:
	movq	_MII_BCM54XX_AUXCTL_SHDWSEL_MISC_WIRESPEED_EN@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.3:
	movq	_BCM54XX_SHD_SCR2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_bcm_phy_read_shadow
	testl	%eax, %eax
	js	LBB0_7
## %bb.4:
	movq	_BCM54XX_SHD_SCR2_WSPD_RTRY_DIS@GOTPCREL(%rip), %rdx
	movl	$1, %ecx
	testl	%eax, (%rdx)
	jne	LBB0_6
## %bb.5:
	movq	_BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrl	%cl, %eax
	movq	_BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_OFFSET@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	movl	%eax, %ecx
	jmp	LBB0_6
LBB0_2:
	movq	_DOWNSHIFT_DEV_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_6:
	movl	%ecx, (%r14)
	xorl	%eax, %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_BCM54XX_AUXCTL_SHDWSEL_MISC,4,2 ## @MII_BCM54XX_AUXCTL_SHDWSEL_MISC
	.comm	_MII_BCM54XX_AUXCTL_SHDWSEL_MISC_WIRESPEED_EN,4,2 ## @MII_BCM54XX_AUXCTL_SHDWSEL_MISC_WIRESPEED_EN
	.comm	_DOWNSHIFT_DEV_DISABLE,4,2      ## @DOWNSHIFT_DEV_DISABLE
	.comm	_BCM54XX_SHD_SCR2,4,2           ## @BCM54XX_SHD_SCR2
	.comm	_BCM54XX_SHD_SCR2_WSPD_RTRY_DIS,4,2 ## @BCM54XX_SHD_SCR2_WSPD_RTRY_DIS
	.comm	_BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_SHIFT,4,2 ## @BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_SHIFT
	.comm	_BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_MASK,4,2 ## @BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_MASK
	.comm	_BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_OFFSET,4,2 ## @BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bcm_phy_downshift_get          ; -- Begin function bcm_phy_downshift_get
	.p2align	2
_bcm_phy_downshift_get:                 ; @bcm_phy_downshift_get
	.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
	mov	x19, x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w8, w0, w8
Lloh18:
	adrp	x9, _BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	and	w8, w8, w9
Lloh21:
	adrp	x9, _BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_OFFSET@GOTPAGE
Lloh22:
	ldr	x9, [x9, _BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_OFFSET@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	add	w8, w8, w9
LBB0_7:
	mov	w0, #0
	str	w8, [x19]
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_BCM54XX_AUXCTL_SHDWSEL_MISC,4,2 ; @MII_BCM54XX_AUXCTL_SHDWSEL_MISC
	.comm	_MII_BCM54XX_AUXCTL_SHDWSEL_MISC_WIRESPEED_EN,4,2 ; @MII_BCM54XX_AUXCTL_SHDWSEL_MISC_WIRESPEED_EN
	.comm	_DOWNSHIFT_DEV_DISABLE,4,2      ; @DOWNSHIFT_DEV_DISABLE
	.comm	_BCM54XX_SHD_SCR2,4,2           ; @BCM54XX_SHD_SCR2
	.comm	_BCM54XX_SHD_SCR2_WSPD_RTRY_DIS,4,2 ; @BCM54XX_SHD_SCR2_WSPD_RTRY_DIS
	.comm	_BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_SHIFT,4,2 ; @BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_SHIFT
	.comm	_BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_MASK,4,2 ; @BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_MASK
	.comm	_BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_OFFSET,4,2 ; @BCM54XX_SHD_SCR2_WSPD_RTRY_LMT_OFFSET
.subsections_via_symbols
