	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function filter_frame
_filter_frame:                          ## @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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rdi), %r12
	movq	8(%r12), %rbx
	leaq	16(%rbx), %r13
	movq	(%r12), %rax
	movq	(%rax), %r15
	cmpq	$0, 8(%rbx)
	jle	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	callq	_av_frame_is_writable
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	cmpl	$0, (%r13)
	jle	LBB0_6
LBB0_4:
	movl	$1, %eax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	incq	%rax
	jmp	LBB0_5
LBB0_2:
	movq	%r14, %rdi
	callq	_av_frame_make_writable
	cmpl	$0, (%r13)
	jg	LBB0_4
LBB0_6:
	leaq	-44(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	movq	%r13, %rdi
	callq	_vsMotionDetection
	movq	_VS_OK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.8:
	movl	(%rbx), %esi
	leaq	-44(%rbp), %rdx
	movq	%r13, %rdi
	movq	%rcx, %rbx
	callq	_vsWriteToFile
	cmpq	(%rbx), %rax
	jne	LBB0_9
## %bb.10:
	leaq	-44(%rbp), %rdi
	callq	_vs_vector_del
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_ff_filter_frame
	jmp	LBB0_11
LBB0_7:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
	movq	_AVERROR_EXTERNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
LBB0_11:
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_9:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	movl	%eax, %ebx
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%r12, %rdi
	callq	_av_log
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VS_OK,8,3                      ## @VS_OK
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"motion detection failed"

	.comm	_AVERROR_EXTERNAL,4,2           ## @AVERROR_EXTERNAL
	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"cannot write to transform file"

	.no_dead_strip	_filter_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function filter_frame
_filter_frame:                          ; @filter_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x20, x1
	ldr	x19, [x0]
	ldp	x8, x23, [x19]
	add	x22, x23, #16
	ldr	x21, [x8]
	ldr	x8, [x23, #8]
	cmp	x8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_av_frame_is_writable
	cbnz	w0, LBB0_3
; %bb.2:
	mov	x0, x20
	bl	_av_frame_make_writable
LBB0_3:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w8, #1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x8, x8, #1
	b	LBB0_5
LBB0_6:
	add	x1, sp, #28
	add	x2, sp, #8
	mov	x0, x22
	bl	_vsMotionDetection
Lloh0:
	adrp	x24, _VS_OK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _VS_OK@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_9
; %bb.7:
	ldr	w1, [x23]
	add	x2, sp, #28
	mov	x0, x22
	bl	_vsWriteToFile
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.8:
	add	x0, sp, #28
	bl	_vs_vector_del
	mov	x0, x21
	mov	x1, x20
	bl	_ff_filter_frame
	b	LBB0_10
LBB0_9:
Lloh2:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_av_log
Lloh7:
	adrp	x8, _AVERROR_EXTERNAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _AVERROR_EXTERNAL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_AVERROR
LBB0_10:
	mov	x20, x0
	b	LBB0_12
LBB0_11:
Lloh10:
	adrp	x8, _errno@GOTPAGE
Lloh11:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_AVERROR
	mov	x20, x0
Lloh13:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x2, l_.str.1@PAGE
Lloh17:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_av_log
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_VS_OK,8,3                      ; @VS_OK
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"motion detection failed"

	.comm	_AVERROR_EXTERNAL,4,2           ; @AVERROR_EXTERNAL
	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"cannot write to transform file"

	.no_dead_strip	_filter_frame
.subsections_via_symbols
