	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_atom_round_to_true_voltage ## -- Begin function radeon_atom_round_to_true_voltage
	.p2align	4, 0x90
_radeon_atom_round_to_true_voltage:     ## @radeon_atom_round_to_true_voltage
	.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
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %rbx
	leaq	-48(%rbp), %rdx
	callq	_radeon_atom_get_max_voltage
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_radeon_atom_get_min_voltage
	testq	%rax, %rax
	jne	LBB0_1
## %bb.3:
	leaq	-40(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_radeon_atom_get_voltage_step
	testq	%rax, %rax
	je	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	-56(%rbp), %rcx
	cmpq	%r15, %rcx
	jge	LBB0_5
## %bb.6:
	movq	-48(%rbp), %rax
	cmpq	%r15, %rax
	jle	LBB0_7
## %bb.8:
	movq	%r15, %rax
	subq	%rcx, %rax
	movq	-40(%rbp), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_9
## %bb.10:
	cqto
	idivq	%rcx
	jmp	LBB0_11
LBB0_5:
	movq	%rcx, (%r14)
	jmp	LBB0_12
LBB0_7:
	movq	%rax, (%r14)
	jmp	LBB0_12
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
LBB0_11:
	subq	%rdx, %r15
	movq	%r15, (%r14)
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_atom_round_to_true_voltage ; -- Begin function radeon_atom_round_to_true_voltage
	.p2align	2
_radeon_atom_round_to_true_voltage:     ; @radeon_atom_round_to_true_voltage
	.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, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	add	x2, sp, #16
	bl	_radeon_atom_get_max_voltage
	cbnz	x0, LBB0_3
; %bb.1:
	add	x2, sp, #24
	mov	x0, x22
	mov	x1, x21
	bl	_radeon_atom_get_min_voltage
	cbnz	x0, LBB0_3
; %bb.2:
	add	x2, sp, #8
	mov	x0, x22
	mov	x1, x21
	bl	_radeon_atom_get_voltage_step
	cbz	x0, LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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_5:
	ldr	x8, [sp, #24]
	cmp	x8, x20
	b.ge	LBB0_8
; %bb.6:
	ldr	x9, [sp, #16]
	cmp	x9, x20
	b.le	LBB0_10
; %bb.7:
	mov	w0, #0
	ldr	x9, [sp, #8]
	sub	x8, x20, x8
	neg	x10, x8
	sdiv	x8, x8, x9
	madd	x8, x8, x9, x10
	add	x8, x20, x8
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	str	x8, [x19]
	b	LBB0_4
LBB0_10:
	mov	w0, #0
	str	x9, [x19]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
