	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i9xx_enable_backlight
_i9xx_enable_backlight:                 ## @i9xx_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, %r14
	movl	(%rsi), %edi
	callq	_to_intel_connector
	movq	%rax, %r12
	movl	24(%rax), %edi
	callq	_to_i915
	movq	%rax, %r15
	movq	_BLC_PWM_CTL@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_I915_READ
	movq	_BACKLIGHT_DUTY_CYCLE_MASK_PNV@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movl	(%r13), %edi
	xorl	%esi, %esi
	callq	_I915_WRITE
LBB0_2:
	movslq	(%r12), %rax
	imulq	$-2139062143, %rax, %rbx        ## imm = 0x80808081
	shrq	$32, %rbx
	addl	%eax, %ebx
	movl	%ebx, %ecx
	shrl	$31, %ecx
	shrl	$7, %ebx
	addl	%ecx, %ebx
	xorl	%ecx, %ecx
	cmpq	$0, 16(%r12)
	movq	_BLM_LEGACY_MODE@GOTPCREL(%rip), %rdx
	cmovnel	(%rdx), %ecx
	cmovel	%eax, %ebx
	shll	$17, %ebx
	orl	%ecx, %ebx
	movq	%r15, %rdi
	callq	_IS_PINEVIEW
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	cmpq	$0, 8(%r12)
	je	LBB0_5
## %bb.4:
	movq	_BLM_POLARITY_PNV@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_5:
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	(%r13), %edi
	callq	_POSTING_READ
	movl	4(%r12), %esi
	movq	%r14, %rdi
	callq	_intel_panel_actually_set_backlight
	movq	%r15, %rdi
	movl	$2, %esi
	callq	_IS_GEN
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	_BLC_HIST_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BLM_HISTOGRAM_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_I915_WRITE                     ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLC_PWM_CTL,4,2                ## @BLC_PWM_CTL
	.comm	_BACKLIGHT_DUTY_CYCLE_MASK_PNV,4,2 ## @BACKLIGHT_DUTY_CYCLE_MASK_PNV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"backlight already enabled\n"

	.comm	_BLM_LEGACY_MODE,4,2            ## @BLM_LEGACY_MODE
	.comm	_BLM_POLARITY_PNV,4,2           ## @BLM_POLARITY_PNV
	.comm	_BLC_HIST_CTL,4,2               ## @BLC_HIST_CTL
	.comm	_BLM_HISTOGRAM_ENABLE,4,2       ## @BLM_HISTOGRAM_ENABLE
	.no_dead_strip	_i9xx_enable_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i9xx_enable_backlight
_i9xx_enable_backlight:                 ; @i9xx_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	x21, x0
	ldr	w0, [x0, #24]
	bl	_to_i915
	mov	x20, x0
Lloh0:
	adrp	x23, _BLC_PWM_CTL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _BLC_PWM_CTL@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_I915_READ
Lloh2:
	adrp	x8, _BACKLIGHT_DUTY_CYCLE_MASK_PNV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BACKLIGHT_DUTY_CYCLE_MASK_PNV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	ldr	w0, [x23]
	mov	w1, #0
	bl	_I915_WRITE
LBB0_2:
	ldrsw	x8, [x21]
	ldr	x9, [x21, #16]
	mov	x10, #-32639
	movk	x10, #32896, lsl #16
	mul	x10, x8, x10
	lsr	x10, x10, #32
	add	w10, w10, w8
	asr	w11, w10, #7
	add	w10, w11, w10, lsr #31
	cmp	x9, #0
	csel	w8, w8, w10, eq
Lloh7:
	adrp	x9, _BLM_LEGACY_MODE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _BLM_LEGACY_MODE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	csel	w9, wzr, w9, eq
	orr	w22, w9, w8, lsl #17
	mov	x0, x20
	bl	_IS_PINEVIEW
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_5
; %bb.4:
Lloh10:
	adrp	x8, _BLM_POLARITY_PNV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _BLM_POLARITY_PNV@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	orr	w22, w8, w22
LBB0_5:
	ldr	w0, [x23]
	mov	x1, x22
	bl	_I915_WRITE
	ldr	w0, [x23]
	bl	_POSTING_READ
	ldr	w1, [x21, #4]
	mov	x0, x19
	bl	_intel_panel_actually_set_backlight
	mov	x0, x20
	mov	w1, #2
	bl	_IS_GEN
	cbz	x0, LBB0_7
; %bb.6:
Lloh13:
	adrp	x8, _BLC_HIST_CTL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _BLC_HIST_CTL@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x8, _BLM_HISTOGRAM_ENABLE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BLM_HISTOGRAM_ENABLE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	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	_I915_WRITE
LBB0_7:
	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
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_BLC_PWM_CTL,4,2                ; @BLC_PWM_CTL
	.comm	_BACKLIGHT_DUTY_CYCLE_MASK_PNV,4,2 ; @BACKLIGHT_DUTY_CYCLE_MASK_PNV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"backlight already enabled\n"

	.comm	_BLM_LEGACY_MODE,4,2            ; @BLM_LEGACY_MODE
	.comm	_BLM_POLARITY_PNV,4,2           ; @BLM_POLARITY_PNV
	.comm	_BLC_HIST_CTL,4,2               ; @BLC_HIST_CTL
	.comm	_BLM_HISTOGRAM_ENABLE,4,2       ; @BLM_HISTOGRAM_ENABLE
	.no_dead_strip	_i9xx_enable_backlight
.subsections_via_symbols
