	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function filter_frame
LCPI0_0:
	.space	4
	.long	1                               ## 0x1
	.space	4
	.space	4
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r13
	movq	(%r13), %rax
	movq	8(%r13), %rbx
	movq	(%rbx), %rcx
	movq	32(%rbx), %rdx
	movq	8(%rdx), %rdx
	movq	(%rdx), %r12
	movq	(%rax), %r15
	movq	40(%rbx), %rax
	shlq	$4, %rcx
	movq	(%rax,%rcx), %r14
	movq	48(%rbx), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	$0, -88(%rbp)
	movq	(%rbx), %rax
	movq	40(%rbx), %rcx
	shlq	$4, %rax
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, 8(%rcx,%rax)
	movq	32(%rbx), %rax
	movl	(%rax), %edi
	callq	*24(%r12)
	movl	%eax, %edi
	callq	_CHECK_CU
	testl	%eax, %eax
	js	LBB0_8
## %bb.1:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rbx), %rdi
	movq	_HIST_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	shll	$2, %edx
	movl	16(%rbx), %ecx
	xorl	%esi, %esi
	callq	*16(%r12)
	movl	%eax, %edi
	callq	_CHECK_CU
	movq	24(%rbx), %rsi
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_thumbnail
	movq	_CU_MEMORYTYPE_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -92(%rbp)
	movq	_CU_MEMORYTYPE_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	24(%rbx), %rax
	movq	%rax, -104(%rbp)
	movl	(%r15), %eax
	shll	$2, %eax
	movdqa	LCPI0_0(%rip), %xmm0            ## xmm0 = <u,1,u,u>
	pinsrd	$0, %eax, %xmm0
	movq	%r14, -128(%rbp)
	pshufd	$64, %xmm0, %xmm0               ## xmm0 = xmm0[0,0,0,1]
	movdqu	%xmm0, -120(%rbp)
	movl	16(%rbx), %esi
	leaq	-128(%rbp), %rdi
	callq	*8(%r12)
	movl	%eax, %edi
	callq	_CHECK_CU
	testl	%eax, %eax
	js	LBB0_8
## %bb.2:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_AV_PIX_FMT_NV12@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_AV_PIX_FMT_YUV420P@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%dl
	orb	%cl, %dl
	movq	_AV_PIX_FMT_P010LE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_AV_PIX_FMT_P016LE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	sete	%al
	orb	%cl, %al
	orb	%dl, %al
	cmpb	$1, %al
	jne	LBB0_6
## %bb.3:
	cmpl	$257, (%r15)                    ## imm = 0x101
	jl	LBB0_6
## %bb.4:
	movl	$256, %eax                      ## imm = 0x100
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	shll	$2, (%r14,%rax,4)
	incq	%rax
	movslq	(%r15), %rcx
	cmpq	%rcx, %rax
	jl	LBB0_5
LBB0_6:
	leaq	-76(%rbp), %rdi
	callq	*(%r12)
	movl	%eax, %edi
	callq	_CHECK_CU
	movq	(%rbx), %rcx
	incq	%rcx
	movq	%rcx, (%rbx)
	xorl	%eax, %eax
	cmpq	8(%rbx), %rcx
	jb	LBB0_8
