	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_uvd_suspend             ## -- Begin function radeon_uvd_suspend
	.p2align	4, 0x90
_radeon_uvd_suspend:                    ## @radeon_uvd_suspend
	.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
	cmpq	$0, 24(%rdi)
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r12
	cmpl	$0, (%rdi)
	jle	LBB0_8
## %bb.2:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r14
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-48(%rbp), %rdi
	xorl	%esi, %esi
	callq	_radeon_fence_wait
	movq	%r14, %rdi
	callq	_radeon_fence_unref
	movq	16(%r12), %rax
	movq	$0, (%rax,%rbx,2)
	movq	8(%r12), %rdi
	addq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_atomic_set
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r15
	movslq	(%r12), %rax
	addq	$4, %rbx
	cmpq	%rax, %r15
	jge	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rdi
	addq	%rbx, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_radeon_uvd_note_usage
	movq	_R600_RING_TYPE_UVD_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movq	%r13, %rdx
	movq	%r14, %rcx
	callq	_radeon_uvd_get_destroy_msg
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
	jmp	LBB0_7
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R600_RING_TYPE_UVD_INDEX,4,2   ## @R600_RING_TYPE_UVD_INDEX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error destroying UVD (%d)!\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_uvd_suspend             ; -- Begin function radeon_uvd_suspend
	.p2align	2
_radeon_uvd_suspend:                    ; @radeon_uvd_suspend
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_8
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x22, #0
	mov	x23, #0
Lloh0:
	adrp	x24, _R600_RING_TYPE_UVD_INDEX@GOTPAGE
Lloh1:
	ldr	x24, [x24, _R600_RING_TYPE_UVD_INDEX@GOTPAGEOFF]
Lloh2:
	adrp	x20, l_.str@PAGE
Lloh3:
	add	x20, x20, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [sp, #8]
	bl	_radeon_fence_wait
	add	x0, sp, #8
	bl	_radeon_fence_unref
	ldr	x8, [x19, #16]
	str	xzr, [x8, x23, lsl #3]
	ldr	x8, [x19, #8]
	add	x0, x8, x22
	mov	w1, #0
	bl	_atomic_set
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	ldrsw	x8, [x19]
	add	x22, x22, #4
	cmp	x23, x8
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x22
	bl	_atomic_read
	cbz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x21, x0
	mov	x0, x19
	bl	_radeon_uvd_note_usage
	ldr	w1, [x24]
	add	x3, sp, #8
	mov	x0, x19
	mov	x2, x21
	bl	_radeon_uvd_get_destroy_msg
	mov	x1, x0
	cbz	w0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_DRM_ERROR
	b	LBB0_4
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_R600_RING_TYPE_UVD_INDEX,4,2   ; @R600_RING_TYPE_UVD_INDEX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error destroying UVD (%d)!\n"

.subsections_via_symbols
