	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_dp_check_link_status     ## -- Begin function intel_dp_check_link_status
	.p2align	4, 0x90
_intel_dp_check_link_status:            ## @intel_dp_check_link_status
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	callq	_dp_to_dig_port
	movq	%rax, %rbx
	movq	%rsp, %r12
	movq	_DP_LINK_STATUS_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	cmpl	$0, 4(%rbx)
	je	LBB0_13
## %bb.1:
	xorl	%edi, %edi
	cmpl	$0, (%rbx)
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_13
## %bb.2:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_intel_dp_get_link_status
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	callq	_intel_dp_get_dpcd
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:
	movq	(%r14), %rax
	movq	_DP_DPCD_REV@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	$17, (%rax,%rcx,4)
	jl	LBB0_11
## %bb.6:
	leaq	-44(%rbp), %rsi
	movq	%r14, %rdi
	callq	_intel_dp_get_sink_irq
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	_DP_DEVICE_SERVICE_IRQ_VECTOR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-44(%rbp), %edx
	movq	%r14, %rdi
	callq	_intel_dp_aux_native_write_1
	movl	-44(%rbp), %eax
	movq	_DP_AUTOMATED_TEST_REQUEST@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	callq	_intel_dp_handle_test_request
	movl	-44(%rbp), %eax
LBB0_9:
	movq	_DP_CP_IRQ@GOTPCREL(%rip), %rcx
	movq	_DP_SINK_SPECIFIC_IRQ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_11
## %bb.10:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_DRIVER
LBB0_11:
	movl	8(%r14), %esi
	movq	%r15, %rdi
	callq	_drm_dp_channel_eq_ok
	testl	%eax, %eax
	jne	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	callq	_drm_get_encoder_name
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG_KMS
	movq	%r14, %rdi
	callq	_intel_dp_start_link_train
	movq	%r14, %rdi
	callq	_intel_dp_complete_link_train
	jmp	LBB0_13
LBB0_3:
	movq	%r14, %rdi
	callq	_intel_dp_link_down
LBB0_13:
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_LINK_STATUS_SIZE,4,2        ## @DP_LINK_STATUS_SIZE
	.comm	_DP_DPCD_REV,8,3                ## @DP_DPCD_REV
	.comm	_DP_DEVICE_SERVICE_IRQ_VECTOR,4,2 ## @DP_DEVICE_SERVICE_IRQ_VECTOR
	.comm	_DP_AUTOMATED_TEST_REQUEST,4,2  ## @DP_AUTOMATED_TEST_REQUEST
	.comm	_DP_CP_IRQ,4,2                  ## @DP_CP_IRQ
	.comm	_DP_SINK_SPECIFIC_IRQ,4,2       ## @DP_SINK_SPECIFIC_IRQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CP or sink specific irq unhandled\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s: channel EQ not ok, retraining\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_dp_check_link_status     ; -- Begin function intel_dp_check_link_status
	.p2align	2
_intel_dp_check_link_status:            ; @intel_dp_check_link_status
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_dp_to_dig_port
	mov	x20, x0
	mov	x22, sp
Lloh3:
	adrp	x8, _DP_LINK_STATUS_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DP_LINK_STATUS_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x21, x9, x8
	mov	sp, x21
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_13
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_13
; %bb.2:
	mov	x0, x19
	mov	x1, x21
	bl	_intel_dp_get_link_status
	cbz	w0, LBB0_12
; %bb.3:
	mov	x0, x19
	bl	_intel_dp_get_dpcd
	cbz	w0, LBB0_12
; %bb.4:
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _DP_DPCD_REV@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DP_DPCD_REV@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	w8, [x8, x9, lsl #2]
	cmp	w8, #17
	b.lt	LBB0_10
; %bb.5:
	sub	x1, x29, #44
	mov	x0, x19
	bl	_intel_dp_get_sink_irq
	cbz	x0, LBB0_10
; %bb.6:
Lloh11:
	adrp	x8, _DP_DEVICE_SERVICE_IRQ_VECTOR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DP_DEVICE_SERVICE_IRQ_VECTOR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldur	w2, [x29, #-44]
	mov	x0, x19
	bl	_intel_dp_aux_native_write_1
	ldur	w8, [x29, #-44]
Lloh14:
	adrp	x9, _DP_AUTOMATED_TEST_REQUEST@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DP_AUTOMATED_TEST_REQUEST@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_intel_dp_handle_test_request
	ldur	w8, [x29, #-44]
LBB0_8:
Lloh17:
	adrp	x9, _DP_CP_IRQ@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DP_CP_IRQ@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x10, _DP_SINK_SPECIFIC_IRQ@GOTPAGE
Lloh21:
	ldr	x10, [x10, _DP_SINK_SPECIFIC_IRQ@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_DRIVER
LBB0_10:
	ldr	w1, [x19, #8]
	mov	x0, x21
	bl	_drm_dp_channel_eq_ok
	cbnz	w0, LBB0_13
; %bb.11:
	mov	x0, x20
	bl	_drm_get_encoder_name
	mov	x1, x0
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x19
	bl	_intel_dp_start_link_train
	mov	x0, x19
	bl	_intel_dp_complete_link_train
	b	LBB0_13
LBB0_12:
	mov	x0, x19
	bl	_intel_dp_link_down
LBB0_13:
	mov	sp, x22
	ldur	x8, [x29, #-40]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	sub	sp, x29, #32
	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_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_LINK_STATUS_SIZE,4,2        ; @DP_LINK_STATUS_SIZE
	.comm	_DP_DPCD_REV,8,3                ; @DP_DPCD_REV
	.comm	_DP_DEVICE_SERVICE_IRQ_VECTOR,4,2 ; @DP_DEVICE_SERVICE_IRQ_VECTOR
	.comm	_DP_AUTOMATED_TEST_REQUEST,4,2  ; @DP_AUTOMATED_TEST_REQUEST
	.comm	_DP_CP_IRQ,4,2                  ; @DP_CP_IRQ
	.comm	_DP_SINK_SPECIFIC_IRQ,4,2       ; @DP_SINK_SPECIFIC_IRQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CP or sink specific irq unhandled\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s: channel EQ not ok, retraining\n"

.subsections_via_symbols
