	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atombios_set_backlight_level   ## -- Begin function atombios_set_backlight_level
	.p2align	4, 0x90
_atombios_set_backlight_level:          ## @atombios_set_backlight_level
	.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	16(%rdi), %rax
	movq	(%rax), %r14
	movq	_ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_13
## %bb.1:
	movq	%rdi, %rbx
	movq	_ATOM_DEVICE_LCD_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_13
## %bb.2:
	movq	8(%rbx), %r15
	testq	%r15, %r15
	je	LBB0_13
## %bb.3:
	movl	%esi, (%r15)
	movq	%r14, %rdi
	callq	_radeon_atom_set_backlight_level_to_reg
	movl	4(%rbx), %eax
	addl	$-128, %eax
	cmpl	$5, %eax
	ja	LBB0_13
## %bb.4:
	movl	$39, %ecx
	btl	%eax, %ecx
	jae	LBB0_5
## %bb.7:
	addq	$16, %rbx
	cmpl	$0, (%r15)
	je	LBB0_8
## %bb.10:
	movq	_ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_atombios_dig_transmitter_setup
	movq	_ATOM_TRANSMITTER_ACTION_LCD_BLON@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	movq	_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_LCD1OutputControl@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_GetIndexIntoMasterTable
	movl	%eax, %ebx
	cmpl	$0, (%r15)
	je	LBB0_6
## %bb.11:
	movq	_ATOM_LCD_BL_BRIGHTNESS_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movl	4(%r14), %edi
	leaq	-32(%rbp), %r15
	movl	%ebx, %esi
	movq	%r15, %rdx
	callq	_atom_execute_table
	movq	_ATOM_LCD_BLON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movl	4(%r14), %edi
	movl	%ebx, %esi
	movq	%r15, %rdx
	jmp	LBB0_12
LBB0_8:
	movq	_ATOM_TRANSMITTER_ACTION_LCD_BLOFF@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atombios_dig_transmitter_setup ## TAILCALL
LBB0_6:
	movq	_ATOM_LCD_BLOFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movl	4(%r14), %edi
	leaq	-32(%rbp), %rdx
	movl	%ebx, %esi
LBB0_12:
	callq	_atom_execute_table
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU,4,2 ## @ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU
	.comm	_ATOM_DEVICE_LCD_SUPPORT,4,2    ## @ATOM_DEVICE_LCD_SUPPORT
	.comm	_COMMAND,4,2                    ## @COMMAND
	.comm	_LCD1OutputControl,4,2          ## @LCD1OutputControl
	.comm	_ATOM_LCD_BLOFF,4,2             ## @ATOM_LCD_BLOFF
	.comm	_ATOM_LCD_BL_BRIGHTNESS_CONTROL,4,2 ## @ATOM_LCD_BL_BRIGHTNESS_CONTROL
	.comm	_ATOM_LCD_BLON,4,2              ## @ATOM_LCD_BLON
	.comm	_ATOM_TRANSMITTER_ACTION_LCD_BLOFF,4,2 ## @ATOM_TRANSMITTER_ACTION_LCD_BLOFF
	.comm	_ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL,4,2 ## @ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL
	.comm	_ATOM_TRANSMITTER_ACTION_LCD_BLON,4,2 ## @ATOM_TRANSMITTER_ACTION_LCD_BLON
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_atombios_set_backlight_level   ; -- Begin function atombios_set_backlight_level
	.p2align	2
_atombios_set_backlight_level:          ; @atombios_set_backlight_level
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	ldr	x8, [x20, #16]!
	ldr	x19, [x8]
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.1:
	mov	x21, x0
	ldr	w8, [x0]
Lloh3:
	adrp	x9, _ATOM_DEVICE_LCD_SUPPORT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATOM_DEVICE_LCD_SUPPORT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.2:
	ldr	x22, [x21, #8]
	cbz	x22, LBB0_13
; %bb.3:
	str	w1, [x22]
	mov	x0, x19
	bl	_radeon_atom_set_backlight_level_to_reg
	ldr	w8, [x21, #4]
	sub	w8, w8, #128
	cmp	w8, #5
	b.hi	LBB0_13
; %bb.4:
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #39
	tst	w8, w9
	b.eq	LBB0_7
; %bb.5:
	ldr	w8, [x22]
	cbz	w8, LBB0_9
; %bb.6:
Lloh6:
	adrp	x8, _ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_atombios_dig_transmitter_setup
Lloh9:
	adrp	x8, _ATOM_TRANSMITTER_ACTION_LCD_BLON@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATOM_TRANSMITTER_ACTION_LCD_BLON@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
Lloh11:
	adrp	x8, _COMMAND@GOTPAGE
Lloh12:
	ldr	x8, [x8, _COMMAND@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _LCD1OutputControl@GOTPAGE
Lloh15:
	ldr	x8, [x8, _LCD1OutputControl@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	bl	_GetIndexIntoMasterTable
	mov	x20, x0
	ldr	w8, [x22]
	cbz	w8, LBB0_11
; %bb.8:
Lloh17:
	adrp	x8, _ATOM_LCD_BL_BRIGHTNESS_CONTROL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ATOM_LCD_BL_BRIGHTNESS_CONTROL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	w0, [x19, #4]
	add	x2, sp, #8
	mov	x1, x20
	bl	_atom_execute_table
Lloh20:
	adrp	x8, _ATOM_LCD_BLON@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ATOM_LCD_BLON@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh22:
	adrp	x8, _ATOM_TRANSMITTER_ACTION_LCD_BLOFF@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ATOM_TRANSMITTER_ACTION_LCD_BLOFF@GOTPAGEOFF]
LBB0_10:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	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
	add	sp, sp, #64
	b	_atombios_dig_transmitter_setup
LBB0_11:
Lloh24:
	adrp	x8, _ATOM_LCD_BLOFF@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ATOM_LCD_BLOFF@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	w0, [x19, #4]
	add	x2, sp, #8
	mov	x1, x20
	bl	_atom_execute_table
LBB0_13:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU,4,2 ; @ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU
	.comm	_ATOM_DEVICE_LCD_SUPPORT,4,2    ; @ATOM_DEVICE_LCD_SUPPORT
	.comm	_COMMAND,4,2                    ; @COMMAND
	.comm	_LCD1OutputControl,4,2          ; @LCD1OutputControl
	.comm	_ATOM_LCD_BLOFF,4,2             ; @ATOM_LCD_BLOFF
	.comm	_ATOM_LCD_BL_BRIGHTNESS_CONTROL,4,2 ; @ATOM_LCD_BL_BRIGHTNESS_CONTROL
	.comm	_ATOM_LCD_BLON,4,2              ; @ATOM_LCD_BLON
	.comm	_ATOM_TRANSMITTER_ACTION_LCD_BLOFF,4,2 ; @ATOM_TRANSMITTER_ACTION_LCD_BLOFF
	.comm	_ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL,4,2 ; @ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL
	.comm	_ATOM_TRANSMITTER_ACTION_LCD_BLON,4,2 ; @ATOM_TRANSMITTER_ACTION_LCD_BLON
.subsections_via_symbols
