	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atibl_getlevel
_atibl_getlevel:                        ## @atibl_getlevel
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %edi
	movq	_RADEON_LVDS_GEN_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_bus_read_4
                                        ## kill: def $eax killed $eax def $rax
	movq	_RADEON_LVDS_BL_MOD_LEVEL_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_RADEON_LVDS_BL_MOD_LEVEL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	addl	%eax, %eax
	addl	$-10, %eax
	cltq
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$33, %rax
	addl	%ecx, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
LBB0_1:
	xorl	%eax, %eax
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_LVDS_GEN_CNTL,4,2       ## @RADEON_LVDS_GEN_CNTL
	.comm	_RADEON_LVDS_BL_MOD_LEVEL_MASK,4,2 ## @RADEON_LVDS_BL_MOD_LEVEL_MASK
	.comm	_RADEON_LVDS_BL_MOD_LEVEL_SHIFT,4,2 ## @RADEON_LVDS_BL_MOD_LEVEL_SHIFT
	.no_dead_strip	_atibl_getlevel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atibl_getlevel
_atibl_getlevel:                        ; @atibl_getlevel
	.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	w0, [x0]
Lloh0:
	adrp	x8, _RADEON_LVDS_GEN_CNTL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RADEON_LVDS_GEN_CNTL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_bus_read_4
Lloh3:
	adrp	x8, _RADEON_LVDS_BL_MOD_LEVEL_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RADEON_LVDS_BL_MOD_LEVEL_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh6:
	adrp	x9, _RADEON_LVDS_BL_MOD_LEVEL_SHIFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _RADEON_LVDS_BL_MOD_LEVEL_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	asr	w8, w8, w9
	cbz	w8, LBB0_2
; %bb.1:
	lsl	w8, w8, #1
	sub	w8, w8, #10
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w0, w8, w9
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_LVDS_GEN_CNTL,4,2       ; @RADEON_LVDS_GEN_CNTL
	.comm	_RADEON_LVDS_BL_MOD_LEVEL_MASK,4,2 ; @RADEON_LVDS_BL_MOD_LEVEL_MASK
	.comm	_RADEON_LVDS_BL_MOD_LEVEL_SHIFT,4,2 ; @RADEON_LVDS_BL_MOD_LEVEL_SHIFT
	.no_dead_strip	_atibl_getlevel
.subsections_via_symbols
