	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function trinity_program_sclk_dpm
_trinity_program_sclk_dpm:              ## @trinity_program_sclk_dpm
	.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, %r14
	movq	_PM_TP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32_SMC
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_radeon_get_xclk
	leaq	-28(%rbp), %rcx
	leaq	-32(%rbp), %r8
	movl	$400, %edi                      ## imm = 0x190
	movl	%eax, %esi
	movl	$16, %edx
	callq	_r600_calculate_u_and_p
	movl	-28(%rbp), %eax
	addl	%ebx, %eax
	decl	%eax
	cltd
	idivl	%ebx
	movl	%eax, %r14d
	movq	_PM_I_CNTL_1@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_RREG32_SMC
	movq	_SCLK_DPM_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	%r14d, %edi
	callq	_SCLK_DPM
	orl	%eax, %ebx
	movl	(%r15), %edi
	movl	%ebx, %esi
	callq	_WREG32_SMC
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PM_TP,4,2                      ## @PM_TP
	.comm	_PM_I_CNTL_1,4,2                ## @PM_I_CNTL_1
	.comm	_SCLK_DPM_MASK,4,2              ## @SCLK_DPM_MASK
	.no_dead_strip	_trinity_program_sclk_dpm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function trinity_program_sclk_dpm
_trinity_program_sclk_dpm:              ; @trinity_program_sclk_dpm
	.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	x19, x0
Lloh0:
	adrp	x8, _PM_TP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PM_TP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RREG32_SMC
	mov	x20, x0
	mov	x0, x19
	bl	_radeon_get_xclk
	mov	x1, x0
	add	x3, sp, #12
	add	x4, sp, #8
	mov	w0, #400
	mov	w2, #16
	bl	_r600_calculate_u_and_p
	ldr	w8, [sp, #12]
	add	w8, w20, w8
	sub	w8, w8, #1
Lloh3:
	adrp	x21, _PM_I_CNTL_1@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PM_I_CNTL_1@GOTPAGEOFF]
	ldr	w0, [x21]
	sdiv	w19, w8, w20
	bl	_RREG32_SMC
Lloh5:
	adrp	x8, _SCLK_DPM_MASK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SCLK_DPM_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	bic	w20, w0, w8
	mov	x0, x19
	bl	_SCLK_DPM
	orr	w1, w20, w0
	ldr	w0, [x21]
	bl	_WREG32_SMC
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PM_TP,4,2                      ; @PM_TP
	.comm	_PM_I_CNTL_1,4,2                ; @PM_I_CNTL_1
	.comm	_SCLK_DPM_MASK,4,2              ; @SCLK_DPM_MASK
	.no_dead_strip	_trinity_program_sclk_dpm
.subsections_via_symbols
