	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal4,4byte_literals
	.p2align	2                               ## -- Begin function filter_frame
LCPI0_0:
	.long	0x3f800000                      ## float 1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rax), %r15
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rdi
	callq	_av_frame_clone
	movq	24(%r15), %rcx
	movl	%eax, (%rcx)
	cmpl	$2, (%r15)
	jl	LBB0_3
## %bb.1:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %edi
	callq	_downscale
	movq	24(%r15), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movslq	(%r15), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_2
LBB0_3:
	movl	4(%r15), %esi
	movl	44(%r15), %edi
	addl	$-8, %esi
	callq	_FFMAX
	movl	%eax, %r12d
	movl	4(%r15), %esi
	movl	40(%r15), %edi
	addl	$8, %esi
	callq	_FFMIN
	movl	%eax, %r13d
	movl	8(%r15), %esi
	movl	36(%r15), %edi
	addl	$-8, %esi
	callq	_FFMAX
	movl	%eax, %r14d
	movl	8(%r15), %esi
	movl	32(%r15), %edi
	addl	$8, %esi
	callq	_FFMIN
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	leaq	-44(%rbp), %r10
	leaq	-48(%rbp), %rbx
	movss	LCPI0_0(%rip), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r12d, %ecx
	movl	%r13d, %r8d
	movl	%r14d, %r9d
	pushq	%r10
	movq	%r10, %r14
	pushq	%rbx
	pushq	%rax
	callq	_search
	addq	$32, %rsp
	movl	(%r15), %edx
	movl	32(%r15), %eax
	decl	%edx
	movl	44(%r15), %ecx
	movl	40(%r15), %r8d
	movl	36(%r15), %r9d
	subq	$8, %rsp
	movq	%r15, %rdi
	xorl	%esi, %esi
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	callq	_search
	addq	$32, %rsp
	movss	%xmm0, -52(%rbp)                ## 4-byte Spill
	movq	_MAX_MIPMAPS@GOTPCREL(%rip), %r14
	cmpl	$0, (%r14)
	jle	LBB0_6
## %bb.4:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rdi
	addq	%r12, %rdi
	callq	_av_frame_free
	incq	%rbx
	movslq	(%r14), %rax
	addq	$4, %r12
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movss	-52(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	ucomiss	12(%r15), %xmm0
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	ja	LBB0_8
## %bb.7:
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-48(%rbp), %ecx
	movl	-44(%rbp), %r8d
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_av_log
	movl	-48(%rbp), %eax
	movl	%eax, 4(%r15)
	movl	-44(%rbp), %eax
	movl	%eax, 8(%r15)
	movq	%rbx, %rdi
	callq	_av_frame_make_writable
	movq	16(%r15), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_av_dict_set_int
	movq	16(%r15), %rax
	movl	4(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_av_dict_set_int
	movl	-48(%rbp), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_av_dict_set_int
	movl	-44(%rbp), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%ecx, %ecx
	callq	_av_dict_set_int
LBB0_8:
	movq	(%r14), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_ff_filter_frame
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_MIPMAPS,4,2                ## @MAX_MIPMAPS
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Found at %d %d score %f\n"

L_.str.1:                               ## @.str.1
	.asciz	"lavfi.rect.w"

L_.str.2:                               ## @.str.2
	.asciz	"lavfi.rect.h"

L_.str.3:                               ## @.str.3
	.asciz	"lavfi.rect.x"

L_.str.4:                               ## @.str.4
	.asciz	"lavfi.rect.y"

	.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, #112
	.cfi_def_cfa_offset 112
	stp	d9, d8, [sp, #16]               ; 16-byte Folded Spill
	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
	.cfi_offset b8, -88
	.cfi_offset b9, -96
	mov	x19, x1
	ldr	x20, [x0]
	ldr	x21, [x20, #8]
	mov	x0, x1
	bl	_av_frame_clone
	ldr	x8, [x21, #24]
	str	w0, [x8]
	ldr	w8, [x21]
	cmp	w8, #1
	b.le	LBB0_3
; %bb.1:
	mov	w22, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	bl	_downscale
	ldr	x8, [x21, #24]
	str	w0, [x8, x22, lsl #2]
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.lt	LBB0_2
LBB0_3:
	ldr	w0, [x21, #44]
	ldr	w8, [x21, #4]
	sub	w1, w8, #8
	bl	_FFMAX
	mov	x22, x0
	ldr	w0, [x21, #40]
	ldr	w8, [x21, #4]
	add	w1, w8, #8
	bl	_FFMIN
	mov	x23, x0
	ldr	w0, [x21, #36]
	ldr	w8, [x21, #8]
	sub	w1, w8, #8
	bl	_FFMAX
	mov	x24, x0
	ldr	w0, [x21, #32]
	ldr	w8, [x21, #8]
	add	w1, w8, #8
	bl	_FFMIN
	mov	x6, x0
	add	x25, sp, #8
	str	x25, [sp]
	add	x7, sp, #12
	fmov	s0, #1.00000000
	mov	x0, x21
	mov	w1, #0
	mov	w2, #0
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	bl	_search
	ldr	w8, [x21]
	sub	w2, w8, #1
	ldp	w4, w3, [x21, #40]
	ldp	w6, w5, [x21, #32]
	str	x25, [sp]
	add	x7, sp, #12
	mov	x0, x21
	mov	w1, #0
	bl	_search
	fmov	s8, s0
Lloh0:
	adrp	x22, _MAX_MIPMAPS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_MIPMAPS@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x23, #0
	mov	x24, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #24]
	add	x0, x8, x23
	bl	_av_frame_free
	add	x24, x24, #1
	ldrsw	x8, [x22]
	add	x23, x23, #4
	cmp	x24, x8
	b.lt	LBB0_5
LBB0_6:
	ldr	s0, [x21, #12]
	fcmp	s8, s0
	b.gt	LBB0_8
; %bb.7:
Lloh2:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	ldp	w4, w3, [sp, #8]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	fmov	s0, s8
	bl	_av_log
	ldp	w9, w8, [sp, #8]
	stp	w8, w9, [x21, #4]
	mov	x0, x19
	bl	_av_frame_make_writable
	ldr	x8, [x21, #16]
	ldr	w2, [x8]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w3, #0
	bl	_av_dict_set_int
	ldr	x8, [x21, #16]
	ldr	w2, [x8, #4]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	w3, #0
	bl	_av_dict_set_int
	ldr	w2, [sp, #12]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	w3, #0
	bl	_av_dict_set_int
	ldr	w2, [sp, #8]
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	w3, #0
	bl	_av_dict_set_int
LBB0_8:
	ldr	x8, [x20]
	ldr	w0, [x8]
	mov	x1, x19
	bl	_ff_filter_frame
	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
	ldp	d9, d8, [sp, #16]               ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_MIPMAPS,4,2                ; @MAX_MIPMAPS
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Found at %d %d score %f\n"

l_.str.1:                               ; @.str.1
	.asciz	"lavfi.rect.w"

l_.str.2:                               ; @.str.2
	.asciz	"lavfi.rect.h"

l_.str.3:                               ; @.str.3
	.asciz	"lavfi.rect.x"

l_.str.4:                               ; @.str.4
	.asciz	"lavfi.rect.y"

	.no_dead_strip	_filter_frame
.subsections_via_symbols
