	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lpt_enable_backlight
_lpt_enable_backlight:                  ## @lpt_enable_backlight
	.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	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %edi
	callq	_to_intel_connector
	movq	%rax, %r12
	movl	24(%rax), %edi
	callq	_to_i915
	movq	%rax, %r15
	movq	_BLC_PWM_PCH_CTL1@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_I915_READ
	movq	_BLM_PCH_PWM_ENABLE@GOTPCREL(%rip), %r14
	testl	%eax, (%r14)
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
LBB0_2:
	movq	%r15, %rdi
	callq	_HAS_PCH_LPT
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_SOUTH_CHICKEN2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_READ
	movq	_LPT_PWM_GRANULARITY@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_4:
	movq	_SOUTH_CHICKEN1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_READ
	movq	_SPT_PWM_GRANULARITY@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %esi
	movl	%esi, %ecx
	orl	%eax, %ecx
	notl	%esi
	andl	%eax, %esi
	cmpq	$0, 16(%r12)
	cmovnel	%ecx, %esi
	movl	(%rbx), %edi
	callq	_I915_WRITE
	movl	(%r12), %esi
	shll	$16, %esi
	movq	_BLC_PWM_PCH_CTL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_WRITE
	xorl	%ebx, %ebx
	cmpq	$0, 8(%r12)
	movl	$0, %r14d
	je	LBB0_7
## %bb.6:
	movq	_BLM_PCH_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_7:
	movq	%r15, %rdi
	callq	_HAS_PCH_LPT
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_BLM_PCH_OVERRIDE_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_9:
	orl	%r14d, %ebx
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	(%r13), %edi
	callq	_POSTING_READ
	movl	(%r13), %edi
	movq	_BLM_PCH_PWM_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	4(%r12), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_panel_actually_set_backlight ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BLC_PWM_PCH_CTL1,4,2           ## @BLC_PWM_PCH_CTL1
	.comm	_BLM_PCH_PWM_ENABLE,4,2         ## @BLM_PCH_PWM_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pch backlight already enabled\n"

	.comm	_SOUTH_CHICKEN2,4,2             ## @SOUTH_CHICKEN2
	.comm	_LPT_PWM_GRANULARITY,4,2        ## @LPT_PWM_GRANULARITY
	.comm	_SOUTH_CHICKEN1,4,2             ## @SOUTH_CHICKEN1
	.comm	_SPT_PWM_GRANULARITY,4,2        ## @SPT_PWM_GRANULARITY
	.comm	_BLC_PWM_PCH_CTL2,4,2           ## @BLC_PWM_PCH_CTL2
	.comm	_BLM_PCH_POLARITY,4,2           ## @BLM_PCH_POLARITY
	.comm	_BLM_PCH_OVERRIDE_ENABLE,4,2    ## @BLM_PCH_OVERRIDE_ENABLE
	.no_dead_strip	_lpt_enable_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lpt_enable_backlight
_lpt_enable_backlight:                  ; @lpt_enable_backlight
	.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, x1
	ldr	w0, [x1]
	bl	_to_intel_connector
	mov	x20, x0
	ldr	w0, [x0, #24]
	bl	_to_i915
	mov	x21, x0
Lloh0:
	adrp	x23, _BLC_PWM_PCH_CTL1@GOTPAGE
Lloh1:
	ldr	x23, [x23, _BLC_PWM_PCH_CTL1@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_I915_READ
Lloh2:
	adrp	x24, _BLM_PCH_PWM_ENABLE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _BLM_PCH_PWM_ENABLE@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	mov	x22, x0
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x24]
	bic	w1, w22, w8
	ldr	w0, [x23]
	bl	_I915_WRITE
LBB0_2:
	mov	x0, x21
	bl	_HAS_PCH_LPT
	cbz	x0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x22, _SOUTH_CHICKEN2@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SOUTH_CHICKEN2@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_I915_READ
Lloh8:
	adrp	x8, _LPT_PWM_GRANULARITY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LPT_PWM_GRANULARITY@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh10:
	adrp	x22, _SOUTH_CHICKEN1@GOTPAGE
Lloh11:
	ldr	x22, [x22, _SOUTH_CHICKEN1@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_I915_READ
Lloh12:
	adrp	x8, _SPT_PWM_GRANULARITY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SPT_PWM_GRANULARITY@GOTPAGEOFF]
LBB0_5:
	ldr	x9, [x20, #16]
	ldr	w8, [x8]
	orr	w10, w8, w0
	bic	w8, w0, w8
	cmp	x9, #0
	csel	w1, w8, w10, eq
	ldr	w0, [x22]
	bl	_I915_WRITE
	ldr	w8, [x20]
	lsl	w1, w8, #16
Lloh14:
	adrp	x8, _BLC_PWM_PCH_CTL2@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BLC_PWM_PCH_CTL2@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_I915_WRITE
	ldr	x8, [x20, #8]
Lloh17:
	adrp	x9, _BLM_PCH_POLARITY@GOTPAGE
Lloh18:
	ldr	x9, [x9, _BLM_PCH_POLARITY@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w22, wzr, w9, eq
	mov	x0, x21
	bl	_HAS_PCH_LPT
Lloh20:
	adrp	x8, _BLM_PCH_OVERRIDE_ENABLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BLM_PCH_OVERRIDE_ENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	orr	w21, w8, w22
	ldr	w0, [x23]
	mov	x1, x21
	bl	_I915_WRITE
	ldr	w0, [x23]
	bl	_POSTING_READ
	ldr	w0, [x23]
	ldr	w8, [x24]
	orr	w1, w8, w21
	bl	_I915_WRITE
	ldr	w1, [x20, #4]
	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_actually_set_backlight
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_BLC_PWM_PCH_CTL1,4,2           ; @BLC_PWM_PCH_CTL1
	.comm	_BLM_PCH_PWM_ENABLE,4,2         ; @BLM_PCH_PWM_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pch backlight already enabled\n"

	.comm	_SOUTH_CHICKEN2,4,2             ; @SOUTH_CHICKEN2
	.comm	_LPT_PWM_GRANULARITY,4,2        ; @LPT_PWM_GRANULARITY
	.comm	_SOUTH_CHICKEN1,4,2             ; @SOUTH_CHICKEN1
	.comm	_SPT_PWM_GRANULARITY,4,2        ; @SPT_PWM_GRANULARITY
	.comm	_BLC_PWM_PCH_CTL2,4,2           ; @BLC_PWM_PCH_CTL2
	.comm	_BLM_PCH_POLARITY,4,2           ; @BLM_PCH_POLARITY
	.comm	_BLM_PCH_OVERRIDE_ENABLE,4,2    ; @BLM_PCH_OVERRIDE_ENABLE
	.no_dead_strip	_lpt_enable_backlight
.subsections_via_symbols
