	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dce_abm_init_backlight
_dce_abm_init_backlight:                ## @dce_abm_init_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_TO_DCE_ABM
	movq	_BL_PWM_CNTL@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_BL_ACTIVE_INT_FRAC_CNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	callq	_REG_GET
	cmpl	$1, -20(%rbp)
	ja	LBB0_4
## %bb.1:
	movq	(%rbx), %rsi
	movl	(%r14), %edi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_REG_WRITE
	movq	_BL_PWM_CNTL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	_REG_WRITE
	movq	_BL_PWM_PERIOD_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	12(%rbx), %esi
	callq	_REG_WRITE
	movq	_LVTMA_PWRSEQ_REF_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BL_PWM_REF_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%rbx), %edx
	callq	_REG_UPDATE
	jmp	LBB0_5
LBB0_4:
	movl	(%r14), %edi
	callq	_REG_READ
	movq	%rax, (%rbx)
	movq	_BL_PWM_CNTL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG_READ
	movl	%eax, 8(%rbx)
	movq	_BL_PWM_PERIOD_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_REG_READ
	movl	%eax, 12(%rbx)
	movq	_LVTMA_PWRSEQ_REF_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_BL_PWM_REF_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$16, %rbx
	movq	%rbx, %rdx
	callq	_REG_GET
	jmp	LBB0_5
LBB0_3:
	movl	$-1073677824, %esi              ## imm = 0xC000FA00
	callq	_REG_WRITE
	movq	_BL_PWM_PERIOD_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$790432, %esi                   ## imm = 0xC0FA0
	callq	_REG_WRITE
LBB0_5:
	movq	_BIOS_SCRATCH_2@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_REG_READ
	movq	_ATOM_S2_VRI_BRIGHT_ENABLE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, -20(%rbp)
	movl	(%rbx), %edi
	movl	%eax, %esi
	callq	_REG_WRITE
	movl	(%r14), %edi
	movq	_BL_PWM_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_REG_UPDATE
	movq	_BL_PWM_GRP1_REG_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %esi
	xorl	%edx, %edx
	callq	_REG_UPDATE
	movl	$1, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BL_PWM_CNTL,4,2                ## @BL_PWM_CNTL
	.comm	_BL_ACTIVE_INT_FRAC_CNT,4,2     ## @BL_ACTIVE_INT_FRAC_CNT
	.comm	_BL_PWM_CNTL2,4,2               ## @BL_PWM_CNTL2
	.comm	_BL_PWM_PERIOD_CNTL,4,2         ## @BL_PWM_PERIOD_CNTL
	.comm	_LVTMA_PWRSEQ_REF_DIV,4,2       ## @LVTMA_PWRSEQ_REF_DIV
	.comm	_BL_PWM_REF_DIV,4,2             ## @BL_PWM_REF_DIV
	.comm	_BIOS_SCRATCH_2,4,2             ## @BIOS_SCRATCH_2
	.comm	_ATOM_S2_VRI_BRIGHT_ENABLE,4,2  ## @ATOM_S2_VRI_BRIGHT_ENABLE
	.comm	_BL_PWM_EN,4,2                  ## @BL_PWM_EN
	.comm	_BL_PWM_GRP1_REG_LOCK,4,2       ## @BL_PWM_GRP1_REG_LOCK
	.no_dead_strip	_dce_abm_init_backlight
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dce_abm_init_backlight
_dce_abm_init_backlight:                ; @dce_abm_init_backlight
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	bl	_TO_DCE_ABM
Lloh0:
	adrp	x20, _BL_PWM_CNTL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _BL_PWM_CNTL@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh2:
	adrp	x8, _BL_ACTIVE_INT_FRAC_CNT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BL_ACTIVE_INT_FRAC_CNT@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_REG_GET
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.hi	LBB0_3
; %bb.1:
	ldr	x1, [x19]
	ldr	w0, [x20]
	cbz	x1, LBB0_4
; %bb.2:
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_REG_WRITE
Lloh5:
	adrp	x8, _BL_PWM_CNTL2@GOTPAGE
