	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uvd_v1_0_ring_test             ## -- Begin function uvd_v1_0_ring_test
	.p2align	4, 0x90
_uvd_v1_0_ring_test:                    ## @uvd_v1_0_ring_test
	.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	%rsi, %r14
	movq	%rdi, %r12
	movq	_UVD_CONTEXT_ID@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	$-889266515, %esi               ## imm = 0xCAFEDEAD
	callq	_WREG32
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	$3, %edx
	callq	_radeon_ring_lock
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	movl	(%r14), %esi
	leaq	L_.str(%rip), %rdi
	movl	%eax, %edx
	callq	_DRM_ERROR
	jmp	LBB0_10
LBB0_2:
	movl	(%rbx), %edi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_PACKET0
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	%r14, %rdi
	movl	$-559038737, %esi               ## imm = 0xDEADBEEF
	callq	_radeon_ring_write
	movq	%r12, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_radeon_ring_unlock_commit
	cmpl	$0, (%r12)
	movl	$0, %r13d
	je	LBB0_9
## %bb.3:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	callq	_RREG32
	movl	%eax, %r13d
	cmpl	$-559038737, %eax               ## imm = 0xDEADBEEF
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	callq	_udelay
	incl	%ebx
	movl	(%r12), %eax
	cmpl	%eax, %ebx
	jb	LBB0_4
	jmp	LBB0_7
LBB0_5:
	movl	(%r12), %eax
LBB0_7:
	cmpl	%eax, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jae	LBB0_9
## %bb.8:
	movl	(%r14), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %edx
	callq	_DRM_INFO
	xorl	%r15d, %r15d
	jmp	LBB0_10
LBB0_9:
	movl	(%r14), %esi
	leaq	L_.str.2(%rip), %rdi
	movl	%r13d, %edx
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UVD_CONTEXT_ID,4,2             ## @UVD_CONTEXT_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"radeon: cp failed to lock ring %d (%d).\n"

L_.str.1:                               ## @.str.1
	.asciz	"ring test on %d succeeded in %d usecs\n"

L_.str.2:                               ## @.str.2
	.asciz	"radeon: ring %d test failed (0x%08X)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uvd_v1_0_ring_test             ; -- Begin function uvd_v1_0_ring_test
	.p2align	2
_uvd_v1_0_ring_test:                    ; @uvd_v1_0_ring_test
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _UVD_CONTEXT_ID@GOTPAGE
Lloh1:
	ldr	x23, [x23, _UVD_CONTEXT_ID@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	w1, #57005
	movk	w1, #51966, lsl #16
	bl	_WREG32
	mov	x0, x20
	mov	x1, x19
	mov	w2, #3
	bl	_radeon_ring_lock
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
	ldr	w1, [x19]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x21
	bl	_DRM_ERROR
	b	LBB0_11
LBB0_2:
	mov	w24, #48879
	movk	w24, #57005, lsl #16
	ldr	w0, [x23]
	mov	w1, #0
	bl	_PACKET0
	mov	x1, x0
	mov	x0, x19
	bl	_radeon_ring_write
	mov	x0, x19
	mov	w1, #48879
	movk	w1, #57005, lsl #16
	bl	_radeon_ring_write
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_radeon_ring_unlock_commit
	ldr	w8, [x20]
	cbz	w8, LBB0_7
; %bb.3:
	mov	w21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_RREG32
	mov	x22, x0
	cmp	w0, w24
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #1
	bl	_udelay
	add	w21, w21, #1
	ldr	w8, [x20]
	cmp	w21, w8
	b.lo	LBB0_4
; %bb.6:
	cmp	w21, w8
	b.lo	LBB0_9
	b	LBB0_10
LBB0_7:
	mov	w22, #0
	b	LBB0_10
LBB0_8:
	ldr	w8, [x20]
	cmp	w21, w8
	b.hs	LBB0_10
LBB0_9:
	ldr	w1, [x19]
Lloh4:
	adrp	x0, l_.str.1@PAGE
Lloh5:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x21
	bl	_DRM_INFO
	mov	w21, #0
	b	LBB0_11
LBB0_10:
	ldr	w1, [x19]
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x2, x22
	bl	_DRM_ERROR
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_UVD_CONTEXT_ID,4,2             ; @UVD_CONTEXT_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"radeon: cp failed to lock ring %d (%d).\n"

l_.str.1:                               ; @.str.1
	.asciz	"ring test on %d succeeded in %d usecs\n"

l_.str.2:                               ; @.str.2
	.asciz	"radeon: ring %d test failed (0x%08X)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
