	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvneta_mac_link_up
_mvneta_mac_link_up:                    ## @mvneta_mac_link_up
	.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	%rcx, %r14
	movl	%esi, %ebx
	movl	(%rdi), %edi
	callq	_to_net_dev
	movq	%rax, %rdi
	callq	_netdev_priv
	movq	%rax, %r12
	movl	%ebx, %edi
	callq	_phylink_autoneg_inband
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	_MVNETA_GMAC_AUTONEG_CONFIG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_mvreg_read
	movq	_MVNETA_GMAC_FORCE_LINK_DOWN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movq	_MVNETA_GMAC_FORCE_LINK_PASS@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_mvreg_write
LBB0_2:
	movq	%r12, %rdi
	callq	_mvneta_port_up
	testq	%r14, %r14
	je	LBB0_7
## %bb.3:
	cmpq	$0, 16(%r12)
	je	LBB0_7
## %bb.4:
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_phy_init_eee
	movq	%rax, %rcx
	shrq	$63, %rcx
	xorl	$1, %ecx
	movl	%ecx, (%r12)
	testq	%rax, %rax
	js	LBB0_6
## %bb.5:
	xorl	%r15d, %r15d
	cmpq	$0, 8(%r12)
	setne	%r15b
LBB0_6:
	movq	%r12, %rdi
	movl	%r15d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mvneta_set_eee                 ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MVNETA_GMAC_AUTONEG_CONFIG,4,2 ## @MVNETA_GMAC_AUTONEG_CONFIG
	.comm	_MVNETA_GMAC_FORCE_LINK_DOWN,4,2 ## @MVNETA_GMAC_FORCE_LINK_DOWN
	.comm	_MVNETA_GMAC_FORCE_LINK_PASS,4,2 ## @MVNETA_GMAC_FORCE_LINK_PASS
	.no_dead_strip	_mvneta_mac_link_up
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvneta_mac_link_up
_mvneta_mac_link_up:                    ; @mvneta_mac_link_up
	.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, x3
	mov	x21, x1
	ldr	w0, [x0]
	bl	_to_net_dev
	bl	_netdev_priv
	mov	x19, x0
	mov	x0, x21
	bl	_phylink_autoneg_inband
	cbnz	w0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x21, _MVNETA_GMAC_AUTONEG_CONFIG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MVNETA_GMAC_AUTONEG_CONFIG@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_mvreg_read
Lloh2:
	adrp	x8, _MVNETA_GMAC_FORCE_LINK_DOWN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MVNETA_GMAC_FORCE_LINK_DOWN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh5:
	adrp	x9, _MVNETA_GMAC_FORCE_LINK_PASS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MVNETA_GMAC_FORCE_LINK_PASS@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w2, w8, w9
	ldr	w1, [x21]
	mov	x0, x19
	bl	_mvreg_write
LBB0_2:
	mov	x0, x19
	bl	_mvneta_port_up
	cbz	x20, LBB0_6
; %bb.3:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_6
; %bb.4:
	mov	x0, x20
	mov	w1, #0
	bl	_phy_init_eee
	lsr	x8, x0, #63
	eor	w8, w8, #0x1
	str	w8, [x19]
	tbnz	x0, #63, LBB0_7
; %bb.5:
	ldr	x8, [x19, #8]
	cmp	x8, #0
	cset	w1, ne
	b	LBB0_8
LBB0_6:
	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_7:
	mov	w1, #0
LBB0_8:
	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	_mvneta_set_eee
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_MVNETA_GMAC_AUTONEG_CONFIG,4,2 ; @MVNETA_GMAC_AUTONEG_CONFIG
	.comm	_MVNETA_GMAC_FORCE_LINK_DOWN,4,2 ; @MVNETA_GMAC_FORCE_LINK_DOWN
	.comm	_MVNETA_GMAC_FORCE_LINK_PASS,4,2 ; @MVNETA_GMAC_FORCE_LINK_PASS
	.no_dead_strip	_mvneta_mac_link_up
.subsections_via_symbols
