	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_vcn_jpeg_ring_test_ib   ## -- Begin function amdgpu_vcn_jpeg_ring_test_ib
	.p2align	4, 0x90
_amdgpu_vcn_jpeg_ring_test_ib:          ## @amdgpu_vcn_jpeg_ring_test_ib
	.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, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %r12
	movq	$0, -48(%rbp)
	leaq	-48(%rbp), %rdx
	movl	$1, %esi
	callq	_amdgpu_vcn_jpeg_set_reg
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_1
LBB0_12:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	-48(%rbp), %rdi
	xorl	%esi, %esi
	movq	%r15, %rdx
	callq	_dma_fence_wait_timeout
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	js	LBB0_4
## %bb.5:
	cmpl	$0, (%r12)
	je	LBB0_6
## %bb.7:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%r14), %rcx
	movl	(%rax,%rcx,4), %edi
	callq	_RREG32
	cmpl	$-559038737, %eax               ## imm = 0xDEADBEEF
	je	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	movl	$1, %edi
	callq	_udelay
	incl	%ebx
	movl	(%r12), %eax
	cmpl	%eax, %ebx
	jb	LBB0_8
	jmp	LBB0_11
LBB0_2:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subq	(%rax), %r13
	jmp	LBB0_12
LBB0_4:
	movq	%rax, %r13
	jmp	LBB0_12
LBB0_6:
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_9:
	movl	(%r12), %eax
LBB0_11:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	xorl	%r13d, %r13d
	subq	(%rcx), %r13
	cmpl	%eax, %ebx
	cmovbq	%rdx, %r13
	movq	-48(%rbp), %rdi
	callq	_dma_fence_put
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_ETIMEDOUT,8,3                  ## @ETIMEDOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_vcn_jpeg_ring_test_ib   ; -- Begin function amdgpu_vcn_jpeg_ring_test_ib
	.p2align	2
_amdgpu_vcn_jpeg_ring_test_ib:          ; @amdgpu_vcn_jpeg_ring_test_ib
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0, #8]
	str	xzr, [sp, #8]
	add	x2, sp, #8
	mov	w1, #1
	bl	_amdgpu_vcn_jpeg_set_reg
	mov	x20, x0
	cbz	x0, LBB0_2
LBB0_1:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
LBB0_2:
	ldr	x0, [sp, #8]
	mov	w1, #0
	mov	x2, x21
	bl	_dma_fence_wait_timeout
	cbz	x0, LBB0_8
; %bb.3:
	mov	x20, x0
	tbnz	x0, #63, LBB0_1
; %bb.4:
	ldr	w8, [x22]
	cbz	w8, LBB0_9
; %bb.5:
	mov	w20, #0
	mov	w21, #48879
	movk	w21, #57005, lsl #16
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	x9, [x19]
	ldr	w0, [x8, x9, lsl #2]
	bl	_RREG32
	cmp	w0, w21
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #1
	bl	_udelay
	add	w20, w20, #1
	ldr	w8, [x22]
	cmp	w20, w8
	b.lo	LBB0_6
	b	LBB0_11
LBB0_8:
Lloh0:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	neg	x20, x8
	b	LBB0_1
LBB0_9:
	mov	w20, #0
	b	LBB0_11
LBB0_10:
	ldr	w8, [x22]
LBB0_11:
Lloh3:
	adrp	x9, _ETIMEDOUT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _ETIMEDOUT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	w20, w8
	csneg	x20, xzr, x9, lo
	ldr	x0, [sp, #8]
	bl	_dma_fence_put
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ETIMEDOUT,8,3                  ; @ETIMEDOUT
.subsections_via_symbols
