	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vp8_alloc_frame
_vp8_alloc_frame:                       ## @vp8_alloc_frame
	.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
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	8(%rdi), %rdi
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movq	_AV_GET_BUFFER_FLAG_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_2:
	movq	%r14, %rsi
	callq	_ff_thread_get_buffer
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movl	4(%r15), %edi
	imull	(%r15), %edi
	callq	_av_buffer_allocz
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.5:
	movq	8(%r15), %rax
	movq	(%rax), %rax
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movl	(%rax), %edi
	testl	%edi, %edi
	je	LBB0_9
## %bb.7:
	callq	_av_buffer_allocz
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movl	(%rax), %eax
	movl	%eax, 24(%r14)
	jmp	LBB0_9
LBB0_3:
	movl	%eax, %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	8(%r14), %rdi
	callq	_av_buffer_unref
	movq	8(%r15), %rdi
	movq	%r14, %rsi
	callq	_ff_thread_release_buffer
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_GET_BUFFER_FLAG_REF,4,2     ## @AV_GET_BUFFER_FLAG_REF
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_vp8_alloc_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vp8_alloc_frame
_vp8_alloc_frame:                       ; @vp8_alloc_frame
	.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, x1
	mov	x20, x0
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x8, _AV_GET_BUFFER_FLAG_REF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_GET_BUFFER_FLAG_REF@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w2, #0
	csel	w2, wzr, w8, eq
	bl	_ff_thread_get_buffer
	tbnz	w0, #31, LBB0_8
; %bb.1:
	ldp	w8, w9, [x20]
	mul	w0, w9, w8
	bl	_av_buffer_allocz
	mov	x21, x19
	str	x0, [x21, #8]!
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.3:
	ldr	w0, [x8]
	cbz	w0, LBB0_8
; %bb.4:
	bl	_av_buffer_allocz
	str	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.5:
	mov	x8, x0
	mov	w0, #0
	ldr	w8, [x8]
	str	w8, [x19, #24]
	b	LBB0_8
LBB0_6:
	mov	x0, x21
	bl	_av_buffer_unref
	ldr	x0, [x20, #8]
	mov	x1, x19
	bl	_ff_thread_release_buffer
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	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
	b	_AVERROR
LBB0_7:
	mov	w0, #0
LBB0_8:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_GET_BUFFER_FLAG_REF,4,2     ; @AV_GET_BUFFER_FLAG_REF
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_vp8_alloc_frame
.subsections_via_symbols
