	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vegam_get_dependency_volt_by_clk
_vegam_get_dependency_volt_by_clk:      ## @vegam_get_dependency_volt_by_clk
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	(%rdi), %r12
	movq	$0, (%r8)
	movq	$0, (%rcx)
	movq	(%rsi), %r14
	testq	%r14, %r14
	je	LBB0_6
## %bb.1:
	movq	%rcx, %r13
	movq	%rsi, %r8
	movq	8(%rsi), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%rsi,%rbx)
	jae	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$32, %rbx
	decq	%rax
	jne	LBB0_2
## %bb.4:
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	leaq	-1(%r14), %rbx
	shlq	$5, %rbx
	movq	_VOLTAGE_SCALE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	imulq	8(%rsi,%rbx), %rax
	movq	_VDDC_SHIFT@GOTPCREL(%rip), %r15
	movb	(%r15), %cl
	shlq	%cl, %rax
	movq	%rax, (%r13)
	leaq	32(%r12), %rdi
	movq	8(%rsi,%rbx), %rsi
	movq	_VDDC_VDDCI_DELTA@GOTPCREL(%rip), %rax
	subq	(%rax), %rsi
	callq	_phm_find_closest_vddci
	movq	_SMU7_VOLTAGE_CONTROL_NONE@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rcx
	cmpq	(%r12), %rcx
	jne	LBB0_12
## %bb.5:
	movq	16(%r12), %rax
	movq	_VDDCI_SHIFT@GOTPCREL(%rip), %r15
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_24
LBB0_7:
	movq	_VOLTAGE_SCALE@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdx
	imulq	8(%rsi,%rbx), %rdx
	movq	_VDDC_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %rdx
	movq	%rdx, (%r13)
	movq	_SMU7_VOLTAGE_CONTROL_NONE@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	cmpq	(%r12), %rax
	jne	LBB0_9
## %bb.8:
	movq	(%rdi), %rax
	imulq	16(%r12), %rax
	jmp	LBB0_11
LBB0_9:
	movslq	16(%rsi,%rbx), %rax
	testq	%rax, %rax
	je	LBB0_17
## %bb.10:
	imulq	(%rdi), %rax
LBB0_11:
	movq	_VDDCI_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	orq	%rdx, %rax
	jmp	LBB0_18
LBB0_12:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	8(%rsi), %rcx
	movslq	16(%rcx,%rbx), %rcx
	testq	%rcx, %rcx
	cmovneq	%rcx, %rax
	cmoveq	_VDDCI_SHIFT@GOTPCREL(%rip), %r15
LBB0_13:
	movq	_VOLTAGE_SCALE@GOTPCREL(%rip), %rdi
	imulq	(%rdi), %rax
	movb	(%r15), %cl
	shlq	%cl, %rax
	orq	%rax, (%r13)
	movq	(%rdx), %rax
	cmpq	8(%r12), %rax
	jne	LBB0_15
## %bb.14:
	movq	(%rdi), %rax
	imulq	24(%r12), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	jmp	LBB0_23
LBB0_15:
	movq	8(%rsi), %rcx
	shlq	$5, %r14
	xorl	%eax, %eax
	cmpq	$0, 24(%rcx,%r14)
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	je	LBB0_24
## %bb.16:
	movq	(%rdi), %rdx
	imulq	24(%rcx,%rbx), %rdx
	movq	%rdx, (%rsi)
	jmp	LBB0_24
LBB0_17:
	leaq	32(%r12), %rdi
	movq	8(%rsi,%rbx), %rsi
	movq	_VDDC_VDDCI_DELTA@GOTPCREL(%rip), %rax
	subq	(%rax), %rsi
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	callq	_phm_find_closest_vddci
	movq	_VOLTAGE_SCALE@GOTPCREL(%rip), %rdi
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	imulq	(%rdi), %rax
	movq	_VDDCI_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shlq	%cl, %rax
	orq	(%r13), %rax
LBB0_18:
	movq	%rax, (%r13)
	movq	(%r14), %rax
	cmpq	8(%r12), %rax
	jne	LBB0_20
## %bb.19:
	movq	24(%r12), %rax
	jmp	LBB0_21
