	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_disable_lvds
_intel_disable_lvds:                    ## @intel_disable_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_lvds_encoder
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_to_i915
	movq	%rax, %r15
	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
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	%ebx, %edi
	callq	_I915_WRITE
	xorl	%edi, %edi
	callq	_PP_STATUS
	movq	_PP_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r15, %rdi
	movl	%eax, %esi
	movl	$1000, %ecx                     ## imm = 0x3E8
	callq	_intel_de_wait_for_clear
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_2:
	movl	(%r14), %ebx
	movl	%ebx, %edi
	callq	_I915_READ
	movq	_LVDS_PORT_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	%ebx, %edi
	callq	_I915_WRITE
	movl	(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_POSTING_READ                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.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 off\n"

	.comm	_LVDS_PORT_EN,4,2               ## @LVDS_PORT_EN
	.no_dead_strip	_intel_disable_lvds
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_disable_lvds
_intel_disable_lvds:                    ; @intel_disable_lvds
	.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
	mov	x20, x0
	bl	_to_lvds_encoder
	mov	x19, x0
	ldr	w0, [x20]
	bl	_to_i915
	mov	x20, x0
	mov	w0, #0
	bl	_PP_CONTROL
	mov	x21, x0
	mov	w0, #0
	bl	_PP_CONTROL
	bl	_I915_READ
Lloh0:
	adrp	x8, _PANEL_POWER_ON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PANEL_POWER_ON@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	bic	w1, w0, w8
	mov	x0, x21
	bl	_I915_WRITE
	mov	w0, #0
	bl	_PP_STATUS
	mov	x1, x0
Lloh3:
	adrp	x8, _PP_ON@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PP_ON@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #1000
	bl	_intel_de_wait_for_clear
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_2:
	ldr	w20, [x19]
	mov	x0, x20
	bl	_I915_READ
Lloh8:
	adrp	x8, _LVDS_PORT_EN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LVDS_PORT_EN@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	bic	w1, w0, w8
	mov	x0, x20
	bl	_I915_WRITE
	ldr	w0, [x19]
	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	_POSTING_READ
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.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 off\n"

	.comm	_LVDS_PORT_EN,4,2               ; @LVDS_PORT_EN
	.no_dead_strip	_intel_disable_lvds
.subsections_via_symbols
