	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rv6xx_calculate_voltage_stepping_parameters
_rv6xx_calculate_voltage_stepping_parameters: ## @rv6xx_calculate_voltage_stepping_parameters
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rsi, %rbx
	callq	_rv6xx_get_pi
	movq	32(%rbx), %rcx
	movq	(%rax), %rsi
	movq	_R600_POWER_LEVEL_CTXSW@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdx
	movq	%rcx, (%rsi,%rdx,8)
	movq	32(%rbx), %rcx
	movq	_R600_POWER_LEVEL_HIGH@GOTPCREL(%rip), %r11
	movq	(%r11), %rdx
	movq	%rcx, (%rsi,%rdx,8)
	movq	16(%rbx), %rcx
	movq	_R600_POWER_LEVEL_MEDIUM@GOTPCREL(%rip), %r10
	movq	(%r10), %rdx
	movq	%rcx, (%rsi,%rdx,8)
	movq	(%rbx), %rcx
	movq	_R600_POWER_LEVEL_LOW@GOTPCREL(%rip), %r9
	movq	(%r9), %rdx
	movq	%rcx, (%rsi,%rdx,8)
	movq	_ATOM_PPLIB_R600_FLAGS_BACKBIASENABLE@GOTPCREL(%rip), %r8
	movl	(%r8), %ecx
	xorl	%edx, %edx
	andl	40(%rbx), %ecx
	setne	%dl
	movq	8(%rax), %rcx
	movq	(%rdi), %rsi
	movl	%edx, (%rcx,%rsi,4)
	movl	(%r8), %edx
	xorl	%esi, %esi
	andl	40(%rbx), %edx
	setne	%sil
	movq	(%r11), %rdx
	movl	%esi, (%rcx,%rdx,4)
	movl	(%r8), %esi
	xorl	%edi, %edi
	andl	24(%rbx), %esi
	setne	%dil
	movq	(%r10), %r10
	movl	%edi, (%rcx,%r10,4)
	movl	(%r8), %edi
	xorl	%esi, %esi
	andl	8(%rbx), %edi
	setne	%sil
	movq	(%r9), %r9
	movl	%esi, (%rcx,%r9,4)
	movq	_ATOM_PPLIB_R600_FLAGS_PCIEGEN2@GOTPCREL(%rip), %r11
	movl	(%r11), %esi
	xorl	%edi, %edi
	andl	40(%rbx), %esi
	setne	%dil
	movq	16(%rax), %rsi
	movl	%edi, (%rsi,%rdx,4)
	movl	(%r11), %edi
	xorl	%ecx, %ecx
	andl	24(%rbx), %edi
	setne	%cl
	movl	%ecx, (%rsi,%r10,4)
	movl	(%r11), %ecx
	xorl	%edi, %edi
	andl	8(%rbx), %ecx
	setne	%dil
	movl	%edi, (%rsi,%r9,4)
	movq	%rdx, 24(%rax)
	movq	16(%rbx), %rcx
	cmpq	%rcx, 32(%rbx)
	jne	LBB0_2
## %bb.1:
	movl	24(%rbx), %esi
	xorl	40(%rbx), %esi
	testl	%esi, (%r8)
	je	LBB0_3
LBB0_2:
	movq	%r10, %rdx
LBB0_3:
	movq	%rdx, 32(%rax)
	cmpq	(%rbx), %rcx
	jne	LBB0_6
## %bb.4:
	movl	8(%rbx), %ecx
	xorl	24(%rbx), %ecx
	testl	%ecx, (%r8)
	je	LBB0_5
LBB0_6:
	movq	%r9, 32(%rax)
	jmp	LBB0_7
