	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_volt_map                  ## -- Begin function nvkm_volt_map
	.p2align	4, 0x90
_nvkm_volt_map:                         ## @nvkm_volt_map
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	8(%rdi), %rax
	movq	(%rax), %rdi
	leaq	-60(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	leaq	-56(%rbp), %r8
	callq	_nvbios_vmap_entry_parse
	testq	%rax, %rax
	je	LBB0_17
## %bb.1:
	movl	(%r15), %r12d
	testl	%r12d, %r12d
	js	LBB0_18
## %bb.2:
	movl	-60(%rbp), %ecx
	cmpl	$16, %ecx
	je	LBB0_5
## %bb.3:
	movl	-56(%rbp), %eax
	cmpl	$32, %ecx
	jne	LBB0_6
## %bb.4:
	testl	%eax, %eax
	jne	LBB0_6
LBB0_5:
	movq	-40(%rbp), %rax
	movl	(%rax), %edi
	movl	$10, %esi
	callq	_div64_s64
	movl	%eax, %r12d
	movq	-40(%rbp), %rax
	movl	(%r15), %edi
	imull	8(%rax), %edi
	movl	$10, %esi
	callq	_div64_s64
	movl	%eax, %ebx
	addl	%r12d, %ebx
	movq	-40(%rbp), %rax
	movl	(%r15), %ecx
	movl	16(%rax), %edi
	imull	%ecx, %edi
	imull	%ecx, %edi
	movl	$100000, %esi                   ## imm = 0x186A0
	callq	_div64_s64
	movl	%eax, %edi
	addl	%ebx, %edi
LBB0_13:
	movl	-52(%rbp), %esi
	callq	_max
	movl	-48(%rbp), %esi
	movl	%eax, %edi
	callq	_min
	movl	%eax, %r12d
	movl	-44(%rbp), %esi
	cmpl	$255, %esi
	je	LBB0_18
## %bb.14:
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_nvkm_volt_map
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	addl	%eax, %r12d
	jmp	LBB0_18
LBB0_17:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	imull	$10000, %ebx, %eax              ## imm = 0x2710
	testl	%ebx, %ebx
	cmovnel	%eax, %r12d
LBB0_18:
	movl	%r12d, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	$32, %ecx
	jne	LBB0_11
## %bb.7:
	cmpl	$3, %eax
	je	LBB0_12
## %bb.8:
	cmpl	$1, %eax
	jne	LBB0_10
## %bb.9:
	movq	-40(%rbp), %rax
	imull	$15625, (%rax), %edx            ## imm = 0x3D09
	sarl	$18, %edx
	imull	$15625, %r12d, %ecx             ## imm = 0x3D09
	movl	8(%rax), %esi
	imull	%ecx, %esi
	sarl	$18, %esi
	addl	%edx, %esi
	imull	$15625, %r14d, %edi             ## imm = 0x3D09
	movl	16(%rax), %edx
	imull	%edi, %edx
	sarl	$10, %edx
	addl	%esi, %edx
	movl	%edi, %esi
	imull	%r12d, %esi
	imull	24(%rax), %esi
	sarl	$18, %esi
	imull	%r12d, %ecx
	imull	32(%rax), %ecx
	addl	%edx, %esi
	sarl	$30, %ecx
	addl	%esi, %ecx
	imull	%r14d, %edi
	imull	40(%rax), %edi
	sarl	$18, %edi
	addl	%ecx, %edi
	jmp	LBB0_13
LBB0_15:
	movl	%eax, %r12d
	jmp	LBB0_18
LBB0_11:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_18
LBB0_12:
	movl	-48(%rbp), %eax
	addl	-52(%rbp), %eax
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	jmp	LBB0_13
LBB0_10:
	movl	-52(%rbp), %edi
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_volt_map                  ; -- Begin function nvkm_volt_map
	.p2align	2
_nvkm_volt_map:                         ; @nvkm_volt_map
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x0, [x8]
	add	x2, sp, #4
	mov	x3, sp
	add	x4, sp, #8
	bl	_nvbios_vmap_entry_parse
	cbz	x0, LBB0_9
; %bb.1:
	ldr	w21, [x20]
	tbnz	w21, #31, LBB0_10
; %bb.2:
	ldr	w9, [sp, #4]
	cmp	w9, #16
	b.eq	LBB0_5
; %bb.3:
	ldr	w8, [sp, #8]
	cmp	w9, #32
	b.ne	LBB0_11
; %bb.4:
	cbnz	w8, LBB0_11
LBB0_5:
	ldr	x8, [sp, #24]
	ldr	w0, [x8]
	mov	w1, #10
	bl	_div64_s64
	mov	x21, x0
	ldr	x8, [sp, #24]
	ldr	w8, [x8, #8]
	ldr	w9, [x20]
	mul	w0, w9, w8
	mov	w1, #10
	bl	_div64_s64
	add	w21, w0, w21
	ldr	x8, [sp, #24]
	ldr	w8, [x8, #16]
	ldr	w9, [x20]
	mul	w8, w9, w8
	mul	w0, w8, w9
	mov	w1, #34464
	movk	w1, #1, lsl #16
	bl	_div64_s64
	add	w0, w21, w0
LBB0_6:
	ldr	w1, [sp, #12]
	bl	_max
	ldr	w1, [sp, #16]
	bl	_min
	mov	x21, x0
	ldr	w1, [sp, #20]
	cmp	w1, #255
	b.eq	LBB0_10
; %bb.7:
	mov	x0, x20
	mov	x2, x19
	bl	_nvkm_volt_map
	tbnz	w0, #31, LBB0_15
; %bb.8:
	add	w21, w0, w21
	b	LBB0_10
LBB0_9:
	mov	w8, #10000
	mul	w8, w21, w8
Lloh0:
	adrp	x9, _ENODEV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w21, #0
	csneg	w21, w8, w9, ne
LBB0_10:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_11:
	cmp	w9, #32
	b.ne	LBB0_16
; %bb.12:
	cmp	w8, #3
	b.eq	LBB0_17
; %bb.13:
	cmp	w8, #1
	b.ne	LBB0_18
; %bb.14:
	ldr	x8, [sp, #24]
	ldr	w9, [x8]
	mov	w10, #15625
	mul	w9, w9, w10
	ldr	w11, [x8, #8]
	mul	w12, w21, w10
	mul	w11, w12, w11
	asr	w11, w11, #18
	add	w9, w11, w9, asr #18
	ldr	w11, [x8, #16]
	mul	w10, w19, w10
	mul	w11, w10, w11
	add	w9, w9, w11, asr #10
	ldr	w11, [x8, #24]
	mul	w13, w10, w21
	mul	w11, w13, w11
	add	w9, w9, w11, asr #18
	ldr	w11, [x8, #32]
	mul	w12, w12, w21
	mul	w11, w12, w11
	add	w9, w9, w11, asr #30
	ldr	w8, [x8, #40]
	mul	w10, w10, w19
	mul	w8, w10, w8
	add	w0, w9, w8, asr #18
	b	LBB0_6
LBB0_15:
	mov	x21, x0
	b	LBB0_10
LBB0_16:
Lloh3:
	adrp	x8, _ENODEV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_10
LBB0_17:
	ldp	w8, w9, [sp, #12]
	add	w8, w9, w8
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w0, w8, #1
	b	LBB0_6
LBB0_18:
	ldr	w0, [sp, #12]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
.subsections_via_symbols
