	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rts525a_optimize_phy
_rts525a_optimize_phy:                  ## @rts525a_optimize_phy
	.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
	movq	_RTS524A_PM_CTRL3@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_D3_DELINK_MODE_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	callq	_rtsx_pci_write_register
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	__PHY_FLD0_CLK_REQ_20C@GOTPCREL(%rip), %rax
	movq	__PHY_FLD0_RX_IDLE_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	__PHY_FLD0_BIT_ERR_RSTN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	__PHY_FLD0_BER_COUNT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	__PHY_FLD0@GOTPCREL(%rip), %rax
	movq	__PHY_FLD0_BER_TIMER@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	__PHY_FLD0_CHECK_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rtsx_pci_write_phy_register
	movq	__PHY_ANA03@GOTPCREL(%rip), %rax
	movq	__PHY_ANA03_TIMER_MAX@GOTPCREL(%rip), %rcx
	movq	__PHY_ANA03_OOBS_DEB_EN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	__PHY_CMU_DEBUG_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rtsx_pci_write_phy_register
	movq	_IC_VER_A@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$21082, %esi                    ## imm = 0x525A
	callq	_is_version
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	__PHY_REV0@GOTPCREL(%rip), %rax
	movq	__PHY_REV0_FILTER_OUT@GOTPCREL(%rip), %rcx
	movq	__PHY_REV0_CDR_BYPASS_PFD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	(%rax), %esi
	movq	__PHY_REV0_CDR_RX_IDLE_BYPASS@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_rtsx_pci_write_phy_register
	jmp	LBB0_4
LBB0_1:
	movl	%eax, %r14d
LBB0_4:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RTS524A_PM_CTRL3,4,2           ## @RTS524A_PM_CTRL3
	.comm	_D3_DELINK_MODE_EN,4,2          ## @D3_DELINK_MODE_EN
	.comm	__PHY_FLD0,4,2                  ## @_PHY_FLD0
	.comm	__PHY_FLD0_CLK_REQ_20C,4,2      ## @_PHY_FLD0_CLK_REQ_20C
	.comm	__PHY_FLD0_RX_IDLE_EN,4,2       ## @_PHY_FLD0_RX_IDLE_EN
	.comm	__PHY_FLD0_BIT_ERR_RSTN,4,2     ## @_PHY_FLD0_BIT_ERR_RSTN
	.comm	__PHY_FLD0_BER_COUNT,4,2        ## @_PHY_FLD0_BER_COUNT
	.comm	__PHY_FLD0_BER_TIMER,4,2        ## @_PHY_FLD0_BER_TIMER
	.comm	__PHY_FLD0_CHECK_EN,4,2         ## @_PHY_FLD0_CHECK_EN
	.comm	__PHY_ANA03,4,2                 ## @_PHY_ANA03
	.comm	__PHY_ANA03_TIMER_MAX,4,2       ## @_PHY_ANA03_TIMER_MAX
	.comm	__PHY_ANA03_OOBS_DEB_EN,4,2     ## @_PHY_ANA03_OOBS_DEB_EN
	.comm	__PHY_CMU_DEBUG_EN,4,2          ## @_PHY_CMU_DEBUG_EN
	.comm	_IC_VER_A,4,2                   ## @IC_VER_A
	.comm	__PHY_REV0,4,2                  ## @_PHY_REV0
	.comm	__PHY_REV0_FILTER_OUT,4,2       ## @_PHY_REV0_FILTER_OUT
	.comm	__PHY_REV0_CDR_BYPASS_PFD,4,2   ## @_PHY_REV0_CDR_BYPASS_PFD
	.comm	__PHY_REV0_CDR_RX_IDLE_BYPASS,4,2 ## @_PHY_REV0_CDR_RX_IDLE_BYPASS
	.no_dead_strip	_rts525a_optimize_phy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rts525a_optimize_phy
_rts525a_optimize_phy:                  ; @rts525a_optimize_phy
	.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	x19, x0
