	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdv_intel_lvds_set_backlight
_cdv_intel_lvds_set_backlight:          ## @cdv_intel_lvds_set_backlight
	.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
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	(%rdi), %r15
	xorl	%esi, %esi
	callq	_gma_power_begin
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	_BLC_PWM_CTL@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_REG_READ
	movq	_BACKLIGHT_DUTY_CYCLE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	notl	%edx
	andl	%eax, %edx
	movl	(%r15), %edi
	movq	_BACKLIGHT_DUTY_CYCLE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%edx, %ebx
	movl	%ebx, %esi
	callq	_REG_WRITE
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gma_power_end                  ## TAILCALL
LBB0_1:
	movq	_BACKLIGHT_DUTY_CYCLE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	_BACKLIGHT_DUTY_CYCLE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	andl	(%r15), %eax
	orl	%eax, %ebx
	movl	%ebx, (%r15)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BLC_PWM_CTL,4,2                ## @BLC_PWM_CTL
	.comm	_BACKLIGHT_DUTY_CYCLE_MASK,4,2  ## @BACKLIGHT_DUTY_CYCLE_MASK
	.comm	_BACKLIGHT_DUTY_CYCLE_SHIFT,4,2 ## @BACKLIGHT_DUTY_CYCLE_SHIFT
	.no_dead_strip	_cdv_intel_lvds_set_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdv_intel_lvds_set_backlight
_cdv_intel_lvds_set_backlight:          ; @cdv_intel_lvds_set_backlight
	.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	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
	mov	w1, #0
	bl	_gma_power_begin
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x21, _BLC_PWM_CTL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _BLC_PWM_CTL@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_REG_READ
Lloh2:
	adrp	x8, _BACKLIGHT_DUTY_CYCLE_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BACKLIGHT_DUTY_CYCLE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	bic	w8, w0, w8
	ldr	w0, [x21]
Lloh5:
	adrp	x9, _BACKLIGHT_DUTY_CYCLE_SHIFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BACKLIGHT_DUTY_CYCLE_SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	lsl	w9, w19, w9
	orr	w1, w9, w8
	bl	_REG_WRITE
	mov	x0, x20
	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	_gma_power_end
LBB0_2:
	ldr	w8, [x21]
Lloh8:
	adrp	x9, _BACKLIGHT_DUTY_CYCLE_MASK@GOTPAGE
Lloh9:
	ldr	x9, [x9, _BACKLIGHT_DUTY_CYCLE_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh11:
	adrp	x9, _BACKLIGHT_DUTY_CYCLE_SHIFT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _BACKLIGHT_DUTY_CYCLE_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	lsl	w9, w19, w9
	orr	w8, w9, w8
	str	w8, [x21]
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_BLC_PWM_CTL,4,2                ; @BLC_PWM_CTL
	.comm	_BACKLIGHT_DUTY_CYCLE_MASK,4,2  ; @BACKLIGHT_DUTY_CYCLE_MASK
	.comm	_BACKLIGHT_DUTY_CYCLE_SHIFT,4,2 ; @BACKLIGHT_DUTY_CYCLE_SHIFT
	.no_dead_strip	_cdv_intel_lvds_set_backlight
.subsections_via_symbols
