	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function marvell_config_aneg
_marvell_config_aneg:                   ## @marvell_config_aneg
	.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	%rdi, %rbx
	movl	8(%rdi), %esi
	callq	_marvell_set_polarity
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_10
## %bb.1:
	movq	_MII_M1111_PHY_LED_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_MII_M1111_PHY_LED_DIRECT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_phy_write
	testl	%eax, %eax
	js	LBB0_9
## %bb.2:
	movq	%rbx, %rdi
	callq	_genphy_config_aneg
	testl	%eax, %eax
	js	LBB0_9
## %bb.3:
	movq	(%rbx), %rax
	movq	_AUTONEG_ENABLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	testl	%r14d, %r14d
	je	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	callq	_genphy_soft_reset
	testl	%eax, %eax
	js	LBB0_9
LBB0_6:
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_9:
	movl	%eax, %r14d
LBB0_10:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MII_M1111_PHY_LED_CONTROL,4,2  ## @MII_M1111_PHY_LED_CONTROL
	.comm	_MII_M1111_PHY_LED_DIRECT,4,2   ## @MII_M1111_PHY_LED_DIRECT
	.comm	_AUTONEG_ENABLE,8,3             ## @AUTONEG_ENABLE
	.no_dead_strip	_marvell_config_aneg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function marvell_config_aneg
_marvell_config_aneg:                   ; @marvell_config_aneg
	.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	x20, x0
	ldr	w1, [x0, #8]
	bl	_marvell_set_polarity
	mov	x19, x0
	tbnz	w0, #31, LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _MII_M1111_PHY_LED_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MII_M1111_PHY_LED_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _MII_M1111_PHY_LED_DIRECT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MII_M1111_PHY_LED_DIRECT@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_phy_write
	tbnz	w0, #31, LBB0_6
; %bb.2:
	mov	x0, x20
	bl	_genphy_config_aneg
	tbnz	w0, #31, LBB0_6
; %bb.3:
	ldr	x8, [x20]
Lloh6:
	adrp	x9, _AUTONEG_ENABLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AUTONEG_ENABLE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	ccmp	w19, #0, #0, eq
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_genphy_soft_reset
	tbnz	w0, #31, LBB0_6
LBB0_5:
	mov	w19, #0
	b	LBB0_7
LBB0_6:
	mov	x19, x0
LBB0_7:
	mov	x0, x19
	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	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MII_M1111_PHY_LED_CONTROL,4,2  ; @MII_M1111_PHY_LED_CONTROL
	.comm	_MII_M1111_PHY_LED_DIRECT,4,2   ; @MII_M1111_PHY_LED_DIRECT
	.comm	_AUTONEG_ENABLE,8,3             ; @AUTONEG_ENABLE
	.no_dead_strip	_marvell_config_aneg
.subsections_via_symbols
