	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vdd_set
_vdd_set:                               ## @vdd_set
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movq	_IMX6_ANALOG_PMU_REG_CORE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_imx6_anatop_read_4
	movq	_IMX6_ANALOG_PMU_REG0_TARG_MASK@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpl	$725, %ebx                      ## imm = 0x2D5
	jl	LBB0_3
## %bb.1:
	movl	$31, %r12d
	cmpl	$1450, %ebx                     ## imm = 0x5AA
	ja	LBB0_3
## %bb.2:
	addl	$-700, %ebx                     ## imm = 0xFD44
	movzwl	%bx, %edx
	imull	$18351, %edx, %edx              ## imm = 0x47AF
	shrl	$16, %edx
	subl	%edx, %ebx
	movzwl	%bx, %r12d
	shrl	%r12d
	addl	%edx, %r12d
	shrl	$4, %r12d
LBB0_3:
	movl	(%rcx), %edx
	cmpl	$19, %r12d
	movl	$18, %esi
	cmovgel	%r12d, %esi
	cmpb	$1, _vdd_set.init_done(%rip)
	jne	LBB0_7
## %bb.4:
	movl	%edx, %edi
	andl	%eax, %edi
	cmpl	%edi, %r12d
	je	LBB0_9
## %bb.5:
	xorl	%ebx, %ebx
	movl	%r12d, %ecx
	subl	%edi, %ecx
	jle	LBB0_8
## %bb.6:
	addl	%ecx, %ecx
	leal	(%rcx,%rcx,2), %ebx
	jmp	LBB0_8
LBB0_7:
	movb	$1, _vdd_set.init_done(%rip)
	movl	$168, %ebx
LBB0_8:
	movq	_IMX6_ANALOG_PMU_REG1_TARG_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_IMX6_ANALOG_PMU_REG2_TARG_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_IMX6_ANALOG_PMU_REG0_TARG_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%r12d, %edi
	shll	%cl, %edi
	notl	%edx
	andl	%edx, %eax
	movq	_IMX6_ANALOG_PMU_REG1_TARG_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%r12d, %edx
	shll	%cl, %edx
	movq	_IMX6_ANALOG_PMU_REG2_TARG_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%edi, %edx
	orl	%eax, %edx
	orl	%edx, %esi
	movl	(%r15), %edi
	callq	_imx6_anatop_write_4
	movl	%ebx, %edi
	callq	_DELAY
	leal	(%r12,%r12,4), %eax
	leal	(%rax,%rax,4), %eax
	addl	$700, %eax                      ## imm = 0x2BC
	movl	%eax, (%r14)
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_vdd_set.init_done,1,2 ## @vdd_set.init_done
	.comm	_IMX6_ANALOG_PMU_REG_CORE,4,2   ## @IMX6_ANALOG_PMU_REG_CORE
	.comm	_IMX6_ANALOG_PMU_REG0_TARG_MASK,4,2 ## @IMX6_ANALOG_PMU_REG0_TARG_MASK
	.comm	_IMX6_ANALOG_PMU_REG1_TARG_MASK,4,2 ## @IMX6_ANALOG_PMU_REG1_TARG_MASK
	.comm	_IMX6_ANALOG_PMU_REG2_TARG_MASK,4,2 ## @IMX6_ANALOG_PMU_REG2_TARG_MASK
	.comm	_IMX6_ANALOG_PMU_REG0_TARG_SHIFT,4,2 ## @IMX6_ANALOG_PMU_REG0_TARG_SHIFT
	.comm	_IMX6_ANALOG_PMU_REG1_TARG_SHIFT,4,2 ## @IMX6_ANALOG_PMU_REG1_TARG_SHIFT
	.comm	_IMX6_ANALOG_PMU_REG2_TARG_SHIFT,4,2 ## @IMX6_ANALOG_PMU_REG2_TARG_SHIFT
	.no_dead_strip	_vdd_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vdd_set
_vdd_set:                               ; @vdd_set
	.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, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _IMX6_ANALOG_PMU_REG_CORE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _IMX6_ANALOG_PMU_REG_CORE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_imx6_anatop_read_4
Lloh2:
	adrp	x8, _IMX6_ANALOG_PMU_REG0_TARG_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IMX6_ANALOG_PMU_REG0_TARG_MASK@GOTPAGEOFF]
	cmp	w20, #725
	b.ge	LBB0_2
; %bb.1:
	mov	w22, #0
	b	LBB0_3
