	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv6xx_dpm_enable               ## -- Begin function rv6xx_dpm_enable
	.p2align	4, 0x90
_rv6xx_dpm_enable:                      ## @rv6xx_dpm_enable
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_rv6xx_get_pi
	movq	%rax, %r14
	movq	8(%r12), %r15
	movq	%r12, %rdi
	callq	_r600_dynamicpm_enabled
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_2:
	movq	_ATOM_PP_PLATFORM_CAP_BACKBIAS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_rv6xx_enable_backbias
LBB0_4:
	cmpq	$0, 32(%r14)
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_rv6xx_enable_spread_spectrum
LBB0_6:
	movq	%r12, %rdi
	callq	_rv6xx_program_mpll_timing_parameters
	movq	%r12, %rdi
	callq	_rv6xx_program_bsp
	movq	%r12, %rdi
	callq	_rv6xx_program_git
	movq	%r12, %rdi
	callq	_rv6xx_program_tp
	movq	%r12, %rdi
	callq	_rv6xx_program_tpp
	movq	%r12, %rdi
	callq	_rv6xx_program_sstp
	movq	%r12, %rdi
	callq	_rv6xx_program_fcp
	movq	%r12, %rdi
	callq	_rv6xx_program_vddc3d_parameters
	movq	%r12, %rdi
	callq	_rv6xx_program_voltage_timing_parameters
	movq	%r12, %rdi
	callq	_rv6xx_program_engine_speed_parameters
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_rv6xx_enable_display_gap
	cmpl	$0, (%r14)
	jne	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_rv6xx_enable_display_gap
LBB0_8:
	movq	%r12, %rdi
	callq	_rv6xx_program_power_level_enter_state
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_rv6xx_calculate_stepping_parameters
	cmpq	$0, 24(%r14)
	je	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	callq	_rv6xx_program_voltage_gpio_pins
LBB0_10:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_rv6xx_generate_stepping_table
	movq	%r12, %rdi
	callq	_rv6xx_program_stepping_parameters_except_lowest_entry
	movq	%r12, %rdi
	callq	_rv6xx_program_stepping_parameters_lowest_entry
	movq	%r12, %rdi
	callq	_rv6xx_program_power_level_low
	movq	%r12, %rdi
	callq	_rv6xx_program_power_level_medium
	movq	%r12, %rdi
	callq	_rv6xx_program_power_level_high
	movq	%r12, %rdi
	callq	_rv6xx_program_vc
	movq	%r12, %rdi
	callq	_rv6xx_program_at
	movq	_R600_POWER_LEVEL_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_r600_power_level_enable
	movq	_R600_POWER_LEVEL_MEDIUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_r600_power_level_enable
	movq	_R600_POWER_LEVEL_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_r600_power_level_enable
	movq	_RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_rv6xx_enable_auto_throttle_source
	movq	%r12, %rdi
	callq	_r600_start_dpm
	cmpq	$0, 24(%r14)
	je	LBB0_12
## %bb.11:
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_rv6xx_enable_static_voltage_control
LBB0_12:
	cmpq	$0, 16(%r14)
	je	LBB0_14
## %bb.13:
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_rv6xx_enable_dynamic_pcie_gen2
LBB0_14:
	xorl	%ebx, %ebx
	cmpq	$0, 8(%r14)
	je	LBB0_16
## %bb.15:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_r600_gfx_clockgating_enable
LBB0_16:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ATOM_PP_PLATFORM_CAP_BACKBIAS,4,2 ## @ATOM_PP_PLATFORM_CAP_BACKBIAS
	.comm	_R600_POWER_LEVEL_LOW,4,2       ## @R600_POWER_LEVEL_LOW
	.comm	_R600_POWER_LEVEL_MEDIUM,4,2    ## @R600_POWER_LEVEL_MEDIUM
	.comm	_R600_POWER_LEVEL_HIGH,4,2      ## @R600_POWER_LEVEL_HIGH
	.comm	_RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL,4,2 ## @RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv6xx_dpm_enable               ; -- Begin function rv6xx_dpm_enable
	.p2align	2
