	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tonga_get_dependency_volt_by_clk
_tonga_get_dependency_volt_by_clk:      ## @tonga_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	(%rsi), %rbx
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.1:
	movq	%rcx, %r15
	movq	%rsi, %r13
	movq	(%rdi), %r12
	movq	8(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rsi), %rax
	xorl	%r14d, %r14d
	movq	%rbx, %rcx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdx, (%rax,%r14)
	jae	LBB0_3
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$40, %r14
	decq	%rcx
	jne	LBB0_2
## %bb.9:
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	4(%r12), %edi
	leaq	-8(,%rbx,8), %rcx
	decq	%rbx
	leaq	(%rcx,%rcx,4), %r14
	movq	32(%rax,%r14), %rsi
	callq	_phm_get_voltage_index
	movq	%rax, 24(%r15)
	movl	(%r12), %edi
	movq	8(%r13), %rax
	movq	24(%rax,%r14), %rsi
	callq	_phm_get_voltage_index
	movq	%rax, 16(%r15)
	movq	8(%r13), %rax
	movq	16(%rax,%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_phm_get_voltage_id
	movq	%rax, 8(%r15)
	movq	8(%r13), %rax
LBB0_11:
	leaq	(%rbx,%rbx,4), %rcx
	movq	8(%rax,%rcx,8), %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_13
## %bb.12:
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	%rcx, (%rdx)
	jmp	LBB0_13
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_13
LBB0_3:
	movq	%r8, %rbx
	movl	4(%r12), %edi
	movq	32(%rax,%r14), %rsi
	callq	_phm_get_voltage_index
	movq	%rax, 24(%r15)
	movl	(%r12), %edi
	movq	8(%r13), %rax
	movq	24(%rax,%r14), %rsi
	callq	_phm_get_voltage_index
	movq	%rax, 16(%r15)
	movq	8(%r13), %rax
	movq	16(%rax,%r14), %rsi
	testq	%rsi, %rsi
	jne	LBB0_5
## %bb.4:
	movq	24(%rax,%r14), %rsi
	movq	_VDDC_VDDCI_DELTA@GOTPCREL(%rip), %rax
	subq	(%rax), %rsi
LBB0_5:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_phm_get_voltage_id
	movq	%rax, 8(%r15)
	movq	8(%r13), %rax
	movq	8(%rax,%r14), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, (%rbx)
LBB0_7:
	movl	$1, (%r15)
	xorl	%eax, %eax
LBB0_13:
	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	_VDDC_VDDCI_DELTA,8,3           ## @VDDC_VDDCI_DELTA
	.no_dead_strip	_tonga_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 tonga_get_dependency_volt_by_clk
_tonga_get_dependency_volt_by_clk:      ; @tonga_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	x8, [x1]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x1
	mov	x23, #0
	ldp	x24, x22, [x0]
	mov	x10, x8
	ldr	x9, [x1, #8]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9, x23]
	cmp	x11, x2
	b.hs	LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x23, #40
	subs	x10, x10, #1
	b.ne	LBB0_2
; %bb.4:
	ldr	w0, [x24, #4]
	sub	x23, x8, #1
	add	x8, x23, x23, lsl #2
	lsl	x25, x8, #3
	add	x8, x9, x25
	ldr	x1, [x8, #32]
	bl	_phm_get_voltage_index
	str	x0, [x20, #24]
	ldr	w0, [x24]
	ldr	x8, [x21, #8]
	add	x8, x8, x25
	ldr	x1, [x8, #24]
	bl	_phm_get_voltage_index
	str	x0, [x20, #16]
	ldr	x8, [x21, #8]
	add	x9, x8, x25
	ldr	x1, [x9, #16]
	cbz	x1, LBB0_6
; %bb.5:
	mov	x0, x22
	bl	_phm_get_voltage_id
	str	x0, [x20, #8]
	ldr	x8, [x21, #8]
LBB0_6:
	mov	w9, #40
	madd	x8, x23, x9, x8
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_14
; %bb.7:
	mov	w0, #0
	str	x8, [x19]
	b	LBB0_15
LBB0_8:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_15
LBB0_9:
	ldr	w0, [x24, #4]
	add	x8, x9, x23
	ldr	x1, [x8, #32]
	bl	_phm_get_voltage_index
	str	x0, [x20, #24]
	ldr	w0, [x24]
	ldr	x8, [x21, #8]
	add	x8, x8, x23
	ldr	x1, [x8, #24]
	bl	_phm_get_voltage_index
	str	x0, [x20, #16]
	ldr	x8, [x21, #8]
	add	x8, x8, x23
	ldr	x1, [x8, #16]
	cbnz	x1, LBB0_11
; %bb.10:
	ldr	x8, [x8, #24]
Lloh3:
	adrp	x9, _VDDC_VDDCI_DELTA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VDDC_VDDCI_DELTA@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	sub	x1, x8, x9
LBB0_11:
	mov	x0, x22
	bl	_phm_get_voltage_id
	str	x0, [x20, #8]
	ldr	x8, [x21, #8]
	add	x8, x8, x23
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_13
; %bb.12:
	str	x8, [x19]
LBB0_13:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_15
LBB0_14:
	mov	w0, #0
LBB0_15:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VDDC_VDDCI_DELTA,8,3           ; @VDDC_VDDCI_DELTA
	.no_dead_strip	_tonga_get_dependency_volt_by_clk
.subsections_via_symbols
