	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pch_enable_backlight
_pch_enable_backlight:                  ## @pch_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	%rdi, %rbx
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %edi
	callq	_to_intel_connector
	movq	%rax, %r12
	movl	24(%rax), %edi
	callq	_to_i915
	movl	(%rbx), %r15d
	movq	_BLC_PWM_CPU_CTL2@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_I915_READ
	movq	_BLM_PWM_ENABLE@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	(%r13), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
LBB0_2:
	movq	_BLC_PWM_PCH_CTL1@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_I915_READ
	movq	_BLM_PCH_PWM_ENABLE@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	(%r13), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
LBB0_4:
	movq	_TRANSCODER_EDP@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_6
## %bb.5:
	movq	_BLM_TRANSCODER_EDP@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_7
LBB0_6:
	movl	%r15d, %edi
	callq	_BLM_PIPE
	movl	%eax, %ebx
LBB0_7:
	movq	%r14, %r15
	movq	_BLM_PWM_ENABLE@GOTPCREL(%rip), %r13
	movq	_BLC_PWM_CPU_CTL2@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	(%r14), %edi
	callq	_POSTING_READ
	movl	(%r14), %edi
	orl	(%r13), %ebx
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	16(%r12), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_intel_panel_actually_set_backlight
	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)
	movq	_BLM_PCH_PWM_ENABLE@GOTPCREL(%rip), %r14
	je	LBB0_9
## %bb.8:
	movq	_BLM_PCH_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_9:
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	(%r15), %edi
	callq	_POSTING_READ
	movl	(%r15), %edi
	orl	(%r14), %ebx
	movl	%ebx, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BLC_PWM_CPU_CTL2,4,2           ## @BLC_PWM_CPU_CTL2
	.comm	_BLM_PWM_ENABLE,4,2             ## @BLM_PWM_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cpu backlight already enabled\n"

	.comm	_BLC_PWM_PCH_CTL1,4,2           ## @BLC_PWM_PCH_CTL1
	.comm	_BLM_PCH_PWM_ENABLE,4,2         ## @BLM_PCH_PWM_ENABLE
L_.str.1:                               ## @.str.1
	.asciz	"pch backlight already enabled\n"

	.comm	_TRANSCODER_EDP,4,2             ## @TRANSCODER_EDP
	.comm	_BLM_TRANSCODER_EDP,4,2         ## @BLM_TRANSCODER_EDP
	.comm	_BLC_PWM_PCH_CTL2,4,2           ## @BLC_PWM_PCH_CTL2
	.comm	_BLM_PCH_POLARITY,4,2           ## @BLM_PCH_POLARITY
	.no_dead_strip	_pch_enable_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pch_enable_backlight
_pch_enable_backlight:                  ; @pch_enable_backlight
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x21, x0
	ldr	w0, [x1]
	bl	_to_intel_connector
	mov	x19, x0
	ldr	w0, [x0, #24]
	bl	_to_i915
	ldr	w21, [x21]
Lloh0:
	adrp	x25, _BLC_PWM_CPU_CTL2@GOTPAGE
Lloh1:
	ldr	x25, [x25, _BLC_PWM_CPU_CTL2@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_I915_READ
Lloh2:
	adrp	x26, _BLM_PWM_ENABLE@GOTPAGE
Lloh3:
	ldr	x26, [x26, _BLM_PWM_ENABLE@GOTPAGEOFF]
	ldr	w8, [x26]
	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, [x26]
	bic	w1, w22, w8
	ldr	w0, [x25]
	bl	_I915_WRITE
LBB0_2:
Lloh6:
	adrp	x23, _BLC_PWM_PCH_CTL1@GOTPAGE
Lloh7:
	ldr	x23, [x23, _BLC_PWM_PCH_CTL1@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_I915_READ
Lloh8:
	adrp	x24, _BLM_PCH_PWM_ENABLE@GOTPAGE
Lloh9:
	ldr	x24, [x24, _BLM_PCH_PWM_ENABLE@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
	mov	x22, x0
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x24]
	bic	w1, w22, w8
	ldr	w0, [x23]
	bl	_I915_WRITE
LBB0_4:
Lloh12:
	adrp	x8, _TRANSCODER_EDP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TRANSCODER_EDP@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w21, w8
	b.ne	LBB0_6
; %bb.5:
Lloh15:
	adrp	x8, _BLM_TRANSCODER_EDP@GOTPAGE
Lloh16:
	ldr	x8, [x8, _BLM_TRANSCODER_EDP@GOTPAGEOFF]
Lloh17:
	ldr	w21, [x8]
	b	LBB0_7
LBB0_6:
	mov	x0, x21
	bl	_BLM_PIPE
	mov	x21, x0
LBB0_7:
	ldr	w0, [x25]
	mov	x1, x21
	bl	_I915_WRITE
	ldr	w0, [x25]
	bl	_POSTING_READ
	ldr	w0, [x25]
	ldr	w8, [x26]
	orr	w1, w8, w21
	bl	_I915_WRITE
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_intel_panel_actually_set_backlight
	ldr	w8, [x19]
	lsl	w1, w8, #16
Lloh18:
	adrp	x8, _BLC_PWM_PCH_CTL2@GOTPAGE
Lloh19:
	ldr	x8, [x8, _BLC_PWM_PCH_CTL2@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_I915_WRITE
	ldr	x8, [x19, #8]
Lloh21:
	adrp	x9, _BLM_PCH_POLARITY@GOTPAGE
Lloh22:
	ldr	x9, [x9, _BLM_PCH_POLARITY@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w19, wzr, w9, eq
	ldr	w0, [x23]
	mov	x1, x19
	bl	_I915_WRITE
	ldr	w0, [x23]
	bl	_POSTING_READ
	ldr	w0, [x23]
	ldr	w8, [x24]
	orr	w1, w8, w19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_I915_WRITE
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_BLC_PWM_CPU_CTL2,4,2           ; @BLC_PWM_CPU_CTL2
	.comm	_BLM_PWM_ENABLE,4,2             ; @BLM_PWM_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cpu backlight already enabled\n"

	.comm	_BLC_PWM_PCH_CTL1,4,2           ; @BLC_PWM_PCH_CTL1
	.comm	_BLM_PCH_PWM_ENABLE,4,2         ; @BLM_PCH_PWM_ENABLE
l_.str.1:                               ; @.str.1
	.asciz	"pch backlight already enabled\n"

	.comm	_TRANSCODER_EDP,4,2             ; @TRANSCODER_EDP
	.comm	_BLM_TRANSCODER_EDP,4,2         ; @BLM_TRANSCODER_EDP
	.comm	_BLC_PWM_PCH_CTL2,4,2           ; @BLC_PWM_PCH_CTL2
	.comm	_BLM_PCH_POLARITY,4,2           ; @BLM_PCH_POLARITY
	.no_dead_strip	_pch_enable_backlight
.subsections_via_symbols
