	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ave_phy_adjust_link
_ave_phy_adjust_link:                   ## @ave_phy_adjust_link
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r13
	movq	(%rbx), %r12
	movq	_AVE_TXCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	callq	_readl
	movq	_AVE_TXCR_TXSPD_100@GOTPCREL(%rip), %r14
	movq	_AVE_TXCR_TXSPD_1G@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	orl	(%r14), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movq	%r12, %rdi
	callq	_phy_interface_is_rgmii
	movq	(%r12), %rcx
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_SPEED_1000@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_3
## %bb.2:
	orl	(%r15), %ebx
	jmp	LBB0_5
LBB0_3:
	movq	_SPEED_100@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	jne	LBB0_5
## %bb.4:
	orl	(%r14), %ebx
LBB0_5:
	movq	_AVE_TXCR@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	addq	(%r13), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	%r12, %rdi
	callq	_phy_interface_is_rgmii
	testq	%rax, %rax
	jne	LBB0_7
## %bb.6:
	movq	_AVE_LINKSEL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r13), %rdi
	callq	_readl
	movq	(%r12), %rcx
	movq	_SPEED_10@GOTPCREL(%rip), %rdx
	movq	_AVE_LINKSEL_100M@GOTPCREL(%rip), %rsi
	movl	(%rsi), %edi
	movl	%edi, %esi
	notl	%esi
	andl	%eax, %esi
	orl	%eax, %edi
	cmpq	(%rdx), %rcx
	cmovel	%esi, %edi
	movq	(%rbx), %rsi
	addq	(%r13), %rsi
	callq	_writel
LBB0_7:
	movq	_AVE_RXCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%r13), %rdi
	callq	_readl
	movl	%eax, %r15d
	movq	(%r14), %rdi
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	addq	(%r13), %rdi
	callq	_readl
	movl	%eax, %r13d
	cmpq	$0, 32(%r12)
	movq	_AVE_RXCR_FDUPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	je	LBB0_16
## %bb.8:
	xorl	%ebx, %ebx
	cmpq	$0, 24(%r12)
	movl	$0, %eax
	je	LBB0_10
## %bb.9:
	movq	_LPA_PAUSE_CAP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	cmpq	$0, 16(%r12)
	je	LBB0_12
## %bb.11:
	movq	_LPA_PAUSE_ASYM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_12:
	orl	%eax, %ebx
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	orl	%r15d, %r14d
	movl	8(%r12), %edi
	callq	_linkmode_adv_to_lcl_adv_t
	movl	%eax, %edi
	movl	%ebx, %esi
	callq	_mii_resolve_flowctrl_fdx
	movq	_FLOW_CTRL_TX@GOTPCREL(%rip), %rcx
	movq	_AVE_TXCR_FLOCTR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	movl	%ebx, %edx
	orl	%r13d, %edx
	notl	%ebx
	andl	%r13d, %ebx
	testl	%eax, (%rcx)
	cmovnel	%edx, %ebx
	movq	_FLOW_CTRL_RX@GOTPCREL(%rip), %rcx
	movq	_AVE_RXCR_FLOCTR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r15d
	testl	%eax, (%rcx)
	je	LBB0_15
## %bb.13:
	orl	%r14d, %r15d
	jmp	LBB0_14
LBB0_16:
	movq	_AVE_RXCR_FLOCTR@GOTPCREL(%rip), %rax
	orl	(%rax), %r14d
	notl	%r14d
	andl	%r15d, %r14d
	movq	_AVE_TXCR_FLOCTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r13d
	movl	%r15d, %eax
	movl	%r14d, %r15d
	movl	%r13d, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	cmpl	%r15d, %eax
	jne	LBB0_18
	jmp	LBB0_19
LBB0_15:
	notl	%r15d
	andl	%r14d, %r15d
LBB0_14:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	%r15d, %eax
	je	LBB0_19
LBB0_18:
	movq	_AVE_RXCR_RXEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	notl	%edi
	andl	%r15d, %edi
	movq	_AVE_RXCR@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	addq	(%r14), %rsi
	callq	_writel
	movq	_AVE_TXCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	(%r13), %rsi
	addq	(%r14), %rsi
	movl	%r15d, %edi
	callq	_writel
