	.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	%rdx, %r14
	movq	%rsi, %r15
	movq	(%rdi), %rbx
	callq	_to_lvds_encoder
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_to_i915
	movq	%rax, %r12
	movl	(%r13), %ebx
	movl	%ebx, %edi
	callq	_I915_READ
	movq	_LVDS_PORT_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	xorl	%edi, %edi
	callq	_PP_CONTROL
	movl	%eax, %ebx
	xorl	%edi, %edi
	callq	_PP_CONTROL
	movl	%eax, %edi
	callq	_I915_READ
	movq	_PANEL_POWER_ON@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_I915_WRITE
	movl	(%r13), %edi
	callq	_POSTING_READ
	xorl	%edi, %edi
	callq	_PP_STATUS
	movq	_PP_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	movl	$5000, %ecx                     ## imm = 0x1388
	callq	_intel_de_wait_for_set
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_2:
	movq	%r15, %rdi
	movq	%r14, %rsi
	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	_LVDS_PORT_EN,4,2               ## @LVDS_PORT_EN
	.comm	_PANEL_POWER_ON,4,2             ## @PANEL_POWER_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	x19, x2
	mov	x20, x1
	ldr	x21, [x0]
	bl	_to_lvds_encoder
	mov	x22, x0
	mov	x0, x21
	bl	_to_i915
	mov	x21, x0
	ldr	w23, [x22]
	mov	x0, x23
	bl	_I915_READ
Lloh0:
	adrp	x8, _LVDS_PORT_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _LVDS_PORT_EN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w1, w8, w0
	mov	x0, x23
	bl	_I915_WRITE
	mov	w0, #0
	bl	_PP_CONTROL
	mov	x23, x0
	mov	w0, #0
	bl	_PP_CONTROL
	bl	_I915_READ
Lloh3:
	adrp	x8, _PANEL_POWER_ON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PANEL_POWER_ON@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w1, w8, w0
	mov	x0, x23
	bl	_I915_WRITE
	ldr	w0, [x22]
	bl	_POSTING_READ
	mov	w0, #0
	bl	_PP_STATUS
	mov	x1, x0
Lloh6:
	adrp	x8, _PP_ON@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PP_ON@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x21
	mov	w3, #5000
	bl	_intel_de_wait_for_set
	cbz	x0, LBB0_2
; %bb.1:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_2:
	mov	x0, x20
	mov	x1, 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	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_LVDS_PORT_EN,4,2               ; @LVDS_PORT_EN
	.comm	_PANEL_POWER_ON,4,2             ; @PANEL_POWER_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
