	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function frame_alloc
_frame_alloc:                           ## @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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	(%rsi), %eax
	movq	_MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.1:
	movq	%rdx, %r14
	movq	_MFX_MEMTYPE_FROM_VPPIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_MFX_MEMTYPE_FROM_VPPOUT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	testl	%eax, %edx
	je	LBB0_3
## %bb.2:
	movq	_MFX_MEMTYPE_EXTERNAL_FRAME@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	je	LBB0_3
## %bb.4:
	movq	%rdi, %rbx
	testl	%eax, %ecx
	je	LBB0_9
## %bb.5:
	movl	(%rbx), %edi
	shll	$2, %edi
	callq	_av_mallocz
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_15
## %bb.6:
	movl	(%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.7:
	movq	16(%rbx), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rsi,8), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax,%rsi,4)
	incq	%rsi
	movslq	(%rbx), %rcx
	cmpq	%rcx, %rsi
	jl	LBB0_8
	jmp	LBB0_13
LBB0_3:
	movq	_MFX_ERR_UNSUPPORTED@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	movl	4(%rbx), %edi
	shll	$2, %edi
	callq	_av_mallocz
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_15
## %bb.10:
	movl	4(%rbx), %ecx
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.11:
	movq	8(%rbx), %rdx
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx,%rsi,8), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax,%rsi,4)
	incq	%rsi
	movslq	4(%rbx), %rcx
	cmpq	%rcx, %rsi
	jl	LBB0_12
LBB0_13:
	movl	%ecx, (%r14)
	movq	_MFX_ERR_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET,4,2 ## @MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET
	.comm	_MFX_MEMTYPE_FROM_VPPIN,4,2     ## @MFX_MEMTYPE_FROM_VPPIN
	.comm	_MFX_MEMTYPE_FROM_VPPOUT,4,2    ## @MFX_MEMTYPE_FROM_VPPOUT
	.comm	_MFX_MEMTYPE_EXTERNAL_FRAME,4,2 ## @MFX_MEMTYPE_EXTERNAL_FRAME
	.comm	_MFX_ERR_UNSUPPORTED,4,2        ## @MFX_ERR_UNSUPPORTED
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MFX_ERR_NONE,4,2               ## @MFX_ERR_NONE
	.no_dead_strip	_frame_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function frame_alloc
_frame_alloc:                           ; @frame_alloc
	.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
	ldr	w8, [x1]
Lloh0:
	adrp	x9, _MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.1:
Lloh3:
	adrp	x9, _MFX_MEMTYPE_FROM_VPPIN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MFX_MEMTYPE_FROM_VPPIN@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _MFX_MEMTYPE_FROM_VPPOUT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MFX_MEMTYPE_FROM_VPPOUT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w10, w10, w9
	tst	w10, w8
	b.eq	LBB0_8
; %bb.2:
Lloh9:
	adrp	x10, _MFX_MEMTYPE_EXTERNAL_FRAME@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MFX_MEMTYPE_EXTERNAL_FRAME@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_8
; %bb.3:
	mov	x19, x2
	mov	x20, x0
	tst	w9, w8
	b.eq	LBB0_10
; %bb.4:
	ldr	w8, [x20]
	lsl	w0, w8, #2
	bl	_av_mallocz
	str	x0, [x19, #8]
	cbz	x0, LBB0_16
; %bb.5:
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.6:
	mov	x9, #0
	ldr	x10, [x20, #16]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x10, x9, lsl #3]
	ldr	w8, [x8]
	str	w8, [x0, x9, lsl #2]
	add	x9, x9, #1
	ldrsw	x8, [x20]
	cmp	x9, x8
	b.lt	LBB0_7
	b	LBB0_15
LBB0_8:
Lloh12:
	adrp	x8, _MFX_ERR_UNSUPPORTED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MFX_ERR_UNSUPPORTED@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldr	w8, [x20, #4]
	lsl	w0, w8, #2
	bl	_av_mallocz
	str	x0, [x19, #8]
	cbz	x0, LBB0_16
; %bb.11:
	ldr	w8, [x20, #4]
	cmp	w8, #1
	b.lt	LBB0_15
; %bb.12:
	mov	x8, #0
	ldr	x9, [x20, #8]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9, x8, lsl #3]
	ldr	w10, [x10]
	str	w10, [x0, x8, lsl #2]
	add	x8, x8, #1
	ldrsw	x10, [x20, #4]
	cmp	x8, x10
	b.lt	LBB0_13
; %bb.14:
	mov	x8, x10
LBB0_15:
	str	w8, [x19]
Lloh14:
	adrp	x8, _MFX_ERR_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MFX_ERR_NONE@GOTPAGEOFF]
	b	LBB0_9
LBB0_16:
Lloh16:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET,4,2 ; @MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET
	.comm	_MFX_MEMTYPE_FROM_VPPIN,4,2     ; @MFX_MEMTYPE_FROM_VPPIN
	.comm	_MFX_MEMTYPE_FROM_VPPOUT,4,2    ; @MFX_MEMTYPE_FROM_VPPOUT
	.comm	_MFX_MEMTYPE_EXTERNAL_FRAME,4,2 ; @MFX_MEMTYPE_EXTERNAL_FRAME
	.comm	_MFX_ERR_UNSUPPORTED,4,2        ; @MFX_ERR_UNSUPPORTED
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MFX_ERR_NONE,4,2               ; @MFX_ERR_NONE
	.no_dead_strip	_frame_alloc
.subsections_via_symbols
