	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vp8_find_free_buffer
_vp8_find_free_buffer:                  ## @vp8_find_free_buffer
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	8(%rdi), %rax
	movq	16(%rdi), %rcx
	movq	_VP56_FRAME_CURRENT@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rcx,%rdx,8), %rsi
	movq	_VP56_FRAME_PREVIOUS@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_VP56_FRAME_GOLDEN@GOTPCREL(%rip), %rbx
	movq	(%rbx), %r9
	movq	_VP56_FRAME_GOLDEN2@GOTPCREL(%rip), %rbx
	movq	(%rbx), %r8
	cmpq	%rsi, %rax
	je	LBB0_5
## %bb.1:
	cmpq	(%rcx,%rdx,8), %rax
	je	LBB0_5
## %bb.2:
	cmpq	(%rcx,%r9,8), %rax
	je	LBB0_5
## %bb.3:
	cmpq	(%rcx,%r8,8), %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rbx
	jmp	LBB0_21
LBB0_5:
	leaq	8(%rax), %rbx
	cmpq	%rsi, %rbx
	je	LBB0_9
## %bb.6:
	cmpq	(%rcx,%rdx,8), %rbx
	je	LBB0_9
## %bb.7:
	cmpq	(%rcx,%r9,8), %rbx
	je	LBB0_9
## %bb.8:
	cmpq	(%rcx,%r8,8), %rbx
	jne	LBB0_21
LBB0_9:
	leaq	16(%rax), %rbx
	cmpq	%rsi, %rbx
	je	LBB0_13
## %bb.10:
	cmpq	(%rcx,%rdx,8), %rbx
	je	LBB0_13
## %bb.11:
	cmpq	(%rcx,%r9,8), %rbx
	je	LBB0_13
## %bb.12:
	cmpq	(%rcx,%r8,8), %rbx
	jne	LBB0_21
LBB0_13:
	leaq	24(%rax), %rbx
	cmpq	%rsi, %rbx
	je	LBB0_17
## %bb.14:
	cmpq	(%rcx,%rdx,8), %rbx
	je	LBB0_17
## %bb.15:
	cmpq	(%rcx,%r9,8), %rbx
	je	LBB0_17
## %bb.16:
	cmpq	(%rcx,%r8,8), %rbx
	jne	LBB0_21
LBB0_17:
	addq	$32, %rax
	cmpq	%rsi, %rax
	je	LBB0_24
## %bb.18:
	cmpq	(%rcx,%rdx,8), %rax
	je	LBB0_24
## %bb.19:
	cmpq	(%rcx,%r9,8), %rax
	je	LBB0_24
## %bb.20:
	movq	%rax, %rbx
	cmpq	(%rcx,%r8,8), %rax
	je	LBB0_24
LBB0_21:
	movq	(%rbx), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_23
## %bb.22:
	movq	%rbx, %rsi
	callq	_vp8_release_frame
LBB0_23:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_24:
	movl	(%rdi), %edi
	movq	_AV_LOG_FATAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	xorl	%eax, %eax
	callq	_abort
	.cfi_endproc
                                        ## -- End function
	.comm	_VP56_FRAME_CURRENT,8,3         ## @VP56_FRAME_CURRENT
	.comm	_VP56_FRAME_PREVIOUS,8,3        ## @VP56_FRAME_PREVIOUS
	.comm	_VP56_FRAME_GOLDEN,8,3          ## @VP56_FRAME_GOLDEN
	.comm	_VP56_FRAME_GOLDEN2,8,3         ## @VP56_FRAME_GOLDEN2
	.comm	_AV_LOG_FATAL,4,2               ## @AV_LOG_FATAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ran out of free frames!\n"

	.no_dead_strip	_vp8_find_free_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vp8_find_free_buffer
