	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_vce_ib_test             ## -- Begin function radeon_vce_ib_test
	.p2align	4, 0x90
_radeon_vce_ib_test:                    ## @radeon_vce_ib_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	$0, -32(%rbp)
	movl	(%rsi), %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_radeon_vce_get_create_msg
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_3:
	movl	(%r14), %esi
	leaq	-32(%rbp), %rcx
	movq	%r15, %rdi
	movl	$1, %edx
	callq	_radeon_vce_get_destroy_msg
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_10:
	leaq	-32(%rbp), %rdi
	callq	_radeon_fence_unref
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	-32(%rbp), %rbx
	movq	_RADEON_USEC_IB_TEST_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_usecs_to_jiffies
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_radeon_fence_wait_timeout
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	je	LBB0_8
## %bb.9:
	movl	(%r14), %esi
	leaq	L_.str.4(%rip), %rdi
	callq	_DRM_INFO
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_6:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_2
LBB0_8:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"radeon: failed to get create msg (%d).\n"

L_.str.1:                               ## @.str.1
	.asciz	"radeon: failed to get destroy ib (%d).\n"

	.comm	_RADEON_USEC_IB_TEST_TIMEOUT,4,2 ## @RADEON_USEC_IB_TEST_TIMEOUT
L_.str.2:                               ## @.str.2
	.asciz	"radeon: fence wait failed (%d).\n"

L_.str.3:                               ## @.str.3
	.asciz	"radeon: fence wait timed out.\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.4:                               ## @.str.4
	.asciz	"ib test on ring %d succeeded\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_vce_ib_test             ; -- Begin function radeon_vce_ib_test
	.p2align	2
_radeon_vce_ib_test:                    ; @radeon_vce_ib_test
	.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	x19, x1
	mov	x21, x0
	str	xzr, [sp, #8]
	ldr	w1, [x1]
	mov	w2, #1
	mov	x3, #0
	bl	_radeon_vce_get_create_msg
	cbz	w0, LBB0_2
; %bb.1:
	mov	x20, x0
	str	x20, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_2:
	ldr	w1, [x19]
	add	x3, sp, #8
	mov	x0, x21
	mov	w2, #1
	bl	_radeon_vce_get_destroy_msg
	cbz	w0, LBB0_5
; %bb.3:
	mov	x20, x0
	str	x20, [sp]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
LBB0_4:
	add	x0, sp, #8
	bl	_radeon_fence_unref
	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_5:
	ldr	x20, [sp, #8]
Lloh4:
	adrp	x8, _RADEON_USEC_IB_TEST_TIMEOUT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _RADEON_USEC_IB_TEST_TIMEOUT@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_usecs_to_jiffies
	mov	x2, x0
	mov	x0, x20
	mov	w1, #0
	bl	_radeon_fence_wait_timeout
	mov	x20, x0
	tbnz	w0, #31, LBB0_8
; %bb.6:
	cbz	w20, LBB0_9
; %bb.7:
	ldr	w1, [x19]
Lloh7:
	adrp	x0, l_.str.4@PAGE
Lloh8:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_INFO
	mov	w20, #0
	b	LBB0_4
LBB0_8:
	mov	x8, x20
	str	x8, [sp]
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_9:
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
Lloh13:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"radeon: failed to get create msg (%d).\n"

l_.str.1:                               ; @.str.1
	.asciz	"radeon: failed to get destroy ib (%d).\n"

	.comm	_RADEON_USEC_IB_TEST_TIMEOUT,4,2 ; @RADEON_USEC_IB_TEST_TIMEOUT
l_.str.2:                               ; @.str.2
	.asciz	"radeon: fence wait failed (%d).\n"

l_.str.3:                               ; @.str.3
	.asciz	"radeon: fence wait timed out.\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.4:                               ; @.str.4
	.asciz	"ib test on ring %d succeeded\n"

.subsections_via_symbols
