	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fill_vaapi_ReferenceFrames
_fill_vaapi_ReferenceFrames:            ## @fill_vaapi_ReferenceFrames
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	$0, -32(%rbp)
	movq	(%rdi), %rdi
	callq	_FF_ARRAY_ELEMS
	movl	%eax, -48(%rbp)
	movq	(%rbx), %rbx
	movq	%rbx, -40(%rbp)
	testl	%eax, %eax
	jle	LBB0_3
## %bb.1:
	movl	%eax, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_init_vaapi_pic
	addq	$4, %rbx
	decq	%r14
	jne	LBB0_2
LBB0_3:
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.4:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r14
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r15), %rcx
	movq	(%rcx,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$0, (%rsi)
	je	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%r14, %rdi
	callq	_dpb_add
	testq	%rax, %rax
	js	LBB0_17
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r15), %eax
	jmp	LBB0_5
LBB0_10:
	xorl	%ebx, %ebx
	leaq	-48(%rbp), %r14
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	cmpq	$16, %rbx
	je	LBB0_16
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	cmpq	$0, (%rsi)
	je	LBB0_11
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	%r14, %rdi
	callq	_dpb_add
	testq	%rax, %rax
	jns	LBB0_11
LBB0_17:
	movl	$-1, %eax
	jmp	LBB0_18
LBB0_16:
	xorl	%eax, %eax
LBB0_18:
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_fill_vaapi_ReferenceFrames
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fill_vaapi_ReferenceFrames
_fill_vaapi_ReferenceFrames:            ; @fill_vaapi_ReferenceFrames
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x1
	mov	x20, x0
	str	xzr, [sp, #24]
	ldr	x0, [x0]
	bl	_FF_ARRAY_ELEMS
	str	w0, [sp, #8]
	ldr	x20, [x20]
	str	x20, [sp, #16]
	cmp	w0, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w21, w0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_init_vaapi_pic
	add	x20, x20, #4
	subs	x21, x21, #1
	b.ne	LBB0_2
LBB0_3:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.4:
	mov	x20, #0
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x20, x20, #1
	cmp	x20, w8, sxtw
	b.ge	LBB0_10
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #16]
	ldr	x1, [x9, x20, lsl #3]
	cbz	x1, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x1]
	cbz	x9, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #8
	bl	_dpb_add
	tbnz	x0, #63, LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w8, [x19]
	b	LBB0_5
LBB0_10:
	mov	x20, #0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x20, x20, #8
	cmp	x20, #128
	b.eq	LBB0_16
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x1, [x8, x20]
	cbz	x1, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x1]
	cbz	x8, LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x0, sp, #8
	bl	_dpb_add
	tbz	x0, #63, LBB0_11
LBB0_15:
	mov	w0, #-1
	b	LBB0_17
LBB0_16:
	mov	w0, #0
LBB0_17:
	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
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_fill_vaapi_ReferenceFrames
.subsections_via_symbols
