	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v8_0_pre_soft_reset
_gfx_v8_0_pre_soft_reset:               ## @gfx_v8_0_pre_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, %r12
	movq	32(%rdi), %r14
	testq	%r14, %r14
	jne	LBB0_2
## %bb.1:
	cmpl	$0, 40(%r12)
	je	LBB0_13
LBB0_2:
	movq	24(%r12), %rax
	movq	%r12, %rdi
	callq	*(%rax)
	movq	_GRBM_SOFT_RESET@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_SOFT_RESET_CP@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movq	%r14, %rdi
	callq	_REG_GET_FIELD
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movl	(%r15), %esi
	movq	_SOFT_RESET_GFX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_REG_GET_FIELD
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_gfx_v8_0_cp_gfx_enable
LBB0_5:
	movl	(%r15), %esi
	movl	(%rbx), %edx
	movq	%r14, %rdi
	callq	_REG_GET_FIELD
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:
	movl	(%r15), %esi
	movq	_SOFT_RESET_CPF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_REG_GET_FIELD
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:
	movl	(%r15), %esi
	movq	_SOFT_RESET_CPC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_REG_GET_FIELD
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	movl	(%r15), %esi
	movq	_SOFT_RESET_CPG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_REG_GET_FIELD
	testq	%rax, %rax
	je	LBB0_13
LBB0_9:
	cmpl	$0, 8(%r12)
	jle	LBB0_12
## %bb.10:
	movl	$8, %r15d
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rbx
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	(%rbx,%r15), %esi
	movl	-8(%rbx,%r15), %ecx
	movl	-4(%rbx,%r15), %edx
	movq	%r12, %rdi
	xorl	%r8d, %r8d
	callq	_vi_srbm_select
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_gfx_v8_0_deactivate_hqd
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_vi_srbm_select
	movq	%r12, %rdi
	callq	_mutex_unlock
	incq	%r14
	movslq	8(%r12), %rax
	addq	$12, %r15
	cmpq	%rax, %r14
	jl	LBB0_11
LBB0_12:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_gfx_v8_0_cp_compute_enable
LBB0_13:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GRBM_SOFT_RESET,4,2            ## @GRBM_SOFT_RESET
	.comm	_SOFT_RESET_CP,4,2              ## @SOFT_RESET_CP
	.comm	_SOFT_RESET_GFX,4,2             ## @SOFT_RESET_GFX
	.comm	_SOFT_RESET_CPF,4,2             ## @SOFT_RESET_CPF
	.comm	_SOFT_RESET_CPC,4,2             ## @SOFT_RESET_CPC
	.comm	_SOFT_RESET_CPG,4,2             ## @SOFT_RESET_CPG
	.no_dead_strip	_gfx_v8_0_pre_soft_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v8_0_pre_soft_reset
_gfx_v8_0_pre_soft_reset:               ; @gfx_v8_0_pre_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
	ldr	x20, [x0, #32]
	cbnz	x20, LBB0_2
; %bb.1:
	ldr	w8, [x19, #40]
	cbz	w8, LBB0_13
LBB0_2:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
Lloh0:
	adrp	x21, _GRBM_SOFT_RESET@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GRBM_SOFT_RESET@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _SOFT_RESET_CP@GOTPAGE
Lloh3:
	ldr	x22, [x22, _SOFT_RESET_CP@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_REG_GET_FIELD
	cbnz	x0, LBB0_4
; %bb.3:
	ldr	w1, [x21]
Lloh4:
	adrp	x8, _SOFT_RESET_GFX@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SOFT_RESET_GFX@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_REG_GET_FIELD
	cbz	x0, LBB0_5
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	bl	_gfx_v8_0_cp_gfx_enable
LBB0_5:
	ldr	w1, [x21]
	ldr	w2, [x22]
	mov	x0, x20
	bl	_REG_GET_FIELD
	cbnz	x0, LBB0_9
; %bb.6:
	ldr	w1, [x21]
Lloh7:
	adrp	x8, _SOFT_RESET_CPF@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SOFT_RESET_CPF@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_REG_GET_FIELD
	cbnz	x0, LBB0_9
; %bb.7:
	ldr	w1, [x21]
Lloh10:
	adrp	x8, _SOFT_RESET_CPC@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SOFT_RESET_CPC@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_REG_GET_FIELD
	cbnz	x0, LBB0_9
; %bb.8:
	ldr	w1, [x21]
Lloh13:
	adrp	x8, _SOFT_RESET_CPG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SOFT_RESET_CPG@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_REG_GET_FIELD
	cbz	x0, LBB0_13
LBB0_9:
	ldr	w8, [x19, #8]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.10:
	mov	x20, #0
	mov	x21, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x19, #16]
	mov	x0, x19
	bl	_mutex_lock
	add	x8, x22, x20
	ldp	w2, w1, [x8, #4]
	ldr	w3, [x8]
	mov	x0, x19
	mov	w4, #0
	bl	_vi_srbm_select
	mov	x0, x19
	mov	w1, #2
	bl	_gfx_v8_0_deactivate_hqd
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_vi_srbm_select
	mov	x0, x19
	bl	_mutex_unlock
	add	x21, x21, #1
	ldrsw	x8, [x19, #8]
	add	x20, x20, #12
	cmp	x21, x8
	b.lt	LBB0_11
LBB0_12:
	mov	x0, x19
	mov	w1, #0
	bl	_gfx_v8_0_cp_compute_enable
LBB0_13:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_GRBM_SOFT_RESET,4,2            ; @GRBM_SOFT_RESET
	.comm	_SOFT_RESET_CP,4,2              ; @SOFT_RESET_CP
	.comm	_SOFT_RESET_GFX,4,2             ; @SOFT_RESET_GFX
	.comm	_SOFT_RESET_CPF,4,2             ; @SOFT_RESET_CPF
	.comm	_SOFT_RESET_CPC,4,2             ; @SOFT_RESET_CPC
	.comm	_SOFT_RESET_CPG,4,2             ; @SOFT_RESET_CPG
	.no_dead_strip	_gfx_v8_0_pre_soft_reset
.subsections_via_symbols
