	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv770_dpm_disable              ## -- Begin function rv770_dpm_disable
	.p2align	4, 0x90
_rv770_dpm_disable:                     ## @rv770_dpm_disable
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_rv770_get_pi
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_rv770_dpm_enabled
	testl	%eax, %eax
	je	LBB0_17
## %bb.1:
	movq	%rbx, %rdi
	callq	_rv770_clear_vc
	cmpq	$0, 24(%r14)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rv770_enable_thermal_protection
LBB0_3:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rv770_enable_spread_spectrum
	cmpq	$0, 16(%r14)
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rv770_enable_dynamic_pcie_gen2
LBB0_5:
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.6:
	movl	24(%rbx), %edi
	callq	_r600_is_internal_thermal_sensor
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	$0, 8(%rbx)
	movq	%rbx, %rdi
	callq	_radeon_irq_set
LBB0_8:
	cmpq	$0, 8(%r14)
	je	LBB0_10
## %bb.9:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rv770_gfx_clock_gating_enable
LBB0_10:
	cmpq	$0, (%r14)
	je	LBB0_12
## %bb.11:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_rv770_mg_clock_gating_enable
LBB0_12:
	movq	(%rbx), %rax
	movq	_CHIP_RV730@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.13:
	movq	_CHIP_RV710@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_14
## %bb.15:
	movq	%rbx, %rdi
	callq	_rv770_stop_dpm
	jmp	LBB0_16
LBB0_17:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_14:
	movq	%rbx, %rdi
	callq	_rv730_stop_dpm
LBB0_16:
	movq	%rbx, %rdi
	callq	_r7xx_stop_smc
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rv770_reset_smio_status        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CHIP_RV730,8,3                 ## @CHIP_RV730
	.comm	_CHIP_RV710,8,3                 ## @CHIP_RV710
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv770_dpm_disable              ; -- Begin function rv770_dpm_disable
	.p2align	2
_rv770_dpm_disable:                     ; @rv770_dpm_disable
	.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, x0
	bl	_rv770_get_pi
	mov	x20, x0
	mov	x0, x19
	bl	_rv770_dpm_enabled
	cbz	w0, LBB0_14
; %bb.1:
	mov	x0, x19
	bl	_rv770_clear_vc
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	mov	w1, #0
	bl	_rv770_enable_thermal_protection
LBB0_3:
	mov	x0, x19
	mov	w1, #0
	bl	_rv770_enable_spread_spectrum
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	w1, #0
	bl	_rv770_enable_dynamic_pcie_gen2
LBB0_5:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	w0, [x19, #24]
	bl	_r600_is_internal_thermal_sensor
	cbz	x0, LBB0_8
; %bb.7:
	str	wzr, [x19, #8]
	mov	x0, x19
	bl	_radeon_irq_set
LBB0_8:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	w1, #0
	bl	_rv770_gfx_clock_gating_enable
LBB0_10:
	ldr	x8, [x20]
	cbz	x8, LBB0_12
; %bb.11:
	mov	x0, x19
	mov	w1, #0
	bl	_rv770_mg_clock_gating_enable
LBB0_12:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _CHIP_RV730@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CHIP_RV730@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _CHIP_RV710@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CHIP_RV710@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	mov	x0, x19
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_15
; %bb.13:
	bl	_rv730_stop_dpm
	b	LBB0_16
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	_rv770_stop_dpm
LBB0_16:
	mov	x0, x19
	bl	_r7xx_stop_smc
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rv770_reset_smio_status
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CHIP_RV730,8,3                 ; @CHIP_RV730
	.comm	_CHIP_RV710,8,3                 ; @CHIP_RV710
.subsections_via_symbols
