	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r12
	callq	_to_lvds_encoder
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_HAS_PCH_SPLIT
	testq	%rax, %rax
	movq	_PCH_PP_STATUS@GOTPCREL(%rip), %rax
	cmoveq	_PP_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_PCH_PP_CONTROL@GOTPCREL(%rip), %rax
	cmoveq	_PP_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_intel_panel_disable_backlight
	movl	%ebx, %edi
	callq	_I915_READ
	movq	_POWER_TARGET_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	%ebx, %edi
	callq	_I915_WRITE
	movl	%r15d, %edi
	callq	_I915_READ
	movq	_PP_ON@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	andl	(%rcx), %eax
	sete	%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:
	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
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_POSTING_READ                   ## 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	_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 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
	ldr	x20, [x0]
	bl	_to_lvds_encoder
	mov	x19, x0
	mov	x0, x20
	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
	ldr	w21, [x8]
Lloh4:
	adrp	x8, _PP_CONTROL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PP_CONTROL@GOTPAGEOFF]
Lloh6:
	adrp	x9, _PCH_PP_CONTROL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PCH_PP_CONTROL@GOTPAGEOFF]
	csel	x8, x8, x9, eq
	ldr	w22, [x8]
	mov	x0, x20
	bl	_intel_panel_disable_backlight
	mov	x0, x22
	bl	_I915_READ
Lloh8:
	adrp	x8, _POWER_TARGET_ON@GOTPAGE
Lloh9:
	ldr	x8, [x8, _POWER_TARGET_ON@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	bic	w1, w0, w8
	mov	x0, x22
	bl	_I915_WRITE
	mov	x0, x21
	bl	_I915_READ
Lloh11:
	adrp	x8, _PP_ON@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PP_ON@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w0, eq
	mov	w1, #1000
	bl	_wait_for
	cbz	x0, LBB0_2
; %bb.1:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_2:
	ldr	w20, [x19]
	mov	x0, x20
	bl	_I915_READ
Lloh16:
	adrp	x8, _LVDS_PORT_EN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LVDS_PORT_EN@GOTPAGEOFF]
Lloh18:
	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	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	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, 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	_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 off\n"

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