	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_dp_link_down
_intel_dp_link_down:                    ## @intel_dp_link_down
	.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	%rdi, %r13
	callq	_dp_to_dig_port
	movq	%rax, %rbx
	movq	(%rax), %rdi
	movq	8(%rax), %r15
	callq	_to_intel_crtc
	movq	%rax, %r12
	movl	(%r13), %r14d
	movq	%r15, %rdi
	callq	_HAS_DDI
	testq	%rax, %rax
	jne	LBB0_12
## %bb.1:
	movl	8(%r13), %edi
	callq	_I915_READ
	movq	_DP_PORT_EN@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	andl	(%rcx), %eax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	%r15, %rdi
	callq	_HAS_PCH_CPT
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r15, %rdi
	callq	_IS_GEN7
	movq	_DP_LINK_TRAIN_MASK_CPT@GOTPCREL(%rip), %rdx
	movq	_DP_LINK_TRAIN_PAT_IDLE_CPT@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	movq	%r13, %rdi
	callq	_is_cpu_edp
	movq	_DP_LINK_TRAIN_MASK_CPT@GOTPCREL(%rip), %rdx
	movq	_DP_LINK_TRAIN_PAT_IDLE_CPT@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	je	LBB0_6
LBB0_5:
	movq	_DP_LINK_TRAIN_MASK@GOTPCREL(%rip), %rdx
	movq	_DP_LINK_TRAIN_PAT_IDLE@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	(%rdx), %eax
	notl	%eax
	andl	%eax, %r14d
	movl	8(%r13), %edi
	movl	(%rcx), %esi
	orl	%r14d, %esi
	callq	_I915_WRITE
	movl	8(%r13), %edi
	callq	_POSTING_READ
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_intel_wait_for_vblank
	movq	%r15, %rdi
	callq	_HAS_PCH_IBX
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movl	8(%r13), %edi
	callq	_I915_READ
	movq	_DP_PIPEB_SELECT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_11
## %bb.8:
	notl	%ecx
	andl	%ecx, %r14d
	movl	8(%r13), %edi
	xorl	%eax, %eax
	cmpq	$0, (%rbx)
	sete	%al
	movl	%eax, %ebx
	movl	%r14d, %esi
	callq	_I915_WRITE
	movl	%ebx, %edi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movl	8(%r13), %edi
	callq	_POSTING_READ
	movl	$50, %edi
	callq	_msleep
	jmp	LBB0_11
LBB0_10:
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_intel_wait_for_vblank
LBB0_11:
	movq	_DP_PORT_EN@GOTPCREL(%rip), %rcx
	movq	_DP_AUDIO_OUTPUT_ENABLE@GOTPCREL(%rip), %rax
	movl	8(%r13), %edi
	movl	(%rcx), %esi
	orl	(%rax), %esi
	notl	%esi
	andl	%r14d, %esi
	callq	_I915_WRITE
	movl	8(%r13), %edi
	callq	_POSTING_READ
	movl	4(%r13), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msleep                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_PORT_EN,4,2                 ## @DP_PORT_EN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_DP_LINK_TRAIN_MASK_CPT,4,2     ## @DP_LINK_TRAIN_MASK_CPT
	.comm	_DP_LINK_TRAIN_PAT_IDLE_CPT,4,2 ## @DP_LINK_TRAIN_PAT_IDLE_CPT
	.comm	_DP_LINK_TRAIN_MASK,4,2         ## @DP_LINK_TRAIN_MASK
	.comm	_DP_LINK_TRAIN_PAT_IDLE,4,2     ## @DP_LINK_TRAIN_PAT_IDLE
	.comm	_DP_PIPEB_SELECT,4,2            ## @DP_PIPEB_SELECT
	.comm	_DP_AUDIO_OUTPUT_ENABLE,4,2     ## @DP_AUDIO_OUTPUT_ENABLE
	.no_dead_strip	_intel_dp_link_down
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_dp_link_down
_intel_dp_link_down:                    ; @intel_dp_link_down
	.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	x19, x0
	bl	_dp_to_dig_port
	mov	x22, x0
	ldp	x0, x20, [x0]
	bl	_to_intel_crtc
	mov	x21, x0
	ldr	w23, [x19]
	mov	x0, x20
	bl	_HAS_DDI
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x19, #8]
	bl	_I915_READ
