	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function submit_frame
_submit_frame:                          ## @submit_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	16(%rsi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	12(%rdi), %rbx
	movl	12(%rdi), %edi
	callq	_clear_unused_frames
	movq	%rbx, %rdi
	callq	_get_free_frame
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r15
	movl	8(%r12), %edi
	callq	_IS_SYSTEM_MEMORY
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	testb	$31, 8(%r13)
	jne	LBB0_4
## %bb.3:
	movq	16(%r13), %rax
	testb	$31, (%rax)
	je	LBB0_13
LBB0_4:
	movl	8(%r14), %edi
	movl	$32, %esi
	callq	_FFALIGN
	movl	%eax, %ebx
	movl	4(%r14), %edi
	movl	$32, %esi
	callq	_FFALIGN
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_ff_get_video_buffer
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	leaq	8(%r15), %rbx
	movl	24(%r13), %ecx
	movl	%ecx, 24(%rax)
	movl	8(%r13), %ecx
	movl	%ecx, (%rax)
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_av_frame_copy
	testq	%rax, %rax
	js	LBB0_12
## %bb.6:
	movq	(%rbx), %rdi
	movq	%r13, %rsi
	callq	_av_frame_copy_props
	movq	(%rbx), %rdi
	jmp	LBB0_14
LBB0_7:
	xorl	%r15d, %r15d
	jmp	LBB0_29
LBB0_8:
	movq	(%r13), %rax
	movq	_AV_PIX_FMT_QSV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.9:
	movq	%r13, %rdi
	callq	_av_frame_clone
	movq	%rax, 8(%r15)
	movq	32(%rax), %rax
	movq	24(%rax), %rbx
	jmp	LBB0_15
LBB0_11:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	jmp	LBB0_20
LBB0_12:
	movq	%rbx, %rdi
	callq	_av_frame_free
	xorl	%r15d, %r15d
	jmp	LBB0_29
LBB0_13:
	movq	%r13, %rdi
	callq	_av_frame_clone
	movq	%rax, %rdi
	movq	%rax, 8(%r15)
LBB0_14:
	movq	%r15, %rbx
	addq	$16, %rbx
	movq	%rbx, %rsi
	callq	_map_frame_to_surface
	testq	%rax, %rax
	js	LBB0_19
LBB0_15:
	movq	%rbx, (%r15)
	movq	(%r12), %r12
	movq	%r14, %rdi
	callq	_FF_INLINK_IDX
	movl	(%r12,%rax,4), %eax
	movl	%eax, (%rbx)
	movq	8(%r15), %rax
	movl	20(%rax), %edi
	movl	(%r14), %esi
	movq	_default_tb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_av_rescale_q
	movq	(%r15), %rcx
	movl	%eax, 4(%rcx)
	movq	8(%r15), %rdx
	cmpl	$0, 16(%rdx)
	je	LBB0_18
## %bb.16:
	cmpq	$0, 8(%rdx)
	jne	LBB0_21
## %bb.17:
	movq	_MFX_PICSTRUCT_FIELD_BFF@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_18:
	movq	_MFX_PICSTRUCT_PROGRESSIVE@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_19:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_20:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_av_log
	xorl	%r15d, %r15d
	jmp	LBB0_29
LBB0_21:
	movq	_MFX_PICSTRUCT_FIELD_TFF@GOTPCREL(%rip), %rax
LBB0_22:
	movl	(%rax), %eax
	movl	%eax, (%rcx)
	movl	4(%rdx), %edx
	cmpl	$4, %edx
	je	LBB0_26
## %bb.23:
	cmpl	$2, %edx
	je	LBB0_27
## %bb.24:
	cmpl	$1, %edx
	jne	LBB0_29
## %bb.25:
	movq	_MFX_PICSTRUCT_FIELD_REPEATED@GOTPCREL(%rip), %rdx
	jmp	LBB0_28
LBB0_26:
	movq	_MFX_PICSTRUCT_FRAME_TRIPLING@GOTPCREL(%rip), %rdx
	jmp	LBB0_28