LBB0_19:
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_phy_print_status               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AVE_TXCR,8,3                   ## @AVE_TXCR
	.comm	_AVE_TXCR_TXSPD_100,4,2         ## @AVE_TXCR_TXSPD_100
	.comm	_AVE_TXCR_TXSPD_1G,4,2          ## @AVE_TXCR_TXSPD_1G
	.comm	_SPEED_1000,8,3                 ## @SPEED_1000
	.comm	_SPEED_100,8,3                  ## @SPEED_100
	.comm	_AVE_LINKSEL,8,3                ## @AVE_LINKSEL
	.comm	_SPEED_10,8,3                   ## @SPEED_10
	.comm	_AVE_LINKSEL_100M,4,2           ## @AVE_LINKSEL_100M
	.comm	_AVE_RXCR,8,3                   ## @AVE_RXCR
	.comm	_AVE_RXCR_FDUPEN,4,2            ## @AVE_RXCR_FDUPEN
	.comm	_LPA_PAUSE_CAP,4,2              ## @LPA_PAUSE_CAP
	.comm	_LPA_PAUSE_ASYM,4,2             ## @LPA_PAUSE_ASYM
	.comm	_FLOW_CTRL_TX,4,2               ## @FLOW_CTRL_TX
	.comm	_AVE_TXCR_FLOCTR,4,2            ## @AVE_TXCR_FLOCTR
	.comm	_FLOW_CTRL_RX,4,2               ## @FLOW_CTRL_RX
	.comm	_AVE_RXCR_FLOCTR,4,2            ## @AVE_RXCR_FLOCTR
	.comm	_AVE_RXCR_RXEN,4,2              ## @AVE_RXCR_RXEN
	.no_dead_strip	_ave_phy_adjust_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ave_phy_adjust_link
_ave_phy_adjust_link:                   ; @ave_phy_adjust_link
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_netdev_priv
	mov	x20, x0
	ldr	x19, [x19]
	ldr	x8, [x0]
Lloh0:
	adrp	x24, _AVE_TXCR@GOTPAGE
Lloh1:
	ldr	x24, [x24, _AVE_TXCR@GOTPAGEOFF]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
Lloh2:
	adrp	x22, _AVE_TXCR_TXSPD_100@GOTPAGE
