	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv6xx_dpm_init                 ## -- Begin function rv6xx_dpm_init
	.p2align	4, 0x90
_rv6xx_dpm_init:                        ## @rv6xx_dpm_init
	.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	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$64, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, 32(%r14)
	movq	%r14, %rdi
	callq	_r600_get_platform_caps
	testl	%eax, %eax
	jne	LBB0_18
## %bb.3:
	movq	%r14, %rdi
	callq	_rv6xx_parse_power_table
	testl	%eax, %eax
	jne	LBB0_18
## %bb.4:
	cmpq	$0, 16(%r14)
	jne	LBB0_6
## %bb.5:
	movq	_R600_VOLTAGERESPONSETIME_DFLT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r14)
LBB0_6:
	cmpq	$0, 24(%r14)
	jne	LBB0_8
## %bb.7:
	movq	_R600_BACKBIASRESPONSETIME_DFLT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r14)
LBB0_8:
	movq	_COMPUTE_ENGINE_PLL_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %r15
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r15, %r8
	callq	_radeon_atom_get_clock_dividers
	movq	_R600_REFERENCEDIVIDER_DFLT@GOTPCREL(%rip), %r12
	testl	%eax, %eax
	jne	LBB0_9
## %bb.10:
	movq	(%r12), %rax
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_18:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	-40(%rbp), %rax
	incq	%rax
LBB0_11:
	movq	%rax, 56(%rbx)
	movq	_COMPUTE_MEMORY_PLL_PARAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r15, %r8
	callq	_radeon_atom_get_clock_dividers
	testl	%eax, %eax
	jne	LBB0_12
## %bb.13:
	movq	(%r12), %rax
	jmp	LBB0_14
LBB0_12:
	movq	-40(%rbp), %rax
	incq	%rax
LBB0_14:
	movq	%rax, 48(%rbx)
	movq	(%r14), %rax
	movq	_CHIP_RV670@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	setge	%dl
	movl	%edx, (%rbx)
	movq	_SET_VOLTAGE_TYPE_ASIC_VDDC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_radeon_atom_is_voltage_gpio
	movl	%eax, 40(%rbx)
	movl	$1, 4(%rbx)
	movq	_ASIC_INTERNAL_ENGINE_SS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_radeon_atombios_get_asic_ss_info
	movl	%eax, 8(%rbx)
	movq	_ASIC_INTERNAL_MEMORY_SS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_radeon_atombios_get_asic_ss_info
	movq	%rax, 32(%rbx)
	movl	$0, 8(%rbx)
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setne	%cl
	movl	%ecx, 12(%rbx)
	movl	$1, 16(%rbx)
	cmpl	$0, 4(%rbx)
	je	LBB0_16
## %bb.15:
	movq	8(%r14), %rcx
	movq	_THERMAL_TYPE_NONE@GOTPCREL(%rip), %rdx
	movl	$1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_17
LBB0_16:
	xorl	%eax, %eax