_vp8_find_free_buffer:                  ; @vp8_find_free_buffer
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldp	x11, x8, [x0, #8]
Lloh0:
	adrp	x9, _VP56_FRAME_CURRENT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _VP56_FRAME_CURRENT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	x13, [x8, x9, lsl #3]
Lloh3:
	adrp	x9, _VP56_FRAME_PREVIOUS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _VP56_FRAME_PREVIOUS@GOTPAGEOFF]
Lloh5:
	adrp	x10, _VP56_FRAME_GOLDEN@GOTPAGE
Lloh6:
	ldr	x10, [x10, _VP56_FRAME_GOLDEN@GOTPAGEOFF]
Lloh7:
	ldr	x12, [x9]
Lloh8:
	ldr	x10, [x10]
Lloh9:
	adrp	x9, _VP56_FRAME_GOLDEN2@GOTPAGE
Lloh10:
	ldr	x9, [x9, _VP56_FRAME_GOLDEN2@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x11, x13
	b.eq	LBB0_4
; %bb.1:
	ldr	x14, [x8, x12, lsl #3]
	cmp	x11, x14
	b.eq	LBB0_4
; %bb.2:
	ldr	x14, [x8, x10, lsl #3]
	cmp	x11, x14
	b.eq	LBB0_4
; %bb.3:
	ldr	x14, [x8, x9, lsl #3]
	mov	x19, x11
	cmp	x11, x14
	b.ne	LBB0_20
LBB0_4:
	add	x19, x11, #8
	cmp	x19, x13
	b.eq	LBB0_8
; %bb.5:
	ldr	x14, [x8, x12, lsl #3]
	cmp	x19, x14
	b.eq	LBB0_8
; %bb.6:
	ldr	x14, [x8, x10, lsl #3]
	cmp	x19, x14
	b.eq	LBB0_8
; %bb.7:
	ldr	x14, [x8, x9, lsl #3]
	cmp	x19, x14
	b.ne	LBB0_20
LBB0_8:
	add	x19, x11, #16
	cmp	x19, x13
	b.eq	LBB0_12
; %bb.9:
	ldr	x14, [x8, x12, lsl #3]
	cmp	x19, x14
	b.eq	LBB0_12
; %bb.10:
	ldr	x14, [x8, x10, lsl #3]
	cmp	x19, x14
	b.eq	LBB0_12
; %bb.11:
	ldr	x14, [x8, x9, lsl #3]
	cmp	x19, x14
	b.ne	LBB0_20
LBB0_12:
	add	x19, x11, #24
	cmp	x19, x13
	b.eq	LBB0_16
; %bb.13:
	ldr	x14, [x8, x12, lsl #3]
	cmp	x19, x14
	b.eq	LBB0_16
; %bb.14:
	ldr	x14, [x8, x10, lsl #3]
	cmp	x19, x14
	b.eq	LBB0_16
; %bb.15:
	ldr	x14, [x8, x9, lsl #3]
	cmp	x19, x14
	b.ne	LBB0_20
LBB0_16:
	add	x19, x11, #32
	cmp	x19, x13
	b.eq	LBB0_23
; %bb.17:
	ldr	x11, [x8, x12, lsl #3]
	cmp	x19, x11
	b.eq	LBB0_23
; %bb.18:
	ldr	x10, [x8, x10, lsl #3]
	cmp	x19, x10
	b.eq	LBB0_23
; %bb.19:
	ldr	x8, [x8, x9, lsl #3]
	cmp	x19, x8
	b.eq	LBB0_23
LBB0_20:
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_22
; %bb.21:
	mov	x1, x19
	bl	_vp8_release_frame
LBB0_22:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_23:
	ldr	w0, [x0]
Lloh12:
	adrp	x8, _AV_LOG_FATAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AV_LOG_FATAL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str@PAGE
Lloh16:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	bl	_abort
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_VP56_FRAME_CURRENT,8,3         ; @VP56_FRAME_CURRENT
	.comm	_VP56_FRAME_PREVIOUS,8,3        ; @VP56_FRAME_PREVIOUS
	.comm	_VP56_FRAME_GOLDEN,8,3          ; @VP56_FRAME_GOLDEN
	.comm	_VP56_FRAME_GOLDEN2,8,3         ; @VP56_FRAME_GOLDEN2
	.comm	_AV_LOG_FATAL,4,2               ; @AV_LOG_FATAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ran out of free frames!\n"

	.no_dead_strip	_vp8_find_free_buffer
.subsections_via_symbols
