	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vaapi_unmap_frame
_vaapi_unmap_frame:                     ## @vaapi_unmap_frame
	.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	%rdi, %r14
	movq	8(%rdi), %rax
	movq	(%rax), %r15
	movq	(%rsi), %rax
	movq	8(%rsi), %r12
	movq	(%rax), %rax
	movq	24(%rax), %r13
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rcx
	xorl	%eax, %eax
	callq	_av_log
	movl	(%r15), %edi
	movl	8(%r12), %esi
	callq	_vaUnmapBuffer
	movq	%rax, %rbx
	movq	_VA_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_2
## %bb.1:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %r15
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_vaErrorStr
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%r15, %r13
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r13, %rcx
	movq	%rbx, %r8
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_av_log
LBB0_2:
	movl	(%r12), %eax
	movq	_AV_HWFRAME_MAP_WRITE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.3:
	movq	_AV_HWFRAME_MAP_DIRECT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_6
## %bb.4:
	movl	(%r15), %edi
	movl	4(%r12), %edx
	movl	(%r14), %eax
	movl	4(%r14), %r9d
	subq	$8, %rsp
	movq	%r13, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%rax
	pushq	%r9
	pushq	$0
	pushq	$0
	pushq	%rax
	callq	_vaPutImage
	addq	$48, %rsp
	movq	%rax, %rbx
	movq	_VA_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_6
## %bb.5:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %r15
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_vaErrorStr
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%r15, %r13
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	%r13, %rcx
	movq	%rbx, %r8
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_av_log
LBB0_6:
	movl	(%r15), %edi
	movl	4(%r12), %esi
	callq	_vaDestroyImage
	movq	%rax, %rbx
	movq	_VA_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	je	LBB0_8
## %bb.7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movq	%r13, %r15
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_vaErrorStr
	leaq	L_.str.3(%rip), %rdx
	movq	%r14, %rdi
	movl	%r13d, %esi
	movq	%r15, %rcx
	movq	%rbx, %r8
	movl	%eax, %r9d
	xorl	%eax, %eax
	callq	_av_log
LBB0_8:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_av_free                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unmap surface %#x.\n"

	.comm	_VA_STATUS_SUCCESS,8,3          ## @VA_STATUS_SUCCESS
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"Failed to unmap image from surface %#x: %d (%s).\n"

	.comm	_AV_HWFRAME_MAP_WRITE,4,2       ## @AV_HWFRAME_MAP_WRITE
	.comm	_AV_HWFRAME_MAP_DIRECT,4,2      ## @AV_HWFRAME_MAP_DIRECT
L_.str.2:                               ## @.str.2
	.asciz	"Failed to write image to surface %#x: %d (%s).\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to destroy image from surface %#x: %d (%s).\n"

	.no_dead_strip	_vaapi_unmap_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vaapi_unmap_frame
_vaapi_unmap_frame:                     ; @vaapi_unmap_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x24, [x8]
	ldp	x8, x19, [x1]
	ldr	x8, [x8]
	ldr	x21, [x8, #24]
Lloh0:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x21
	bl	_av_log
	ldr	w0, [x24]
	ldr	w1, [x19, #8]
	bl	_vaUnmapBuffer
Lloh5:
	adrp	x26, _VA_STATUS_SUCCESS@GOTPAGE
Lloh6:
	ldr	x26, [x26, _VA_STATUS_SUCCESS@GOTPAGEOFF]
	ldr	x8, [x26]
Lloh7:
	adrp	x25, _AV_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x25, [x25, _AV_LOG_ERROR@GOTPAGEOFF]
	cmp	x0, x8
	b.eq	LBB0_2
; %bb.1:
	mov	x22, x0
	ldr	w23, [x25]
	bl	_vaErrorStr
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
Lloh9:
	adrp	x2, l_.str.1@PAGE
Lloh10:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x23
	mov	x3, x21
	bl	_av_log
LBB0_2:
	ldr	w8, [x19]
Lloh11:
	adrp	x9, _AV_HWFRAME_MAP_WRITE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _AV_HWFRAME_MAP_WRITE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.3:
Lloh14:
	adrp	x9, _AV_HWFRAME_MAP_DIRECT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _AV_HWFRAME_MAP_DIRECT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_6
; %bb.4:
	ldr	w0, [x24]
	ldr	w2, [x19, #4]
	ldp	w6, w5, [x20]
	stp	w5, w6, [sp, #4]
	str	wzr, [sp]
	mov	x1, x21
	mov	w3, #0
	mov	w4, #0
	mov	w7, #0
	bl	_vaPutImage
	ldr	x8, [x26]
	cmp	x0, x8
	b.eq	LBB0_6
; %bb.5:
	mov	x22, x0
	ldr	w23, [x25]
	bl	_vaErrorStr
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
Lloh17:
	adrp	x2, l_.str.2@PAGE
Lloh18:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x1, x23
	mov	x3, x21
	bl	_av_log
LBB0_6:
	ldr	w0, [x24]
	ldr	w1, [x19, #4]
	bl	_vaDestroyImage
	ldr	x8, [x26]
	cmp	x0, x8
	b.eq	LBB0_8
; %bb.7:
	mov	x22, x0
	ldr	w23, [x25]
	bl	_vaErrorStr
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp]
Lloh19:
	adrp	x2, l_.str.3@PAGE
Lloh20:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x1, x23
	mov	x3, x21
	bl	_av_log
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_av_free
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unmap surface %#x.\n"

	.comm	_VA_STATUS_SUCCESS,8,3          ; @VA_STATUS_SUCCESS
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"Failed to unmap image from surface %#x: %d (%s).\n"

	.comm	_AV_HWFRAME_MAP_WRITE,4,2       ; @AV_HWFRAME_MAP_WRITE
	.comm	_AV_HWFRAME_MAP_DIRECT,4,2      ; @AV_HWFRAME_MAP_DIRECT
l_.str.2:                               ; @.str.2
	.asciz	"Failed to write image to surface %#x: %d (%s).\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to destroy image from surface %#x: %d (%s).\n"

	.no_dead_strip	_vaapi_unmap_frame
.subsections_via_symbols