Lloh0:
	adrp	x24, _DP_PORT_EN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DP_PORT_EN@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_3
LBB0_2:
	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
LBB0_3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x20
	bl	_HAS_PCH_CPT
	cbz	x0, LBB0_7
; %bb.4:
	mov	x0, x20
	bl	_IS_GEN7
	cbz	x0, LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _DP_LINK_TRAIN_MASK_CPT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DP_LINK_TRAIN_MASK_CPT@GOTPAGEOFF]
Lloh6:
	adrp	x9, _DP_LINK_TRAIN_PAT_IDLE_CPT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DP_LINK_TRAIN_PAT_IDLE_CPT@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_is_cpu_edp
	cbz	w0, LBB0_5
LBB0_7:
Lloh8:
	adrp	x8, _DP_LINK_TRAIN_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DP_LINK_TRAIN_MASK@GOTPAGEOFF]
Lloh10:
	adrp	x9, _DP_LINK_TRAIN_PAT_IDLE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _DP_LINK_TRAIN_PAT_IDLE@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	bic	w23, w23, w8
	ldr	w0, [x19, #8]
	ldr	w8, [x9]
	orr	w1, w8, w23
	bl	_I915_WRITE
	ldr	w0, [x19, #8]
	bl	_POSTING_READ
	ldr	w1, [x21]
	mov	x0, x20
	bl	_intel_wait_for_vblank
	mov	x0, x20
	bl	_HAS_PCH_IBX
	cbz	x0, LBB0_13
; %bb.9:
	ldr	w0, [x19, #8]
	bl	_I915_READ
Lloh12:
	adrp	x8, _DP_PIPEB_SELECT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DP_PIPEB_SELECT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_13
; %bb.10:
	ldr	x22, [x22]
	bic	w23, w23, w8
	ldr	w0, [x19, #8]
	mov	x1, x23
	bl	_I915_WRITE
	cmp	x22, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_12
; %bb.11:
	ldr	w0, [x19, #8]
	bl	_POSTING_READ
	mov	w0, #50
	bl	_msleep
	b	LBB0_13
LBB0_12:
	ldr	w1, [x21]
	mov	x0, x20
	bl	_intel_wait_for_vblank
LBB0_13:
Lloh15:
	adrp	x8, _DP_AUDIO_OUTPUT_ENABLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DP_AUDIO_OUTPUT_ENABLE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	ldr	w0, [x19, #8]
	ldr	w9, [x24]
	orr	w8, w9, w8
	bic	w1, w23, w8
	bl	_I915_WRITE
	ldr	w0, [x19, #8]
	bl	_POSTING_READ
	ldr	w0, [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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_msleep
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_PORT_EN,4,2                 ; @DP_PORT_EN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_DP_LINK_TRAIN_MASK_CPT,4,2     ; @DP_LINK_TRAIN_MASK_CPT
	.comm	_DP_LINK_TRAIN_PAT_IDLE_CPT,4,2 ; @DP_LINK_TRAIN_PAT_IDLE_CPT
	.comm	_DP_LINK_TRAIN_MASK,4,2         ; @DP_LINK_TRAIN_MASK
	.comm	_DP_LINK_TRAIN_PAT_IDLE,4,2     ; @DP_LINK_TRAIN_PAT_IDLE
	.comm	_DP_PIPEB_SELECT,4,2            ; @DP_PIPEB_SELECT
	.comm	_DP_AUDIO_OUTPUT_ENABLE,4,2     ; @DP_AUDIO_OUTPUT_ENABLE
	.no_dead_strip	_intel_dp_link_down
.subsections_via_symbols
