	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_ref_idx
_find_ref_idx:                          ## @find_ref_idx
	.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
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	24(%rdi), %rdi
	movq	32(%r12), %rax
	movb	(%rax), %cl
	movl	$-1, %r15d
	shll	%cl, %r15d
	notl	%r15d
	callq	_FF_ARRAY_ELEMS
	testl	%eax, %eax
	jle	LBB0_6
## %bb.1:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r13
	callq	_FF_ARRAY_ELEMS
	cltq
	addq	$24, %rbx
	cmpq	%rax, %r13
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rdi
	movq	16(%rdi,%rbx), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_2
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%rdi,%rbx), %rax
	cmpq	(%r12), %rax
	jne	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	8(%rdi,%rbx), %eax
	andl	%r15d, %eax
	cmpl	%r14d, %eax
	jne	LBB0_2
	jmp	LBB0_13
LBB0_6:
	movq	24(%r12), %rdi
	callq	_FF_ARRAY_ELEMS
	testl	%eax, %eax
	jle	LBB0_14
## %bb.7:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	incq	%r13
	callq	_FF_ARRAY_ELEMS
	cltq
	addq	$24, %rbx
	cmpq	%rax, %r13
	jge	LBB0_14
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rdi
	movq	16(%rdi,%rbx), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%rdi,%rbx), %rax
	cmpq	(%r12), %rax
	jne	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	8(%rdi,%rbx), %eax
	cmpl	%r14d, %eax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	andl	%r15d, %eax
	cmpl	%r14d, %eax
	jne	LBB0_8
LBB0_13:
	addq	%rbx, %rdi
	jmp	LBB0_20
LBB0_14:
	movq	8(%r12), %rax
	movq	_HEVC_NAL_CRA_NUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.16:
	movq	%r12, %rdi
	callq	_IS_BLA
	testl	%eax, %eax
	jne	LBB0_19
## %bb.18:
	movl	16(%r12), %edi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movl	%r14d, %ecx
	callq	_av_log
LBB0_19:
	xorl	%edi, %edi
LBB0_20:
	movq	%rdi, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HEVC_NAL_CRA_NUT,8,3           ## @HEVC_NAL_CRA_NUT
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not find ref with POC %d\n"

	.no_dead_strip	_find_ref_idx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_ref_idx
_find_ref_idx:                          ; @find_ref_idx
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x20, x0
	ldp	x0, x8, [x0, #24]
	ldr	w8, [x8]
	mov	w9, #-1
	lsl	w8, w9, w8
	mvn	w21, w8
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, #1
	mov	x0, x8
	bl	_FF_ARRAY_ELEMS
	add	x22, x22, #24
	cmp	x23, w0, sxtw
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	add	x9, x8, x22
	ldr	x9, [x9, #16]
	ldr	x9, [x9]
	ldr	x9, [x9]
	cbz	x9, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x8, x22]
	ldr	x10, [x20]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x0, x8, x22
	ldr	w9, [x0, #8]
	and	w9, w9, w21
	cmp	w9, w19
	b.ne	LBB0_2
	b	LBB0_16
LBB0_6:
	ldr	x0, [x20, #24]
	bl	_FF_ARRAY_ELEMS
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.7:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x23, x23, #1
	mov	x0, x8
	bl	_FF_ARRAY_ELEMS
	add	x22, x22, #24
	cmp	x23, w0, sxtw
	b.ge	LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	add	x9, x8, x22
	ldr	x9, [x9, #16]
	ldr	x9, [x9]
	ldr	x9, [x9]
	cbz	x9, LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x9, [x8, x22]
	ldr	x10, [x20]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x0, x8, x22
	ldr	w9, [x0, #8]
	and	w10, w9, w21
	cmp	w9, w19
	ccmp	w10, w19, #4, ne
	b.ne	LBB0_8
	b	LBB0_16
LBB0_12:
	ldr	x8, [x20, #8]
Lloh0:
	adrp	x9, _HEVC_NAL_CRA_NUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HEVC_NAL_CRA_NUT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_15
; %bb.13:
	mov	x0, x20
	bl	_IS_BLA
	cbnz	w0, LBB0_15
; %bb.14:
	ldr	w0, [x20, #16]
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x19
	bl	_av_log
LBB0_15:
	mov	x0, #0
LBB0_16:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_HEVC_NAL_CRA_NUT,8,3           ; @HEVC_NAL_CRA_NUT
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not find ref with POC %d\n"

	.no_dead_strip	_find_ref_idx
.subsections_via_symbols
