	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function b53_adjust_link
_b53_adjust_link:                       ## @b53_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	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	8(%rdi), %rbx
	movq	8(%rbx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$0, -48(%rbp)
	movl	$0, -44(%rbp)
	movq	%rdx, %rdi
	callq	_phy_is_pseudo_fixed_link
	testl	%eax, %eax
	je	LBB0_22
## %bb.1:
	movq	%rbx, %rdi
	callq	_is5301x
	xorl	%r8d, %r8d
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	cmpl	%r14d, (%rbx)
	jne	LBB0_4
## %bb.3:
	movq	_MLO_PAUSE_TXRX_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
LBB0_4:
	cmpq	$0, 32(%r12)
	je	LBB0_8
## %bb.5:
	xorl	%eax, %eax
	cmpq	$0, 24(%r12)
	je	LBB0_7
## %bb.6:
	movq	_MLO_PAUSE_TX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	orl	%r8d, %eax
	movq	_MLO_PAUSE_RX@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, %r8d
LBB0_8:
	movl	(%r12), %edx
	movl	16(%r12), %ecx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_b53_force_port_config
	movl	4(%r12), %edx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_b53_force_link
	movq	%rbx, %rdi
	callq	_is531x5
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:
	movq	%r12, %rdi
	callq	_phy_interface_is_rgmii
	testq	%rax, %rax
	je	LBB0_14
## %bb.10:
	cmpl	$8, %r14d
	jne	LBB0_12
## %bb.11:
	movq	_B53_RGMII_CTRL_IMP@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_13
LBB0_12:
	movl	%r14d, %edi
	callq	_B53_RGMII_CTRL_P
	movl	%eax, %r13d
LBB0_13:
	movq	_B53_CTRL_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_b53_read8
	movq	_RGMII_CTRL_DLL_RXC@GOTPCREL(%rip), %rax
	movq	_RGMII_CTRL_DLL_TXC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	(%rax), %eax
	orl	%edx, %eax
	movq	_RGMII_CTRL_TIMING_SEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movl	%eax, %edi
	orl	%r8d, %edi
	notl	%edi
	andl	-48(%rbp), %edi
	movq	8(%r12), %rsi
	movq	_PHY_INTERFACE_MODE_RGMII_TXID@GOTPCREL(%rip), %r9
	xorl	%ecx, %ecx
	cmpq	(%r9), %rsi
	cmovel	%edx, %ecx
	movq	_PHY_INTERFACE_MODE_RGMII@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rsi
	cmovel	%eax, %ecx
	orl	%r8d, %ecx
	orl	%edi, %ecx
	movl	%ecx, -48(%rbp)
	movq	_B53_CTRL_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r13d, %edx
	callq	_b53_write8
	movl	(%r15), %r13d
	movq	8(%r12), %rdi
	callq	_phy_modes
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_dev_info
LBB0_14:
	movq	%rbx, %rdi
	callq	_is5325
	testq	%rax, %rax
	je	LBB0_18
## %bb.15:
	movq	_B53_CTRL_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_B53_PORT_OVERRIDE_CTRL@GOTPCREL(%rip), %r13
	movl	(%r13), %edx
	leaq	-44(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_b53_read8
	movl	-44(%rbp), %eax
	movq	_PORT_OVERRIDE_RV_MII_25@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	jne	LBB0_21
## %bb.16:
	movq	_B53_CTRL_PAGE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	movl	(%r13), %edx
	orl	%eax, %ecx
	movq	%rbx, %rdi
	callq	_b53_write8
	movq	_B53_CTRL_PAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r13), %edx
	leaq	-44(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_b53_read8
	movq	_PORT_OVERRIDE_RV_MII_25@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -44(%rbp)
	jne	LBB0_21
## %bb.17:
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_22
LBB0_18:
	movq	%rbx, %rdi
	callq	_is5301x
	testq	%rax, %rax
	je	LBB0_21
## %bb.19:
	movl	(%rbx), %esi
	cmpl	%r14d, %esi
	je	LBB0_21
## %bb.20:
	movq	_DUPLEX_FULL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MLO_PAUSE_TXRX_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%rbx, %rdi
	movl	$2000, %edx                     ## imm = 0x7D0
	callq	_b53_force_port_config
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_b53_force_link
LBB0_21:
	movslq	%r14d, %rbx
	movq	%r15, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	_b53_eee_init
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx,%rbx,4)
LBB0_22:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLO_PAUSE_TXRX_MASK,4,2        ## @MLO_PAUSE_TXRX_MASK
	.comm	_MLO_PAUSE_TX,4,2               ## @MLO_PAUSE_TX
	.comm	_MLO_PAUSE_RX,4,2               ## @MLO_PAUSE_RX
	.comm	_B53_RGMII_CTRL_IMP,4,2         ## @B53_RGMII_CTRL_IMP
	.comm	_B53_CTRL_PAGE,4,2              ## @B53_CTRL_PAGE
	.comm	_RGMII_CTRL_DLL_RXC,4,2         ## @RGMII_CTRL_DLL_RXC
	.comm	_RGMII_CTRL_DLL_TXC,4,2         ## @RGMII_CTRL_DLL_TXC
	.comm	_RGMII_CTRL_TIMING_SEL,4,2      ## @RGMII_CTRL_TIMING_SEL
	.comm	_PHY_INTERFACE_MODE_RGMII_TXID,8,3 ## @PHY_INTERFACE_MODE_RGMII_TXID
	.comm	_PHY_INTERFACE_MODE_RGMII,8,3   ## @PHY_INTERFACE_MODE_RGMII
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Configured port %d for %s\n"

	.comm	_B53_PORT_OVERRIDE_CTRL,4,2     ## @B53_PORT_OVERRIDE_CTRL
	.comm	_PORT_OVERRIDE_RV_MII_25,4,2    ## @PORT_OVERRIDE_RV_MII_25
L_.str.1:                               ## @.str.1
	.asciz	"Failed to enable reverse MII mode\n"

	.comm	_DUPLEX_FULL,4,2                ## @DUPLEX_FULL
	.no_dead_strip	_b53_adjust_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function b53_adjust_link
_b53_adjust_link:                       ; @b53_adjust_link
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x0, #8]
	ldr	x24, [x22, #8]
	str	xzr, [sp, #8]
	mov	x0, x2
	bl	_phy_is_pseudo_fixed_link
	cbz	w0, LBB0_19
; %bb.1:
	mov	x0, x22
	bl	_is5301x
	cbz	x0, LBB0_8
; %bb.2:
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _MLO_PAUSE_TXRX_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLO_PAUSE_TXRX_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w20
	csel	w4, w9, wzr, eq
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_4
LBB0_3:
	ldr	x8, [x19, #24]
Lloh3:
	adrp	x9, _MLO_PAUSE_TX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLO_PAUSE_TX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w8, wzr, w9, eq
	orr	w8, w8, w4
Lloh6:
	adrp	x9, _MLO_PAUSE_RX@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MLO_PAUSE_RX@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w4, w8, w9
LBB0_4:
	ldr	w2, [x19]
	ldr	w3, [x19, #16]
	mov	x0, x22
	mov	x1, x20
	bl	_b53_force_port_config
	ldr	w2, [x19, #4]
	mov	x0, x22
	mov	x1, x20
	bl	_b53_force_link
	mov	x0, x22
	bl	_is531x5
Lloh9:
	adrp	x25, _B53_CTRL_PAGE@GOTPAGE
Lloh10:
	ldr	x25, [x25, _B53_CTRL_PAGE@GOTPAGEOFF]
	cbz	x0, LBB0_11
; %bb.5:
	mov	x0, x19
	bl	_phy_interface_is_rgmii
	cbz	x0, LBB0_11
; %bb.6:
	cmp	w20, #8
	b.ne	LBB0_9
; %bb.7:
Lloh11:
	adrp	x8, _B53_RGMII_CTRL_IMP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _B53_RGMII_CTRL_IMP@GOTPAGEOFF]
Lloh13:
	ldr	w23, [x8]
	b	LBB0_10
LBB0_8:
	mov	w4, #0
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_3
	b	LBB0_4
LBB0_9:
	mov	x0, x20
	bl	_B53_RGMII_CTRL_P
	mov	x23, x0
LBB0_10:
	ldr	w1, [x25]
	add	x3, sp, #12
	mov	x0, x22
	mov	x2, x23
	bl	_b53_read8
Lloh14:
	adrp	x8, _RGMII_CTRL_DLL_RXC@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RGMII_CTRL_DLL_RXC@GOTPAGEOFF]
Lloh16:
	adrp	x9, _RGMII_CTRL_DLL_TXC@GOTPAGE
Lloh17:
	ldr	x9, [x9, _RGMII_CTRL_DLL_TXC@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
Lloh19:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh20:
	adrp	x10, _RGMII_CTRL_TIMING_SEL@GOTPAGE
Lloh21:
	ldr	x10, [x10, _RGMII_CTRL_TIMING_SEL@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	orr	w11, w8, w10
	ldr	w12, [sp, #12]
	bic	w11, w12, w11
	ldr	x12, [x19, #8]
Lloh23:
	adrp	x13, _PHY_INTERFACE_MODE_RGMII_TXID@GOTPAGE
Lloh24:
	ldr	x13, [x13, _PHY_INTERFACE_MODE_RGMII_TXID@GOTPAGEOFF]
Lloh25:
	ldr	x13, [x13]
	cmp	x12, x13
	csel	w9, w9, wzr, eq
Lloh26:
	adrp	x13, _PHY_INTERFACE_MODE_RGMII@GOTPAGE
Lloh27:
	ldr	x13, [x13, _PHY_INTERFACE_MODE_RGMII@GOTPAGEOFF]
Lloh28:
	ldr	x13, [x13]
	cmp	x12, x13
	csel	w8, w8, w9, eq
	orr	w8, w11, w8
	orr	w3, w8, w10
	str	w3, [sp, #12]
	ldr	w1, [x25]
	mov	x0, x22
	mov	x2, x23
	bl	_b53_write8
	ldr	w23, [x21]
	ldr	x0, [x19, #8]
	bl	_phy_modes
	mov	x3, x0
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x20
	bl	_dev_info
LBB0_11:
	mov	x0, x22
	bl	_is5325
	cbz	x0, LBB0_15
; %bb.12:
	ldr	w1, [x25]
Lloh31:
	adrp	x23, _B53_PORT_OVERRIDE_CTRL@GOTPAGE
Lloh32:
	ldr	x23, [x23, _B53_PORT_OVERRIDE_CTRL@GOTPAGEOFF]
	ldr	w2, [x23]
	add	x3, sp, #8
	mov	x0, x22
	bl	_b53_read8
	ldr	w8, [sp, #8]
Lloh33:
	adrp	x26, _PORT_OVERRIDE_RV_MII_25@GOTPAGE
Lloh34:
	ldr	x26, [x26, _PORT_OVERRIDE_RV_MII_25@GOTPAGEOFF]
	ldr	w9, [x26]
	tst	w9, w8
	b.ne	LBB0_18
; %bb.13:
	ldr	w1, [x25]
	ldr	w2, [x23]
	orr	w3, w9, w8
	mov	x0, x22
	bl	_b53_write8
	ldr	w1, [x25]
	ldr	w2, [x23]
	add	x3, sp, #8
	mov	x0, x22
	bl	_b53_read8
	ldr	w8, [sp, #8]
	ldr	w9, [x26]
	tst	w9, w8
	b.ne	LBB0_18
; %bb.14:
	ldr	w0, [x21]
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_19
LBB0_15:
	mov	x0, x22
	bl	_is5301x
	cbz	x0, LBB0_18
; %bb.16:
	ldr	w1, [x22]
	cmp	w1, w20
	b.eq	LBB0_18
; %bb.17:
Lloh37:
	adrp	x8, _DUPLEX_FULL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _DUPLEX_FULL@GOTPAGEOFF]
Lloh39:
	ldr	w3, [x8]
Lloh40:
	adrp	x8, _MLO_PAUSE_TXRX_MASK@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MLO_PAUSE_TXRX_MASK@GOTPAGEOFF]
Lloh42:
	ldr	w4, [x8]
	mov	x0, x22
	mov	w2, #2000
	bl	_b53_force_port_config
	ldr	w1, [x22]
	mov	x0, x22
	mov	w2, #1
	bl	_b53_force_link
LBB0_18:
	sxtw	x22, w20
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_b53_eee_init
	str	w0, [x24, x22, lsl #2]
LBB0_19:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_MLO_PAUSE_TXRX_MASK,4,2        ; @MLO_PAUSE_TXRX_MASK
	.comm	_MLO_PAUSE_TX,4,2               ; @MLO_PAUSE_TX
	.comm	_MLO_PAUSE_RX,4,2               ; @MLO_PAUSE_RX
	.comm	_B53_RGMII_CTRL_IMP,4,2         ; @B53_RGMII_CTRL_IMP
	.comm	_B53_CTRL_PAGE,4,2              ; @B53_CTRL_PAGE
	.comm	_RGMII_CTRL_DLL_RXC,4,2         ; @RGMII_CTRL_DLL_RXC
	.comm	_RGMII_CTRL_DLL_TXC,4,2         ; @RGMII_CTRL_DLL_TXC
	.comm	_RGMII_CTRL_TIMING_SEL,4,2      ; @RGMII_CTRL_TIMING_SEL
	.comm	_PHY_INTERFACE_MODE_RGMII_TXID,8,3 ; @PHY_INTERFACE_MODE_RGMII_TXID
	.comm	_PHY_INTERFACE_MODE_RGMII,8,3   ; @PHY_INTERFACE_MODE_RGMII
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Configured port %d for %s\n"

	.comm	_B53_PORT_OVERRIDE_CTRL,4,2     ; @B53_PORT_OVERRIDE_CTRL
	.comm	_PORT_OVERRIDE_RV_MII_25,4,2    ; @PORT_OVERRIDE_RV_MII_25
l_.str.1:                               ; @.str.1
	.asciz	"Failed to enable reverse MII mode\n"

	.comm	_DUPLEX_FULL,4,2                ; @DUPLEX_FULL
	.no_dead_strip	_b53_adjust_link
.subsections_via_symbols
