	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v8_0_soft_reset
_gfx_v8_0_soft_reset:                   ## @gfx_v8_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	4(%rdi), %r12d
	movl	8(%rdi), %r14d
	testl	%r12d, %r12d
	je	LBB0_2
## %bb.1:
	testl	%r14d, %r14d
	setne	%al
	jmp	LBB0_3
LBB0_2:
	movb	$1, %al
	testl	%r14d, %r14d
	je	LBB0_8
LBB0_3:
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movq	_mmGMCON_DEBUG@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_RREG32
	movq	_GMCON_DEBUG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_GFX_STALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%rbx), %esi
	movq	_GFX_CLEAR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%r13), %edi
	movl	%eax, %esi
	callq	_WREG32
	movl	$50, %edi
	callq	_udelay
	testl	%r12d, %r12d
	je	LBB0_5
## %bb.4:
	movq	_mmGRBM_SOFT_RESET@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_RREG32
	movl	%eax, %ebx
	orl	%r12d, %ebx
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_info
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_WREG32
	movl	(%r13), %edi
	callq	_RREG32
	movl	%eax, %ebx
	movl	$50, %edi
	callq	_udelay
	notl	%r12d
	andl	%ebx, %r12d
	movl	(%r13), %edi
	movl	%r12d, %esi
	callq	_WREG32
	movl	(%r13), %edi
	movq	_mmGMCON_DEBUG@GOTPCREL(%rip), %r13
	callq	_RREG32
LBB0_5:
	cmpb	$0, -41(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_7
## %bb.6:
	movq	_mmSRBM_SOFT_RESET@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_RREG32
	movl	%eax, %ebx
	orl	%r14d, %ebx
	movl	(%r15), %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	%r14d
	andl	%ebx, %r14d
	movl	(%r12), %edi
	movl	%r14d, %esi
	callq	_WREG32
	movl	(%r12), %edi
	callq	_RREG32
LBB0_7:
	movl	(%r13), %edi
	callq	_RREG32
	movq	_GMCON_DEBUG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_GFX_STALL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	(%rbx), %esi
	movq	_GFX_CLEAR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	xorl	%ecx, %ecx
	callq	_REG_SET_FIELD
	movl	(%r13), %edi
	movl	%eax, %esi
	callq	_WREG32
	movl	$50, %edi
	callq	_udelay
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mmGMCON_DEBUG,4,2              ## @mmGMCON_DEBUG
	.comm	_GMCON_DEBUG,4,2                ## @GMCON_DEBUG
	.comm	_GFX_STALL,4,2                  ## @GFX_STALL
	.comm	_GFX_CLEAR,4,2                  ## @GFX_CLEAR
	.comm	_mmGRBM_SOFT_RESET,4,2          ## @mmGRBM_SOFT_RESET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GRBM_SOFT_RESET=0x%08X\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	_gfx_v8_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 gfx_v8_0_soft_reset
_gfx_v8_0_soft_reset:                   ; @gfx_v8_0_soft_reset
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldp	w27, w23, [x0, #4]
	cbz	w27, LBB0_2
; %bb.1:
	cmp	w23, #0
	cset	w26, ne
	b	LBB0_4
LBB0_2:
	cbz	w23, LBB0_8
; %bb.3:
	mov	w26, #1
LBB0_4:
Lloh0:
	adrp	x21, _mmGMCON_DEBUG@GOTPAGE
Lloh1:
	ldr	x21, [x21, _mmGMCON_DEBUG@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_RREG32
Lloh2:
	adrp	x22, _GMCON_DEBUG@GOTPAGE
Lloh3:
	ldr	x22, [x22, _GMCON_DEBUG@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh4:
	adrp	x24, _GFX_STALL@GOTPAGE
Lloh5:
	ldr	x24, [x24, _GFX_STALL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	w3, #1
	bl	_REG_SET_FIELD
	ldr	w1, [x22]
Lloh6:
	adrp	x25, _GFX_CLEAR@GOTPAGE
Lloh7:
	ldr	x25, [x25, _GFX_CLEAR@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	w3, #1
	bl	_REG_SET_FIELD
	mov	x1, x0
	ldr	w0, [x21]
	bl	_WREG32
	mov	w0, #50
	bl	_udelay
	cbz	w27, LBB0_9
; %bb.5:
Lloh8:
	adrp	x28, _mmGRBM_SOFT_RESET@GOTPAGE
Lloh9:
	ldr	x28, [x28, _mmGRBM_SOFT_RESET@GOTPAGEOFF]
	ldr	w0, [x28]
	bl	_RREG32
	orr	w20, w0, w27
	ldr	w0, [x19]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_info
	ldr	w0, [x28]
	mov	x1, x20
	bl	_WREG32
	ldr	w0, [x28]
	bl	_RREG32
	mov	x20, x0
	mov	w0, #50
	bl	_udelay
	bic	w1, w20, w27
	ldr	w0, [x28]
	bl	_WREG32
	ldr	w0, [x28]
	bl	_RREG32
	tbz	w26, #0, LBB0_7
LBB0_6:
Lloh12:
	adrp	x26, _mmSRBM_SOFT_RESET@GOTPAGE
Lloh13:
	ldr	x26, [x26, _mmSRBM_SOFT_RESET@GOTPAGEOFF]
	ldr	w0, [x26]
	bl	_RREG32
	orr	w20, w0, w23
	ldr	w0, [x19]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x20
	bl	_dev_info
	ldr	w0, [x26]
	mov	x1, x20
	bl	_WREG32
	ldr	w0, [x26]
	bl	_RREG32
	mov	x19, x0
	mov	w0, #50
	bl	_udelay
	bic	w1, w19, w23
	ldr	w0, [x26]
	bl	_WREG32
	ldr	w0, [x26]
	bl	_RREG32
LBB0_7:
	ldr	w0, [x21]
	bl	_RREG32
	ldr	w1, [x22]
	ldr	w2, [x24]
	mov	w3, #0
	bl	_REG_SET_FIELD
	ldr	w1, [x22]
	ldr	w2, [x25]
	mov	w3, #0
	bl	_REG_SET_FIELD
	mov	x1, x0
	ldr	w0, [x21]
	bl	_WREG32
	mov	w0, #50
	bl	_udelay
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_9:
	cbnz	w26, LBB0_6
	b	LBB0_7
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_mmGMCON_DEBUG,4,2              ; @mmGMCON_DEBUG
	.comm	_GMCON_DEBUG,4,2                ; @GMCON_DEBUG
	.comm	_GFX_STALL,4,2                  ; @GFX_STALL
	.comm	_GFX_CLEAR,4,2                  ; @GFX_CLEAR
	.comm	_mmGRBM_SOFT_RESET,4,2          ; @mmGRBM_SOFT_RESET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GRBM_SOFT_RESET=0x%08X\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	_gfx_v8_0_soft_reset
.subsections_via_symbols