LBB0_5:
	movq	%rdx, 40(%rax)
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R600_POWER_LEVEL_CTXSW,8,3     ## @R600_POWER_LEVEL_CTXSW
	.comm	_R600_POWER_LEVEL_HIGH,8,3      ## @R600_POWER_LEVEL_HIGH
	.comm	_R600_POWER_LEVEL_MEDIUM,8,3    ## @R600_POWER_LEVEL_MEDIUM
	.comm	_R600_POWER_LEVEL_LOW,8,3       ## @R600_POWER_LEVEL_LOW
	.comm	_ATOM_PPLIB_R600_FLAGS_BACKBIASENABLE,4,2 ## @ATOM_PPLIB_R600_FLAGS_BACKBIASENABLE
	.comm	_ATOM_PPLIB_R600_FLAGS_PCIEGEN2,4,2 ## @ATOM_PPLIB_R600_FLAGS_PCIEGEN2
	.no_dead_strip	_rv6xx_calculate_voltage_stepping_parameters
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rv6xx_calculate_voltage_stepping_parameters
_rv6xx_calculate_voltage_stepping_parameters: ; @rv6xx_calculate_voltage_stepping_parameters
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_rv6xx_get_pi
Lloh0:
	adrp	x9, _R600_POWER_LEVEL_CTXSW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _R600_POWER_LEVEL_CTXSW@GOTPAGEOFF]
	ldr	x8, [x19, #32]
	ldr	x10, [x9]
	ldp	x11, x12, [x0]
	str	x8, [x11, x10, lsl #3]
	ldr	x8, [x19, #32]
Lloh2:
	adrp	x10, _R600_POWER_LEVEL_HIGH@GOTPAGE
Lloh3:
	ldr	x10, [x10, _R600_POWER_LEVEL_HIGH@GOTPAGEOFF]
	ldr	x13, [x10]
	str	x8, [x11, x13, lsl #3]
	ldr	x8, [x19, #16]
Lloh4:
	adrp	x13, _R600_POWER_LEVEL_MEDIUM@GOTPAGE
Lloh5:
	ldr	x13, [x13, _R600_POWER_LEVEL_MEDIUM@GOTPAGEOFF]
	ldr	x14, [x13]
	str	x8, [x11, x14, lsl #3]
	ldr	x8, [x19]
Lloh6:
	adrp	x14, _R600_POWER_LEVEL_LOW@GOTPAGE
Lloh7:
	ldr	x14, [x14, _R600_POWER_LEVEL_LOW@GOTPAGEOFF]
	ldr	x15, [x14]
	str	x8, [x11, x15, lsl #3]
	ldr	w11, [x19, #40]
Lloh8:
	adrp	x8, _ATOM_PPLIB_R600_FLAGS_BACKBIASENABLE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ATOM_PPLIB_R600_FLAGS_BACKBIASENABLE@GOTPAGEOFF]
	ldr	w15, [x8]
	tst	w15, w11
	cset	w11, ne
	ldr	x9, [x9]
	str	w11, [x12, x9, lsl #2]
	ldr	w9, [x19, #40]
	ldr	w11, [x8]
	tst	w11, w9
	cset	w9, ne
	ldr	x11, [x10]
	lsl	x15, x11, #2
	str	w9, [x12, x15]
	ldr	w9, [x19, #24]
	ldr	w10, [x8]
	tst	w10, w9
	cset	w10, ne
	ldr	x9, [x13]
	lsl	x13, x9, #2
	str	w10, [x12, x13]
	ldr	w10, [x19, #8]
	ldr	w16, [x8]
	tst	w16, w10
	cset	w16, ne
	ldr	x10, [x14]
	lsl	x14, x10, #2
	str	w16, [x12, x14]
	ldr	w12, [x19, #40]
Lloh10:
	adrp	x16, _ATOM_PPLIB_R600_FLAGS_PCIEGEN2@GOTPAGE
Lloh11:
	ldr	x16, [x16, _ATOM_PPLIB_R600_FLAGS_PCIEGEN2@GOTPAGEOFF]
	ldr	w17, [x16]
	tst	w17, w12
	cset	w12, ne
	ldr	x17, [x0, #16]
	str	w12, [x17, x15]
	ldr	w12, [x19, #24]
	ldr	w15, [x16]
	tst	w15, w12
	cset	w12, ne
	str	w12, [x17, x13]
	ldr	w12, [x19, #8]
	ldr	w13, [x16]
	tst	w13, w12
	cset	w12, ne
	str	w12, [x17, x14]
	str	x11, [x0, #24]
	ldr	x13, [x19, #32]
	ldr	x12, [x19, #16]
	cmp	x13, x12
	b.ne	LBB0_3
; %bb.1:
	ldr	w13, [x19, #40]
	ldr	w14, [x8]
	ldr	w15, [x19, #24]
	eor	w13, w15, w13
	tst	w13, w14
	b.ne	LBB0_3
; %bb.2:
	mov	x9, x11
LBB0_3:
	str	x9, [x0, #32]
	ldr	x11, [x19]
	cmp	x12, x11
	b.ne	LBB0_5
; %bb.4:
	ldr	w11, [x19, #24]
	ldr	w8, [x8]
	ldr	w12, [x19, #8]
	eor	w11, w12, w11
	tst	w11, w8
	b.eq	LBB0_6
LBB0_5:
	str	x10, [x0, #32]
	b	LBB0_7
LBB0_6:
	str	x9, [x0, #40]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_R600_POWER_LEVEL_CTXSW,8,3     ; @R600_POWER_LEVEL_CTXSW
	.comm	_R600_POWER_LEVEL_HIGH,8,3      ; @R600_POWER_LEVEL_HIGH
	.comm	_R600_POWER_LEVEL_MEDIUM,8,3    ; @R600_POWER_LEVEL_MEDIUM
	.comm	_R600_POWER_LEVEL_LOW,8,3       ; @R600_POWER_LEVEL_LOW
	.comm	_ATOM_PPLIB_R600_FLAGS_BACKBIASENABLE,4,2 ; @ATOM_PPLIB_R600_FLAGS_BACKBIASENABLE
	.comm	_ATOM_PPLIB_R600_FLAGS_PCIEGEN2,4,2 ; @ATOM_PPLIB_R600_FLAGS_PCIEGEN2
	.no_dead_strip	_rv6xx_calculate_voltage_stepping_parameters
.subsections_via_symbols
