	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function marvell_set_downshift
_marvell_set_downshift:                 ## @marvell_set_downshift
	.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
	movl	%edx, %ebx
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	_MII_M1011_PHY_SCR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_phy_read
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	movq	_MII_M1011_PHY_SRC_DOWNSHIFT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%eax, %edx
	decl	%ebx
	movq	_MII_M1011_PHY_SCR_DOWNSHIFT_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.2:
	movq	_MII_M1011_PHY_SCR_DOWNSHIFT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_3:
	orl	%r15d, %ebx
	orl	%ebx, %edx
	movl	(%r12), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_phy_write                      ## TAILCALL
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_M1011_PHY_SCR,4,2          ## @MII_M1011_PHY_SCR
	.comm	_MII_M1011_PHY_SRC_DOWNSHIFT_MASK,4,2 ## @MII_M1011_PHY_SRC_DOWNSHIFT_MASK
	.comm	_MII_M1011_PHY_SCR_DOWNSHIFT_SHIFT,4,2 ## @MII_M1011_PHY_SCR_DOWNSHIFT_SHIFT
	.comm	_MII_M1011_PHY_SCR_DOWNSHIFT_EN,4,2 ## @MII_M1011_PHY_SCR_DOWNSHIFT_EN
	.no_dead_strip	_marvell_set_downshift
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function marvell_set_downshift
_marvell_set_downshift:                 ; @marvell_set_downshift
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _MII_M1011_PHY_SCR@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MII_M1011_PHY_SCR@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_phy_read
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _MII_M1011_PHY_SRC_DOWNSHIFT_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MII_M1011_PHY_SRC_DOWNSHIFT_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w8, w8, w0
	sub	w9, w21, #1
Lloh5:
	adrp	x10, _MII_M1011_PHY_SCR_DOWNSHIFT_SHIFT@GOTPAGE
Lloh6:
	ldr	x10, [x10, _MII_M1011_PHY_SCR_DOWNSHIFT_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _MII_M1011_PHY_SCR_DOWNSHIFT_EN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MII_M1011_PHY_SCR_DOWNSHIFT_EN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w20, #0
	csel	w9, wzr, w9, eq
	orr	w2, w8, w9
	ldr	w1, [x22]
	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	_phy_write
LBB0_2:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_M1011_PHY_SCR,4,2          ; @MII_M1011_PHY_SCR
	.comm	_MII_M1011_PHY_SRC_DOWNSHIFT_MASK,4,2 ; @MII_M1011_PHY_SRC_DOWNSHIFT_MASK
	.comm	_MII_M1011_PHY_SCR_DOWNSHIFT_SHIFT,4,2 ; @MII_M1011_PHY_SCR_DOWNSHIFT_SHIFT
	.comm	_MII_M1011_PHY_SCR_DOWNSHIFT_EN,4,2 ; @MII_M1011_PHY_SCR_DOWNSHIFT_EN
	.no_dead_strip	_marvell_set_downshift
.subsections_via_symbols