LBB0_20:
	movq	8(%r8), %rax
	movq	24(%rax,%rbx), %rax
	testq	%rax, %rax
	je	LBB0_22
LBB0_21:
	imulq	(%rdi), %rax
	movq	%rax, (%r15)
LBB0_22:
	movq	_PHASES_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	cltq
	orq	%rax, (%r13)
LBB0_23:
	xorl	%eax, %eax
LBB0_24:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VOLTAGE_SCALE,8,3              ## @VOLTAGE_SCALE
	.comm	_VDDC_SHIFT,8,3                 ## @VDDC_SHIFT
	.comm	_SMU7_VOLTAGE_CONTROL_NONE,8,3  ## @SMU7_VOLTAGE_CONTROL_NONE
	.comm	_VDDCI_SHIFT,8,3                ## @VDDCI_SHIFT
	.comm	_VDDC_VDDCI_DELTA,8,3           ## @VDDC_VDDCI_DELTA
	.comm	_PHASES_SHIFT,4,2               ## @PHASES_SHIFT
	.no_dead_strip	_vegam_get_dependency_volt_by_clk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vegam_get_dependency_volt_by_clk
_vegam_get_dependency_volt_by_clk:      ; @vegam_get_dependency_volt_by_clk
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x22, [x0]
	str	xzr, [x4]
	str	xzr, [x3]
	ldr	x24, [x1]
	cbz	x24, LBB0_6
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x1
	mov	x23, #0
	ldr	x8, [x1, #8]
	mov	x9, x24
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8, x23]
	cmp	x10, x2
	b.hs	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #32
	subs	x9, x9, #1
	b.ne	LBB0_2
; %bb.4:
	sub	x25, x24, #1
	add	x8, x8, x25, lsl #5
	ldr	x9, [x8, #8]
Lloh0:
	adrp	x23, _VOLTAGE_SCALE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _VOLTAGE_SCALE@GOTPAGEOFF]
	ldr	x10, [x23]
	mul	x9, x10, x9
Lloh2:
	adrp	x26, _VDDC_SHIFT@GOTPAGE
