	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function marvell_setup_aneg
_marvell_setup_aneg:                    ## @marvell_setup_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	$1, (%rdi)
	movq	_SPEED_10@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rdi)
	movq	_DUPLEX_HALF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rdi)
	movq	$0, 8(%rdi)
	movl	%esi, 4(%rdi)
	movq	_MII_ADVERTISE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_sungem_phy_read
	movq	_ADVERTISE_ALL@GOTPCREL(%rip), %rcx
	movq	_ADVERTISE_100BASE4@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movq	_ADVERTISED_10baseT_Half@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%ebx, %edx
	je	LBB0_2
## %bb.1:
	movq	_ADVERTISE_10HALF@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
LBB0_2:
	orl	(%rcx), %esi
	movq	_ADVERTISED_10baseT_Full@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ebx, %ecx
	je	LBB0_4
## %bb.3:
	movq	_ADVERTISE_10FULL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
LBB0_4:
	notl	%esi
	movq	_ADVERTISED_100baseT_Half@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	andl	%ebx, %edi
	je	LBB0_6
## %bb.5:
	movq	_ADVERTISE_100HALF@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
LBB0_6:
	andl	%esi, %eax
	movq	_ADVERTISED_100baseT_Full@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	andl	%ebx, %esi
	je	LBB0_8
## %bb.7:
	movq	_ADVERTISE_100FULL@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
LBB0_8:
	orl	%eax, %edx
	orl	%edi, %ecx
	movq	_ADVERTISED_Pause@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	je	LBB0_10
## %bb.9:
	movq	_ADVERTISE_PAUSE_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	orl	%eax, %esi
	orl	%ecx, %edx
	movq	_ADVERTISED_Asym_Pause@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	je	LBB0_12
## %bb.11:
	movq	_ADVERTISE_PAUSE_ASYM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_12:
	orl	%eax, %esi
	orl	%esi, %edx
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_sungem_phy_write
	movq	_MII_M1011_PHY_SPEC_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_sungem_phy_read
	movq	_MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_MII_1000BASETCONTROL_FULLDUPLEXCAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_MII_1000BASETCONTROL_HALFDUPLEXCAP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, %esi
	orl	%ecx, %esi
	notl	%esi
	andl	%eax, %esi
	movq	_SUPPORTED_1000baseT_Half@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	cmovnel	%edx, %eax
	movq	_SUPPORTED_1000baseT_Full@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ebx
	cmovnel	%ecx, %ebx
	orl	%eax, %ebx
	orl	%esi, %ebx
	movq	_MII_1000BASETCONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_sungem_phy_write
	movq	_MII_BMCR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_sungem_phy_read
	movq	_BMCR_ANENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_BMCR_ANRESTART@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_sungem_phy_write
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SPEED_10,4,2                   ## @SPEED_10
	.comm	_DUPLEX_HALF,4,2                ## @DUPLEX_HALF
	.comm	_MII_ADVERTISE,4,2              ## @MII_ADVERTISE
	.comm	_ADVERTISE_ALL,4,2              ## @ADVERTISE_ALL
	.comm	_ADVERTISE_100BASE4,4,2         ## @ADVERTISE_100BASE4
	.comm	_ADVERTISED_10baseT_Half,4,2    ## @ADVERTISED_10baseT_Half
	.comm	_ADVERTISE_10HALF,4,2           ## @ADVERTISE_10HALF
	.comm	_ADVERTISED_10baseT_Full,4,2    ## @ADVERTISED_10baseT_Full
	.comm	_ADVERTISE_10FULL,4,2           ## @ADVERTISE_10FULL
	.comm	_ADVERTISED_100baseT_Half,4,2   ## @ADVERTISED_100baseT_Half
	.comm	_ADVERTISE_100HALF,4,2          ## @ADVERTISE_100HALF
	.comm	_ADVERTISED_100baseT_Full,4,2   ## @ADVERTISED_100baseT_Full
	.comm	_ADVERTISE_100FULL,4,2          ## @ADVERTISE_100FULL
	.comm	_ADVERTISED_Pause,4,2           ## @ADVERTISED_Pause
	.comm	_ADVERTISE_PAUSE_CAP,4,2        ## @ADVERTISE_PAUSE_CAP
	.comm	_ADVERTISED_Asym_Pause,4,2      ## @ADVERTISED_Asym_Pause
	.comm	_ADVERTISE_PAUSE_ASYM,4,2       ## @ADVERTISE_PAUSE_ASYM
	.comm	_MII_M1011_PHY_SPEC_CONTROL,4,2 ## @MII_M1011_PHY_SPEC_CONTROL
	.comm	_MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX,4,2 ## @MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX
	.comm	_MII_1000BASETCONTROL_FULLDUPLEXCAP,4,2 ## @MII_1000BASETCONTROL_FULLDUPLEXCAP
	.comm	_MII_1000BASETCONTROL_HALFDUPLEXCAP,4,2 ## @MII_1000BASETCONTROL_HALFDUPLEXCAP
	.comm	_SUPPORTED_1000baseT_Half,4,2   ## @SUPPORTED_1000baseT_Half
	.comm	_SUPPORTED_1000baseT_Full,4,2   ## @SUPPORTED_1000baseT_Full
	.comm	_MII_1000BASETCONTROL,4,2       ## @MII_1000BASETCONTROL
	.comm	_MII_BMCR,4,2                   ## @MII_BMCR
	.comm	_BMCR_ANENABLE,4,2              ## @BMCR_ANENABLE
	.comm	_BMCR_ANRESTART,4,2             ## @BMCR_ANRESTART
	.no_dead_strip	_marvell_setup_aneg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function marvell_setup_aneg
