	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function oaktrail_lvds_get_max_backlight
_oaktrail_lvds_get_max_backlight:       ## @oaktrail_lvds_get_max_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %r15
	xorl	%esi, %esi
	callq	_gma_power_begin
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_BLC_PWM_CTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG_READ
	movl	%eax, %ebx
	movq	_BACKLIGHT_MODULATION_FREQ_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	_BACKLIGHT_MODULATION_FREQ_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	%r14, %rdi
	callq	_gma_power_end
	jmp	LBB0_3
LBB0_2:
	movq	_BACKLIGHT_MODULATION_FREQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	andl	(%r15), %ebx
	movq	_BACKLIGHT_MODULATION_FREQ_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
LBB0_3:
	addl	%ebx, %ebx
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLC_PWM_CTL,4,2                ## @BLC_PWM_CTL
	.comm	_BACKLIGHT_MODULATION_FREQ_MASK,4,2 ## @BACKLIGHT_MODULATION_FREQ_MASK
	.comm	_BACKLIGHT_MODULATION_FREQ_SHIFT,4,2 ## @BACKLIGHT_MODULATION_FREQ_SHIFT
	.no_dead_strip	_oaktrail_lvds_get_max_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function oaktrail_lvds_get_max_backlight
_oaktrail_lvds_get_max_backlight:       ; @oaktrail_lvds_get_max_backlight
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x20, [x0]
	mov	w1, #0
	bl	_gma_power_begin
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _BLC_PWM_CTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BLC_PWM_CTL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_REG_READ
Lloh3:
	adrp	x8, _BACKLIGHT_MODULATION_FREQ_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BACKLIGHT_MODULATION_FREQ_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh6:
	adrp	x9, _BACKLIGHT_MODULATION_FREQ_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BACKLIGHT_MODULATION_FREQ_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	asr	w20, w8, w9
	mov	x0, x19
	bl	_gma_power_end
	b	LBB0_3
LBB0_2:
	ldr	w8, [x20]
Lloh9:
	adrp	x9, _BACKLIGHT_MODULATION_FREQ_MASK@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BACKLIGHT_MODULATION_FREQ_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh12:
	adrp	x9, _BACKLIGHT_MODULATION_FREQ_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _BACKLIGHT_MODULATION_FREQ_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	asr	w20, w8, w9
LBB0_3:
	lsl	w0, w20, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_BLC_PWM_CTL,4,2                ; @BLC_PWM_CTL
	.comm	_BACKLIGHT_MODULATION_FREQ_MASK,4,2 ; @BACKLIGHT_MODULATION_FREQ_MASK
	.comm	_BACKLIGHT_MODULATION_FREQ_SHIFT,4,2 ; @BACKLIGHT_MODULATION_FREQ_SHIFT
	.no_dead_strip	_oaktrail_lvds_get_max_backlight
.subsections_via_symbols
