	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tcphy_phy_init
_tcphy_phy_init:                        ## @tcphy_phy_init
	.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	%rsi, %r15
	movq	%rdi, %r14
	movq	40(%rdi), %r12
	movl	(%rdi), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	20(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_10
LBB0_2:
	movl	4(%r14), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movl	20(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_9:
	movl	(%r14), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_10
LBB0_4:
	movl	8(%r14), %edi
	callq	_reset_control_deassert
	movq	32(%r14), %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_property_enable
	movq	%r14, %rdi
	callq	_tcphy_dp_aux_set_flip
	movq	%r14, %rdi
	callq	_tcphy_cfg_24m
	movq	_MODE_DFP_DP@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	callq	_tcphy_cfg_dp_pll
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_tcphy_dp_cfg_lane
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_tcphy_dp_cfg_lane
	movq	_PIN_ASSIGN_C_E@GOTPCREL(%rip), %r12
	movl	$3, %r15d
	movl	$2, %ebx
	jmp	LBB0_7
LBB0_6:
	movq	%r14, %rdi
	callq	_tcphy_cfg_usb3_pll
	movq	%r14, %rdi
	callq	_tcphy_cfg_dp_pll
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	cmpq	$0, 32(%r14)
	sete	%al
	setne	%cl
	leal	(%rcx,%rcx,2), %esi
	movl	$2, %r12d
	subl	%eax, %r12d
	leal	(%rax,%rax), %r15d
	incl	%r15d
	movl	%eax, %ebx
	addl	%eax, %ebx
	movq	%r14, %rdi
	callq	_tcphy_tx_usb3_cfg_lane
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_tcphy_rx_usb3_cfg_lane
	movq	_PIN_ASSIGN_D_F@GOTPCREL(%rip), %r12
LBB0_7:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_tcphy_dp_cfg_lane
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_tcphy_dp_cfg_lane
	movl	(%r12), %edi
	movq	_PMA_LANE_CFG@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r14), %rsi
	callq	_writel
	movq	_DP_MODE_ENTER_A2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DP_MODE_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r14), %rsi
	callq	_writel
	movl	12(%r14), %edi
	callq	_reset_control_deassert
	movq	_readl@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PMA_CMN_CTRL1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	24(%r14), %rsi
	movq	_PHY_MODE_SET_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	movl	$10, %r8d
	callq	_readx_poll_timeout
	testl	%eax, %eax
	js	LBB0_8
