	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fill_vaapi_pic
_fill_vaapi_pic:                        ## @fill_vaapi_pic
	.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
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rsi), %rdi
	callq	_ff_vaapi_get_surface_id
	movl	%eax, 8(%r14)
	movl	16(%rbx), %eax
	movl	%eax, 4(%r14)
	movl	%r15d, (%r14)
	movq	_HEVC_FRAME_FLAG_LONG_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	_VA_PICTURE_HEVC_LONG_TERM_REFERENCE@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movl	%r15d, (%r14)
LBB0_2:
	movq	8(%rbx), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_5
## %bb.3:
	movq	_VA_PICTURE_HEVC_FIELD_PIC@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r15d
	movl	%r15d, (%r14)
	cmpl	$0, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	_VA_PICTURE_HEVC_BOTTOM_FIELD@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movl	%r15d, (%r14)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HEVC_FRAME_FLAG_LONG_REF,4,2   ## @HEVC_FRAME_FLAG_LONG_REF
	.comm	_VA_PICTURE_HEVC_LONG_TERM_REFERENCE,4,2 ## @VA_PICTURE_HEVC_LONG_TERM_REFERENCE
	.comm	_VA_PICTURE_HEVC_FIELD_PIC,4,2  ## @VA_PICTURE_HEVC_FIELD_PIC
	.comm	_VA_PICTURE_HEVC_BOTTOM_FIELD,4,2 ## @VA_PICTURE_HEVC_BOTTOM_FIELD
	.no_dead_strip	_fill_vaapi_pic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_vaapi_pic
_fill_vaapi_pic:                        ; @fill_vaapi_pic
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x0, [x1, #8]
	bl	_ff_vaapi_get_surface_id
	str	w0, [x19, #8]
	ldr	w8, [x21, #16]
	stp	w20, w8, [x19]
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _HEVC_FRAME_FLAG_LONG_REF@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HEVC_FRAME_FLAG_LONG_REF@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _VA_PICTURE_HEVC_LONG_TERM_REFERENCE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VA_PICTURE_HEVC_LONG_TERM_REFERENCE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	orr	w20, w8, w20
	str	w20, [x19]
LBB0_2:
	ldr	x8, [x21, #8]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_5
; %bb.3:
Lloh6:
	adrp	x9, _VA_PICTURE_HEVC_FIELD_PIC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _VA_PICTURE_HEVC_FIELD_PIC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w9, w20, w9
	str	w9, [x19]
	ldr	w8, [x8]
	cbnz	w8, LBB0_5
; %bb.4:
Lloh9:
	adrp	x8, _VA_PICTURE_HEVC_BOTTOM_FIELD@GOTPAGE
Lloh10:
	ldr	x8, [x8, _VA_PICTURE_HEVC_BOTTOM_FIELD@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	orr	w8, w8, w9
	str	w8, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_HEVC_FRAME_FLAG_LONG_REF,4,2   ; @HEVC_FRAME_FLAG_LONG_REF
	.comm	_VA_PICTURE_HEVC_LONG_TERM_REFERENCE,4,2 ; @VA_PICTURE_HEVC_LONG_TERM_REFERENCE
	.comm	_VA_PICTURE_HEVC_FIELD_PIC,4,2  ; @VA_PICTURE_HEVC_FIELD_PIC
	.comm	_VA_PICTURE_HEVC_BOTTOM_FIELD,4,2 ; @VA_PICTURE_HEVC_BOTTOM_FIELD
	.no_dead_strip	_fill_vaapi_pic
.subsections_via_symbols
