	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_encoder_add_backlight
_radeon_encoder_add_backlight:          ## @radeon_encoder_add_backlight
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_ATOM_DEVICE_LCD_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdi)
	je	LBB0_9
## %bb.1:
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movq	_radeon_backlight@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	$1, %ecx
	je	LBB0_7
## %bb.2:
	cmpl	$-1, %ecx
	jne	LBB0_9
## %bb.3:
	movq	16(%rax), %rcx
	cmpl	$38275, (%rcx)                  ## imm = 0x9583
	jne	LBB0_6
## %bb.4:
	cmpl	$5940, 4(%rcx)                  ## imm = 0x1734
	jne	LBB0_6
## %bb.5:
	cmpl	$4359, 8(%rcx)                  ## imm = 0x1107
	je	LBB0_9
LBB0_6:
	movq	(%rax), %rcx
	movq	_CHIP_R600@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_7
LBB0_9:
	popq	%rbp
	retq
LBB0_7:
	cmpq	$0, 8(%rax)
	je	LBB0_8
## %bb.10:
	popq	%rbp
	jmp	_radeon_atom_backlight_init     ## TAILCALL
LBB0_8:
	popq	%rbp
	jmp	_radeon_legacy_backlight_init   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ATOM_DEVICE_LCD_SUPPORT,4,2    ## @ATOM_DEVICE_LCD_SUPPORT
	.comm	_radeon_backlight,4,2           ## @radeon_backlight
	.comm	_CHIP_R600,8,3                  ## @CHIP_R600
	.no_dead_strip	_radeon_encoder_add_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_encoder_add_backlight
_radeon_encoder_add_backlight:          ; @radeon_encoder_add_backlight
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _ATOM_DEVICE_LCD_SUPPORT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATOM_DEVICE_LCD_SUPPORT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.1:
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _radeon_backlight@GOTPAGE
Lloh4:
	ldr	x9, [x9, _radeon_backlight@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w9, #1
	b.eq	LBB0_8
; %bb.2:
	cmn	w9, #1
	b.ne	LBB0_7
; %bb.3:
	ldr	x9, [x8, #16]
	ldr	w10, [x9]
	mov	w11, #38275
	cmp	w10, w11
	b.ne	LBB0_6
; %bb.4:
	ldr	w10, [x9, #4]
	mov	w11, #5940
	cmp	w10, w11
	b.ne	LBB0_6
; %bb.5:
	ldr	w9, [x9, #8]
	mov	w10, #4359
	cmp	w9, w10
	b.eq	LBB0_7
LBB0_6:
	ldr	x9, [x8]
Lloh6:
	adrp	x10, _CHIP_R600@GOTPAGE
Lloh7:
	ldr	x10, [x10, _CHIP_R600@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ge	LBB0_8
LBB0_7:
	ret
LBB0_8:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_10
; %bb.9:
	b	_radeon_atom_backlight_init
LBB0_10:
	b	_radeon_legacy_backlight_init
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_ATOM_DEVICE_LCD_SUPPORT,4,2    ; @ATOM_DEVICE_LCD_SUPPORT
	.comm	_radeon_backlight,4,2           ; @radeon_backlight
	.comm	_CHIP_R600,8,3                  ; @CHIP_R600
	.no_dead_strip	_radeon_encoder_add_backlight
.subsections_via_symbols
