	.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	%r15
	pushq	%r14
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rsi), %eax
	movq	_MFX_MEMTYPE_VIDEO_MEMORY_PROCESSOR_TARGET@GOTPCREL(%rip), %rcx
	movq	_MFX_ERR_UNSUPPORTED@GOTPCREL(%rip), %r15
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.1:
	movq	_MFX_MEMTYPE_FROM_VPPIN@GOTPCREL(%rip), %rcx
	movq	_MFX_MEMTYPE_FROM_VPPOUT@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ebx
	orl	(%rcx), %ebx
	testl	%eax, %ebx
	je	LBB0_9
## %bb.2:
	movq	_MFX_MEMTYPE_EXTERNAL_FRAME@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_9
## %bb.3:
	movq	(%rdi), %r9
	movq	8(%r9), %rax
	movq	8(%rsi), %rcx
	movq	16(%rsi), %r8
	movq	(%rax), %r11
	movq	8(%rax), %r14
	cmpq	%r11, %rcx
	jg	LBB0_7
## %bb.4:
	cmpq	%r14, %r8
	jg	LBB0_7
## %bb.5:
	movq	24(%rsi), %rbx
	cmpq	16(%rax), %rbx
	jne	LBB0_7
## %bb.6:
	movq	32(%rsi), %rbx
	cmpq	24(%rax), %rbx
	jne	LBB0_7
## %bb.8:
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rdx)
	movl	(%r9), %eax
	movl	%eax, (%rdx)
	movq	_MFX_ERR_NONE@GOTPCREL(%rip), %r15
	jmp	LBB0_9
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r10d
	movq	24(%rsi), %r9
	movq	32(%rsi), %rdx
	movups	16(%rax), %xmm0
	movups	%xmm0, 24(%rsp)
	movq	%r14, 16(%rsp)
	movq	%r11, 8(%rsp)
	movq	%rdx, (%rsp)
	leaq	L_.str(%rip), %rdx
	movl	%r10d, %esi
	callq	_av_log
LBB0_9:
	movl	(%r15), %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Mismatching surface properties in an allocation request: %dx%d %d %d vs %dx%d %d %d\n"

	.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:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	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
	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	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_8
; %bb.2:
Lloh9:
	adrp	x9, _MFX_MEMTYPE_EXTERNAL_FRAME@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MFX_MEMTYPE_EXTERNAL_FRAME@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
	ldr	x8, [x0]
	ldr	x9, [x8, #8]
	ldp	x3, x4, [x1, #8]
	ldp	x7, x10, [x9]
	cmp	x3, x7
	ccmp	x4, x10, #0, le
	b.gt	LBB0_7
; %bb.4:
	ldr	x11, [x1, #24]
	ldr	x12, [x9, #16]
	cmp	x11, x12
	b.ne	LBB0_7
; %bb.5:
	ldr	x11, [x1, #32]
	ldr	x12, [x9, #24]
	cmp	x11, x12
	b.ne	LBB0_7
; %bb.6:
	ldr	x9, [x0, #8]
	ldr	x9, [x9]
	ldr	w9, [x9]
	ldr	w8, [x8]
	stp	w8, w9, [x2]
Lloh12:
	adrp	x8, _MFX_ERR_NONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MFX_ERR_NONE@GOTPAGEOFF]
	b	LBB0_9
LBB0_7:
Lloh14:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	ldp	x5, x6, [x1, #24]
	ldp	x11, x9, [x9, #16]
	stp	x11, x9, [sp, #8]
	str	x10, [sp]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x8
	bl	_av_log
LBB0_8:
Lloh19:
	adrp	x8, _MFX_ERR_UNSUPPORTED@GOTPAGE
Lloh20:
	ldr	x8, [x8, _MFX_ERR_UNSUPPORTED@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.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 AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.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	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Mismatching surface properties in an allocation request: %dx%d %d %d vs %dx%d %d %d\n"

	.comm	_MFX_ERR_NONE,4,2               ; @MFX_ERR_NONE
	.no_dead_strip	_frame_alloc
.subsections_via_symbols
