	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_dp_retrain_link          ## -- Begin function intel_dp_retrain_link
	.p2align	4, 0x90
_intel_dp_retrain_link:                 ## @intel_dp_retrain_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_enc_to_intel_dp
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.1:
	movq	%rax, %r13
	movq	(%rbx), %rax
	movq	_connector_status_connected@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.2:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_drm_modeset_lock
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.3:
	movq	8(%rbx), %r15
	movl	8(%r15), %edi
	callq	_to_intel_crtc
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:
	movq	%rax, %rbx
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leaq	8(%rax), %rdi
	movq	%r12, %rsi
	callq	_drm_modeset_lock
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.5:
	movl	4(%rbx), %edi
	callq	_to_intel_crtc_state
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_intel_crtc_has_dp_encoder
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	cmpl	$0, 8(%r12)
	je	LBB0_14
## %bb.6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_try_wait_for_completion
	testl	%eax, %eax
	je	LBB0_14
LBB0_8:
	movq	%r13, %rdi
	callq	_intel_dp_needs_link_retrain
	movl	$0, %r15d
	testl	%eax, %eax
	je	LBB0_15
## %bb.9:
	movl	(%rbx), %esi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_intel_set_cpu_fifo_underrun_reporting
	cmpq	$0, (%r12)
	je	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	callq	_intel_crtc_pch_transcoder
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_intel_set_pch_fifo_underrun_reporting
LBB0_11:
	movq	%r13, %rdi
	callq	_intel_dp_start_link_train
	movq	%r13, %rdi
	callq	_intel_dp_stop_link_train
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_intel_wait_for_vblank
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	$1, %edx
	callq	_intel_set_cpu_fifo_underrun_reporting
	cmpq	$0, (%r12)
	je	LBB0_15
## %bb.12:
	movq	%rbx, %rdi
	callq	_intel_crtc_pch_transcoder
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_intel_set_pch_fifo_underrun_reporting
	jmp	LBB0_15
LBB0_14:
	xorl	%r15d, %r15d
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_connector_status_connected,8,3 ## @connector_status_connected
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_dp_retrain_link          ; -- Begin function intel_dp_retrain_link
	.p2align	2
_intel_dp_retrain_link:                 ; @intel_dp_retrain_link
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_to_i915
	mov	x19, x0
	mov	x0, x20
	bl	_enc_to_intel_dp
	ldr	x21, [x0]
	cbz	x21, LBB0_13
; %bb.1:
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _connector_status_connected@GOTPAGE
Lloh1:
	ldr	x9, [x9, _connector_status_connected@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x22
	bl	_drm_modeset_lock
	cbnz	w0, LBB0_14
; %bb.3:
	ldr	x23, [x21, #8]
	ldr	w0, [x23, #8]
	bl	_to_intel_crtc
	cbz	x0, LBB0_14
; %bb.4:
	mov	x21, x0
	add	x0, x0, #8
	mov	x1, x22
	bl	_drm_modeset_lock
	cbnz	w0, LBB0_14
; %bb.5:
	ldr	w0, [x21, #4]
	bl	_to_intel_crtc_state
	mov	x22, x0
	bl	_intel_crtc_has_dp_encoder
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w8, [x22, #8]
	cbz	w8, LBB0_13
; %bb.6:
	ldr	x0, [x23]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_try_wait_for_completion
	cbz	w0, LBB0_14
LBB0_8:
	mov	x0, x20
	bl	_intel_dp_needs_link_retrain
	cbz	w0, LBB0_14
; %bb.9:
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_intel_set_cpu_fifo_underrun_reporting
	ldr	x8, [x22]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x21
	bl	_intel_crtc_pch_transcoder
	mov	x1, x0
	mov	x0, x19
	mov	w2, #0
	bl	_intel_set_pch_fifo_underrun_reporting
LBB0_11:
	mov	x0, x20
	bl	_intel_dp_start_link_train
	mov	x0, x20
	bl	_intel_dp_stop_link_train
	ldr	w1, [x21]
	mov	x0, x19
	bl	_intel_wait_for_vblank
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #1
	bl	_intel_set_cpu_fifo_underrun_reporting
	ldr	x8, [x22]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x21
	bl	_intel_crtc_pch_transcoder
	mov	x1, x0
	mov	x0, x19
	mov	w2, #1
	bl	_intel_set_pch_fifo_underrun_reporting
LBB0_13:
	mov	w0, #0
LBB0_14:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_connector_status_connected,8,3 ; @connector_status_connected
.subsections_via_symbols
