	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdv_intel_dp_link_down
_cdv_intel_dp_link_down:                ## @cdv_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movl	(%rbx), %r14d
	movl	4(%rbx), %edi
	callq	_REG_READ
	movq	_DP_PORT_EN@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	_DP_LINK_TRAIN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r14d
	movl	4(%rbx), %edi
	movq	_DP_LINK_TRAIN_PAT_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	%r14d, %esi
	callq	_REG_WRITE
	movl	4(%rbx), %edi
	callq	_REG_READ
	movl	$17, %edi
	callq	_msleep
	movl	4(%rbx), %edi
	movl	(%r15), %esi
	notl	%esi
	andl	%r14d, %esi
	callq	_REG_WRITE
	movl	4(%rbx), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_REG_READ                       ## TAILCALL
LBB0_1:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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,4,2         ## @DP_LINK_TRAIN_MASK
	.comm	_DP_LINK_TRAIN_PAT_IDLE,4,2     ## @DP_LINK_TRAIN_PAT_IDLE
	.no_dead_strip	_cdv_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 cdv_intel_dp_link_down
_cdv_intel_dp_link_down:                ; @cdv_intel_dp_link_down
	.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
	ldr	x19, [x0]
	ldp	w21, w0, [x19]
	bl	_REG_READ
Lloh0:
	adrp	x20, _DP_PORT_EN@GOTPAGE
Lloh1:
	ldr	x20, [x20, _DP_PORT_EN@GOTPAGEOFF]
	ldr	w8, [x20]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh4:
	adrp	x8, _DP_LINK_TRAIN_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DP_LINK_TRAIN_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	bic	w21, w21, w8
	ldr	w0, [x19, #4]
Lloh7:
	adrp	x8, _DP_LINK_TRAIN_PAT_IDLE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DP_LINK_TRAIN_PAT_IDLE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	orr	w1, w8, w21
	bl	_REG_WRITE
	ldr	w0, [x19, #4]
	bl	_REG_READ
	mov	w0, #17
	bl	_msleep
	ldr	w0, [x19, #4]
	ldr	w8, [x20]
	bic	w1, w21, w8
	bl	_REG_WRITE
	ldr	w0, [x19, #4]
	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
	b	_REG_READ
LBB0_2:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.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,4,2         ; @DP_LINK_TRAIN_MASK
	.comm	_DP_LINK_TRAIN_PAT_IDLE,4,2     ; @DP_LINK_TRAIN_PAT_IDLE
	.no_dead_strip	_cdv_intel_dp_link_down
.subsections_via_symbols