LBB0_17:
	movl	%eax, 20(%rbx)
	movl	$1, 24(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_R600_VOLTAGERESPONSETIME_DFLT,8,3 ## @R600_VOLTAGERESPONSETIME_DFLT
	.comm	_R600_BACKBIASRESPONSETIME_DFLT,8,3 ## @R600_BACKBIASRESPONSETIME_DFLT
	.comm	_COMPUTE_ENGINE_PLL_PARAM,4,2   ## @COMPUTE_ENGINE_PLL_PARAM
	.comm	_R600_REFERENCEDIVIDER_DFLT,8,3 ## @R600_REFERENCEDIVIDER_DFLT
	.comm	_COMPUTE_MEMORY_PLL_PARAM,4,2   ## @COMPUTE_MEMORY_PLL_PARAM
	.comm	_CHIP_RV670,8,3                 ## @CHIP_RV670
	.comm	_SET_VOLTAGE_TYPE_ASIC_VDDC,4,2 ## @SET_VOLTAGE_TYPE_ASIC_VDDC
	.comm	_ASIC_INTERNAL_ENGINE_SS,4,2    ## @ASIC_INTERNAL_ENGINE_SS
	.comm	_ASIC_INTERNAL_MEMORY_SS,4,2    ## @ASIC_INTERNAL_MEMORY_SS
	.comm	_THERMAL_TYPE_NONE,8,3          ## @THERMAL_TYPE_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rv6xx_dpm_init                 ; -- Begin function rv6xx_dpm_init
	.p2align	2
_rv6xx_dpm_init:                        ; @rv6xx_dpm_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #64
	bl	_kzalloc
	cbz	x0, LBB0_10
; %bb.1:
	mov	x19, x0
	str	x0, [x20, #32]
	mov	x0, x20
	bl	_r600_get_platform_caps
	cbnz	w0, LBB0_11
; %bb.2:
	mov	x0, x20
	bl	_rv6xx_parse_power_table
	cbnz	w0, LBB0_11
; %bb.3:
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _R600_VOLTAGERESPONSETIME_DFLT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R600_VOLTAGERESPONSETIME_DFLT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x20, #16]
LBB0_5:
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_7
; %bb.6:
Lloh6:
	adrp	x8, _R600_BACKBIASRESPONSETIME_DFLT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R600_BACKBIASRESPONSETIME_DFLT@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [x20, #24]
LBB0_7:
Lloh9:
	adrp	x8, _COMPUTE_ENGINE_PLL_PARAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _COMPUTE_ENGINE_PLL_PARAM@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x4, sp
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_radeon_atom_get_clock_dividers
Lloh12:
	adrp	x21, _R600_REFERENCEDIVIDER_DFLT@GOTPAGE
Lloh13:
	ldr	x21, [x21, _R600_REFERENCEDIVIDER_DFLT@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x9, [sp]
	cmp	w0, #0
	csinc	x8, x8, x9, eq
	str	x8, [x19, #56]
Lloh14:
	adrp	x8, _COMPUTE_MEMORY_PLL_PARAM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _COMPUTE_MEMORY_PLL_PARAM@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x4, sp
	mov	x0, x20
	mov	w2, #0
	mov	w3, #0
	bl	_radeon_atom_get_clock_dividers
	ldr	x8, [x21]
	ldr	x9, [sp]
	cmp	w0, #0
	csinc	x8, x8, x9, eq
	str	x8, [x19, #48]
	ldr	x8, [x20]
Lloh17:
	adrp	x9, _CHIP_RV670@GOTPAGE
Lloh18:
	ldr	x9, [x9, _CHIP_RV670@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w8, ge
	str	w8, [x19]
Lloh20:
	adrp	x8, _SET_VOLTAGE_TYPE_ASIC_VDDC@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SET_VOLTAGE_TYPE_ASIC_VDDC@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_radeon_atom_is_voltage_gpio
	str	w0, [x19, #40]
	mov	w21, #1
	str	w21, [x19, #4]
Lloh23:
	adrp	x8, _ASIC_INTERNAL_ENGINE_SS@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ASIC_INTERNAL_ENGINE_SS@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x20
	mov	w3, #0
	bl	_radeon_atombios_get_asic_ss_info
	str	w0, [x19, #8]
Lloh26:
	adrp	x8, _ASIC_INTERNAL_MEMORY_SS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ASIC_INTERNAL_MEMORY_SS@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	x0, x20
	mov	w3, #0
	bl	_radeon_atombios_get_asic_ss_info
	str	x0, [x19, #32]
	cmp	x0, #0
	cset	w8, ne
	stp	wzr, w8, [x19, #8]
	str	w21, [x19, #16]
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_9
; %bb.8:
	ldr	x8, [x20, #8]
Lloh29:
	adrp	x9, _THERMAL_TYPE_NONE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _THERMAL_TYPE_NONE@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
LBB0_9:
	mov	w8, #0
	b	LBB0_13
LBB0_10:
Lloh32:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_12:
	mov	w8, #1
LBB0_13:
	mov	w0, #0
	mov	w9, #1
	stp	w8, w9, [x19, #20]
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_R600_VOLTAGERESPONSETIME_DFLT,8,3 ; @R600_VOLTAGERESPONSETIME_DFLT
	.comm	_R600_BACKBIASRESPONSETIME_DFLT,8,3 ; @R600_BACKBIASRESPONSETIME_DFLT
	.comm	_COMPUTE_ENGINE_PLL_PARAM,4,2   ; @COMPUTE_ENGINE_PLL_PARAM
	.comm	_R600_REFERENCEDIVIDER_DFLT,8,3 ; @R600_REFERENCEDIVIDER_DFLT
	.comm	_COMPUTE_MEMORY_PLL_PARAM,4,2   ; @COMPUTE_MEMORY_PLL_PARAM
	.comm	_CHIP_RV670,8,3                 ; @CHIP_RV670
	.comm	_SET_VOLTAGE_TYPE_ASIC_VDDC,4,2 ; @SET_VOLTAGE_TYPE_ASIC_VDDC
	.comm	_ASIC_INTERNAL_ENGINE_SS,4,2    ; @ASIC_INTERNAL_ENGINE_SS
	.comm	_ASIC_INTERNAL_MEMORY_SS,4,2    ; @ASIC_INTERNAL_MEMORY_SS
	.comm	_THERMAL_TYPE_NONE,8,3          ; @THERMAL_TYPE_NONE
.subsections_via_symbols
