	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tc_aux_link_setup
_tc_aux_link_setup:                     ## @tc_aux_link_setup
	.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
	movq	%rdi, %r14
	callq	_tc_set_syspllparam
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movl	4(%r14), %edi
	movq	_DP_PHY_CTRL@GOTPCREL(%rip), %r15
	movq	_BGREN@GOTPCREL(%rip), %rax
	movq	_PWR_SW_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	(%r15), %esi
	movq	_PHY_A0_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.2:
	movq	_DP0_PLLCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_tc_pllupdate
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movq	_DP1_PLLCTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_tc_pllupdate
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_9:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r15), %esi
	movq	_PHY_RDY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%ecx, %edx
	movl	$1, %r8d
	movl	$1000, %r9d                     ## imm = 0x3E8
	callq	_tc_poll_timeout
	movl	%eax, %ebx
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	jne	LBB0_6
## %bb.5:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_6:
	testl	%ebx, %ebx
	jne	LBB0_9
## %bb.7:
	movq	_AUX_RX_FILTER_EN@GOTPCREL(%rip), %rax
	movl	$1599, %edx                     ## imm = 0x63F
	orl	(%rax), %edx
	movl	4(%r14), %edi
	movq	_DP0_AUXCFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_regmap_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_PHY_CTRL,4,2                ## @DP_PHY_CTRL
	.comm	_BGREN,4,2                      ## @BGREN
	.comm	_PWR_SW_EN,4,2                  ## @PWR_SW_EN
	.comm	_PHY_A0_EN,4,2                  ## @PHY_A0_EN
	.comm	_DP0_PLLCTRL,4,2                ## @DP0_PLLCTRL
	.comm	_DP1_PLLCTRL,4,2                ## @DP1_PLLCTRL
	.comm	_PHY_RDY,4,2                    ## @PHY_RDY
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Timeout waiting for PHY to become ready"

	.comm	_AUX_RX_FILTER_EN,4,2           ## @AUX_RX_FILTER_EN
	.comm	_DP0_AUXCFG1,4,2                ## @DP0_AUXCFG1
L_.str.1:                               ## @.str.1
	.asciz	"tc_aux_link_setup failed: %d\n"

	.no_dead_strip	_tc_aux_link_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tc_aux_link_setup
_tc_aux_link_setup:                     ; @tc_aux_link_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	bl	_tc_set_syspllparam
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w0, [x19, #4]
Lloh0:
	adrp	x21, _DP_PHY_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DP_PHY_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x8, _BGREN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BGREN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _PWR_SW_EN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PWR_SW_EN@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _PHY_A0_EN@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PHY_A0_EN@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w2, w8, w9
	bl	_regmap_write
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.2:
Lloh11:
	adrp	x8, _DP0_PLLCTRL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DP0_PLLCTRL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tc_pllupdate
	mov	x20, x0
	cbnz	w0, LBB0_4
; %bb.3:
Lloh14:
	adrp	x8, _DP1_PLLCTRL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DP1_PLLCTRL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_tc_pllupdate
	mov	x20, x0
	cbz	w0, LBB0_7
LBB0_4:
	ldr	w0, [x19]
	str	x20, [sp]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	bl	_dev_err
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_7:
	ldr	w1, [x21]
Lloh19:
	adrp	x8, _PHY_RDY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PHY_RDY@GOTPAGEOFF]
Lloh21:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, x2
	mov	w4, #1
	mov	w5, #1000
	bl	_tc_poll_timeout
	mov	x20, x0
Lloh22:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmn	w0, w8
	b.ne	LBB0_9
; %bb.8:
	ldr	w0, [x19]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_9:
	cbnz	w20, LBB0_4
; %bb.10:
Lloh27:
	adrp	x8, _AUX_RX_FILTER_EN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AUX_RX_FILTER_EN@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	mov	w9, #1599
	orr	w2, w8, w9
	ldr	w0, [x19, #4]
Lloh30:
	adrp	x8, _DP0_AUXCFG1@GOTPAGE
Lloh31:
	ldr	x8, [x8, _DP0_AUXCFG1@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	bl	_regmap_write
	mov	x20, x0
	cbnz	w0, LBB0_4
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_PHY_CTRL,4,2                ; @DP_PHY_CTRL
	.comm	_BGREN,4,2                      ; @BGREN
	.comm	_PWR_SW_EN,4,2                  ; @PWR_SW_EN
	.comm	_PHY_A0_EN,4,2                  ; @PHY_A0_EN
	.comm	_DP0_PLLCTRL,4,2                ; @DP0_PLLCTRL
	.comm	_DP1_PLLCTRL,4,2                ; @DP1_PLLCTRL
	.comm	_PHY_RDY,4,2                    ; @PHY_RDY
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Timeout waiting for PHY to become ready"

	.comm	_AUX_RX_FILTER_EN,4,2           ; @AUX_RX_FILTER_EN
	.comm	_DP0_AUXCFG1,4,2                ; @DP0_AUXCFG1
l_.str.1:                               ; @.str.1
	.asciz	"tc_aux_link_setup failed: %d\n"

	.no_dead_strip	_tc_aux_link_setup
.subsections_via_symbols
