	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_vce_ring_test_ring      ## -- Begin function amdgpu_vce_ring_test_ring
	.p2align	4, 0x90
_amdgpu_vce_ring_test_ring:             ## @amdgpu_vce_ring_test_ring
	.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	(%rdi), %rdi
	movl	(%rdi), %r15d
	callq	_amdgpu_sriov_vf
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_10
## %bb.1:
	movq	%r12, %rdi
	movl	$16, %esi
	callq	_amdgpu_ring_alloc
	testl	%eax, %eax
	jne	LBB0_10
## %bb.2:
	movq	%r12, %rdi
	callq	_amdgpu_ring_get_rptr
	movq	%rax, %r14
	movq	_VCE_CMD_END@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_amdgpu_ring_write
	movq	%r12, %rdi
	callq	_amdgpu_ring_commit
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.3:
	movq	%r12, %rdi
	callq	_amdgpu_ring_get_rptr
	movb	$1, %cl
	cmpq	%r14, %rax
	jne	LBB0_9
## %bb.4:
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ecx, %ebx
	movl	$1, %edi
	callq	_udelay
	cmpl	%ebx, %r15d
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%r12, %rdi
	callq	_amdgpu_ring_get_rptr
	leal	1(%rbx), %ecx
	cmpq	%r14, %rax
	je	LBB0_7
LBB0_8:
	cmpl	%r15d, %ebx
	setb	%cl
LBB0_9:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	subl	(%rdx), %eax
	xorl	%edx, %edx
	testb	%cl, %cl
	cmovnel	%edx, %eax
	jmp	LBB0_10
LBB0_5:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VCE_CMD_END,4,2                ## @VCE_CMD_END
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_vce_ring_test_ring      ; -- Begin function amdgpu_vce_ring_test_ring
	.p2align	2
_amdgpu_vce_ring_test_ring:             ; @amdgpu_vce_ring_test_ring
	.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	x0, [x0]
	ldr	w21, [x0]
	bl	_amdgpu_sriov_vf
	cbz	x0, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_10
LBB0_2:
	mov	x0, x19
	mov	w1, #16
	bl	_amdgpu_ring_alloc
	cbnz	w0, LBB0_10
; %bb.3:
	mov	x0, x19
	bl	_amdgpu_ring_get_rptr
	mov	x20, x0
Lloh0:
	adrp	x8, _VCE_CMD_END@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VCE_CMD_END@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amdgpu_ring_write
	mov	x0, x19
	bl	_amdgpu_ring_commit
	cbz	w21, LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_amdgpu_ring_get_rptr
	mov	w8, #1
	cmp	x0, x20
	b.ne	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x22, x8
	mov	w0, #1
	bl	_udelay
	cmp	w21, w22
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_amdgpu_ring_get_rptr
	add	w8, w22, #1
	cmp	x0, x20
	b.eq	LBB0_5
LBB0_7:
	cmp	w22, w21
	cset	w8, lo
LBB0_8:
Lloh3:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, #0
	csneg	w0, wzr, w9, ne
	b	LBB0_10
LBB0_9:
Lloh6:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VCE_CMD_END,4,2                ; @VCE_CMD_END
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
.subsections_via_symbols
