	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rs780_dpm_enable               ## -- Begin function rs780_dpm_enable
	.p2align	4, 0x90
_rs780_dpm_enable:                      ## @rs780_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_rs780_get_pi
	movq	%rax, %r14
	movq	(%r15), %rbx
	movq	%r15, %rdi
	callq	_rs780_get_pm_mode_parameters
	movq	%r15, %rdi
	callq	_rs780_disable_vbios_powersaving
	movq	%r15, %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_7
LBB0_2:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_rs780_initialize_dpm_parameters
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.3:
	movq	%r15, %rdi
	callq	_rs780_start_dpm
	movq	%r15, %rdi
	callq	_rs780_preset_ranges_slow_clk_fbdiv_en
	movq	%r15, %rdi
	callq	_rs780_preset_starting_fbdiv
	cmpq	$0, 8(%r14)
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	callq	_rs780_voltage_scaling_init
LBB0_5:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_rs780_clk_scaling_enable
	movq	%r15, %rdi
	callq	_rs780_set_engine_clock_sc
	movq	%r15, %rdi
	callq	_rs780_set_engine_clock_wfc
	movq	%r15, %rdi
	callq	_rs780_program_at
	movq	%r15, %rdi
	callq	_rs780_set_engine_clock_tdc
	movq	%r15, %rdi
	callq	_rs780_set_engine_clock_ssc
	xorl	%ebx, %ebx
	cmpq	$0, (%r14)
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	movl	$1, %esi
	callq	_r600_gfx_clockgating_enable
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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	_rs780_dpm_enable               ; -- Begin function rs780_dpm_enable
	.p2align	2
_rs780_dpm_enable:                      ; @rs780_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	_rs780_get_pi
	mov	x20, x0
	ldr	x21, [x19]
	mov	x0, x19
	bl	_rs780_get_pm_mode_parameters
	mov	x0, x19
	bl	_rs780_disable_vbios_powersaving
	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_8
LBB0_2:
	mov	x0, x19
	mov	x1, x21
	bl	_rs780_initialize_dpm_parameters
	cbnz	w0, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_rs780_start_dpm
	mov	x0, x19
	bl	_rs780_preset_ranges_slow_clk_fbdiv_en
	mov	x0, x19
	bl	_rs780_preset_starting_fbdiv
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_rs780_voltage_scaling_init
LBB0_5:
	mov	x0, x19
	mov	w1, #1
	bl	_rs780_clk_scaling_enable
	mov	x0, x19
	bl	_rs780_set_engine_clock_sc
	mov	x0, x19
	bl	_rs780_set_engine_clock_wfc
	mov	x0, x19
	bl	_rs780_program_at
	mov	x0, x19
	bl	_rs780_set_engine_clock_tdc
	mov	x0, x19
	bl	_rs780_set_engine_clock_ssc
	ldr	x8, [x20]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	w1, #1
	bl	_r600_gfx_clockgating_enable
LBB0_7:
	mov	w0, #0
LBB0_8:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
