	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_vce_resume              ## -- Begin function radeon_vce_resume
	.p2align	4, 0x90
_radeon_vce_resume:                     ## @radeon_vce_resume
	.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	%rdi, %r14
	movq	8(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	xorl	%esi, %esi
	callq	_radeon_bo_reserve
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movl	%eax, %ebx
	movl	24(%r14), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_5:
	movq	8(%r14), %rdi
	leaq	-32(%rbp), %rsi
	callq	_radeon_bo_kmap
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	callq	_radeon_bo_unreserve
	movl	24(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movl	%ebx, %edx
	callq	_dev_err
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	-32(%rbp), %r15
	movq	8(%r14), %rdi
	callq	_radeon_bo_size
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_memset
	movq	(%r14), %rcx
	movq	_CHIP_BONAIRE@GOTPCREL(%rip), %rdx
	movq	-32(%rbp), %rax
	cmpq	(%rdx), %rcx
	jge	LBB0_9
## %bb.8:
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_vce_v1_0_load_fw
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_9:
	movq	16(%r14), %rcx
	movl	(%rcx), %edx
	movl	4(%rcx), %esi
	movq	%rax, %rdi
	callq	_memcpy
LBB0_10:
	movq	8(%r14), %rdi
	callq	_radeon_bo_kunmap
	movq	8(%r14), %rdi
	callq	_radeon_bo_unreserve
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"(%d) failed to reserve VCE bo\n"

L_.str.1:                               ## @.str.1
	.asciz	"(%d) VCE map failed\n"

	.comm	_CHIP_BONAIRE,8,3               ## @CHIP_BONAIRE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_vce_resume              ; -- Begin function radeon_vce_resume
	.p2align	2
_radeon_vce_resume:                     ; @radeon_vce_resume
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x0, [x0, #8]
	cbz	x0, LBB0_3
; %bb.1:
	mov	w1, #0
	bl	_radeon_bo_reserve
	cbz	w0, LBB0_4
; %bb.2:
	mov	x20, x0
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_4:
	ldr	x0, [x19, #8]
	add	x1, sp, #8
	bl	_radeon_bo_kmap
	cbz	w0, LBB0_8
; %bb.5:
	mov	x20, x0
	ldr	x0, [x19, #8]
	bl	_radeon_bo_unreserve
	ldr	w0, [x19, #24]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	mov	x2, x20
	bl	_dev_err
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_8:
	ldr	x20, [sp, #8]
	ldr	x0, [x19, #8]
	bl	_radeon_bo_size
	mov	x2, x0
	mov	x0, x20
	mov	w1, #0
	bl	_memset
	ldr	x9, [x19]
Lloh7:
	adrp	x8, _CHIP_BONAIRE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CHIP_BONAIRE@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x8]
	ldr	x8, [sp, #8]
	cmp	x9, x10
	b.ge	LBB0_10
; %bb.9:
	mov	x0, x19
	mov	x1, x8
	bl	_vce_v1_0_load_fw
	mov	x20, x0
	b	LBB0_11
LBB0_10:
	ldr	x9, [x19, #16]
	ldp	w2, w1, [x9]
	mov	x0, x8
	bl	_memcpy
	mov	w20, #0
LBB0_11:
	ldr	x0, [x19, #8]
	bl	_radeon_bo_kunmap
	ldr	x0, [x19, #8]
	bl	_radeon_bo_unreserve
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"(%d) failed to reserve VCE bo\n"

l_.str.1:                               ; @.str.1
	.asciz	"(%d) VCE map failed\n"

	.comm	_CHIP_BONAIRE,8,3               ; @CHIP_BONAIRE
.subsections_via_symbols
