	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_panel_enable_backlight   ## -- Begin function intel_panel_enable_backlight
	.p2align	4, 0x90
_intel_panel_enable_backlight:          ## @intel_panel_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
	movl	%esi, %ebx
	movq	%rdi, %r13
	movq	(%rdi), %r14
	cmpq	$0, (%r14)
	jne	LBB0_2
## %bb.1:
	movq	%r13, %rdi
	callq	_intel_panel_get_max_backlight
	movq	%rax, (%r14)
LBB0_2:
	movq	%r13, %rdi
	callq	_INTEL_INFO
	cmpl	$4, (%rax)
	jl	LBB0_12
## %bb.3:
	movq	%r13, %rdi
	callq	_HAS_PCH_SPLIT
	testq	%rax, %rax
	jne	LBB0_4
## %bb.5:
	movq	_BLC_PWM_CTL2@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_BLC_PWM_CPU_CTL2@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %r15d
	movl	%r15d, %edi
	callq	_I915_READ
	movl	%eax, %r12d
	movq	_BLM_PWM_ENABLE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	jne	LBB0_12
## %bb.7:
	cmpl	$3, 8(%r14)
	jne	LBB0_8
## %bb.9:
	movq	_BLM_PIPE_SELECT_IVB@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_BLM_PIPE_SELECT@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %r12d
	movl	%ebx, %edi
	callq	_BLM_PIPE
	orl	%eax, %r12d
	movq	_BLM_PWM_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	andl	%r12d, %ebx
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movl	%r15d, %edi
	callq	_POSTING_READ
	movq	_BLM_PWM_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%r15d, %edi
	movl	%ebx, %esi
	callq	_I915_WRITE
	movq	%r13, %rdi
	callq	_HAS_PCH_SPLIT
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_BLC_PWM_PCH_CTL1@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_I915_READ
	movq	_BLM_PCH_PWM_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_BLM_PCH_OVERRIDE_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	notl	%esi
	andl	%eax, %esi
	movl	(%rbx), %edi
	callq	_I915_WRITE
LBB0_12:
	movl	$1, 12(%r14)
	movq	(%r14), %rsi
	movq	%r13, %rdi
	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_CPU_CTL2,4,2           ## @BLC_PWM_CPU_CTL2
	.comm	_BLC_PWM_CTL2,4,2               ## @BLC_PWM_CTL2
	.comm	_BLM_PWM_ENABLE,4,2             ## @BLM_PWM_ENABLE
	.comm	_BLM_PIPE_SELECT_IVB,4,2        ## @BLM_PIPE_SELECT_IVB
	.comm	_BLM_PIPE_SELECT,4,2            ## @BLM_PIPE_SELECT
	.comm	_BLC_PWM_PCH_CTL1,4,2           ## @BLC_PWM_PCH_CTL1
	.comm	_BLM_PCH_PWM_ENABLE,4,2         ## @BLM_PCH_PWM_ENABLE
	.comm	_BLM_PCH_OVERRIDE_ENABLE,4,2    ## @BLM_PCH_OVERRIDE_ENABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intel_panel_enable_backlight   ; -- Begin function intel_panel_enable_backlight
	.p2align	2
_intel_panel_enable_backlight:          ; @intel_panel_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	x20, x1
	mov	x19, x0
	ldr	x22, [x0]
	ldr	x8, [x22]
	cbnz	x8, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_intel_panel_get_max_backlight
	str	x0, [x22]
LBB0_2:
	mov	x0, x19
	bl	_INTEL_INFO
	ldr	w8, [x0]
	cmp	w8, #4
	b.lt	LBB0_6
; %bb.3:
	mov	x0, x19
	bl	_HAS_PCH_SPLIT
Lloh0:
	adrp	x8, _BLC_PWM_CPU_CTL2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLC_PWM_CPU_CTL2@GOTPAGEOFF]
Lloh2:
	adrp	x9, _BLC_PWM_CTL2@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BLC_PWM_CTL2@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w21, [x8]
	mov	x0, x21
	bl	_I915_READ
Lloh4:
	adrp	x23, _BLM_PWM_ENABLE@GOTPAGE
Lloh5:
	ldr	x23, [x23, _BLM_PWM_ENABLE@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.ne	LBB0_6
; %bb.4:
	ldr	w8, [x22, #8]
Lloh6:
	adrp	x9, _BLM_PIPE_SELECT_IVB@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BLM_PIPE_SELECT_IVB@GOTPAGEOFF]
Lloh8:
	adrp	x10, _BLM_PIPE_SELECT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _BLM_PIPE_SELECT@GOTPAGEOFF]
	cmp	w8, #3
	csel	x8, x9, x10, eq
	ldr	w8, [x8]
	bic	w24, w0, w8
	mov	x0, x20
	bl	_BLM_PIPE
	orr	w8, w24, w0
	ldr	w9, [x23]
	bic	w20, w8, w9
	mov	x0, x21
	mov	x1, x20
	bl	_I915_WRITE
	mov	x0, x21
	bl	_POSTING_READ
	ldr	w8, [x23]
	orr	w1, w8, w20
	mov	x0, x21
	bl	_I915_WRITE
	mov	x0, x19
	bl	_HAS_PCH_SPLIT
	cbz	x0, LBB0_6
; %bb.5:
Lloh10:
	adrp	x20, _BLC_PWM_PCH_CTL1@GOTPAGE
Lloh11:
	ldr	x20, [x20, _BLC_PWM_PCH_CTL1@GOTPAGEOFF]
	ldr	w0, [x20]
	bl	_I915_READ
Lloh12:
	adrp	x8, _BLM_PCH_PWM_ENABLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BLM_PCH_PWM_ENABLE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh15:
	adrp	x9, _BLM_PCH_OVERRIDE_ENABLE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _BLM_PCH_OVERRIDE_ENABLE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	bic	w1, w8, w9
	ldr	w0, [x20]
	bl	_I915_WRITE
LBB0_6:
	mov	w8, #1
	str	w8, [x22, #12]
	ldr	x1, [x22]
	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	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_BLC_PWM_CPU_CTL2,4,2           ; @BLC_PWM_CPU_CTL2
	.comm	_BLC_PWM_CTL2,4,2               ; @BLC_PWM_CTL2
	.comm	_BLM_PWM_ENABLE,4,2             ; @BLM_PWM_ENABLE
	.comm	_BLM_PIPE_SELECT_IVB,4,2        ; @BLM_PIPE_SELECT_IVB
	.comm	_BLM_PIPE_SELECT,4,2            ; @BLM_PIPE_SELECT
	.comm	_BLC_PWM_PCH_CTL1,4,2           ; @BLC_PWM_PCH_CTL1
	.comm	_BLM_PCH_PWM_ENABLE,4,2         ; @BLM_PCH_PWM_ENABLE
	.comm	_BLM_PCH_OVERRIDE_ENABLE,4,2    ; @BLM_PCH_OVERRIDE_ENABLE
.subsections_via_symbols