_marvell_setup_aneg:                    ; @marvell_setup_aneg
	.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	x20, x1
	mov	x19, x0
	mov	w8, #1
Lloh0:
	adrp	x9, _SPEED_10@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SPEED_10@GOTPAGEOFF]
	str	w8, [x0]
Lloh2:
	ldr	w8, [x9]
Lloh3:
	adrp	x9, _DUPLEX_HALF@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DUPLEX_HALF@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #16]
	str	xzr, [x0, #8]
	str	w1, [x0, #4]
Lloh6:
	adrp	x21, _MII_ADVERTISE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MII_ADVERTISE@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_sungem_phy_read
Lloh8:
	adrp	x8, _ADVERTISE_ALL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ADVERTISE_ALL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _ADVERTISE_100BASE4@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ADVERTISE_100BASE4@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _ADVERTISED_10baseT_Half@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ADVERTISED_10baseT_Half@GOTPAGEOFF]
	bic	w8, w0, w8
Lloh16:
	ldr	w9, [x9]
Lloh17:
	adrp	x10, _ADVERTISE_10HALF@GOTPAGE
Lloh18:
	ldr	x10, [x10, _ADVERTISE_10HALF@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, wzr, w10, eq
	orr	w8, w9, w8
Lloh20:
	adrp	x9, _ADVERTISED_10baseT_Full@GOTPAGE
Lloh21:
	ldr	x9, [x9, _ADVERTISED_10baseT_Full@GOTPAGEOFF]
Lloh22:
	adrp	x10, _ADVERTISE_10FULL@GOTPAGE
Lloh23:
	ldr	x10, [x10, _ADVERTISE_10FULL@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
Lloh25:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, wzr, w10, eq
Lloh26:
	adrp	x10, _ADVERTISED_100baseT_Half@GOTPAGE
Lloh27:
	ldr	x10, [x10, _ADVERTISED_100baseT_Half@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh28:
	ldr	w9, [x10]
Lloh29:
	adrp	x10, _ADVERTISE_100HALF@GOTPAGE
Lloh30:
	ldr	x10, [x10, _ADVERTISE_100HALF@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
Lloh32:
	adrp	x9, _ADVERTISED_100baseT_Full@GOTPAGE
Lloh33:
	ldr	x9, [x9, _ADVERTISED_100baseT_Full@GOTPAGEOFF]
Lloh34:
	adrp	x10, _ADVERTISE_100FULL@GOTPAGE
Lloh35:
	ldr	x10, [x10, _ADVERTISE_100FULL@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
Lloh37:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, wzr, w10, eq
Lloh38:
	adrp	x10, _ADVERTISED_Pause@GOTPAGE
Lloh39:
	ldr	x10, [x10, _ADVERTISED_Pause@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh40:
	ldr	w9, [x10]
Lloh41:
	adrp	x10, _ADVERTISE_PAUSE_CAP@GOTPAGE
Lloh42:
	ldr	x10, [x10, _ADVERTISE_PAUSE_CAP@GOTPAGEOFF]
Lloh43:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, wzr, w10, eq
	orr	w8, w8, w9
Lloh44:
	adrp	x9, _ADVERTISED_Asym_Pause@GOTPAGE
Lloh45:
	ldr	x9, [x9, _ADVERTISED_Asym_Pause@GOTPAGEOFF]
Lloh46:
	adrp	x10, _ADVERTISE_PAUSE_ASYM@GOTPAGE
Lloh47:
	ldr	x10, [x10, _ADVERTISE_PAUSE_ASYM@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
Lloh49:
	ldr	w10, [x10]
	tst	w9, w20
	csel	w9, wzr, w10, eq
	orr	w2, w8, w9
	ldr	w1, [x21]
	mov	x0, x19
	bl	_sungem_phy_write
Lloh50:
	adrp	x8, _MII_M1011_PHY_SPEC_CONTROL@GOTPAGE
Lloh51:
	ldr	x8, [x8, _MII_M1011_PHY_SPEC_CONTROL@GOTPAGEOFF]
Lloh52:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sungem_phy_read
Lloh53:
	adrp	x8, _MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX@GOTPAGE
Lloh54:
	ldr	x8, [x8, _MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh56:
	adrp	x9, _MII_1000BASETCONTROL_FULLDUPLEXCAP@GOTPAGE
Lloh57:
	ldr	x9, [x9, _MII_1000BASETCONTROL_FULLDUPLEXCAP@GOTPAGEOFF]
Lloh58:
	ldr	w9, [x9]
Lloh59:
	adrp	x10, _MII_1000BASETCONTROL_HALFDUPLEXCAP@GOTPAGE
Lloh60:
	ldr	x10, [x10, _MII_1000BASETCONTROL_HALFDUPLEXCAP@GOTPAGEOFF]
Lloh61:
	ldr	w10, [x10]
	orr	w11, w10, w9
	bic	w8, w8, w11
Lloh62:
	adrp	x11, _SUPPORTED_1000baseT_Half@GOTPAGE
Lloh63:
	ldr	x11, [x11, _SUPPORTED_1000baseT_Half@GOTPAGEOFF]
Lloh64:
	ldr	w11, [x11]
	tst	w11, w20
	csel	w10, wzr, w10, eq
	orr	w8, w10, w8
Lloh65:
	adrp	x10, _SUPPORTED_1000baseT_Full@GOTPAGE
Lloh66:
	ldr	x10, [x10, _SUPPORTED_1000baseT_Full@GOTPAGEOFF]
Lloh67:
	ldr	w10, [x10]
	tst	w10, w20
	csel	w9, wzr, w9, eq
	orr	w2, w8, w9
Lloh68:
	adrp	x8, _MII_1000BASETCONTROL@GOTPAGE
Lloh69:
	ldr	x8, [x8, _MII_1000BASETCONTROL@GOTPAGEOFF]
Lloh70:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_sungem_phy_write
Lloh71:
	adrp	x20, _MII_BMCR@GOTPAGE
Lloh72:
	ldr	x20, [x20, _MII_BMCR@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_sungem_phy_read
Lloh73:
	adrp	x8, _BMCR_ANENABLE@GOTPAGE
Lloh74:
	ldr	x8, [x8, _BMCR_ANENABLE@GOTPAGEOFF]
Lloh75:
	ldr	w8, [x8]
Lloh76:
	adrp	x9, _BMCR_ANRESTART@GOTPAGE
Lloh77:
	ldr	x9, [x9, _BMCR_ANRESTART@GOTPAGEOFF]
Lloh78:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w2, w8, w9
	ldr	w1, [x20]
	mov	x0, x19
	bl	_sungem_phy_write
	mov	w0, #0
	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 AdrpLdrGotLdr	Lloh76, Lloh77, Lloh78
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpLdrGotLdr	Lloh65, Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh48
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh36
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SPEED_10,4,2                   ; @SPEED_10
	.comm	_DUPLEX_HALF,4,2                ; @DUPLEX_HALF
	.comm	_MII_ADVERTISE,4,2              ; @MII_ADVERTISE
	.comm	_ADVERTISE_ALL,4,2              ; @ADVERTISE_ALL
	.comm	_ADVERTISE_100BASE4,4,2         ; @ADVERTISE_100BASE4
	.comm	_ADVERTISED_10baseT_Half,4,2    ; @ADVERTISED_10baseT_Half
	.comm	_ADVERTISE_10HALF,4,2           ; @ADVERTISE_10HALF
	.comm	_ADVERTISED_10baseT_Full,4,2    ; @ADVERTISED_10baseT_Full
	.comm	_ADVERTISE_10FULL,4,2           ; @ADVERTISE_10FULL
	.comm	_ADVERTISED_100baseT_Half,4,2   ; @ADVERTISED_100baseT_Half
	.comm	_ADVERTISE_100HALF,4,2          ; @ADVERTISE_100HALF
	.comm	_ADVERTISED_100baseT_Full,4,2   ; @ADVERTISED_100baseT_Full
	.comm	_ADVERTISE_100FULL,4,2          ; @ADVERTISE_100FULL
	.comm	_ADVERTISED_Pause,4,2           ; @ADVERTISED_Pause
	.comm	_ADVERTISE_PAUSE_CAP,4,2        ; @ADVERTISE_PAUSE_CAP
	.comm	_ADVERTISED_Asym_Pause,4,2      ; @ADVERTISED_Asym_Pause
	.comm	_ADVERTISE_PAUSE_ASYM,4,2       ; @ADVERTISE_PAUSE_ASYM
	.comm	_MII_M1011_PHY_SPEC_CONTROL,4,2 ; @MII_M1011_PHY_SPEC_CONTROL
	.comm	_MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX,4,2 ; @MII_M1011_PHY_SPEC_CONTROL_AUTO_MDIX
	.comm	_MII_1000BASETCONTROL_FULLDUPLEXCAP,4,2 ; @MII_1000BASETCONTROL_FULLDUPLEXCAP
	.comm	_MII_1000BASETCONTROL_HALFDUPLEXCAP,4,2 ; @MII_1000BASETCONTROL_HALFDUPLEXCAP
	.comm	_SUPPORTED_1000baseT_Half,4,2   ; @SUPPORTED_1000baseT_Half
	.comm	_SUPPORTED_1000baseT_Full,4,2   ; @SUPPORTED_1000baseT_Full
	.comm	_MII_1000BASETCONTROL,4,2       ; @MII_1000BASETCONTROL
	.comm	_MII_BMCR,4,2                   ; @MII_BMCR
	.comm	_BMCR_ANENABLE,4,2              ; @BMCR_ANENABLE
	.comm	_BMCR_ANRESTART,4,2             ; @BMCR_ANRESTART
	.no_dead_strip	_marvell_setup_aneg
.subsections_via_symbols
