	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmc_v6_0_soft_reset
_gmc_v6_0_soft_reset:                   ## @gmc_v6_0_soft_reset
	.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	_mmSRBM_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movl	%eax, %ebx
	movq	_SRBM_STATUS__VMC_BUSY_MASK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_SRBM_SOFT_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SOFT_RESET_VMC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	%eax, %r15d
	jmp	LBB0_3
LBB0_1:
	xorl	%r15d, %r15d
LBB0_3:
	movq	_SRBM_STATUS__MCB_BUSY_MASK@GOTPCREL(%rip), %rax
	movq	_SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SRBM_STATUS__MCC_BUSY_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_SRBM_STATUS__MCD_BUSY_MASK@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	testl	%ebx, %ecx
	je	LBB0_6
## %bb.4:
	movq	_AMD_IS_APU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r14)
	je	LBB0_5
LBB0_6:
	testl	%r15d, %r15d
	je	LBB0_10
LBB0_7:
	movq	%r14, %rdi
	callq	_gmc_v6_0_mc_stop
	movq	%r14, %rdi
	callq	_gmc_v6_0_wait_for_idle
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
LBB0_9:
	movq	_mmSRBM_SOFT_RESET@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_RREG32
	movl	%eax, %ebx
	orl	%r15d, %ebx
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_info
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_WREG32
	movl	(%r12), %edi
	callq	_RREG32
	movl	%eax, %ebx
	movl	$50, %edi
	callq	_udelay
	notl	%r15d
	andl	%ebx, %r15d
	movl	(%r12), %edi
	movl	%r15d, %esi
	callq	_WREG32
	movl	(%r12), %edi
	callq	_RREG32
	movl	$50, %edi
	callq	_udelay
	movq	%r14, %rdi
	callq	_gmc_v6_0_mc_resume
	movl	$50, %edi
	callq	_udelay
LBB0_10:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_SRBM_SOFT_RESET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SOFT_RESET_MC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r15d, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	%eax, %r15d
	testl	%r15d, %r15d
	jne	LBB0_7
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_mmSRBM_STATUS,4,2              ## @mmSRBM_STATUS
	.comm	_SRBM_STATUS__VMC_BUSY_MASK,4,2 ## @SRBM_STATUS__VMC_BUSY_MASK
	.comm	_SRBM_SOFT_RESET,4,2            ## @SRBM_SOFT_RESET
	.comm	_SOFT_RESET_VMC,4,2             ## @SOFT_RESET_VMC
	.comm	_SRBM_STATUS__MCB_BUSY_MASK,4,2 ## @SRBM_STATUS__MCB_BUSY_MASK
	.comm	_SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK,4,2 ## @SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK
	.comm	_SRBM_STATUS__MCC_BUSY_MASK,4,2 ## @SRBM_STATUS__MCC_BUSY_MASK
	.comm	_SRBM_STATUS__MCD_BUSY_MASK,4,2 ## @SRBM_STATUS__MCD_BUSY_MASK
	.comm	_AMD_IS_APU,4,2                 ## @AMD_IS_APU
	.comm	_SOFT_RESET_MC,4,2              ## @SOFT_RESET_MC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wait for GMC idle timed out !\n"

	.comm	_mmSRBM_SOFT_RESET,4,2          ## @mmSRBM_SOFT_RESET
L_.str.1:                               ## @.str.1
	.asciz	"SRBM_SOFT_RESET=0x%08X\n"

	.no_dead_strip	_gmc_v6_0_soft_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gmc_v6_0_soft_reset
_gmc_v6_0_soft_reset:                   ; @gmc_v6_0_soft_reset
	.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
Lloh0:
	adrp	x8, _mmSRBM_STATUS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mmSRBM_STATUS@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_RREG32
	mov	x21, x0
Lloh3:
	adrp	x8, _SRBM_STATUS__VMC_BUSY_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SRBM_STATUS__VMC_BUSY_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _SRBM_SOFT_RESET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SRBM_SOFT_RESET@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _SOFT_RESET_VMC@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SOFT_RESET_VMC@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	w0, #0
	mov	w3, #1
	bl	_REG_SET_FIELD
	mov	x20, x0
	b	LBB0_3
