	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_panel_get_backlight
_intel_panel_get_backlight:             ## @intel_panel_get_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_HAS_PCH_SPLIT
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_BLC_PWM_CPU_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	_BACKLIGHT_DUTY_CYCLE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	jmp	LBB0_4
LBB0_2:
	movq	_BLC_PWM_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_I915_READ
	movl	%eax, %ebx
	movq	_BACKLIGHT_DUTY_CYCLE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_INTEL_INFO
	cmpl	$4, (%rax)
	setl	%cl
	sarl	%cl, %ebx
	movq	%r14, %rdi
	callq	_is_backlight_combination_mode
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r14), %edi
	movq	_PCI_LBPC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_pci_read_config_byte
	imull	-20(%rbp), %ebx
LBB0_4:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_intel_panel_compute_brightness
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_DEBUG_DRIVER
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLC_PWM_CPU_CTL,4,2            ## @BLC_PWM_CPU_CTL
	.comm	_BACKLIGHT_DUTY_CYCLE_MASK,4,2  ## @BACKLIGHT_DUTY_CYCLE_MASK
	.comm	_BLC_PWM_CTL,4,2                ## @BLC_PWM_CTL
	.comm	_PCI_LBPC,4,2                   ## @PCI_LBPC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"get backlight PWM = %d\n"

	.no_dead_strip	_intel_panel_get_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_panel_get_backlight
_intel_panel_get_backlight:             ; @intel_panel_get_backlight
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	bl	_HAS_PCH_SPLIT
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _BLC_PWM_CPU_CTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLC_PWM_CPU_CTL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh3:
	adrp	x8, _BACKLIGHT_DUTY_CYCLE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BACKLIGHT_DUTY_CYCLE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w20, w8, w0
	b	LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _BLC_PWM_CTL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BLC_PWM_CTL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_I915_READ
Lloh9:
	adrp	x8, _BACKLIGHT_DUTY_CYCLE_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _BACKLIGHT_DUTY_CYCLE_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	and	w20, w8, w0
	mov	x0, x19
	bl	_INTEL_INFO
	ldr	w8, [x0]
	cmp	w8, #4
	cset	w8, lt
	asr	w20, w20, w8
	mov	x0, x19
	bl	_is_backlight_combination_mode
	cbz	x0, LBB0_4
; %bb.3:
	ldr	w0, [x19]
Lloh12:
	adrp	x8, _PCI_LBPC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PCI_LBPC@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
	mul	w20, w8, w20
LBB0_4:
	mov	x0, x19
	mov	x1, x20
	bl	_intel_panel_compute_brightness
	mov	x19, x0
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DRM_DEBUG_DRIVER
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_BLC_PWM_CPU_CTL,4,2            ; @BLC_PWM_CPU_CTL
	.comm	_BACKLIGHT_DUTY_CYCLE_MASK,4,2  ; @BACKLIGHT_DUTY_CYCLE_MASK
	.comm	_BLC_PWM_CTL,4,2                ; @BLC_PWM_CTL
	.comm	_PCI_LBPC,4,2                   ; @PCI_LBPC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"get backlight PWM = %d\n"

	.no_dead_strip	_intel_panel_get_backlight
.subsections_via_symbols
