	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cnp_enable_backlight
_cnp_enable_backlight:                  ## @cnp_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	(%rsi), %edi
	callq	_to_intel_connector
	movq	%rax, %rbx
	movl	24(%rax), %edi
	callq	_to_i915
	movl	4(%rbx), %edi
	callq	_BXT_BLC_PWM_CTL
	movl	%eax, %edi
	callq	_I915_READ
	movq	_BXT_BLC_PWM_ENABLE@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, %r15d
	movl	4(%rbx), %edi
	callq	_BXT_BLC_PWM_CTL
	movl	%eax, %edi
	movl	%r15d, %esi
	callq	_I915_WRITE
LBB0_2:
	movl	4(%rbx), %edi
	callq	_BXT_BLC_PWM_FREQ
	movl	(%rbx), %esi
	movl	%eax, %edi
	callq	_I915_WRITE
	movl	16(%rbx), %esi
	movq	%r14, %rdi
	callq	_intel_panel_actually_set_backlight
	xorl	%r14d, %r14d
	cmpq	$0, 8(%rbx)
	je	LBB0_4
## %bb.3:
	movq	_BXT_BLC_PWM_POLARITY@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_4:
	movl	4(%rbx), %edi
	callq	_BXT_BLC_PWM_CTL
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_I915_WRITE
	movl	4(%rbx), %edi
	callq	_BXT_BLC_PWM_CTL
	movl	%eax, %edi
	callq	_POSTING_READ
	movl	4(%rbx), %edi
	callq	_BXT_BLC_PWM_CTL
	orl	(%r12), %r14d
	movl	%eax, %edi
	movl	%r14d, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BXT_BLC_PWM_ENABLE,4,2         ## @BXT_BLC_PWM_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"backlight already enabled\n"

	.comm	_BXT_BLC_PWM_POLARITY,4,2       ## @BXT_BLC_PWM_POLARITY
	.no_dead_strip	_cnp_enable_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cnp_enable_backlight
_cnp_enable_backlight:                  ; @cnp_enable_backlight
	.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, x1
	ldr	w0, [x1]
	bl	_to_intel_connector
	mov	x19, x0
	ldr	w0, [x0, #24]
	bl	_to_i915
	ldr	w0, [x19, #4]
	bl	_BXT_BLC_PWM_CTL
	bl	_I915_READ
Lloh0:
	adrp	x22, _BXT_BLC_PWM_ENABLE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _BXT_BLC_PWM_ENABLE@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	mov	x21, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w8, [x22]
	bic	w21, w21, w8
	ldr	w0, [x19, #4]
	bl	_BXT_BLC_PWM_CTL
	mov	x1, x21
	bl	_I915_WRITE
LBB0_2:
	ldr	w0, [x19, #4]
	bl	_BXT_BLC_PWM_FREQ
	ldr	w1, [x19]
	bl	_I915_WRITE
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_intel_panel_actually_set_backlight
	ldr	x8, [x19, #8]
Lloh4:
	adrp	x9, _BXT_BLC_PWM_POLARITY@GOTPAGE
Lloh5:
	ldr	x9, [x9, _BXT_BLC_PWM_POLARITY@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w20, wzr, w9, eq
	ldr	w0, [x19, #4]
	bl	_BXT_BLC_PWM_CTL
	mov	x1, x20
	bl	_I915_WRITE
	ldr	w0, [x19, #4]
	bl	_BXT_BLC_PWM_CTL
	bl	_POSTING_READ
	ldr	w0, [x19, #4]
	bl	_BXT_BLC_PWM_CTL
	ldr	w8, [x22]
	orr	w1, w8, w20
	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	_I915_WRITE
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_BXT_BLC_PWM_ENABLE,4,2         ; @BXT_BLC_PWM_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"backlight already enabled\n"

	.comm	_BXT_BLC_PWM_POLARITY,4,2       ; @BXT_BLC_PWM_POLARITY
	.no_dead_strip	_cnp_enable_backlight
.subsections_via_symbols
