	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vp9_get_sf_ref_fb
_vp9_get_sf_ref_fb:                     ## @vp9_get_sf_ref_fb
	.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), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movl	$32, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	callq	_ARRAY_SIZE
	cltq
	addq	$40, %rbx
	cmpq	%rax, %r13
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpq	$0, (%rdi,%rbx)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$0, -32(%rdi,%rbx)
	jne	LBB0_4
	jmp	LBB0_18
LBB0_5:
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_6
## %bb.7:
	movl	$32, %ebx
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rdi
	cmpq	$0, (%rdi,%rbx)
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%r13
	callq	_ARRAY_SIZE
	cltq
	addq	$40, %rbx
	cmpq	%rax, %r13
	jl	LBB0_8
	jmp	LBB0_10
LBB0_6:
	xorl	%r13d, %r13d
LBB0_10:
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %r13d
	jne	LBB0_13
## %bb.11:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_12
LBB0_13:
	movl	%r13d, %eax
	leaq	(%rax,%rax,4), %r12
	movq	(%r15), %rax
	movq	24(%r15), %rcx
	leaq	(%rax,%r12,8), %rsi
	addq	$24, %rsi
	addq	32(%r15), %rcx
	movq	%rcx, 24(%rax,%r12,8)
	movl	(%r14), %edi
	callq	_mtk_vcodec_mem_alloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_12
LBB0_15:
	movq	(%r15), %rax
	movq	8(%r15), %rcx
	leaq	(%rax,%r12,8), %rsi
	addq	$8, %rsi
	addq	16(%r15), %rcx
	movq	%rcx, 8(%rax,%r12,8)
	movl	(%r14), %edi
	callq	_mtk_vcodec_mem_alloc
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	leaq	L_.str.2(%rip), %rsi
LBB0_12:
	movq	%r14, %rdi
	callq	_mtk_vcodec_err
	movl	$-1, %r13d
LBB0_18:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	(%r15), %rax
	movq	$0, (%rax,%r12,8)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"List Full"

L_.str.1:                               ## @.str.1
	.asciz	"Cannot allocate sf_ref_buf y_buf"

L_.str.2:                               ## @.str.2
	.asciz	"Cannot allocate sf_ref_fb c_buf"

	.no_dead_strip	_vp9_get_sf_ref_fb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vp9_get_sf_ref_fb
_vp9_get_sf_ref_fb:                     ; @vp9_get_sf_ref_fb
	.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	x19, x0
	ldr	x21, [x0, #8]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x22, #0
	mov	x20, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x20, x20, #1
	bl	_ARRAY_SIZE
	add	x22, x22, #40
	cmp	x20, w0, sxtw
	b.ge	LBB0_6
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	add	x8, x0, x22
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x0, x22]
	cbnz	x8, LBB0_2
; %bb.5:
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	b	LBB0_18
LBB0_6:
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x20, #0
	mov	w22, #32
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	ldr	x8, [x0, x22]
	cbz	x8, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x20, x20, #1
	bl	_ARRAY_SIZE
	add	x22, x22, #40
	cmp	x20, w0, sxtw
	b.lt	LBB0_8
	b	LBB0_11
LBB0_10:
	mov	w20, #0
LBB0_11:
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w20, w0
	b.ne	LBB0_13
; %bb.12:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_17
LBB0_13:
	ldr	x8, [x21]
	mov	w9, #40
	umaddl	x1, w20, w9, x8
	ldp	x9, x8, [x21, #24]
	add	x8, x9, x8
	str	x8, [x1, #24]!
	ldr	w0, [x19]
	bl	_mtk_vcodec_mem_alloc
	cbz	x0, LBB0_15
; %bb.14:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_17
LBB0_15:
	mov	w22, w20
	mov	w8, #40
	ldp	x9, x10, [x21]
	madd	x1, x22, x8, x9
	ldr	x8, [x21, #16]
	add	x8, x10, x8
	str	x8, [x1, #8]!
	ldr	w0, [x19]
	bl	_mtk_vcodec_mem_alloc
	cbz	x0, LBB0_19
; %bb.16:
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_17:
	mov	x0, x19
	bl	_mtk_vcodec_err
	mov	w20, #-1
LBB0_18:
	mov	x0, x20
	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
LBB0_19:
	ldr	x8, [x21]
	mov	w9, #40
	mul	x9, x22, x9
	str	xzr, [x8, x9]
	b	LBB0_18
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"List Full"

l_.str.1:                               ; @.str.1
	.asciz	"Cannot allocate sf_ref_buf y_buf"

l_.str.2:                               ; @.str.2
	.asciz	"Cannot allocate sf_ref_fb c_buf"

	.no_dead_strip	_vp9_get_sf_ref_fb
.subsections_via_symbols
