	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vega10_acg_enable
_vega10_acg_enable:                     ## @vega10_acg_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r14
	movq	8(%r14), %rax
	movq	_GNLD_ACG@GOTPCREL(%rip), %r15
	movq	(%r15), %rcx
	shlq	$4, %rcx
	cmpq	$0, 8(%rax,%rcx)
	je	LBB0_12
## %bb.1:
	movq	%rdi, %rbx
	movq	_GNLD_DPM_PREFETCHER@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	shlq	$4, %rcx
	movl	4(%rax,%rcx), %edx
	movl	$1, %esi
	callq	_vega10_enable_smc_features
	testq	%rax, %rax
	jne	LBB0_3
## %bb.2:
	movq	8(%r14), %rax
	movq	(%r12), %rcx
	shlq	$4, %rcx
	movl	$1, (%rax,%rcx)
LBB0_3:
	movq	_PPSMC_MSG_InitializeAcg@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smum_send_msg_to_smc
	movq	_PPSMC_MSG_RunAcgBtc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smum_send_msg_to_smc
	movq	%rbx, %rdi
	callq	_smum_get_argument
	cmpl	$1, %eax
	jne	LBB0_10
## %bb.4:
	movl	(%r14), %eax
	cmpl	$1, %eax
	je	LBB0_5
## %bb.6:
	cmpl	$2, %eax
	jne	LBB0_9
## %bb.7:
	movq	_PPSMC_MSG_RunAcgInOpenLoop@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_10:
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	xorl	%r12d, %r12d
	jmp	LBB0_11
LBB0_5:
	movq	_PPSMC_MSG_RunAcgInClosedLoop@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smum_send_msg_to_smc
LBB0_9:
	movq	8(%r14), %rax
	movq	(%r15), %rcx
	shlq	$4, %rcx
	movl	4(%rax,%rcx), %edx
	movl	$1, %r12d
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_vega10_enable_smc_features
	testq	%rax, %rax
	jne	LBB0_12
LBB0_11:
	movq	8(%r14), %rax
	movq	(%r15), %rcx
	shlq	$4, %rcx
	movl	%r12d, (%rax,%rcx)
LBB0_12:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GNLD_ACG,8,3                   ## @GNLD_ACG
	.comm	_GNLD_DPM_PREFETCHER,8,3        ## @GNLD_DPM_PREFETCHER
	.comm	_PPSMC_MSG_InitializeAcg,4,2    ## @PPSMC_MSG_InitializeAcg
	.comm	_PPSMC_MSG_RunAcgBtc,4,2        ## @PPSMC_MSG_RunAcgBtc
	.comm	_PPSMC_MSG_RunAcgInClosedLoop,4,2 ## @PPSMC_MSG_RunAcgInClosedLoop
	.comm	_PPSMC_MSG_RunAcgInOpenLoop,4,2 ## @PPSMC_MSG_RunAcgInOpenLoop
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[ACG_Enable] ACG BTC Returned Failed Status!\n"

	.no_dead_strip	_vega10_acg_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vega10_acg_enable
_vega10_acg_enable:                     ; @vega10_acg_enable
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	ldr	x20, [x0]
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x21, _GNLD_ACG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GNLD_ACG@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x9, x8, x9, lsl #4
	ldr	x9, [x9, #8]
	cbz	x9, LBB0_12
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x22, _GNLD_DPM_PREFETCHER@GOTPAGE
Lloh3:
	ldr	x22, [x22, _GNLD_DPM_PREFETCHER@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x8, x8, x9, lsl #4
	ldr	w2, [x8, #4]
	mov	w23, #1
	mov	w1, #1
	bl	_vega10_enable_smc_features
	cbnz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	x9, [x22]
	lsl	x9, x9, #4
	str	w23, [x8, x9]
LBB0_3:
Lloh4:
	adrp	x8, _PPSMC_MSG_InitializeAcg@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PPSMC_MSG_InitializeAcg@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smum_send_msg_to_smc
Lloh7:
	adrp	x8, _PPSMC_MSG_RunAcgBtc@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PPSMC_MSG_RunAcgBtc@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smum_send_msg_to_smc
	mov	x0, x19
	bl	_smum_get_argument
	cmp	w0, #1
	b.ne	LBB0_7
; %bb.4:
	ldr	w8, [x20]
	cmp	w8, #1
	b.eq	LBB0_8
; %bb.5:
	cmp	w8, #2
	b.ne	LBB0_10
; %bb.6:
Lloh10:
	adrp	x8, _PPSMC_MSG_RunAcgInOpenLoop@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PPSMC_MSG_RunAcgInOpenLoop@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh12:
	adrp	x0, l_.str@PAGE
Lloh13:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
	mov	w22, #0
	b	LBB0_11
LBB0_8:
Lloh14:
	adrp	x8, _PPSMC_MSG_RunAcgInClosedLoop@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PPSMC_MSG_RunAcgInClosedLoop@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smum_send_msg_to_smc
LBB0_10:
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	add	x8, x8, x9, lsl #4
	ldr	w2, [x8, #4]
	mov	w22, #1
	mov	x0, x19
	mov	w1, #1
	bl	_vega10_enable_smc_features
	cbnz	x0, LBB0_12
LBB0_11:
	ldr	x8, [x20, #8]
	ldr	x9, [x21]
	lsl	x9, x9, #4
	str	w22, [x8, x9]
LBB0_12:
	mov	w0, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GNLD_ACG,8,3                   ; @GNLD_ACG
	.comm	_GNLD_DPM_PREFETCHER,8,3        ; @GNLD_DPM_PREFETCHER
	.comm	_PPSMC_MSG_InitializeAcg,4,2    ; @PPSMC_MSG_InitializeAcg
	.comm	_PPSMC_MSG_RunAcgBtc,4,2        ; @PPSMC_MSG_RunAcgBtc
	.comm	_PPSMC_MSG_RunAcgInClosedLoop,4,2 ; @PPSMC_MSG_RunAcgInClosedLoop
	.comm	_PPSMC_MSG_RunAcgInOpenLoop,4,2 ; @PPSMC_MSG_RunAcgInOpenLoop
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[ACG_Enable] ACG BTC Returned Failed Status!\n"

	.no_dead_strip	_vega10_acg_enable
.subsections_via_symbols