LBB0_27:
	movq	_MFX_PICSTRUCT_FRAME_DOUBLING@GOTPCREL(%rip), %rdx
LBB0_28:
	orl	(%rdx), %eax
	movl	%eax, (%rcx)
LBB0_29:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PIX_FMT_QSV,8,3             ## @AV_PIX_FMT_QSV
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QSVVPP gets a wrong frame.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unsupported frame.\n"

	.comm	_default_tb,4,2                 ## @default_tb
	.comm	_MFX_PICSTRUCT_PROGRESSIVE,4,2  ## @MFX_PICSTRUCT_PROGRESSIVE
	.comm	_MFX_PICSTRUCT_FIELD_TFF,4,2    ## @MFX_PICSTRUCT_FIELD_TFF
	.comm	_MFX_PICSTRUCT_FIELD_BFF,4,2    ## @MFX_PICSTRUCT_FIELD_BFF
	.comm	_MFX_PICSTRUCT_FIELD_REPEATED,4,2 ## @MFX_PICSTRUCT_FIELD_REPEATED
	.comm	_MFX_PICSTRUCT_FRAME_DOUBLING,4,2 ## @MFX_PICSTRUCT_FRAME_DOUBLING
	.comm	_MFX_PICSTRUCT_FRAME_TRIPLING,4,2 ## @MFX_PICSTRUCT_FRAME_TRIPLING
	.no_dead_strip	_submit_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function submit_frame