Lloh6:
	ldr	x8, [x8, _BL_PWM_CNTL2@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_REG_WRITE
Lloh8:
	adrp	x8, _BL_PWM_PERIOD_CNTL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BL_PWM_PERIOD_CNTL@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	w1, [x19, #12]
	bl	_REG_WRITE
Lloh11:
	adrp	x8, _LVTMA_PWRSEQ_REF_DIV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LVTMA_PWRSEQ_REF_DIV@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x8, _BL_PWM_REF_DIV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BL_PWM_REF_DIV@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldr	w2, [x19, #16]
	bl	_REG_UPDATE
	b	LBB0_5
LBB0_3:
	ldr	w0, [x20]
	bl	_REG_READ
	str	x0, [x19]
Lloh17:
	adrp	x8, _BL_PWM_CNTL2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _BL_PWM_CNTL2@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	bl	_REG_READ
	str	w0, [x19, #8]
Lloh20:
	adrp	x8, _BL_PWM_PERIOD_CNTL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BL_PWM_PERIOD_CNTL@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_REG_READ
Lloh23:
	adrp	x8, _LVTMA_PWRSEQ_REF_DIV@GOTPAGE
Lloh24:
	ldr	x8, [x8, _LVTMA_PWRSEQ_REF_DIV@GOTPAGEOFF]
	str	w0, [x19, #12]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x8, _BL_PWM_REF_DIV@GOTPAGE
Lloh27:
	ldr	x8, [x8, _BL_PWM_REF_DIV@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	add	x2, x19, #16
	bl	_REG_GET
	b	LBB0_5
LBB0_4:
	mov	w1, #64000
	movk	w1, #49152, lsl #16
	bl	_REG_WRITE
Lloh29:
	adrp	x8, _BL_PWM_PERIOD_CNTL@GOTPAGE
Lloh30:
	ldr	x8, [x8, _BL_PWM_PERIOD_CNTL@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	mov	w1, #4000
	movk	w1, #12, lsl #16
	bl	_REG_WRITE
LBB0_5:
Lloh32:
	adrp	x19, _BIOS_SCRATCH_2@GOTPAGE
Lloh33:
	ldr	x19, [x19, _BIOS_SCRATCH_2@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_REG_READ
Lloh34:
	adrp	x8, _ATOM_S2_VRI_BRIGHT_ENABLE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _ATOM_S2_VRI_BRIGHT_ENABLE@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	orr	w1, w8, w0
	str	w1, [sp, #12]
	ldr	w0, [x19]
	bl	_REG_WRITE
	ldr	w0, [x20]
Lloh37:
	adrp	x8, _BL_PWM_EN@GOTPAGE
Lloh38:
	ldr	x8, [x8, _BL_PWM_EN@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_REG_UPDATE
Lloh40:
	adrp	x8, _BL_PWM_GRP1_REG_LOCK@GOTPAGE
Lloh41:
	ldr	x8, [x8, _BL_PWM_GRP1_REG_LOCK@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	mov	x1, x0
	mov	w2, #0
	bl	_REG_UPDATE
	mov	w0, #1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_BL_PWM_CNTL,4,2                ; @BL_PWM_CNTL
	.comm	_BL_ACTIVE_INT_FRAC_CNT,4,2     ; @BL_ACTIVE_INT_FRAC_CNT
	.comm	_BL_PWM_CNTL2,4,2               ; @BL_PWM_CNTL2
	.comm	_BL_PWM_PERIOD_CNTL,4,2         ; @BL_PWM_PERIOD_CNTL
	.comm	_LVTMA_PWRSEQ_REF_DIV,4,2       ; @LVTMA_PWRSEQ_REF_DIV
	.comm	_BL_PWM_REF_DIV,4,2             ; @BL_PWM_REF_DIV
	.comm	_BIOS_SCRATCH_2,4,2             ; @BIOS_SCRATCH_2
	.comm	_ATOM_S2_VRI_BRIGHT_ENABLE,4,2  ; @ATOM_S2_VRI_BRIGHT_ENABLE
	.comm	_BL_PWM_EN,4,2                  ; @BL_PWM_EN
	.comm	_BL_PWM_GRP1_REG_LOCK,4,2       ; @BL_PWM_GRP1_REG_LOCK
	.no_dead_strip	_dce_abm_init_backlight
.subsections_via_symbols
