	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vp9_frame_alloc
_vp9_frame_alloc:                       ## @vp9_frame_alloc
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	8(%rdi), %rbx
	addq	$40, %rsi
	movq	_AV_GET_BUFFER_FLAG_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ff_thread_get_buffer
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movslq	(%rbx), %rax
	movslq	4(%rbx), %rbx
	imulq	%rax, %rbx
	shlq	$6, %rbx
	leal	(%rbx,%rbx,4), %edi
	callq	_av_buffer_allocz
	movq	%rax, 16(%r15)
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	(%rax), %rax
	movq	%rax, 32(%r15)
	addq	%rax, %rbx
	movq	%rbx, 24(%r15)
	movq	(%r14), %rbx
	xorl	%r12d, %r12d
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.4:
	xorl	%edi, %edi
	cmpq	$0, 8(%r15)
	sete	%dil
	callq	_av_assert0
	movl	(%rbx), %edi
	testl	%edi, %edi
	je	LBB0_7
## %bb.5:
	callq	_av_buffer_allocz
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	(%rax), %rax
	movq	%rax, 8(%r15)
	jmp	LBB0_7
LBB0_1:
	movl	%eax, %r12d
LBB0_7:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_vp9_frame_unref
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r12
	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	_vp9_frame_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vp9_frame_alloc
_vp9_frame_alloc:                       ; @vp9_frame_alloc
	.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	x21, [x0, #8]
	add	x1, x1, #40
Lloh0:
	adrp	x8, _AV_GET_BUFFER_FLAG_REF@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_GET_BUFFER_FLAG_REF@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_ff_thread_get_buffer
	tbnz	w0, #31, LBB0_8
; %bb.1:
	ldpsw	x8, x9, [x21]
	mul	x8, x8, x9
	lsl	x21, x8, #6
	add	w0, w21, w21, lsl #2
	bl	_av_buffer_allocz
	str	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.2:
	ldr	x8, [x0]
	add	x9, x8, x21
	stp	x9, x8, [x19, #24]
	ldr	x21, [x20]
	cbz	x21, LBB0_7
; %bb.3:
	ldr	x8, [x19, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_av_assert0
	ldr	w0, [x21]
	cbz	w0, LBB0_8
; %bb.4:
	bl	_av_buffer_allocz
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.5:
	mov	x8, x0
	mov	w0, #0
	ldr	x8, [x8]
	str	x8, [x19, #8]
	b	LBB0_8
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	bl	_vp9_frame_unref
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	_vp9_frame_alloc
.subsections_via_symbols