LBB0_2:
	mov	w9, #31
	sub	w10, w20, #700
	and	w11, w10, #0xffff
	mov	w12, #18351
	mul	w11, w11, w12
	lsr	w11, w11, #16
	sub	w10, w10, w11
	and	w10, w10, #0xfffe
	add	w10, w11, w10, lsr #1
	lsr	w10, w10, #4
	cmp	w20, #1450
	csel	w22, w9, w10, hi
LBB0_3:
	ldr	w9, [x8]
	mov	w8, #18
	cmp	w22, #18
	csel	w8, w22, w8, gt
	adrp	x10, _vdd_set.init_done@PAGE
	ldrb	w11, [x10, _vdd_set.init_done@PAGEOFF]
	cmp	w11, #1
	b.ne	LBB0_6
; %bb.4:
	and	w10, w9, w0
	subs	w11, w22, w10
	b.eq	LBB0_8
; %bb.5:
	add	w11, w11, w11, lsl #1
	lsl	w11, w11, #1
	cmp	w22, w10
	csel	w20, wzr, w11, le
	b	LBB0_7
LBB0_6:
	mov	w11, #1
	strb	w11, [x10, _vdd_set.init_done@PAGEOFF]
	mov	w20, #168
LBB0_7:
Lloh4:
	adrp	x10, _IMX6_ANALOG_PMU_REG1_TARG_MASK@GOTPAGE
Lloh5:
	ldr	x10, [x10, _IMX6_ANALOG_PMU_REG1_TARG_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	orr	w9, w10, w9
Lloh7:
	adrp	x10, _IMX6_ANALOG_PMU_REG2_TARG_MASK@GOTPAGE
Lloh8:
	ldr	x10, [x10, _IMX6_ANALOG_PMU_REG2_TARG_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w10, [x10]
	orr	w9, w9, w10
	bic	w9, w0, w9
Lloh10:
	adrp	x10, _IMX6_ANALOG_PMU_REG0_TARG_SHIFT@GOTPAGE
Lloh11:
	ldr	x10, [x10, _IMX6_ANALOG_PMU_REG0_TARG_SHIFT@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	lsl	w10, w22, w10
	orr	w9, w9, w10
Lloh13:
	adrp	x10, _IMX6_ANALOG_PMU_REG1_TARG_SHIFT@GOTPAGE
Lloh14:
	ldr	x10, [x10, _IMX6_ANALOG_PMU_REG1_TARG_SHIFT@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	lsl	w10, w22, w10
	orr	w9, w9, w10
Lloh16:
	adrp	x10, _IMX6_ANALOG_PMU_REG2_TARG_SHIFT@GOTPAGE
Lloh17:
	ldr	x10, [x10, _IMX6_ANALOG_PMU_REG2_TARG_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	lsl	w8, w8, w10
	orr	w1, w9, w8
	ldr	w0, [x21]
	bl	_imx6_anatop_write_4
	mov	x0, x20
	bl	_DELAY
	mov	w8, #25
	mul	w8, w22, w8
	add	w8, w8, #700
	str	w8, [x19]
LBB0_8:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_vdd_set.init_done,1,2 ; @vdd_set.init_done
	.comm	_IMX6_ANALOG_PMU_REG_CORE,4,2   ; @IMX6_ANALOG_PMU_REG_CORE
	.comm	_IMX6_ANALOG_PMU_REG0_TARG_MASK,4,2 ; @IMX6_ANALOG_PMU_REG0_TARG_MASK
	.comm	_IMX6_ANALOG_PMU_REG1_TARG_MASK,4,2 ; @IMX6_ANALOG_PMU_REG1_TARG_MASK
	.comm	_IMX6_ANALOG_PMU_REG2_TARG_MASK,4,2 ; @IMX6_ANALOG_PMU_REG2_TARG_MASK
	.comm	_IMX6_ANALOG_PMU_REG0_TARG_SHIFT,4,2 ; @IMX6_ANALOG_PMU_REG0_TARG_SHIFT
	.comm	_IMX6_ANALOG_PMU_REG1_TARG_SHIFT,4,2 ; @IMX6_ANALOG_PMU_REG1_TARG_SHIFT
	.comm	_IMX6_ANALOG_PMU_REG2_TARG_SHIFT,4,2 ; @IMX6_ANALOG_PMU_REG2_TARG_SHIFT
	.no_dead_strip	_vdd_set
.subsections_via_symbols