## %bb.11:
	movl	16(%r14), %edi
	callq	_reset_control_deassert
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movl	20(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movl	12(%r14), %edi
	callq	_reset_control_assert
	movl	8(%r14), %edi
	callq	_reset_control_assert
	movl	4(%r14), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to prepare_enable core clock\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to prepare_enable ref clock\n"

	.comm	_MODE_DFP_DP,8,3                ## @MODE_DFP_DP
	.comm	_PIN_ASSIGN_C_E,4,2             ## @PIN_ASSIGN_C_E
	.comm	_PMA_LANE_CFG,8,3               ## @PMA_LANE_CFG
	.comm	_PIN_ASSIGN_D_F,4,2             ## @PIN_ASSIGN_D_F
	.comm	_DP_MODE_ENTER_A2,4,2           ## @DP_MODE_ENTER_A2
	.comm	_DP_MODE_CTL,8,3                ## @DP_MODE_CTL
	.comm	_readl,4,2                      ## @readl
	.comm	_PMA_CMN_CTRL1,8,3              ## @PMA_CMN_CTRL1
	.comm	_CMN_READY,4,2                  ## @CMN_READY
	.comm	_PHY_MODE_SET_TIMEOUT,4,2       ## @PHY_MODE_SET_TIMEOUT
L_.str.2:                               ## @.str.2
	.asciz	"wait pma ready timeout\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_tcphy_phy_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tcphy_phy_init
_tcphy_phy_init:                        ; @tcphy_phy_init
	.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	x21, x1
	mov	x19, x0
	ldr	x22, [x0, #40]
	ldr	w0, [x0]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	ldr	w0, [x19, #20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_10
LBB0_2:
	ldr	w0, [x19, #4]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_5
; %bb.3:
	mov	x20, x0
	ldr	w0, [x19, #20]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_4:
	ldr	w0, [x19]
	bl	_clk_disable_unprepare
	b	LBB0_10
LBB0_5:
	ldr	w0, [x19, #8]
	bl	_reset_control_deassert
	ldr	x2, [x19, #32]
	mov	x0, x19
	mov	x1, x22
	bl	_property_enable
	mov	x0, x19
	bl	_tcphy_dp_aux_set_flip
	mov	x0, x19
	bl	_tcphy_cfg_24m
Lloh4:
	adrp	x8, _MODE_DFP_DP@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MODE_DFP_DP@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	mov	x0, x19
	cmp	x8, x21
	b.ne	LBB0_7
; %bb.6:
	bl	_tcphy_cfg_dp_pll
	mov	x0, x19
	mov	w1, #0
	bl	_tcphy_dp_cfg_lane
	mov	x0, x19
	mov	w1, #1
	bl	_tcphy_dp_cfg_lane
Lloh7:
	adrp	x22, _PIN_ASSIGN_C_E@GOTPAGE
Lloh8:
	ldr	x22, [x22, _PIN_ASSIGN_C_E@GOTPAGEOFF]
	mov	w20, #3
	mov	w21, #2
	b	LBB0_8
LBB0_7:
	bl	_tcphy_cfg_usb3_pll
	mov	x0, x19
	bl	_tcphy_cfg_dp_pll
	ldr	x8, [x19, #32]
	cmp	x8, #0
	cset	w8, eq
	mov	w9, #3
	csel	w1, wzr, w9, eq
	mov	w10, #1
	cinc	w22, w10, ne
	lsl	w21, w8, #1
	csinc	w20, w9, wzr, eq
	mov	x0, x19
	bl	_tcphy_tx_usb3_cfg_lane
	mov	x0, x19
	mov	x1, x22
	bl	_tcphy_rx_usb3_cfg_lane
Lloh9:
	adrp	x22, _PIN_ASSIGN_D_F@GOTPAGE
Lloh10:
	ldr	x22, [x22, _PIN_ASSIGN_D_F@GOTPAGEOFF]
LBB0_8:
	mov	x0, x19
	mov	x1, x21
	bl	_tcphy_dp_cfg_lane
	mov	x0, x19
	mov	x1, x20
	bl	_tcphy_dp_cfg_lane
	ldr	w0, [x22]
	ldr	x8, [x19, #24]
Lloh11:
	adrp	x9, _PMA_LANE_CFG@GOTPAGE
Lloh12:
	ldr	x9, [x9, _PMA_LANE_CFG@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh14:
	adrp	x8, _DP_MODE_ENTER_A2@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DP_MODE_ENTER_A2@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	ldr	x8, [x19, #24]
Lloh17:
	adrp	x9, _DP_MODE_CTL@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DP_MODE_CTL@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	w0, [x19, #12]
	bl	_reset_control_deassert
Lloh20:
	adrp	x8, _readl@GOTPAGE
Lloh21:
	ldr	x8, [x8, _readl@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x8, _PMA_CMN_CTRL1@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PMA_CMN_CTRL1@GOTPAGEOFF]
	ldr	x9, [x19, #24]
Lloh25:
	ldr	x8, [x8]
	add	x1, x8, x9
Lloh26:
	adrp	x8, _PHY_MODE_SET_TIMEOUT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PHY_MODE_SET_TIMEOUT@GOTPAGEOFF]
Lloh28:
	ldr	w5, [x8]
	mov	w3, #0
	mov	w4, #10
	bl	_readx_poll_timeout
	tbnz	w0, #31, LBB0_11
; %bb.9:
	ldr	w0, [x19, #16]
	bl	_reset_control_deassert
	mov	w20, #0
LBB0_10:
	mov	x0, x20
	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_11:
	ldr	w0, [x19, #20]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh31:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w20, w8
	ldr	w0, [x19, #12]
	bl	_reset_control_assert
	ldr	w0, [x19, #8]
	bl	_reset_control_assert
	ldr	w0, [x19, #4]
	bl	_clk_disable_unprepare
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to prepare_enable core clock\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to prepare_enable ref clock\n"

	.comm	_MODE_DFP_DP,8,3                ; @MODE_DFP_DP
	.comm	_PIN_ASSIGN_C_E,4,2             ; @PIN_ASSIGN_C_E
	.comm	_PMA_LANE_CFG,8,3               ; @PMA_LANE_CFG
	.comm	_PIN_ASSIGN_D_F,4,2             ; @PIN_ASSIGN_D_F
	.comm	_DP_MODE_ENTER_A2,4,2           ; @DP_MODE_ENTER_A2
	.comm	_DP_MODE_CTL,8,3                ; @DP_MODE_CTL
	.comm	_readl,4,2                      ; @readl
	.comm	_PMA_CMN_CTRL1,8,3              ; @PMA_CMN_CTRL1
	.comm	_CMN_READY,4,2                  ; @CMN_READY
	.comm	_PHY_MODE_SET_TIMEOUT,4,2       ; @PHY_MODE_SET_TIMEOUT
l_.str.2:                               ; @.str.2
	.asciz	"wait pma ready timeout\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_tcphy_phy_init
.subsections_via_symbols
