	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function filter_slice
_filter_slice:                          ## @filter_slice
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movl	%edx, %r13d
	movq	(%rdi), %r12
	movq	%r12, -136(%rbp)                ## 8-byte Spill
	movq	40(%r12), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movslq	%edx, %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	24(%rsi), %rax
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	movq	16(%rsi), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %eax
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	movl	4(%rsi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movslq	8(%rsi), %rcx
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	movq	8(%r12), %rax
	movslq	(%rax,%rcx,4), %rbx
	movq	16(%r12), %rax
	movslq	(%rax,%rcx,4), %r15
	movq	%r15, %rsi
	subq	32(%r12), %rsi
	movl	(%r12), %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%edi, %edi
	callq	_FFMAX
	movl	%eax, %r14d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	subq	32(%r12), %rbx
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_FFMAX
	movq	%r15, %r8
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $eax killed $eax def $rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	leal	(%rsi,%r15), %eax
	decl	%eax
	cltd
	idivl	%esi
	movl	%eax, %ecx
	imull	%r13d, %eax
	cltd
	idivl	%ebx
	movl	%eax, %r15d
	imull	%esi, %r15d
	leal	-1(%rbx), %eax
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	movq	%rdx, %rdi
	cmpl	%edx, %eax
	movq	%r13, -144(%rbp)                ## 8-byte Spill
	jne	LBB0_2
## %bb.1:
	leal	(%r14,%rsi), %r12d
	jmp	LBB0_3
LBB0_2:
	leal	1(%r13), %eax
	imull	%eax, %ecx
	movl	%ecx, %eax
	cltd
	idivl	%ebx
	movl	%eax, %r12d
	imull	%esi, %r12d
LBB0_3:
	movq	%rdi, %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax,%rdi,8), %edi
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	imull	%r8d, %r13d
	shll	$2, %r13d
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_memset
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%rbx,8), %edi
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_memset
	cmpl	%r12d, %r15d
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movq	-104(%rbp), %rax                ## 8-byte Reload
	jge	LBB0_9
## %bb.4:
	leal	(%rax,%r8), %edx
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	movq	%r14, -120(%rbp)                ## 8-byte Spill
	movl	%r12d, -72(%rbp)                ## 4-byte Spill
	movq	-144(%rbp), %rbx                ## 8-byte Reload
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	addl	%r8d, %ecx
	movl	-72(%rbp), %r12d                ## 4-byte Reload
	cmpl	%r12d, %ecx
	movq	-120(%rbp), %r14                ## 8-byte Reload
	movl	%ecx, %r15d
	jge	LBB0_9
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	cmpl	%r14d, %r15d
	cmovgel	%r14d, %r15d
	cmpl	$0, -64(%rbp)                   ## 4-byte Folded Reload
	movq	-136(%rbp), %rdi                ## 8-byte Reload
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r15d, %ecx
	movq	-128(%rbp), %r12                ## 8-byte Reload
	jle	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r13d, %r13d
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%eax, %r13d
	movl	%eax, %r14d
	cmovll	%r13d, %r14d
	subq	$8, %rsp
	movq	%rdi, %r15
	movl	%r14d, %r8d
	movl	%r12d, %r9d
	pushq	%rbx
	callq	_block_matching
	addq	$8, %rsp
	movq	%r15, %rdi
	movq	-152(%rbp), %rsi                ## 8-byte Reload
	movl	-92(%rbp), %edx                 ## 4-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	-56(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rbx
	pushq	%r12
	pushq	%r14
	callq	*24(%r15)
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%r15, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	addq	$32, %rsp
	addl	%r8d, %r14d
	cmpl	%r13d, %eax
	movl	%r14d, %r13d
	jg	LBB0_7
	jmp	LBB0_8
