	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vce_v3_0_check_soft_reset
_vce_v3_0_check_soft_reset:             ## @vce_v3_0_check_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, %r14
	leaq	8(%rdi), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_mmGRBM_GFX_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	callq	_GET_VCE_INSTANCE
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32
	movq	_mmVCE_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	movq	_AMDGPU_VCE_STATUS_BUSY_MASK@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	je	LBB0_2
## %bb.1:
	movq	_SRBM_SOFT_RESET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_SOFT_RESET_VCE0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%rbx), %esi
	movq	_SOFT_RESET_VCE1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movq	%rax, %r12
LBB0_2:
	movq	_mmGRBM_GFX_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$1, %edi
	callq	_GET_VCE_INSTANCE
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32
	movq	_mmVCE_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_RREG32
	testl	%eax, (%r13)
	je	LBB0_4
## %bb.3:
	movq	_SRBM_SOFT_RESET@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_SOFT_RESET_VCE0@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movl	(%rbx), %esi
	movq	_SOFT_RESET_VCE1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movl	$1, %ecx
	callq	_REG_SET_FIELD
	movq	%rax, %r12
LBB0_4:
	movq	_mmGRBM_GFX_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%edi, %edi
	callq	_GET_VCE_INSTANCE
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_WREG32
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	testq	%r12, %r12
	setne	%al
	movq	%r12, (%r14)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mmGRBM_GFX_INDEX,4,2           ## @mmGRBM_GFX_INDEX
	.comm	_mmVCE_STATUS,4,2               ## @mmVCE_STATUS
	.comm	_AMDGPU_VCE_STATUS_BUSY_MASK,4,2 ## @AMDGPU_VCE_STATUS_BUSY_MASK
	.comm	_SRBM_SOFT_RESET,4,2            ## @SRBM_SOFT_RESET
	.comm	_SOFT_RESET_VCE0,4,2            ## @SOFT_RESET_VCE0
	.comm	_SOFT_RESET_VCE1,4,2            ## @SOFT_RESET_VCE1
	.no_dead_strip	_vce_v3_0_check_soft_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vce_v3_0_check_soft_reset
_vce_v3_0_check_soft_reset:             ; @vce_v3_0_check_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
	add	x20, x0, #8
	mov	x0, x20
	bl	_mutex_lock
Lloh0:
	adrp	x23, _mmGRBM_GFX_INDEX@GOTPAGE
Lloh1:
	ldr	x23, [x23, _mmGRBM_GFX_INDEX@GOTPAGEOFF]
	ldr	w21, [x23]
	mov	w0, #0
	bl	_GET_VCE_INSTANCE
	mov	x1, x0
	mov	x0, x21
	bl	_WREG32
Lloh2:
	adrp	x26, _mmVCE_STATUS@GOTPAGE
Lloh3:
	ldr	x26, [x26, _mmVCE_STATUS@GOTPAGEOFF]
	ldr	w0, [x26]
	bl	_RREG32
Lloh4:
	adrp	x28, _AMDGPU_VCE_STATUS_BUSY_MASK@GOTPAGE
Lloh5:
	ldr	x28, [x28, _AMDGPU_VCE_STATUS_BUSY_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x24, _SRBM_SOFT_RESET@GOTPAGE
Lloh7:
	ldr	x24, [x24, _SRBM_SOFT_RESET@GOTPAGEOFF]
	ldr	w8, [x28]
Lloh8:
	adrp	x27, _SOFT_RESET_VCE0@GOTPAGE
Lloh9:
	ldr	x27, [x27, _SOFT_RESET_VCE0@GOTPAGEOFF]
Lloh10:
	adrp	x25, _SOFT_RESET_VCE1@GOTPAGE
Lloh11:
	ldr	x25, [x25, _SOFT_RESET_VCE1@GOTPAGEOFF]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	w1, [x24]
	ldr	w2, [x27]
	mov	x0, #0
	mov	w3, #1
	bl	_REG_SET_FIELD
	ldr	w1, [x24]
	ldr	w2, [x25]
	mov	w3, #1
	bl	_REG_SET_FIELD
	mov	x21, x0
	b	LBB0_3
LBB0_2:
	mov	x21, #0
LBB0_3:
	ldr	w22, [x23]
	mov	w0, #1
	bl	_GET_VCE_INSTANCE
	mov	x1, x0
	mov	x0, x22
	bl	_WREG32
	ldr	w0, [x26]
	bl	_RREG32
	ldr	w8, [x28]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.4:
	ldr	w1, [x24]
	ldr	w2, [x27]
	mov	x0, x21
	mov	w3, #1
	bl	_REG_SET_FIELD
	ldr	w1, [x24]
	ldr	w2, [x25]
	mov	w3, #1
	bl	_REG_SET_FIELD
	mov	x21, x0
LBB0_5:
	ldr	w22, [x23]
	mov	w0, #0
	bl	_GET_VCE_INSTANCE
	mov	x1, x0
	mov	x0, x22
	bl	_WREG32
	mov	x0, x20
	bl	_mutex_unlock
	cmp	x21, #0
	cset	w0, ne
	str	x21, [x19]
	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
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_mmGRBM_GFX_INDEX,4,2           ; @mmGRBM_GFX_INDEX
	.comm	_mmVCE_STATUS,4,2               ; @mmVCE_STATUS
	.comm	_AMDGPU_VCE_STATUS_BUSY_MASK,4,2 ; @AMDGPU_VCE_STATUS_BUSY_MASK
	.comm	_SRBM_SOFT_RESET,4,2            ; @SRBM_SOFT_RESET
	.comm	_SOFT_RESET_VCE0,4,2            ; @SOFT_RESET_VCE0
	.comm	_SOFT_RESET_VCE1,4,2            ; @SOFT_RESET_VCE1
	.no_dead_strip	_vce_v3_0_check_soft_reset
.subsections_via_symbols
