	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vaapi_transfer_data_to
_vaapi_transfer_data_to:                ## @vaapi_transfer_data_to
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdx), %rax
	cmpq	(%rdi), %rax
	jg	LBB0_2
## %bb.1:
	movq	%rdx, %r15
	movq	%rdi, %rbx
	movq	8(%rdx), %rax
	cmpq	8(%rdi), %rax
	jle	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edi
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_4:
	movq	%rsi, %r14
	xorl	%eax, %eax
	callq	_av_frame_alloc
	movq	%rax, -40(%rbp)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r12
	movl	16(%r15), %eax
	movl	%eax, 16(%r12)
	movq	_AV_HWFRAME_MAP_WRITE@GOTPCREL(%rip), %rax
	movq	_AV_HWFRAME_MAP_OVERWRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_vaapi_map_frame
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movups	(%r15), %xmm0
	movups	%xmm0, (%r12)
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_av_frame_copy
	movl	%eax, %ebx
LBB0_8:
	leaq	-40(%rbp), %rdi
	callq	_av_frame_free
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_AV_HWFRAME_MAP_WRITE,4,2       ## @AV_HWFRAME_MAP_WRITE
	.comm	_AV_HWFRAME_MAP_OVERWRITE,4,2   ## @AV_HWFRAME_MAP_OVERWRITE
	.no_dead_strip	_vaapi_transfer_data_to
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vaapi_transfer_data_to
_vaapi_transfer_data_to:                ; @vaapi_transfer_data_to
	.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
	ldr	x8, [x2]
	ldr	x9, [x0]
	cmp	x8, x9
	b.gt	LBB0_2
; %bb.1:
	mov	x19, x2
	mov	x21, x0
	ldr	x8, [x2, #8]
	ldr	x9, [x0, #8]
	cmp	x8, x9
	b.le	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_4:
	mov	x20, x1
	bl	_av_frame_alloc
	str	x0, [sp, #8]
	cbz	x0, LBB0_8
; %bb.5:
	mov	x22, x0
	ldr	w8, [x19, #16]
Lloh2:
	adrp	x9, _AV_HWFRAME_MAP_WRITE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _AV_HWFRAME_MAP_WRITE@GOTPAGEOFF]
	str	w8, [x0, #16]
Lloh4:
	ldr	w8, [x9]
Lloh5:
	adrp	x9, _AV_HWFRAME_MAP_OVERWRITE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _AV_HWFRAME_MAP_OVERWRITE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_vaapi_map_frame
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.6:
	ldr	q0, [x19]
	str	q0, [x22]
	mov	x0, x22
	mov	x1, x19
	bl	_av_frame_copy
	mov	x20, x0
LBB0_7:
	add	x0, sp, #8
	bl	_av_frame_free
	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_8:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_AV_HWFRAME_MAP_WRITE,4,2       ; @AV_HWFRAME_MAP_WRITE
	.comm	_AV_HWFRAME_MAP_OVERWRITE,4,2   ; @AV_HWFRAME_MAP_OVERWRITE
	.no_dead_strip	_vaapi_transfer_data_to
.subsections_via_symbols