_submit_frame:                          ; @submit_frame
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x23, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x22, [x1, #16]
	mov	x19, x0
	ldr	w0, [x19, #12]!
	bl	_clear_unused_frames
	mov	x0, x19
	bl	_get_free_frame
	mov	x19, x0
	cbz	x0, LBB0_26
; %bb.1:
	ldr	w0, [x21, #8]
	bl	_IS_SYSTEM_MEMORY
	cbz	w0, LBB0_7
; %bb.2:
	ldrb	w8, [x23, #8]
	tst	w8, #0x1f
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x23, #16]
	ldrb	w8, [x8]
	tst	w8, #0x1f
	b.eq	LBB0_12
LBB0_4:
	ldr	w0, [x20, #8]
	mov	w1, #32
	bl	_FFALIGN
	mov	x24, x0
	ldr	w0, [x20, #4]
	mov	w1, #32
	bl	_FFALIGN
	mov	x2, x0
	mov	x0, x20
	mov	x1, x24
	bl	_ff_get_video_buffer
	mov	x24, x19
	str	x0, [x24, #8]!
	cbz	x0, LBB0_9
; %bb.5:
	ldr	w8, [x23, #24]
	str	w8, [x0, #24]
	ldr	w8, [x23, #8]
	str	w8, [x0]
	mov	x1, x23
	bl	_av_frame_copy
	tbnz	x0, #63, LBB0_11
; %bb.6:
	ldr	x0, [x24]
	mov	x1, x23
	bl	_av_frame_copy_props
	ldr	x0, [x24]
	b	LBB0_13
LBB0_7:
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _AV_PIX_FMT_QSV@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_PIX_FMT_QSV@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:
	mov	x0, x23
	bl	_av_frame_clone
	str	x0, [x19, #8]
	ldr	x8, [x0, #32]
	ldr	x23, [x8, #24]
	b	LBB0_14
LBB0_9:
	mov	x19, #0
	b	LBB0_26
LBB0_10:
Lloh3:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_22
LBB0_11:
	mov	x0, x24
	bl	_av_frame_free
	mov	x19, #0
	b	LBB0_26
LBB0_12:
	mov	x0, x23
	bl	_av_frame_clone
	str	x0, [x19, #8]
LBB0_13:
	add	x23, x19, #16
	mov	x1, x23
	bl	_map_frame_to_surface
	tbnz	x0, #63, LBB0_21
LBB0_14:
	str	x23, [x19]
	ldr	x21, [x21]
	mov	x0, x20
	bl	_FF_INLINK_IDX
	ldr	w8, [x21, x0, lsl #2]
	str	w8, [x23]
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #20]
	ldr	w1, [x20]
Lloh8:
	adrp	x8, _default_tb@GOTPAGE
Lloh9:
	ldr	x8, [x8, _default_tb@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	bl	_av_rescale_q
	ldp	x8, x10, [x19]
	str	w0, [x8, #4]
	ldr	w9, [x10, #16]
	cbz	w9, LBB0_16
; %bb.15:
Lloh11:
	adrp	x9, _MFX_PICSTRUCT_FIELD_TFF@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MFX_PICSTRUCT_FIELD_TFF@GOTPAGEOFF]
	ldr	x11, [x10, #8]
Lloh13:
	adrp	x12, _MFX_PICSTRUCT_FIELD_BFF@GOTPAGE
Lloh14:
	ldr	x12, [x12, _MFX_PICSTRUCT_FIELD_BFF@GOTPAGEOFF]
	cmp	x11, #0
	csel	x9, x12, x9, eq
	b	LBB0_17
LBB0_16:
Lloh15:
	adrp	x9, _MFX_PICSTRUCT_PROGRESSIVE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MFX_PICSTRUCT_PROGRESSIVE@GOTPAGEOFF]
LBB0_17:
	ldr	w9, [x9]
	str	w9, [x8]
	ldr	w10, [x10, #4]
	cmp	w10, #4
	b.eq	LBB0_23
; %bb.18:
	cmp	w10, #2
	b.eq	LBB0_24
; %bb.19:
	cmp	w10, #1
	b.ne	LBB0_26
; %bb.20:
Lloh17:
	adrp	x10, _MFX_PICSTRUCT_FIELD_REPEATED@GOTPAGE
Lloh18:
	ldr	x10, [x10, _MFX_PICSTRUCT_FIELD_REPEATED@GOTPAGEOFF]
	b	LBB0_25
LBB0_21:
Lloh19:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x2, l_.str.1@PAGE
Lloh23:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_22:
	mov	x0, x22
	bl	_av_log
	mov	x19, #0
	b	LBB0_26
LBB0_23:
Lloh24:
	adrp	x10, _MFX_PICSTRUCT_FRAME_TRIPLING@GOTPAGE
Lloh25:
	ldr	x10, [x10, _MFX_PICSTRUCT_FRAME_TRIPLING@GOTPAGEOFF]
	b	LBB0_25
LBB0_24:
Lloh26:
	adrp	x10, _MFX_PICSTRUCT_FRAME_DOUBLING@GOTPAGE
Lloh27:
	ldr	x10, [x10, _MFX_PICSTRUCT_FRAME_DOUBLING@GOTPAGEOFF]
LBB0_25:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x8]
LBB0_26:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PIX_FMT_QSV,8,3             ; @AV_PIX_FMT_QSV
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QSVVPP gets a wrong frame.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unsupported frame.\n"

	.comm	_default_tb,4,2                 ; @default_tb
	.comm	_MFX_PICSTRUCT_PROGRESSIVE,4,2  ; @MFX_PICSTRUCT_PROGRESSIVE
	.comm	_MFX_PICSTRUCT_FIELD_TFF,4,2    ; @MFX_PICSTRUCT_FIELD_TFF
	.comm	_MFX_PICSTRUCT_FIELD_BFF,4,2    ; @MFX_PICSTRUCT_FIELD_BFF
	.comm	_MFX_PICSTRUCT_FIELD_REPEATED,4,2 ; @MFX_PICSTRUCT_FIELD_REPEATED
	.comm	_MFX_PICSTRUCT_FRAME_DOUBLING,4,2 ; @MFX_PICSTRUCT_FRAME_DOUBLING
	.comm	_MFX_PICSTRUCT_FRAME_TRIPLING,4,2 ; @MFX_PICSTRUCT_FRAME_TRIPLING
	.no_dead_strip	_submit_frame
.subsections_via_symbols
