	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_enable_lvds
_intel_enable_lvds:                     ## @intel_enable_lvds
	.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, %rbx
	movq	8(%rdi), %r15
	callq	_to_lvds_encoder
	movq	%rax, %r13
	movl	(%rbx), %edi
	callq	_to_intel_crtc
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_HAS_PCH_SPLIT
	testq	%rax, %rax
	movq	_PCH_PP_STATUS@GOTPCREL(%rip), %rax
	cmoveq	_PP_STATUS@GOTPCREL(%rip), %rax
	movq	_PCH_PP_CONTROL@GOTPCREL(%rip), %rcx
	cmoveq	_PP_CONTROL@GOTPCREL(%rip), %rcx
	movl	(%rax), %r12d
	movl	(%rcx), %ebx
	movl	(%r13), %r14d
	movl	%r14d, %edi
	callq	_I915_READ
	movq	_LVDS_PORT_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	movl	%ebx, %edi
	callq	_I915_READ
	movq	_POWER_TARGET_ON@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	movl	(%r13), %edi
	callq	_POSTING_READ
	movl	%r12d, %edi
	callq	_I915_READ
	movq	_PP_ON@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	andl	(%rcx), %eax
	setne	%dil
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_wait_for
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_2:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_panel_enable_backlight   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PCH_PP_CONTROL,4,2             ## @PCH_PP_CONTROL
	.comm	_PCH_PP_STATUS,4,2              ## @PCH_PP_STATUS
	.comm	_PP_CONTROL,4,2                 ## @PP_CONTROL
	.comm	_PP_STATUS,4,2                  ## @PP_STATUS
	.comm	_LVDS_PORT_EN,4,2               ## @LVDS_PORT_EN
	.comm	_POWER_TARGET_ON,4,2            ## @POWER_TARGET_ON
	.comm	_PP_ON,4,2                      ## @PP_ON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timed out waiting for panel to power on\n"

	.no_dead_strip	_intel_enable_lvds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_enable_lvds
_intel_enable_lvds:                     ; @intel_enable_lvds
	.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	x20, x0
	ldr	x19, [x0, #8]
	bl	_to_lvds_encoder
	mov	x21, x0
	ldr	w0, [x20]
	bl	_to_intel_crtc
	mov	x20, x0
	mov	x0, x19
	bl	_HAS_PCH_SPLIT
Lloh0:
	adrp	x8, _PP_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PP_STATUS@GOTPAGEOFF]
Lloh2:
	adrp	x9, _PCH_PP_STATUS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _PCH_PP_STATUS@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x8, x9, eq
Lloh4:
	adrp	x9, _PP_CONTROL@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PP_CONTROL@GOTPAGEOFF]
	ldr	w22, [x8]
Lloh6:
	adrp	x8, _PCH_PP_CONTROL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PCH_PP_CONTROL@GOTPAGEOFF]
	csel	x8, x9, x8, eq
	ldr	w23, [x8]
	ldr	w24, [x21]
	mov	x0, x24
	bl	_I915_READ
Lloh8:
	adrp	x8, _LVDS_PORT_EN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LVDS_PORT_EN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	orr	w1, w8, w0
	mov	x0, x24
	bl	_I915_WRITE
	mov	x0, x23
	bl	_I915_READ
Lloh11:
	adrp	x8, _POWER_TARGET_ON@GOTPAGE
Lloh12:
	ldr	x8, [x8, _POWER_TARGET_ON@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	orr	w1, w8, w0
	mov	x0, x23
	bl	_I915_WRITE
	ldr	w0, [x21]
	bl	_POSTING_READ
	mov	x0, x22
	bl	_I915_READ
Lloh14:
	adrp	x8, _PP_ON@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PP_ON@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, ne
	mov	w1, #1000
	bl	_wait_for
	cbz	x0, LBB0_2
; %bb.1:
Lloh17:
	adrp	x0, l_.str@PAGE
Lloh18:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_2:
	ldr	w1, [x20]
	mov	x0, x19
	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	_intel_panel_enable_backlight
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_PCH_PP_CONTROL,4,2             ; @PCH_PP_CONTROL
	.comm	_PCH_PP_STATUS,4,2              ; @PCH_PP_STATUS
	.comm	_PP_CONTROL,4,2                 ; @PP_CONTROL
	.comm	_PP_STATUS,4,2                  ; @PP_STATUS
	.comm	_LVDS_PORT_EN,4,2               ; @LVDS_PORT_EN
	.comm	_POWER_TARGET_ON,4,2            ; @POWER_TARGET_ON
	.comm	_PP_ON,4,2                      ; @PP_ON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timed out waiting for panel to power on\n"

	.no_dead_strip	_intel_enable_lvds
.subsections_via_symbols
