	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_atombios_encoder_set_backlight_level ## -- Begin function amdgpu_atombios_encoder_set_backlight_level
	.p2align	4, 0x90
_amdgpu_atombios_encoder_set_backlight_level: ## @amdgpu_atombios_encoder_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movq	(%rax), %rdi
	movq	_ATOM_BIOS_INFO_BL_CONTROLLED_BY_GPU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_8
## %bb.1:
	movq	_ATOM_DEVICE_LCD_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_8
## %bb.2:
	movq	8(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_8
## %bb.3:
	movl	%esi, (%r14)
	callq	_amdgpu_atombios_encoder_set_backlight_level_to_reg
	movl	4(%rbx), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_8
## %bb.4:
	addq	$16, %rbx
	cmpl	$0, (%r14)
	je	LBB0_5
## %bb.6:
	movq	_ATOM_TRANSMITTER_ACTION_BL_BRIGHTNESS_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_amdgpu_atombios_encoder_setup_dig_transmitter
	movq	_ATOM_TRANSMITTER_ACTION_LCD_BLON@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_5:
	movq	_ATOM_TRANSMITTER_ACTION_LCD_BLOFF@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_amdgpu_atombios_encoder_setup_dig_transmitter ## TAILCALL
	.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	_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	_amdgpu_atombios_encoder_set_backlight_level ; -- Begin function amdgpu_atombios_encoder_set_backlight_level
	.p2align	2
_amdgpu_atombios_encoder_set_backlight_level: ; @amdgpu_atombios_encoder_set_backlight_level
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	mov	x19, x0
	ldr	x8, [x19, #16]!
	ldr	x0, [x8]
	ldr	w8, [x0]
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_6
; %bb.1:
	ldr	w8, [x20]
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_6
; %bb.2:
	ldr	x21, [x20, #8]
	cbz	x21, LBB0_6
; %bb.3:
	str	w1, [x21]
	bl	_amdgpu_atombios_encoder_set_backlight_level_to_reg
	ldr	w8, [x20, #4]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_6
; %bb.4:
	ldr	w8, [x21]
	cbz	w8, LBB0_7
; %bb.5:
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, x19
	mov	w2, #0
	mov	w3, #0
	bl	_amdgpu_atombios_encoder_setup_dig_transmitter
Lloh9:
	adrp	x8, _ATOM_TRANSMITTER_ACTION_LCD_BLON@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ATOM_TRANSMITTER_ACTION_LCD_BLON@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
Lloh11:
	adrp	x8, _ATOM_TRANSMITTER_ACTION_LCD_BLOFF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATOM_TRANSMITTER_ACTION_LCD_BLOFF@GOTPAGEOFF]
LBB0_8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_amdgpu_atombios_encoder_setup_dig_transmitter
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.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	_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