Lloh3:
	ldr	x22, [x22, _AVE_TXCR_TXSPD_100@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh4:
	adrp	x23, _AVE_TXCR_TXSPD_1G@GOTPAGE
Lloh5:
	ldr	x23, [x23, _AVE_TXCR_TXSPD_1G@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w9, w8
	bic	w21, w0, w8
	mov	x0, x19
	bl	_phy_interface_is_rgmii
	ldr	x8, [x19]
	cbz	x0, LBB0_3
; %bb.1:
Lloh6:
	adrp	x9, _SPEED_1000@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SPEED_1000@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	ldr	w8, [x23]
	b	LBB0_5
LBB0_3:
Lloh9:
	adrp	x9, _SPEED_100@GOTPAGE
Lloh10:
	ldr	x9, [x9, _SPEED_100@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [x22]
LBB0_5:
	orr	w21, w8, w21
LBB0_6:
	ldr	x8, [x20]
	ldr	x9, [x24]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	mov	x0, x19
	bl	_phy_interface_is_rgmii
	cbnz	x0, LBB0_8
; %bb.7:
	ldr	x8, [x20]
Lloh12:
	adrp	x21, _AVE_LINKSEL@GOTPAGE
Lloh13:
	ldr	x21, [x21, _AVE_LINKSEL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl
Lloh14:
	adrp	x8, _SPEED_10@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SPEED_10@GOTPAGEOFF]
	ldr	x9, [x19]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x10, _AVE_LINKSEL_100M@GOTPAGE
Lloh18:
	ldr	x10, [x10, _AVE_LINKSEL_100M@GOTPAGEOFF]
Lloh19:
	ldr	w10, [x10]
	bic	w11, w0, w10
	orr	w10, w10, w0
	cmp	x9, x8
	csel	w0, w11, w10, eq
	ldr	x8, [x20]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_writel
LBB0_8:
	ldr	x8, [x20]
Lloh20:
	adrp	x25, _AVE_RXCR@GOTPAGE
Lloh21:
	ldr	x25, [x25, _AVE_RXCR@GOTPAGEOFF]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_readl
	mov	x21, x0
	ldr	x8, [x20]
	ldr	x9, [x24]
	add	x0, x9, x8
	bl	_readl
	mov	x22, x0
	ldr	x9, [x19, #32]
Lloh22:
	adrp	x8, _AVE_RXCR_FDUPEN@GOTPAGE
Lloh23:
	ldr	x8, [x8, _AVE_RXCR_FDUPEN@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cbz	x9, LBB0_12
; %bb.9:
	orr	w26, w8, w21
Lloh25:
	adrp	x8, _LPA_PAUSE_CAP@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LPA_PAUSE_CAP@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldp	x10, x9, [x19, #16]
	cmp	x9, #0
Lloh28:
	adrp	x9, _LPA_PAUSE_ASYM@GOTPAGE
Lloh29:
	ldr	x9, [x9, _LPA_PAUSE_ASYM@GOTPAGEOFF]
	csel	w8, wzr, w8, eq
Lloh30:
	ldr	w9, [x9]
	cmp	x10, #0
	csel	w9, wzr, w9, eq
	orr	w23, w9, w8
	ldr	w0, [x19, #8]
	bl	_linkmode_adv_to_lcl_adv_t
	mov	x1, x23
	bl	_mii_resolve_flowctrl_fdx
Lloh31:
	adrp	x8, _FLOW_CTRL_TX@GOTPAGE
Lloh32:
	ldr	x8, [x8, _FLOW_CTRL_TX@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
Lloh34:
	adrp	x9, _AVE_TXCR_FLOCTR@GOTPAGE
Lloh35:
	ldr	x9, [x9, _AVE_TXCR_FLOCTR@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
	orr	w10, w9, w22
	bic	w9, w22, w9
	tst	w8, w0
	csel	w22, w9, w10, eq
Lloh37:
	adrp	x8, _FLOW_CTRL_RX@GOTPAGE
Lloh38:
	ldr	x8, [x8, _FLOW_CTRL_RX@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	tst	w8, w0
Lloh40:
	adrp	x8, _AVE_RXCR_FLOCTR@GOTPAGE
Lloh41:
	ldr	x8, [x8, _AVE_RXCR_FLOCTR@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	bic	w9, w26, w8
	orr	w8, w8, w26
	csel	w23, w9, w8, eq
	cmp	w21, w23
	b.eq	LBB0_11
LBB0_10:
Lloh43:
	adrp	x8, _AVE_RXCR_RXEN@GOTPAGE
Lloh44:
	ldr	x8, [x8, _AVE_RXCR_RXEN@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	bic	w0, w23, w8
	ldr	x8, [x20]
	ldr	x9, [x25]
	add	x1, x9, x8
	bl	_writel
	ldr	x8, [x20]
	ldr	x9, [x24]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writel
	ldr	x8, [x20]
	ldr	x9, [x25]
	add	x1, x9, x8
	mov	x0, x23
	bl	_writel
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_phy_print_status
LBB0_12:
Lloh46:
	adrp	x9, _AVE_RXCR_FLOCTR@GOTPAGE
Lloh47:
	ldr	x9, [x9, _AVE_RXCR_FLOCTR@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	orr	w8, w9, w8
	bic	w23, w21, w8
Lloh49:
	adrp	x8, _AVE_TXCR_FLOCTR@GOTPAGE
Lloh50:
	ldr	x8, [x8, _AVE_TXCR_FLOCTR@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	bic	w22, w22, w8
	cmp	w21, w23
	b.ne	LBB0_10
	b	LBB0_11
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_AVE_TXCR,8,3                   ; @AVE_TXCR
	.comm	_AVE_TXCR_TXSPD_100,4,2         ; @AVE_TXCR_TXSPD_100
	.comm	_AVE_TXCR_TXSPD_1G,4,2          ; @AVE_TXCR_TXSPD_1G
	.comm	_SPEED_1000,8,3                 ; @SPEED_1000
	.comm	_SPEED_100,8,3                  ; @SPEED_100
	.comm	_AVE_LINKSEL,8,3                ; @AVE_LINKSEL
	.comm	_SPEED_10,8,3                   ; @SPEED_10
	.comm	_AVE_LINKSEL_100M,4,2           ; @AVE_LINKSEL_100M
	.comm	_AVE_RXCR,8,3                   ; @AVE_RXCR
	.comm	_AVE_RXCR_FDUPEN,4,2            ; @AVE_RXCR_FDUPEN
	.comm	_LPA_PAUSE_CAP,4,2              ; @LPA_PAUSE_CAP
	.comm	_LPA_PAUSE_ASYM,4,2             ; @LPA_PAUSE_ASYM
	.comm	_FLOW_CTRL_TX,4,2               ; @FLOW_CTRL_TX
	.comm	_AVE_TXCR_FLOCTR,4,2            ; @AVE_TXCR_FLOCTR
	.comm	_FLOW_CTRL_RX,4,2               ; @FLOW_CTRL_RX
	.comm	_AVE_RXCR_FLOCTR,4,2            ; @AVE_RXCR_FLOCTR
	.comm	_AVE_RXCR_RXEN,4,2              ; @AVE_RXCR_RXEN
	.no_dead_strip	_ave_phy_adjust_link
.subsections_via_symbols
