	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qsvscale_filter_frame
_qsvscale_filter_frame:                 ## @qsvscale_filter_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	%rsi, -64(%rbp)
	movq	8(%rdi), %r15
	movq	(%r15), %rax
	movq	8(%r15), %r14
	movq	(%rax), %rbx
	movq	$0, -48(%rbp)
	movl	(%rbx), %esi
	movl	4(%rbx), %edx
	movq	%rbx, %rdi
	callq	_ff_get_video_buffer
	movq	%rax, -88(%rbp)
	testq	%rax, %rax
	je	LBB0_14
## %bb.1:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %r15
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	_MFX_WRN_DEVICE_BUSY@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpq	%rax, %r13
	movq	%rbx, %rax
	jne	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %edi
	movq	24(%r15), %rcx
	movq	24(%rcx), %rsi
	movq	%rax, %rbx
	movq	24(%rax), %rax
	movq	24(%rax), %rdx
	xorl	%ecx, %ecx
	leaq	-48(%rbp), %r8
	callq	_MFXVideoVPP_RunFrameVPPAsync
	movq	%rax, %r13
	movq	(%r12), %rax
	cmpq	%rax, %r13
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_av_usleep
	movq	(%r12), %rax
	jmp	LBB0_4
LBB0_5:
	testq	%r13, %r13
	js	LBB0_18
## %bb.6:
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_18
## %bb.7:
	movl	(%r14), %edi
	movl	$1000, %edx                     ## imm = 0x3E8
	callq	_MFXVideoCORE_SyncOperation
	movq	_MFX_WRN_IN_EXECUTION@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	movq	%r15, %r13
	jne	LBB0_9
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	-48(%rbp), %rsi
	movl	(%r14), %edi
	movl	$1000, %edx                     ## imm = 0x3E8
	callq	_MFXVideoCORE_SyncOperation
	cmpq	(%r12), %rax
	je	LBB0_8
LBB0_9:
	testq	%rax, %rax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	js	LBB0_10
## %bb.12:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_av_frame_copy_props
	testl	%eax, %eax
	js	LBB0_15
## %bb.13:
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movl	(%r14), %ecx
	movl	%ecx, (%rbx)
	movl	4(%r14), %edx
	movl	%edx, 4(%rbx)
	leaq	16(%rbx), %rdi
	movq	%rbx, %rsi
	addq	$8, %rsi
	imull	16(%r13), %edx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	imull	(%rax), %edx
	imull	8(%r13), %ecx
	imull	4(%rax), %ecx
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	callq	_av_reduce
	leaq	-64(%rbp), %rdi
	callq	_av_frame_free
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_ff_filter_frame
	movl	%eax, %r15d
	jmp	LBB0_17
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_15:
	movl	%eax, %r15d
	jmp	LBB0_16
LBB0_18:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_av_log
	jmp	LBB0_11
LBB0_10:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_av_log
LBB0_11:
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_16:
	leaq	-64(%rbp), %rdi
	callq	_av_frame_free
	leaq	-88(%rbp), %rdi
	callq	_av_frame_free
LBB0_17:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MFX_WRN_DEVICE_BUSY,8,3        ## @MFX_WRN_DEVICE_BUSY
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error during scaling\n"

	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.comm	_MFX_WRN_IN_EXECUTION,8,3       ## @MFX_WRN_IN_EXECUTION
L_.str.1:                               ## @.str.1
	.asciz	"Error synchronizing the operation: %d\n"

	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.no_dead_strip	_qsvscale_filter_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qsvscale_filter_frame
_qsvscale_filter_frame:                 ; @qsvscale_filter_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x1
	mov	x22, x0
	str	x1, [sp, #24]
	ldr	x23, [x0, #8]
	ldp	x8, x25, [x23]
	ldr	x19, [x8]
	str	xzr, [sp, #16]
	ldp	w1, w2, [x19]
	mov	x0, x19
	bl	_ff_get_video_buffer
	str	x0, [sp, #8]
	cbz	x0, LBB0_10
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x26, _MFX_WRN_DEVICE_BUSY@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MFX_WRN_DEVICE_BUSY@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	x24, x8
	b.ne	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	ldr	x8, [x21, #24]
	ldr	x1, [x8, #24]
	ldr	x8, [x20, #24]
	ldr	x2, [x8, #24]
	add	x4, sp, #16
	mov	x3, #0
	bl	_MFXVideoVPP_RunFrameVPPAsync
	mov	x24, x0
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_av_usleep
	ldr	x8, [x26]
	b	LBB0_2
LBB0_5:
	tbnz	x24, #63, LBB0_12
; %bb.6:
	ldr	x1, [sp, #16]
	cbz	x1, LBB0_12
; %bb.7:
	ldr	w0, [x25]
	mov	w2, #1000
	bl	_MFXVideoCORE_SyncOperation
Lloh2:
	adrp	x24, _MFX_WRN_IN_EXECUTION@GOTPAGE
Lloh3:
	ldr	x24, [x24, _MFX_WRN_IN_EXECUTION@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x1, [sp, #16]
	ldr	w0, [x25]
	mov	w2, #1000
	bl	_MFXVideoCORE_SyncOperation
	b	LBB0_8
LBB0_10:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_11:
	mov	x23, x0
	b	LBB0_18
LBB0_12:
Lloh7:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x2, l_.str@PAGE
Lloh11:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_17
LBB0_13:
	tbnz	x0, #63, LBB0_16
; %bb.14:
	mov	x0, x20
	mov	x1, x21
	bl	_av_frame_copy_props
	tbnz	w0, #31, LBB0_11
; %bb.15:
	ldr	w8, [x19]
	str	w8, [x20]
	ldr	w9, [x19, #4]
	str	w9, [x20, #4]
	add	x0, x20, #16
	add	x1, x20, #8
	ldr	w10, [x21, #16]
	mul	w9, w9, w10
	ldp	w10, w11, [x22]
	mul	w2, w9, w10
	ldr	w9, [x21, #8]
	mul	w8, w8, w9
	mul	w3, w8, w11
Lloh12:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
	bl	_av_reduce
	add	x0, sp, #24
	bl	_av_frame_free
	mov	x0, x19
	mov	x1, x20
	bl	_ff_filter_frame
	mov	x23, x0
	b	LBB0_19
LBB0_16:
Lloh15:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	str	x0, [sp]
Lloh18:
	adrp	x2, l_.str.1@PAGE
Lloh19:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_17:
	mov	x0, x23
	bl	_av_log
Lloh20:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh22:
	ldr	w23, [x8]
LBB0_18:
	add	x0, sp, #24
	bl	_av_frame_free
	add	x0, sp, #8
	bl	_av_frame_free
LBB0_19:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MFX_WRN_DEVICE_BUSY,8,3        ; @MFX_WRN_DEVICE_BUSY
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error during scaling\n"

	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.comm	_MFX_WRN_IN_EXECUTION,8,3       ; @MFX_WRN_IN_EXECUTION
l_.str.1:                               ; @.str.1
	.asciz	"Error synchronizing the operation: %d\n"

	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.no_dead_strip	_qsvscale_filter_frame
.subsections_via_symbols
