	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdv_intel_edp_panel_off
_cdv_intel_edp_panel_off:               ## @cdv_intel_edp_panel_off
	.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	_PP_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	(%rdi), %r15
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_PP_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_REG_READ
	movq	_POWER_TARGET_ON@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.1:
	movl	$0, (%r15)
	movq	_PANEL_UNLOCK_MASK@GOTPCREL(%rip), %rdx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	movq	_EDP_FORCE_VDD@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_EDP_BLC_ENABLE@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	notl	%ecx
	andl	%ecx, %eax
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	(%rbx), %edi
	callq	_REG_READ
	movq	_PP_STATUS@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_REG_READ
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movl	(%rbx), %edi
	callq	_REG_READ
	xorl	%edi, %edi
	testl	%r14d, %eax
	sete	%dil
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_wait_for
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
LBB0_3:
	movl	4(%r15), %edi
	callq	_msleep
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_KMS                  ## TAILCALL
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PP_ON,4,2                      ## @PP_ON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_PP_CONTROL,4,2                 ## @PP_CONTROL
	.comm	_POWER_TARGET_ON,4,2            ## @POWER_TARGET_ON
	.comm	_PANEL_UNLOCK_MASK,4,2          ## @PANEL_UNLOCK_MASK
	.comm	_EDP_FORCE_VDD,4,2              ## @EDP_FORCE_VDD
	.comm	_EDP_BLC_ENABLE,4,2             ## @EDP_BLC_ENABLE
L_.str.1:                               ## @.str.1
	.asciz	"PP_STATUS %x\n"

	.comm	_PP_STATUS,4,2                  ## @PP_STATUS
L_.str.2:                               ## @.str.2
	.asciz	"Error in turning off Panel\n"

L_.str.3:                               ## @.str.3
	.asciz	"Over\n"

	.no_dead_strip	_cdv_intel_edp_panel_off
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdv_intel_edp_panel_off
_cdv_intel_edp_panel_off:               ; @cdv_intel_edp_panel_off
	.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
Lloh0:
	adrp	x8, _PP_ON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PP_ON@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	ldr	x19, [x0]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh5:
	adrp	x21, _PP_CONTROL@GOTPAGE
Lloh6:
	ldr	x21, [x21, _PP_CONTROL@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_REG_READ
Lloh7:
	adrp	x8, _POWER_TARGET_ON@GOTPAGE
Lloh8:
	ldr	x8, [x8, _POWER_TARGET_ON@GOTPAGEOFF]
	ldr	w9, [x8]
	tst	w9, w0
	b.eq	LBB0_4
; %bb.1:
	str	wzr, [x19]
Lloh9:
	adrp	x9, _PANEL_UNLOCK_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PANEL_UNLOCK_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	ldr	w8, [x8]
	orr	w8, w8, w9
Lloh12:
	adrp	x9, _EDP_FORCE_VDD@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EDP_FORCE_VDD@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _EDP_BLC_ENABLE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EDP_BLC_ENABLE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w1, w0, w8
	ldr	w0, [x21]
	bl	_REG_WRITE
	ldr	w0, [x21]
	bl	_REG_READ
Lloh18:
	adrp	x21, _PP_STATUS@GOTPAGE
Lloh19:
	ldr	x21, [x21, _PP_STATUS@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_REG_READ
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w0, [x21]
	bl	_REG_READ
	tst	w0, w20
	cset	w0, eq
	mov	w1, #1000
	bl	_wait_for
	cbz	x0, LBB0_3
; %bb.2:
Lloh22:
	adrp	x0, l_.str.2@PAGE
Lloh23:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG_KMS
LBB0_3:
	ldr	w0, [x19, #4]
	bl	_msleep
Lloh24:
	adrp	x0, l_.str.3@PAGE
Lloh25:
	add	x0, x0, l_.str.3@PAGEOFF
	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
	b	_DRM_DEBUG_KMS
LBB0_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
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_PP_ON,4,2                      ; @PP_ON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_PP_CONTROL,4,2                 ; @PP_CONTROL
	.comm	_POWER_TARGET_ON,4,2            ; @POWER_TARGET_ON
	.comm	_PANEL_UNLOCK_MASK,4,2          ; @PANEL_UNLOCK_MASK
	.comm	_EDP_FORCE_VDD,4,2              ; @EDP_FORCE_VDD
	.comm	_EDP_BLC_ENABLE,4,2             ; @EDP_BLC_ENABLE
l_.str.1:                               ; @.str.1
	.asciz	"PP_STATUS %x\n"

	.comm	_PP_STATUS,4,2                  ; @PP_STATUS
l_.str.2:                               ; @.str.2
	.asciz	"Error in turning off Panel\n"

l_.str.3:                               ; @.str.3
	.asciz	"Over\n"

	.no_dead_strip	_cdv_intel_edp_panel_off
.subsections_via_symbols