LBB0_9:
	xorl	%eax, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_filter_slice
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function filter_slice
_filter_slice:                          ; @filter_slice
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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 w27, -88
	.cfi_offset w28, -96
	mov	x24, x3
	mov	x19, x2
	ldr	x20, [x0]
	sxtw	x23, w19
	ldr	w21, [x20]
	ldr	x8, [x1, #24]
	str	x8, [sp, #64]                   ; 8-byte Folded Spill
	ldr	x9, [x1, #16]
	ldrsw	x8, [x1, #8]
	stp	x8, x9, [sp, #32]               ; 16-byte Folded Spill
	lsl	x8, x8, #2
	ldp	x9, x10, [x20, #8]
	ldrsw	x25, [x9, x8]
	ldr	w9, [x1]
	str	w9, [sp, #60]                   ; 4-byte Folded Spill
	ldr	w9, [x1, #4]
	str	w9, [sp, #28]                   ; 4-byte Folded Spill
	ldrsw	x28, [x10, x8]
	ldr	x8, [x20, #40]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x8, [x20, #32]
	sub	x1, x28, x8
	mov	w0, #0
	bl	_FFMAX
	mov	x22, x0
	ldr	x8, [x20, #32]
	sub	x1, x25, x8
	mov	w0, #0
	bl	_FFMAX
	mov	x10, x21
	mov	x27, x0
	add	w8, w21, w28
	sub	w8, w8, #1
	sdiv	w8, w8, w21
	mul	w9, w8, w19
	sdiv	w9, w9, w24
	mul	w26, w9, w21
	sub	w9, w24, #1
	cmp	w9, w19
	str	w21, [sp, #76]                  ; 4-byte Folded Spill
	str	x19, [sp, #48]                  ; 8-byte Folded Spill
	b.ne	LBB0_2
; %bb.1:
	add	w19, w22, w10
	b	LBB0_3
LBB0_2:
	madd	w8, w8, w19, w8
	sdiv	w8, w8, w24
	mul	w19, w8, w10
LBB0_3:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x21, x8, x23, lsl #3
	ldr	w0, [x21, #4]
	mul	w8, w25, w28
	lsl	w28, w8, #2
	mov	w1, #0
	mov	x2, x28
	bl	_memset
	ldr	w0, [x21]
	mov	w1, #0
	mov	x2, x28
	bl	_memset
	cmp	w26, w19
	ldr	w9, [sp, #76]                   ; 4-byte Folded Reload
	b.ge	LBB0_9
; %bb.4:
	add	w8, w27, w9
	str	w8, [sp, #8]                    ; 4-byte Folded Spill
	stp	w19, w22, [sp, #20]             ; 8-byte Folded Spill
	ldp	x25, x23, [sp, #32]             ; 16-byte Folded Reload
	ldr	w24, [sp, #28]                  ; 4-byte Folded Reload
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	w26, w28, w9
	ldp	w19, w22, [sp, #20]             ; 8-byte Folded Reload
	cmp	w26, w19
	b.ge	LBB0_9
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	cmp	w26, w22
	csel	w28, w26, w22, lt
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	cmp	w8, #1
	ldr	w19, [sp, #60]                  ; 4-byte Folded Reload
	ldr	x22, [sp, #48]                  ; 8-byte Folded Reload
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w21, #0
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w21, w27
	csel	w26, w21, w27, lt
	mov	x0, x20
	mov	x1, x23
	mov	x2, x24
	mov	x3, x28
	mov	x4, x26
	mov	x5, x25
	mov	x6, x22
	bl	_block_matching
	ldr	x8, [x20, #24]
	str	w22, [sp]
	mov	x0, x20
	ldr	x1, [sp, #64]                   ; 8-byte Folded Reload
	mov	x2, x19
	mov	x3, x23
	mov	x4, x24
	mov	x5, x28
	mov	x6, x26
	mov	x7, x25
	blr	x8
	ldr	w9, [sp, #76]                   ; 4-byte Folded Reload
	add	w8, w26, w9
	cmp	w27, w21
	mov	x21, x8
	b.gt	LBB0_8
	b	LBB0_5
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_filter_slice
.subsections_via_symbols
