	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_trinity_dpm_enable             ## -- Begin function trinity_dpm_enable
	.p2align	4, 0x90
_trinity_dpm_enable:                    ## @trinity_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_trinity_get_pi
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_trinity_acquire_mutex
	movq	%rbx, %rdi
	callq	_trinity_dpm_enabled
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_trinity_release_mutex
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_5
LBB0_2:
	movq	%rbx, %rdi
	callq	_trinity_program_bootup_state
	movq	%rbx, %rdi
	movl	$12582963, %esi                 ## imm = 0xC00033
	callq	_sumo_program_vc
	movq	%rbx, %rdi
	callq	_trinity_start_am
	cmpq	$0, (%r14)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_trinity_program_ttt
	movq	%rbx, %rdi
	callq	_trinity_enable_att
LBB0_4:
	movq	%rbx, %rdi
	callq	_trinity_program_sclk_dpm
	movq	%rbx, %rdi
	callq	_trinity_start_dpm
	movq	%rbx, %rdi
	callq	_trinity_wait_for_dpm_enabled
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_trinity_dpm_bapm_enable
	movq	%rbx, %rdi
	callq	_trinity_release_mutex
	movl	(%rbx), %esi
	movq	%rbx, %rdi
	callq	_trinity_update_current_ps
LBB0_5:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	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	_trinity_dpm_enable             ; -- Begin function trinity_dpm_enable
	.p2align	2
_trinity_dpm_enable:                    ; @trinity_dpm_enable
	.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	_trinity_get_pi
	mov	x20, x0
	mov	x0, x19
	bl	_trinity_acquire_mutex
	mov	x0, x19
	bl	_trinity_dpm_enabled
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_trinity_release_mutex
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_trinity_program_bootup_state
	mov	x0, x19
	mov	w1, #51
	movk	w1, #192, lsl #16
	bl	_sumo_program_vc
	mov	x0, x19
	bl	_trinity_start_am
	ldr	x8, [x20]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_trinity_program_ttt
	mov	x0, x19
	bl	_trinity_enable_att
LBB0_4:
	mov	x0, x19
	bl	_trinity_program_sclk_dpm
	mov	x0, x19
	bl	_trinity_start_dpm
	mov	x0, x19
	bl	_trinity_wait_for_dpm_enabled
	mov	x0, x19
	mov	w1, #0
	bl	_trinity_dpm_bapm_enable
	mov	x0, x19
	bl	_trinity_release_mutex
	ldr	w1, [x19]
	mov	x0, x19
	bl	_trinity_update_current_ps
	mov	w0, #0
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
