	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rsi, -48(%rbp)
	movq	(%rdi), %r12
	movq	8(%r12), %r13
	movq	8(%r13), %rdi
	movq	48(%r13), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdx
	callq	_update_histogram_diff
	jmp	LBB0_3
LBB0_2:
	movq	%r15, %rsi
	callq	_update_histogram_frame
LBB0_3:
	movl	%eax, %r14d
	testl	%eax, %eax
	jle	LBB0_5
## %bb.4:
	movl	%r14d, %eax
	addq	%rax, 32(%r13)
LBB0_5:
	movq	(%r13), %rax
	movq	_STATS_MODE_DIFF_FRAMES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	addq	$48, %r13
	movq	%r13, %rdi
	callq	_av_frame_free
	movq	%r15, (%r13)
	jmp	LBB0_13
LBB0_7:
	movq	_STATS_MODE_SINGLE_FRAMES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.8:
	movq	%r12, %rdi
	callq	_get_palette_frame
	movq	%rax, %r14
	movl	(%r15), %eax
	movl	%eax, (%r14)
	leaq	-48(%rbp), %rdi
	callq	_av_frame_free
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_ff_filter_frame
	movl	%eax, %r14d
	movq	_HIST_SIZE@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_11
## %bb.9:
	xorl	%r12d, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rdi
	addq	%r12, %rdi
	callq	_av_freep
	incq	%rbx
	movslq	(%r15), %rax
	addq	$4, %r12
	cmpq	%rax, %rbx
	jl	LBB0_10
LBB0_11:
	leaq	40(%r13), %rdi
	callq	_av_freep
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r13)
	movq	16(%r13), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	8(%r13), %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	jmp	LBB0_13
LBB0_12:
	leaq	-48(%rbp), %rdi
	callq	_av_frame_free
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STATS_MODE_DIFF_FRAMES,8,3     ## @STATS_MODE_DIFF_FRAMES
	.comm	_STATS_MODE_SINGLE_FRAMES,8,3   ## @STATS_MODE_SINGLE_FRAMES
	.comm	_HIST_SIZE,4,2                  ## @HIST_SIZE
	.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, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	str	x1, [sp, #8]
	ldr	x21, [x0]
	ldr	x23, [x21, #8]
	mov	x22, x23
	ldr	x1, [x22, #48]!
	ldr	x0, [x23, #8]
	cbz	x1, LBB0_2
; %bb.1:
	mov	x2, x20
	bl	_update_histogram_diff
	b	LBB0_3
LBB0_2:
	mov	x1, x20
	bl	_update_histogram_frame
LBB0_3:
	mov	x19, x0
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.4:
	ldr	x8, [x23, #32]
	add	x8, x8, w19, uxtw
	str	x8, [x23, #32]
LBB0_5:
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _STATS_MODE_DIFF_FRAMES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STATS_MODE_DIFF_FRAMES@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x22
	bl	_av_frame_free
	str	x20, [x22]
	b	LBB0_13
LBB0_7:
Lloh3:
	adrp	x9, _STATS_MODE_SINGLE_FRAMES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STATS_MODE_SINGLE_FRAMES@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.8:
	mov	x0, x21
	bl	_get_palette_frame
	mov	x19, x0
	ldr	w8, [x20]
	str	w8, [x0]
	add	x0, sp, #8
	bl	_av_frame_free
	ldr	x8, [x21]
	ldr	w0, [x8]
	mov	x1, x19
	bl	_ff_filter_frame
	mov	x19, x0
Lloh6:
	adrp	x20, _HIST_SIZE@GOTPAGE
Lloh7:
	ldr	x20, [x20, _HIST_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.9:
	mov	x21, #0
	mov	x22, #0
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23, #8]
	add	x0, x8, x21
	bl	_av_freep
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #4
	cmp	x22, x8
	b.lt	LBB0_10
LBB0_11:
	add	x0, x23, #40
	bl	_av_freep
	stp	xzr, xzr, [x23, #24]
	ldr	x0, [x23, #16]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x0, [x23, #8]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	b	LBB0_13
LBB0_12:
	add	x0, sp, #8
	bl	_av_frame_free
LBB0_13:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_STATS_MODE_DIFF_FRAMES,8,3     ; @STATS_MODE_DIFF_FRAMES
	.comm	_STATS_MODE_SINGLE_FRAMES,8,3   ; @STATS_MODE_SINGLE_FRAMES
	.comm	_HIST_SIZE,4,2                  ; @HIST_SIZE
	.no_dead_strip	_filter_frame
.subsections_via_symbols