LBB0_2:
	mov	w20, #0
LBB0_3:
Lloh12:
	adrp	x8, _SRBM_STATUS__MCB_BUSY_MASK@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SRBM_STATUS__MCB_BUSY_MASK@GOTPAGEOFF]
Lloh14:
	adrp	x9, _SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh18:
	adrp	x9, _SRBM_STATUS__MCC_BUSY_MASK@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SRBM_STATUS__MCC_BUSY_MASK@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh21:
	adrp	x9, _SRBM_STATUS__MCD_BUSY_MASK@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SRBM_STATUS__MCD_BUSY_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w21
	b.eq	LBB0_5
; %bb.4:
	ldr	w8, [x19]
Lloh24:
	adrp	x9, _AMD_IS_APU@GOTPAGE
Lloh25:
	ldr	x9, [x9, _AMD_IS_APU@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
LBB0_5:
	cbz	w20, LBB0_9
LBB0_6:
	mov	x0, x19
	bl	_gmc_v6_0_mc_stop
	mov	x0, x19
	bl	_gmc_v6_0_wait_for_idle
	cbz	x0, LBB0_8
; %bb.7:
	ldr	w0, [x19, #4]
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
LBB0_8:
Lloh29:
	adrp	x22, _mmSRBM_SOFT_RESET@GOTPAGE
Lloh30:
	ldr	x22, [x22, _mmSRBM_SOFT_RESET@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_RREG32
	orr	w21, w0, w20
	ldr	w0, [x19, #4]
Lloh31:
	adrp	x1, l_.str.1@PAGE
Lloh32:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_dev_info
	ldr	w0, [x22]
	mov	x1, x21
	bl	_WREG32
	ldr	w0, [x22]
	bl	_RREG32
	mov	x21, x0
	mov	w0, #50
	bl	_udelay
	bic	w1, w21, w20
	ldr	w0, [x22]
	bl	_WREG32
	ldr	w0, [x22]
	bl	_RREG32
	mov	w0, #50
	bl	_udelay
	mov	x0, x19
	bl	_gmc_v6_0_mc_resume
	mov	w0, #50
	bl	_udelay
LBB0_9:
	mov	w0, #0
	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
LBB0_10:
Lloh33:
	adrp	x8, _SRBM_SOFT_RESET@GOTPAGE
Lloh34:
	ldr	x8, [x8, _SRBM_SOFT_RESET@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	adrp	x8, _SOFT_RESET_MC@GOTPAGE
Lloh37:
	ldr	x8, [x8, _SOFT_RESET_MC@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w3, #1
	bl	_REG_SET_FIELD
	mov	x20, x0
	cbnz	w20, LBB0_6
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_mmSRBM_STATUS,4,2              ; @mmSRBM_STATUS
	.comm	_SRBM_STATUS__VMC_BUSY_MASK,4,2 ; @SRBM_STATUS__VMC_BUSY_MASK
	.comm	_SRBM_SOFT_RESET,4,2            ; @SRBM_SOFT_RESET
	.comm	_SOFT_RESET_VMC,4,2             ; @SOFT_RESET_VMC
	.comm	_SRBM_STATUS__MCB_BUSY_MASK,4,2 ; @SRBM_STATUS__MCB_BUSY_MASK
	.comm	_SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK,4,2 ; @SRBM_STATUS__MCB_NON_DISPLAY_BUSY_MASK
	.comm	_SRBM_STATUS__MCC_BUSY_MASK,4,2 ; @SRBM_STATUS__MCC_BUSY_MASK
	.comm	_SRBM_STATUS__MCD_BUSY_MASK,4,2 ; @SRBM_STATUS__MCD_BUSY_MASK
	.comm	_AMD_IS_APU,4,2                 ; @AMD_IS_APU
	.comm	_SOFT_RESET_MC,4,2              ; @SOFT_RESET_MC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wait for GMC idle timed out !\n"

	.comm	_mmSRBM_SOFT_RESET,4,2          ; @mmSRBM_SOFT_RESET
l_.str.1:                               ; @.str.1
	.asciz	"SRBM_SOFT_RESET=0x%08X\n"

	.no_dead_strip	_gmc_v6_0_soft_reset
.subsections_via_symbols
