	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alloc_frame
_alloc_frame:                           ## @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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	16(%rsi), %rdx
	movq	80(%rbx), %rsi
	testq	%rdx, %rdx
	je	LBB0_2
## %bb.1:
	callq	_ff_qsv_get_continuous_buffer
	testl	%eax, %eax
	jns	LBB0_4
	jmp	LBB0_11
LBB0_2:
	movq	_AV_GET_BUFFER_FLAG_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_ff_get_buffer
	testl	%eax, %eax
	js	LBB0_11
LBB0_4:
	movq	80(%rbx), %rax
	movq	(%rax), %rcx
	movq	_AV_PIX_FMT_QSV@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_6
## %bb.5:
	movq	8(%rax), %rax
	movq	24(%rax), %rax
	movq	48(%rax), %rcx
	movq	%rcx, 72(%rbx)
	movups	(%rax), %xmm0
	movups	16(%rax), %xmm1
	movups	32(%rax), %xmm2
	movups	%xmm2, 56(%rbx)
	movups	%xmm1, 40(%rbx)
	movups	%xmm0, 24(%rbx)
	cmpq	$0, (%r14)
	jne	LBB0_8
	jmp	LBB0_10
LBB0_6:
	movl	8(%r14), %ecx
	movl	%ecx, 72(%rbx)
	movq	16(%rax), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 64(%rbx)
	movq	8(%rax), %rax
	movq	(%rax), %rcx
	movq	%rcx, 56(%rbx)
	movq	8(%rax), %rax
	movq	%rax, 48(%rbx)
	cmpq	$0, (%r14)
	je	LBB0_10
LBB0_8:
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ff_qsv_find_surface_idx
	testl	%eax, %eax
	js	LBB0_11
## %bb.9:
	movl	%eax, %eax
	shlq	$2, %rax
	addq	(%r14), %rax
	movq	%rax, 40(%rbx)
LBB0_10:
	leaq	16(%rbx), %rax
	movq	%rax, 32(%rbx)
	movl	$1, 24(%rbx)
	leaq	4(%rbx), %rax
	movq	%rax, 16(%rbx)
	movq	_MFX_EXTBUFF_DECODED_FRAME_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movabsq	$34359738369, %rax              ## imm = 0x800000001
	movq	%rax, (%rbx)
	xorl	%eax, %eax
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_GET_BUFFER_FLAG_REF,4,2     ## @AV_GET_BUFFER_FLAG_REF
	.comm	_AV_PIX_FMT_QSV,8,3             ## @AV_PIX_FMT_QSV
	.comm	_MFX_EXTBUFF_DECODED_FRAME_INFO,4,2 ## @MFX_EXTBUFF_DECODED_FRAME_INFO
	.no_dead_strip	_alloc_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function alloc_frame
lCPI0_0:
	.long	1                               ; 0x1
	.long	8                               ; 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_alloc_frame:                           ; @alloc_frame
	.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
	mov	x19, x2
	mov	x20, x1
	ldr	x2, [x1, #16]
	ldr	x1, [x19, #80]
	cbz	x2, LBB0_2
; %bb.1:
	bl	_ff_qsv_get_continuous_buffer
	tbz	w0, #31, LBB0_3
	b	LBB0_9
LBB0_2:
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_get_buffer
	tbnz	w0, #31, LBB0_9
LBB0_3:
	ldr	x8, [x19, #80]
	ldr	x9, [x8]
Lloh3:
	adrp	x10, _AV_PIX_FMT_QSV@GOTPAGE
Lloh4:
	ldr	x10, [x10, _AV_PIX_FMT_QSV@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_5
; %bb.4:
	ldr	x8, [x8, #8]
	ldr	x8, [x8, #24]
	ldp	q0, q1, [x8]
	ldr	q2, [x8, #32]
	ldr	x8, [x8, #48]
	str	x8, [x19, #72]
	stur	q2, [x19, #56]
	stur	q1, [x19, #40]
	stur	q0, [x19, #24]
	ldr	x8, [x20]
	cbnz	x8, LBB0_6
	b	LBB0_8
LBB0_5:
	ldr	w9, [x20, #8]
	str	w9, [x19, #72]
	ldp	x8, x9, [x8, #8]
	ldr	w9, [x9]
	str	w9, [x19, #64]
	ldr	x9, [x8]
	str	x9, [x19, #56]
	ldr	x8, [x8, #8]
	str	x8, [x19, #48]
	ldr	x8, [x20]
	cbz	x8, LBB0_8
LBB0_6:
	mov	x0, x20
	mov	x1, x19
	bl	_ff_qsv_find_surface_idx
	tbnz	w0, #31, LBB0_9
; %bb.7:
	ldr	x8, [x20]
	add	x8, x8, w0, uxtw #2
	str	x8, [x19, #40]
LBB0_8:
	mov	w0, #0
	add	x8, x19, #4
	mov	x9, x19
	str	x8, [x9, #16]!
	str	x9, [x19, #32]
	mov	w8, #1
Lloh6:
	adrp	x9, _MFX_EXTBUFF_DECODED_FRAME_INFO@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MFX_EXTBUFF_DECODED_FRAME_INFO@GOTPAGEOFF]
	str	w8, [x19, #24]
Lloh8:
	ldr	w8, [x9]
	str	w8, [x19, #8]
Lloh9:
	adrp	x8, lCPI0_0@PAGE
Lloh10:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdr	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_GET_BUFFER_FLAG_REF,4,2     ; @AV_GET_BUFFER_FLAG_REF
	.comm	_AV_PIX_FMT_QSV,8,3             ; @AV_PIX_FMT_QSV
	.comm	_MFX_EXTBUFF_DECODED_FRAME_INFO,4,2 ; @MFX_EXTBUFF_DECODED_FRAME_INFO
	.no_dead_strip	_alloc_frame
.subsections_via_symbols
