	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_atom_get_backlight_level_from_reg
_radeon_atom_get_backlight_level_from_reg: ## @radeon_atom_get_backlight_level_from_reg
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movq	_CHIP_R600@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_1
## %bb.2:
	movq	_RADEON_BIOS_2_SCRATCH@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_R600_BIOS_2_SCRATCH@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edi
	callq	_RREG32
	movq	_ATOM_S2_CURRENT_BL_LEVEL_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_ATOM_S2_CURRENT_BL_LEVEL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_R600,8,3                  ## @CHIP_R600
	.comm	_R600_BIOS_2_SCRATCH,4,2        ## @R600_BIOS_2_SCRATCH
	.comm	_RADEON_BIOS_2_SCRATCH,4,2      ## @RADEON_BIOS_2_SCRATCH
	.comm	_ATOM_S2_CURRENT_BL_LEVEL_MASK,4,2 ## @ATOM_S2_CURRENT_BL_LEVEL_MASK
	.comm	_ATOM_S2_CURRENT_BL_LEVEL_SHIFT,4,2 ## @ATOM_S2_CURRENT_BL_LEVEL_SHIFT
	.no_dead_strip	_radeon_atom_get_backlight_level_from_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_atom_get_backlight_level_from_reg
_radeon_atom_get_backlight_level_from_reg: ; @radeon_atom_get_backlight_level_from_reg
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _CHIP_R600@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_R600@GOTPAGEOFF]
Lloh2:
	adrp	x10, _RADEON_BIOS_2_SCRATCH@GOTPAGE
Lloh3:
	ldr	x10, [x10, _RADEON_BIOS_2_SCRATCH@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
Lloh5:
	adrp	x11, _R600_BIOS_2_SCRATCH@GOTPAGE
Lloh6:
	ldr	x11, [x11, _R600_BIOS_2_SCRATCH@GOTPAGEOFF]
	cmp	x8, x9
	csel	x8, x10, x11, lt
	ldr	w0, [x8]
	bl	_RREG32
Lloh7:
	adrp	x8, _ATOM_S2_CURRENT_BL_LEVEL_MASK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ATOM_S2_CURRENT_BL_LEVEL_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh10:
	adrp	x9, _ATOM_S2_CURRENT_BL_LEVEL_SHIFT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ATOM_S2_CURRENT_BL_LEVEL_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	asr	w0, w8, w9
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_R600,8,3                  ; @CHIP_R600
	.comm	_R600_BIOS_2_SCRATCH,4,2        ; @R600_BIOS_2_SCRATCH
	.comm	_RADEON_BIOS_2_SCRATCH,4,2      ; @RADEON_BIOS_2_SCRATCH
	.comm	_ATOM_S2_CURRENT_BL_LEVEL_MASK,4,2 ; @ATOM_S2_CURRENT_BL_LEVEL_MASK
	.comm	_ATOM_S2_CURRENT_BL_LEVEL_SHIFT,4,2 ; @ATOM_S2_CURRENT_BL_LEVEL_SHIFT
	.no_dead_strip	_radeon_atom_get_backlight_level_from_reg
.subsections_via_symbols