Lloh3:
	ldr	x26, [x26, _VDDC_SHIFT@GOTPAGEOFF]
	ldr	x10, [x26]
	lsl	x9, x9, x10
	str	x9, [x20]
	add	x0, x22, #32
	ldr	x8, [x8, #8]
Lloh4:
	adrp	x9, _VDDC_VDDCI_DELTA@GOTPAGE
Lloh5:
	ldr	x9, [x9, _VDDC_VDDCI_DELTA@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	sub	x1, x8, x9
	bl	_phm_find_closest_vddci
Lloh7:
	adrp	x8, _SMU7_VOLTAGE_CONTROL_NONE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SMU7_VOLTAGE_CONTROL_NONE@GOTPAGEOFF]
	ldr	x9, [x8]
	ldr	x10, [x22]
	cmp	x9, x10
	b.ne	LBB0_17
; %bb.5:
	ldr	x9, [x22, #16]
Lloh9:
	adrp	x10, _VDDCI_SHIFT@GOTPAGE
Lloh10:
	ldr	x10, [x10, _VDDCI_SHIFT@GOTPAGEOFF]
	b	LBB0_18
LBB0_6:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_23
LBB0_7:
	add	x9, x8, x23
	ldr	x8, [x9, #8]
Lloh14:
	adrp	x24, _VOLTAGE_SCALE@GOTPAGE
Lloh15:
	ldr	x24, [x24, _VOLTAGE_SCALE@GOTPAGEOFF]
	ldr	x10, [x24]
	mul	x8, x10, x8
Lloh16:
	adrp	x10, _VDDC_SHIFT@GOTPAGE
Lloh17:
	ldr	x10, [x10, _VDDC_SHIFT@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	lsl	x8, x8, x10
	str	x8, [x20]
Lloh19:
	adrp	x25, _SMU7_VOLTAGE_CONTROL_NONE@GOTPAGE
Lloh20:
	ldr	x25, [x25, _SMU7_VOLTAGE_CONTROL_NONE@GOTPAGEOFF]
	ldr	x10, [x25]
	ldr	x11, [x22]
	cmp	x10, x11
	b.ne	LBB0_9
; %bb.8:
	ldr	x9, [x22, #16]
	ldr	x10, [x24]
	mul	x9, x10, x9
	b	LBB0_11
LBB0_9:
	ldrsw	x10, [x9, #16]
	cbz	w10, LBB0_24
; %bb.10:
	ldr	x9, [x24]
	mul	x9, x9, x10
LBB0_11:
Lloh21:
	adrp	x10, _VDDCI_SHIFT@GOTPAGE
Lloh22:
	ldr	x10, [x10, _VDDCI_SHIFT@GOTPAGEOFF]
Lloh23:
	ldr	x10, [x10]
	lsl	x9, x9, x10
LBB0_12:
	orr	x8, x9, x8
	str	x8, [x20]
	ldr	x8, [x25]
	ldr	x9, [x22, #8]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:
	ldr	x8, [x22, #24]
	b	LBB0_15
LBB0_14:
	ldr	x8, [x21, #8]
	add	x8, x8, x23
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_16
LBB0_15:
	ldr	x9, [x24]
	mul	x8, x9, x8
	str	x8, [x19]
LBB0_16:
	mov	w0, #0
Lloh24:
	adrp	x8, _PHASES_SHIFT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PHASES_SHIFT@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
	sxtw	x8, w8
	ldr	x9, [x20]
	orr	x8, x9, x8
	str	x8, [x20]
	b	LBB0_23
LBB0_17:
	ldr	x9, [x21, #8]
	add	x9, x9, x25, lsl #5
	ldrsw	x9, [x9, #16]
	cmp	w9, #0
	csel	x9, x0, x9, eq
Lloh27:
	adrp	x10, _VDDCI_SHIFT@GOTPAGE
Lloh28:
	ldr	x10, [x10, _VDDCI_SHIFT@GOTPAGEOFF]
	csel	x10, x10, x26, eq
LBB0_18:
	ldr	x11, [x23]
	mul	x9, x11, x9
	ldr	x10, [x10]
	lsl	x9, x9, x10
	ldr	x10, [x20]
	orr	x9, x10, x9
	str	x9, [x20]
	ldr	x8, [x8]
	ldr	x9, [x22, #8]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.19:
	mov	w0, #0
	ldr	x8, [x22, #24]
	b	LBB0_22
LBB0_20:
	ldr	x8, [x21, #8]
	add	x9, x8, x24, lsl #5
	ldr	x9, [x9, #24]
	cbz	x9, LBB0_25
; %bb.21:
	mov	w0, #0
	add	x8, x8, x25, lsl #5
	ldr	x8, [x8, #24]
LBB0_22:
	ldr	x9, [x23]
	mul	x8, x9, x8
	str	x8, [x19]
LBB0_23:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_24:
	add	x0, x22, #32
	ldr	x8, [x9, #8]
Lloh29:
	adrp	x9, _VDDC_VDDCI_DELTA@GOTPAGE
Lloh30:
	ldr	x9, [x9, _VDDC_VDDCI_DELTA@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	sub	x1, x8, x9
	bl	_phm_find_closest_vddci
	ldr	x8, [x24]
	mul	x8, x8, x0
Lloh32:
	adrp	x9, _VDDCI_SHIFT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _VDDCI_SHIFT@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
	lsl	x8, x8, x9
	ldr	x9, [x20]
	b	LBB0_12
LBB0_25:
	mov	w0, #0
	b	LBB0_23
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VOLTAGE_SCALE,8,3              ; @VOLTAGE_SCALE
	.comm	_VDDC_SHIFT,8,3                 ; @VDDC_SHIFT
	.comm	_SMU7_VOLTAGE_CONTROL_NONE,8,3  ; @SMU7_VOLTAGE_CONTROL_NONE
	.comm	_VDDCI_SHIFT,8,3                ; @VDDCI_SHIFT
	.comm	_VDDC_VDDCI_DELTA,8,3           ; @VDDC_VDDCI_DELTA
	.comm	_PHASES_SHIFT,4,2               ; @PHASES_SHIFT
	.no_dead_strip	_vegam_get_dependency_volt_by_clk
.subsections_via_symbols
