	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdv_intel_edp_panel_on
_cdv_intel_edp_panel_on:                ## @cdv_intel_edp_panel_on
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	movl	$1, %r14d
	cmpl	$0, (%rbx)
	jne	LBB0_5
## %bb.1:
	movq	_PP_ON@GOTPCREL(%rip), %rax
	movq	_PP_SEQUENCE_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	orl	(%rax), %r15d
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	movq	_PP_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_REG_READ
	movq	_PANEL_UNLOCK_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movq	_PANEL_UNLOCK_REGS@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_POWER_TARGET_ON@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	(%r12), %edi
	callq	_REG_WRITE
	movl	(%r12), %edi
	callq	_REG_READ
	movq	_PP_STATUS@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_REG_READ
	notl	%eax
	xorl	%edi, %edi
	testl	%eax, %r15d
	sete	%dil
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_wait_for
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movl	(%r12), %edi
	callq	_REG_READ
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_DEBUG_KMS
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movl	$1, %eax
LBB0_4:
	movl	%eax, (%rbx)
	movl	4(%rbx), %edi
	callq	_msleep
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PP_ON,4,2                      ## @PP_ON
	.comm	_PP_SEQUENCE_NONE,4,2           ## @PP_SEQUENCE_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_PP_CONTROL,4,2                 ## @PP_CONTROL
	.comm	_PANEL_UNLOCK_MASK,4,2          ## @PANEL_UNLOCK_MASK
	.comm	_PANEL_UNLOCK_REGS,4,2          ## @PANEL_UNLOCK_REGS
	.comm	_POWER_TARGET_ON,4,2            ## @POWER_TARGET_ON
	.comm	_PP_STATUS,4,2                  ## @PP_STATUS
L_.str.1:                               ## @.str.1
	.asciz	"Error in Powering up eDP panel, status %x\n"

	.no_dead_strip	_cdv_intel_edp_panel_on
.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_on
_cdv_intel_edp_panel_on:                ; @cdv_intel_edp_panel_on
	.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
	ldr	x19, [x0]
	ldr	w8, [x19]
	cbz	w8, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_6
LBB0_2:
Lloh0:
	adrp	x8, _PP_ON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PP_ON@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PP_SEQUENCE_NONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PP_SEQUENCE_NONE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w21, w9, w8
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
Lloh8:
	adrp	x20, _PP_CONTROL@GOTPAGE
Lloh9:
	ldr	x20, [x20, _PP_CONTROL@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_REG_READ
Lloh10:
	adrp	x8, _PANEL_UNLOCK_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PANEL_UNLOCK_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	bic	w8, w0, w8
Lloh13:
	adrp	x9, _PANEL_UNLOCK_REGS@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PANEL_UNLOCK_REGS@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
Lloh16:
	adrp	x10, _POWER_TARGET_ON@GOTPAGE
Lloh17:
	ldr	x10, [x10, _POWER_TARGET_ON@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	orr	w8, w8, w9
	orr	w1, w8, w10
	ldr	w0, [x20]
	bl	_REG_WRITE
	ldr	w0, [x20]
	bl	_REG_READ
Lloh19:
	adrp	x20, _PP_STATUS@GOTPAGE
Lloh20:
	ldr	x20, [x20, _PP_STATUS@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_REG_READ
	bics	wzr, w21, w0
	cset	w0, eq
	mov	w1, #1000
	bl	_wait_for
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x20]
	bl	_REG_READ
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh21:
	adrp	x0, l_.str.1@PAGE
Lloh22:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	w8, #0
	b	LBB0_5
LBB0_4:
	mov	w8, #1
LBB0_5:
	str	w8, [x19]
	ldr	w0, [x19, #4]
	bl	_msleep
	mov	w0, #0
LBB0_6:
	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	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_PP_ON,4,2                      ; @PP_ON
	.comm	_PP_SEQUENCE_NONE,4,2           ; @PP_SEQUENCE_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_PP_CONTROL,4,2                 ; @PP_CONTROL
	.comm	_PANEL_UNLOCK_MASK,4,2          ; @PANEL_UNLOCK_MASK
	.comm	_PANEL_UNLOCK_REGS,4,2          ; @PANEL_UNLOCK_REGS
	.comm	_POWER_TARGET_ON,4,2            ; @POWER_TARGET_ON
	.comm	_PP_STATUS,4,2                  ; @PP_STATUS
l_.str.1:                               ; @.str.1
	.asciz	"Error in Powering up eDP panel, status %x\n"

	.no_dead_strip	_cdv_intel_edp_panel_on
.subsections_via_symbols