## %bb.7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_get_best_frame
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_ff_filter_frame
LBB0_8:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HIST_SIZE,4,2                  ## @HIST_SIZE
	.comm	_CU_MEMORYTYPE_DEVICE,4,2       ## @CU_MEMORYTYPE_DEVICE
	.comm	_CU_MEMORYTYPE_HOST,4,2         ## @CU_MEMORYTYPE_HOST
	.comm	_AV_PIX_FMT_NV12,8,3            ## @AV_PIX_FMT_NV12
	.comm	_AV_PIX_FMT_YUV420P,8,3         ## @AV_PIX_FMT_YUV420P
	.comm	_AV_PIX_FMT_P010LE,8,3          ## @AV_PIX_FMT_P010LE
	.comm	_AV_PIX_FMT_P016LE,8,3          ## @AV_PIX_FMT_P016LE
	.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, #144
	.cfi_def_cfa_offset 144
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	ldr	x19, [x0]
	ldp	x8, x22, [x19]
	ldp	x9, x10, [x22, #32]
	ldr	x9, [x9, #8]
	ldr	x23, [x9]
	ldr	x20, [x8]
	ldr	x8, [x22]
	lsl	x8, x8, #4
	ldr	x24, [x10, x8]
	ldr	x8, [x22, #48]
	ldr	x26, [x8]
	str	xzr, [sp, #48]
	ldr	x8, [x22, #40]
	ldr	x9, [x22]
	add	x8, x8, x9, lsl #4
	str	x1, [x8, #8]
	ldr	x8, [x23, #24]
	ldr	x9, [x22, #32]
	ldr	w0, [x9]
	blr	x8
	bl	_CHECK_CU
	tbnz	w0, #31, LBB0_9
; %bb.1:
	ldr	x8, [x23, #16]
	ldr	x0, [x22, #24]
Lloh0:
	adrp	x25, _HIST_SIZE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _HIST_SIZE@GOTPAGEOFF]
	ldr	w9, [x25]
	lsl	w2, w9, #2
	ldr	w3, [x22, #16]
	mov	w1, #0
	blr	x8
	bl	_CHECK_CU
	ldr	x1, [x22, #24]
	mov	x0, x19
	mov	x2, x21
	bl	_thumbnail
Lloh2:
	adrp	x8, _CU_MEMORYTYPE_DEVICE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CU_MEMORYTYPE_DEVICE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _CU_MEMORYTYPE_HOST@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CU_MEMORYTYPE_HOST@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #40]
	ldr	x8, [x22, #24]
	str	x8, [sp, #32]
	str	x24, [sp, #8]
	ldr	w8, [x25]
	lsl	w8, w8, #2
	stp	w8, w8, [sp, #16]
	mov	w9, #1
	stp	w8, w9, [sp, #24]
	ldr	x8, [x23, #8]
	ldr	w1, [x22, #16]
	add	x0, sp, #8
	blr	x8
	bl	_CHECK_CU
	tbnz	w0, #31, LBB0_9
; %bb.2:
	ldr	x8, [x26]
Lloh8:
	adrp	x9, _AV_PIX_FMT_NV12@GOTPAGE
Lloh9:
	ldr	x9, [x9, _AV_PIX_FMT_NV12@GOTPAGEOFF]
Lloh10:
	adrp	x10, _AV_PIX_FMT_YUV420P@GOTPAGE
Lloh11:
	ldr	x10, [x10, _AV_PIX_FMT_YUV420P@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
Lloh13:
	ldr	x10, [x10]
Lloh14:
	adrp	x11, _AV_PIX_FMT_P010LE@GOTPAGE
Lloh15:
	ldr	x11, [x11, _AV_PIX_FMT_P010LE@GOTPAGEOFF]
Lloh16:
	adrp	x12, _AV_PIX_FMT_P016LE@GOTPAGE
Lloh17:
	ldr	x12, [x12, _AV_PIX_FMT_P016LE@GOTPAGEOFF]
Lloh18:
	ldr	x11, [x11]
Lloh19:
	ldr	x12, [x12]
	cmp	x8, x12
	ccmp	x8, x11, #4, ne
	ccmp	x8, x10, #4, ne
	ccmp	x8, x9, #4, ne
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x25]
	cmp	w8, #257
	b.lt	LBB0_6
; %bb.4:
	mov	w8, #256
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	lsl	x9, x8, #2
	ldr	w10, [x24, x9]
	lsl	w10, w10, #2
	str	w10, [x24, x9]
	add	x8, x8, #1
	ldrsw	x9, [x25]
	cmp	x8, x9
	b.lt	LBB0_5
LBB0_6:
	ldr	x8, [x23]
	add	x0, sp, #60
	blr	x8
	bl	_CHECK_CU
	ldp	x8, x9, [x22]
	add	x8, x8, #1
	str	x8, [x22]
	cmp	x8, x9
	b.hs	LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_get_best_frame
	mov	x1, x0
	mov	x0, x20
	bl	_ff_filter_frame
LBB0_9:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh18
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_HIST_SIZE,4,2                  ; @HIST_SIZE
	.comm	_CU_MEMORYTYPE_DEVICE,4,2       ; @CU_MEMORYTYPE_DEVICE
	.comm	_CU_MEMORYTYPE_HOST,4,2         ; @CU_MEMORYTYPE_HOST
	.comm	_AV_PIX_FMT_NV12,8,3            ; @AV_PIX_FMT_NV12
	.comm	_AV_PIX_FMT_YUV420P,8,3         ; @AV_PIX_FMT_YUV420P
	.comm	_AV_PIX_FMT_P010LE,8,3          ; @AV_PIX_FMT_P010LE
	.comm	_AV_PIX_FMT_P016LE,8,3          ; @AV_PIX_FMT_P016LE
	.no_dead_strip	_filter_frame
.subsections_via_symbols