_rv6xx_dpm_enable:                      ; @rv6xx_dpm_enable
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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, x0
	bl	_rv6xx_get_pi
	mov	x20, x0
	ldr	x21, [x19, #8]
	mov	x0, x19
	bl	_r600_dynamicpm_enabled
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_2:
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _ATOM_PP_PLATFORM_CAP_BACKBIAS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ATOM_PP_PLATFORM_CAP_BACKBIAS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #1
	bl	_rv6xx_enable_backbias
LBB0_4:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	w1, #1
	bl	_rv6xx_enable_spread_spectrum
LBB0_6:
	mov	x0, x19
	bl	_rv6xx_program_mpll_timing_parameters
	mov	x0, x19
	bl	_rv6xx_program_bsp
	mov	x0, x19
	bl	_rv6xx_program_git
	mov	x0, x19
	bl	_rv6xx_program_tp
	mov	x0, x19
	bl	_rv6xx_program_tpp
	mov	x0, x19
	bl	_rv6xx_program_sstp
	mov	x0, x19
	bl	_rv6xx_program_fcp
	mov	x0, x19
	bl	_rv6xx_program_vddc3d_parameters
	mov	x0, x19
	bl	_rv6xx_program_voltage_timing_parameters
	mov	x0, x19
	bl	_rv6xx_program_engine_speed_parameters
	mov	x0, x19
	mov	w1, #1
	bl	_rv6xx_enable_display_gap
	ldr	w8, [x20]
	cbnz	w8, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	w1, #0
	bl	_rv6xx_enable_display_gap
LBB0_8:
	mov	x0, x19
	bl	_rv6xx_program_power_level_enter_state
	mov	x0, x19
	mov	x1, x21
	bl	_rv6xx_calculate_stepping_parameters
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	bl	_rv6xx_program_voltage_gpio_pins
LBB0_10:
	mov	x0, x19
	mov	x1, x21
	bl	_rv6xx_generate_stepping_table
	mov	x0, x19
	bl	_rv6xx_program_stepping_parameters_except_lowest_entry
	mov	x0, x19
	bl	_rv6xx_program_stepping_parameters_lowest_entry
	mov	x0, x19
	bl	_rv6xx_program_power_level_low
	mov	x0, x19
	bl	_rv6xx_program_power_level_medium
	mov	x0, x19
	bl	_rv6xx_program_power_level_high
	mov	x0, x19
	bl	_rv6xx_program_vc
	mov	x0, x19
	bl	_rv6xx_program_at
Lloh6:
	adrp	x8, _R600_POWER_LEVEL_LOW@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R600_POWER_LEVEL_LOW@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_r600_power_level_enable
Lloh9:
	adrp	x8, _R600_POWER_LEVEL_MEDIUM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _R600_POWER_LEVEL_MEDIUM@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_r600_power_level_enable
Lloh12:
	adrp	x8, _R600_POWER_LEVEL_HIGH@GOTPAGE
Lloh13:
	ldr	x8, [x8, _R600_POWER_LEVEL_HIGH@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_r600_power_level_enable
Lloh15:
	adrp	x8, _RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #1
	bl	_rv6xx_enable_auto_throttle_source
	mov	x0, x19
	bl	_r600_start_dpm
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_12
; %bb.11:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_rv6xx_enable_static_voltage_control
LBB0_12:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_14
; %bb.13:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #1
	bl	_rv6xx_enable_dynamic_pcie_gen2
LBB0_14:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_16
; %bb.15:
	mov	x0, x19
	mov	w1, #1
	bl	_r600_gfx_clockgating_enable
LBB0_16:
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ATOM_PP_PLATFORM_CAP_BACKBIAS,4,2 ; @ATOM_PP_PLATFORM_CAP_BACKBIAS
	.comm	_R600_POWER_LEVEL_LOW,4,2       ; @R600_POWER_LEVEL_LOW
	.comm	_R600_POWER_LEVEL_MEDIUM,4,2    ; @R600_POWER_LEVEL_MEDIUM
	.comm	_R600_POWER_LEVEL_HIGH,4,2      ; @R600_POWER_LEVEL_HIGH
	.comm	_RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL,4,2 ; @RADEON_DPM_AUTO_THROTTLE_SRC_THERMAL
.subsections_via_symbols
