	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function icl_tc_phy_connect
_icl_tc_phy_connect:                    ## @icl_tc_phy_connect
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r13
	callq	_icl_tc_phy_status_complete
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_icl_tc_phy_set_safe_mode
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movl	(%r13), %edi
	callq	_WARN_ON
	testl	%eax, %eax
	je	LBB0_11
LBB0_4:
	movq	%r13, %rdi
	callq	_intel_tc_port_fia_max_lane_count
	movl	%eax, %r15d
	cmpl	$0, (%r13)
	je	LBB0_6
## %bb.5:
	xorl	%edi, %edi
	cmpl	$4, %r15d
	setne	%dil
	callq	_WARN_ON
	movq	_TC_PORT_LEGACY@GOTPCREL(%rip), %rbx
	jmp	LBB0_12
LBB0_1:
	movl	8(%r13), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_11
LBB0_6:
	movq	%r13, %rdi
	callq	_tc_port_live_status_mask
	movl	%eax, %r12d
	movq	_TC_PORT_DP_ALT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_BIT
	testl	%r12d, %eax
	je	LBB0_7
## %bb.8:
	cmpl	%r14d, %r15d
	jge	LBB0_12
## %bb.9:
	movl	8(%r13), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	jmp	LBB0_10
LBB0_7:
	movl	8(%r13), %esi
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_10:
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_icl_tc_phy_set_safe_mode
LBB0_11:
	movq	_TC_PORT_TBT_ALT@GOTPCREL(%rip), %rbx
LBB0_12:
	movl	(%rbx), %eax
	movl	%eax, 4(%r13)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Port %s: PHY not ready\n"

	.comm	_TC_PORT_LEGACY,4,2             ## @TC_PORT_LEGACY
	.comm	_TC_PORT_DP_ALT,4,2             ## @TC_PORT_DP_ALT
L_.str.1:                               ## @.str.1
	.asciz	"Port %s: PHY sudden disconnect\n"

L_.str.2:                               ## @.str.2
	.asciz	"Port %s: PHY max lanes %d < required lanes %d\n"

	.comm	_TC_PORT_TBT_ALT,4,2            ## @TC_PORT_TBT_ALT
	.no_dead_strip	_icl_tc_phy_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function icl_tc_phy_connect
_icl_tc_phy_connect:                    ; @icl_tc_phy_connect
	.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	x20, x1
	mov	x19, x0
	bl	_icl_tc_phy_status_complete
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x19
	mov	w1, #0
	bl	_icl_tc_phy_set_safe_mode
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	w0, [x19]
	bl	_WARN_ON
	cbz	w0, LBB0_11
LBB0_3:
	mov	x0, x19
	bl	_intel_tc_port_fia_max_lane_count
	mov	x21, x0
	ldr	w8, [x19]
	cbz	w8, LBB0_6
; %bb.4:
	cmp	w21, #4
	cset	w0, ne
	bl	_WARN_ON
Lloh0:
	adrp	x8, _TC_PORT_LEGACY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TC_PORT_LEGACY@GOTPAGEOFF]
	b	LBB0_12
LBB0_5:
	ldr	w1, [x19, #8]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	b	LBB0_11
LBB0_6:
	mov	x0, x19
	bl	_tc_port_live_status_mask
	mov	x22, x0
Lloh4:
	adrp	x8, _TC_PORT_DP_ALT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TC_PORT_DP_ALT@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_BIT
	tst	w0, w22
	b.eq	LBB0_9
; %bb.7:
	cmp	w21, w20
	b.ge	LBB0_13
; %bb.8:
	ldr	w1, [x19, #8]
	stp	x21, x20, [sp]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:
	ldr	w1, [x19, #8]
Lloh9:
	adrp	x0, l_.str.1@PAGE
Lloh10:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_10:
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	mov	w1, #1
	bl	_icl_tc_phy_set_safe_mode
LBB0_11:
Lloh11:
	adrp	x8, _TC_PORT_TBT_ALT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TC_PORT_TBT_ALT@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	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_13:
Lloh13:
	adrp	x8, _TC_PORT_DP_ALT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TC_PORT_DP_ALT@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Port %s: PHY not ready\n"

	.comm	_TC_PORT_LEGACY,4,2             ; @TC_PORT_LEGACY
	.comm	_TC_PORT_DP_ALT,4,2             ; @TC_PORT_DP_ALT
l_.str.1:                               ; @.str.1
	.asciz	"Port %s: PHY sudden disconnect\n"

l_.str.2:                               ; @.str.2
	.asciz	"Port %s: PHY max lanes %d < required lanes %d\n"

	.comm	_TC_PORT_TBT_ALT,4,2            ; @TC_PORT_TBT_ALT
	.no_dead_strip	_icl_tc_phy_connect
.subsections_via_symbols