Lloh0:
	adrp	x8, _RTS524A_PM_CTRL3@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RTS524A_PM_CTRL3@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _D3_DELINK_MODE_EN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D3_DELINK_MODE_EN@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	w3, #0
	bl	_rtsx_pci_write_register
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, __PHY_FLD0@GOTPAGE
Lloh7:
	ldr	x8, [x8, __PHY_FLD0@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, __PHY_FLD0_CLK_REQ_20C@GOTPAGE
Lloh10:
	ldr	x8, [x8, __PHY_FLD0_CLK_REQ_20C@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, __PHY_FLD0_RX_IDLE_EN@GOTPAGE
Lloh13:
	ldr	x9, [x9, __PHY_FLD0_RX_IDLE_EN@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh15:
	adrp	x9, __PHY_FLD0_BIT_ERR_RSTN@GOTPAGE
Lloh16:
	ldr	x9, [x9, __PHY_FLD0_BIT_ERR_RSTN@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh18:
	adrp	x9, __PHY_FLD0_BER_COUNT@GOTPAGE
Lloh19:
	ldr	x9, [x9, __PHY_FLD0_BER_COUNT@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh21:
	adrp	x9, __PHY_FLD0_BER_TIMER@GOTPAGE
Lloh22:
	ldr	x9, [x9, __PHY_FLD0_BER_TIMER@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh24:
	adrp	x9, __PHY_FLD0_CHECK_EN@GOTPAGE
Lloh25:
	ldr	x9, [x9, __PHY_FLD0_CHECK_EN@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_rtsx_pci_write_phy_register
Lloh27:
	adrp	x8, __PHY_ANA03@GOTPAGE
Lloh28:
	ldr	x8, [x8, __PHY_ANA03@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
Lloh30:
	adrp	x8, __PHY_ANA03_TIMER_MAX@GOTPAGE
Lloh31:
	ldr	x8, [x8, __PHY_ANA03_TIMER_MAX@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
Lloh33:
	adrp	x9, __PHY_ANA03_OOBS_DEB_EN@GOTPAGE
Lloh34:
	ldr	x9, [x9, __PHY_ANA03_OOBS_DEB_EN@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh36:
	adrp	x9, __PHY_CMU_DEBUG_EN@GOTPAGE
Lloh37:
	ldr	x9, [x9, __PHY_CMU_DEBUG_EN@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_rtsx_pci_write_phy_register
Lloh39:
	adrp	x8, _IC_VER_A@GOTPAGE
Lloh40:
	ldr	x8, [x8, _IC_VER_A@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #21082
	bl	_is_version
	cbz	x0, LBB0_3
; %bb.2:
Lloh42:
	adrp	x8, __PHY_REV0@GOTPAGE
Lloh43:
	ldr	x8, [x8, __PHY_REV0@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
Lloh45:
	adrp	x8, __PHY_REV0_FILTER_OUT@GOTPAGE
Lloh46:
	ldr	x8, [x8, __PHY_REV0_FILTER_OUT@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
Lloh48:
	adrp	x9, __PHY_REV0_CDR_BYPASS_PFD@GOTPAGE
Lloh49:
	ldr	x9, [x9, __PHY_REV0_CDR_BYPASS_PFD@GOTPAGEOFF]
Lloh50:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh51:
	adrp	x9, __PHY_REV0_CDR_RX_IDLE_BYPASS@GOTPAGE
Lloh52:
	ldr	x9, [x9, __PHY_REV0_CDR_RX_IDLE_BYPASS@GOTPAGEOFF]
Lloh53:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	bl	_rtsx_pci_write_phy_register
	mov	w0, #0
LBB0_3:
	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	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_RTS524A_PM_CTRL3,4,2           ; @RTS524A_PM_CTRL3
	.comm	_D3_DELINK_MODE_EN,4,2          ; @D3_DELINK_MODE_EN
	.comm	__PHY_FLD0,4,2                  ; @_PHY_FLD0
	.comm	__PHY_FLD0_CLK_REQ_20C,4,2      ; @_PHY_FLD0_CLK_REQ_20C
	.comm	__PHY_FLD0_RX_IDLE_EN,4,2       ; @_PHY_FLD0_RX_IDLE_EN
	.comm	__PHY_FLD0_BIT_ERR_RSTN,4,2     ; @_PHY_FLD0_BIT_ERR_RSTN
	.comm	__PHY_FLD0_BER_COUNT,4,2        ; @_PHY_FLD0_BER_COUNT
	.comm	__PHY_FLD0_BER_TIMER,4,2        ; @_PHY_FLD0_BER_TIMER
	.comm	__PHY_FLD0_CHECK_EN,4,2         ; @_PHY_FLD0_CHECK_EN
	.comm	__PHY_ANA03,4,2                 ; @_PHY_ANA03
	.comm	__PHY_ANA03_TIMER_MAX,4,2       ; @_PHY_ANA03_TIMER_MAX
	.comm	__PHY_ANA03_OOBS_DEB_EN,4,2     ; @_PHY_ANA03_OOBS_DEB_EN
	.comm	__PHY_CMU_DEBUG_EN,4,2          ; @_PHY_CMU_DEBUG_EN
	.comm	_IC_VER_A,4,2                   ; @IC_VER_A
	.comm	__PHY_REV0,4,2                  ; @_PHY_REV0
	.comm	__PHY_REV0_FILTER_OUT,4,2       ; @_PHY_REV0_FILTER_OUT
	.comm	__PHY_REV0_CDR_BYPASS_PFD,4,2   ; @_PHY_REV0_CDR_BYPASS_PFD
	.comm	__PHY_REV0_CDR_RX_IDLE_BYPASS,4,2 ; @_PHY_REV0_CDR_RX_IDLE_BYPASS
	.no_dead_strip	_rts525a_optimize_phy
.subsections_via_symbols
