	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fiji_start_avfs_btc
_fiji_start_avfs_btc:                   ## @fiji_start_avfs_btc
	.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, %rbx
	movq	8(%rdi), %rax
	movq	(%rax), %rdx
	xorl	%r14d, %r14d
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.1:
	movq	_PPSMC_MSG_PerformBtc@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_smu7_send_msg_to_smc_with_parameter
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_pr_info
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_3:
	movl	(%rbx), %edi
	movq	_mmCP_MEC_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$1342177280, %edx               ## imm = 0x50000000
	callq	_cgs_write_register
	movl	(%rbx), %edi
	movq	_mmGRBM_SOFT_RESET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movl	$-1, %edx
	callq	_cgs_write_register
	movl	(%rbx), %edi
	movl	(%r15), %esi
	xorl	%edx, %edx
	callq	_cgs_write_register
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PPSMC_MSG_PerformBtc,4,2       ## @PPSMC_MSG_PerformBtc
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[AVFS][Fiji_PerformBtc] PerformBTC SMU msg failed"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_mmCP_MEC_CNTL,4,2              ## @mmCP_MEC_CNTL
	.comm	_mmGRBM_SOFT_RESET,4,2          ## @mmGRBM_SOFT_RESET
	.no_dead_strip	_fiji_start_avfs_btc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fiji_start_avfs_btc
_fiji_start_avfs_btc:                   ; @fiji_start_avfs_btc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0, #8]
	ldr	x2, [x8]
	cbz	x2, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _PPSMC_MSG_PerformBtc@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PPSMC_MSG_PerformBtc@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_smu7_send_msg_to_smc_with_parameter
	cbz	x0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
LBB0_3:
	mov	w20, #0
LBB0_4:
	ldr	w0, [x19]
Lloh8:
	adrp	x8, _mmCP_MEC_CNTL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _mmCP_MEC_CNTL@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	w2, #1342177280
	bl	_cgs_write_register
	ldr	w0, [x19]
Lloh11:
	adrp	x21, _mmGRBM_SOFT_RESET@GOTPAGE
Lloh12:
	ldr	x21, [x21, _mmGRBM_SOFT_RESET@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	w2, #-1
	bl	_cgs_write_register
	ldr	w0, [x19]
	ldr	w1, [x21]
	mov	w2, #0
	bl	_cgs_write_register
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PPSMC_MSG_PerformBtc,4,2       ; @PPSMC_MSG_PerformBtc
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[AVFS][Fiji_PerformBtc] PerformBTC SMU msg failed"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_mmCP_MEC_CNTL,4,2              ; @mmCP_MEC_CNTL
	.comm	_mmGRBM_SOFT_RESET,4,2          ; @mmGRBM_SOFT_RESET
	.no_dead_strip	_fiji_start_avfs_btc
.subsections_via_symbols
