	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function deband_8_c
_deband_8_c:                            ## @deband_8_c
	.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	$184, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -104(%rbp)                ## 4-byte Spill
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -128(%rbp)                ## 8-byte Spill
	movq	(%rdi), %rdi
	movl	(%rdi), %r8d
	testl	%r8d, %r8d
	jle	LBB0_17
## %bb.1:
	movq	(%rsi), %rax
	movq	%rax, -176(%rbp)                ## 8-byte Spill
	movq	8(%rsi), %rax
	movq	%rax, -168(%rbp)                ## 8-byte Spill
	movq	-128(%rbp), %rax                ## 8-byte Reload
	incl	%eax
	movl	%eax, -100(%rbp)                ## 4-byte Spill
	movq	24(%rdi), %rsi
	xorl	%ecx, %ecx
	movq	%rdi, -144(%rbp)                ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rdi), %r8d
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	incq	%rcx
	movslq	%r8d, %rax
	cmpq	%rax, %rcx
	jge	LBB0_17
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
	movq	16(%rdi), %rax
	movl	(%rax,%rcx,4), %r10d
	movl	%r10d, %eax
	imull	-128(%rbp), %eax                ## 4-byte Folded Reload
	cltd
	movl	-104(%rbp), %ebx                ## 4-byte Reload
	idivl	%ebx
	movl	%eax, %r9d
	movl	%r10d, %eax
	imull	-100(%rbp), %eax                ## 4-byte Folded Reload
	cltd
	idivl	%ebx
	cmpl	%eax, %r9d
	jge	LBB0_16
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-168(%rbp), %rdx                ## 8-byte Reload
	movq	(%rdx), %r8
	movq	8(%rdx), %rdx
	movq	(%rdx,%rcx,8), %r14
	movq	-176(%rbp), %r15                ## 8-byte Reload
	movq	8(%r15), %rdx
	movq	(%rdx,%rcx,8), %r11
	movslq	(%r8,%rcx,4), %r8
	movq	8(%rdi), %rdx
	movl	(%rdx,%rcx,4), %edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	(%rsi,%rcx,4), %edx
	decl	%edx
	movl	%edx, -112(%rbp)                ## 4-byte Spill
	decl	%r10d
	movl	%r10d, -52(%rbp)                ## 4-byte Spill
	movq	(%r15), %rdx
	movslq	(%rdx,%rcx,4), %rbx
	movslq	%r9d, %r9
	movq	%rbx, %rdx
	imulq	%r9, %rdx
	leaq	(%r11,%rdx,4), %rdx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	shlq	$2, %rbx
	movq	%rbx, -192(%rbp)                ## 8-byte Spill
	movq	%r8, %rdx
	imulq	%r9, %rdx
	movq	%r14, -152(%rbp)                ## 8-byte Spill
	leaq	(%r14,%rdx,4), %rdx
	movq	%rdx, -136(%rbp)                ## 8-byte Spill
	movq	%r8, -96(%rbp)                  ## 8-byte Spill
	leaq	(,%r8,4), %rdx
	movq	%rdx, -184(%rbp)                ## 8-byte Spill
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	leaq	(,%r9,4), %rdx
	movl	%eax, -108(%rbp)                ## 4-byte Spill
	movq	%rcx, -208(%rbp)                ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	incq	%rax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	addq	-192(%rbp), %rdx                ## 8-byte Folded Reload
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	-184(%rbp), %rdx                ## 8-byte Reload
	addq	%rdx, -136(%rbp)                ## 8-byte Folded Spill
	movq	-200(%rbp), %rdx                ## 8-byte Reload
	addq	$4, %rdx
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	cmpl	%eax, -108(%rbp)                ## 4-byte Folded Reload
	je	LBB0_15
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	cmpl	$0, (%rsi,%rcx,4)
	movq	%rdx, -200(%rbp)                ## 8-byte Spill
	jle	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movslq	(%rsi), %rax
	imulq	%rdx, %rax
	movq	%rax, -216(%rbp)                ## 8-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_6 Depth=3
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movl	-72(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	callq	_get_avg
	movl	%eax, %ebx
	movl	%r14d, %edi
	subl	%eax, %edi
	callq	_FFABS
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	cmovll	%ebx, %r14d
LBB0_13:                                ##   in Loop: Header=BB0_6 Depth=3
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	%r14d, (%rax,%r12,4)
	incq	%r12
	movq	-144(%rbp), %rdi                ## 8-byte Reload
	movq	24(%rdi), %rsi
	movq	-208(%rbp), %rcx                ## 8-byte Reload
	movslq	(%rsi,%rcx,4), %rax
	cmpq	%rax, %r12
	jge	LBB0_14
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	%r12, -160(%rbp)                ## 8-byte Spill
	movq	32(%rdi), %rax
	movq	-216(%rbp), %rdx                ## 8-byte Reload
	addq	%rdx, %rax
	movq	40(%rdi), %rcx
	addq	%rdx, %rcx
	movl	(%rcx,%r12,4), %ecx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	leal	(%rcx,%r13), %edi
	movl	%edi, -116(%rbp)                ## 4-byte Spill
	movl	(%rax,%r12,4), %r14d
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	xorl	%esi, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_av_clip
	movl	%eax, %ebx
	imull	-96(%rbp), %ebx                 ## 4-byte Folded Reload
	leal	(%r12,%r14), %r15d
	movl	%r15d, %edi
	xorl	%esi, %esi
	movl	-112(%rbp), %r12d               ## 4-byte Reload
	movl	%r12d, %edx
	callq	_av_clip
	addl	%ebx, %eax
	cltq
	movq	-152(%rbp), %rcx                ## 8-byte Reload
	movl	(%rcx,%rax,4), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
                                        ## kill: def $r13d killed $r13d killed $r13
	subl	-64(%rbp), %r13d                ## 4-byte Folded Reload
	movl	%r13d, %edi
	xorl	%esi, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	callq	_av_clip
	movl	%eax, %ebx
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	imull	%r14d, %ebx
	movl	%r15d, %edi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_av_clip
	addl	%ebx, %eax
	cltq
	movq	-152(%rbp), %r15                ## 8-byte Reload
	movl	(%r15,%rax,4), %eax
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	xorl	%esi, %esi
	movl	-52(%rbp), %r13d                ## 4-byte Reload
	movl	%r13d, %edx
	callq	_av_clip
	movl	%eax, %ebx
	imull	%r14d, %ebx
	movq	-160(%rbp), %rax                ## 8-byte Reload
	movl	%eax, %r14d
	subl	-72(%rbp), %r14d                ## 4-byte Folded Reload
	movl	%r14d, %edi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_av_clip
	addl	%ebx, %eax
	cltq
	movl	(%r15,%rax,4), %eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	-116(%rbp), %edi                ## 4-byte Reload
	xorl	%esi, %esi
	movl	%r13d, %edx
	callq	_av_clip
	movl	%eax, %ebx
	imull	-96(%rbp), %ebx                 ## 4-byte Folded Reload
	movl	%r14d, %edi
	xorl	%esi, %esi
	movl	%r12d, %edx
	movq	-160(%rbp), %r12                ## 8-byte Reload
	callq	_av_clip
	addl	%ebx, %eax
	cltq
	movl	(%r15,%rax,4), %ebx
	movq	-136(%rbp), %rax                ## 8-byte Reload
	movl	(%rax,%r12,4), %r14d
	movq	-144(%rbp), %rax                ## 8-byte Reload
	cmpq	$0, 48(%rax)
	jne	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=3
	movl	-72(%rbp), %r13d                ## 4-byte Reload
	movl	-64(%rbp), %r15d                ## 4-byte Reload
	movl	%r14d, %edi
	subl	-48(%rbp), %edi                 ## 4-byte Folded Reload
	callq	_FFABS
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_13
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=3
	movl	%r14d, %edi
	subl	%r15d, %edi
	callq	_FFABS
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=3
	movl	%r14d, %edi
	subl	%r13d, %edi
	callq	_FFABS
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_6 Depth=3
	movl	%r14d, %edi
	subl	%ebx, %edi
	callq	_FFABS
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=3
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%r15d, %esi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_get_avg
	movl	%eax, %r14d
	jmp	LBB0_13
LBB0_17:
	xorl	%eax, %eax
	addq	$184, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_deband_8_c
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function deband_8_c
_deband_8_c:                            ; @deband_8_c
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #272
	.cfi_def_cfa_offset 272
	stp	x28, x27, [sp, #176]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #192]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #208]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #224]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #240]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #256]            ; 16-byte Folded Spill
	add	x29, sp, #256
	.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
	ldr	x19, [x0]
	ldr	w9, [x19]
	cmp	w9, #1
	b.lt	LBB0_19
; %bb.1:
	mov	x20, #0
	ldr	x10, [x1]
	ldr	x8, [x1, #8]
	stp	x8, x10, [sp, #16]              ; 16-byte Folded Spill
	add	w14, w2, #1
	ldr	x8, [x19, #24]
	stp	w2, w3, [sp, #36]               ; 8-byte Folded Spill
	str	w14, [sp, #12]                  ; 4-byte Folded Spill
	str	x19, [sp, #72]                  ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x19]
	ldp	w2, w3, [sp, #36]               ; 8-byte Folded Reload
	ldr	w14, [sp, #12]                  ; 4-byte Folded Reload
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x20, x20, #1
	cmp	x20, w9, sxtw
	b.ge	LBB0_19
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	lsl	x11, x20, #2
	ldr	x10, [x19, #16]
	ldr	w12, [x10, x11]
	mul	w10, w12, w2
	sdiv	w10, w10, w3
	mul	w13, w12, w14
	sdiv	w16, w13, w3
	cmp	w10, w16
	b.ge	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	lsl	x9, x20, #3
	ldp	x14, x15, [sp, #16]             ; 16-byte Folded Reload
	ldp	x14, x13, [x14]
	ldr	x17, [x13, x9]
	ldp	x15, x13, [x15]
	ldr	x9, [x13, x9]
	ldrsw	x14, [x14, x11]
	ldr	x13, [x19, #8]
	ldr	w21, [x13, x11]
	ldr	w11, [x8, x11]
	sub	w11, w11, #1
	str	w11, [sp, #100]                 ; 4-byte Folded Spill
	sub	w11, w12, #1
	str	w11, [sp, #96]                  ; 4-byte Folded Spill
	ldrsw	x11, [x15, x20, lsl #2]
	sxtw	x13, w10
	mul	x12, x11, x13
	add	x9, x9, x12, lsl #2
	stur	x9, [x29, #-120]                ; 8-byte Folded Spill
	lsl	x9, x11, #2
	str	x9, [sp, #56]                   ; 8-byte Folded Spill
	stur	x13, [x29, #-112]               ; 8-byte Folded Spill
	mul	x9, x14, x13
	stp	x14, x17, [sp, #104]            ; 16-byte Folded Spill
	add	x9, x17, x9, lsl #2
	str	x9, [sp, #128]                  ; 8-byte Folded Spill
	lsl	x9, x14, #2
	str	x9, [sp, #48]                   ; 8-byte Folded Spill
	sbfiz	x12, x10, #2, #32
	str	x20, [sp, #80]                  ; 8-byte Folded Spill
	str	w16, [sp, #44]                  ; 4-byte Folded Spill
	str	w21, [sp, #92]                  ; 4-byte Folded Spill
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	ldp	x10, x9, [x29, #-120]           ; 16-byte Folded Reload
	add	x9, x9, #1
	ldr	x11, [sp, #56]                  ; 8-byte Folded Reload
	add	x10, x10, x11
	stur	x10, [x29, #-120]               ; 8-byte Folded Spill
	ldr	x10, [sp, #128]                 ; 8-byte Folded Reload
	ldr	x11, [sp, #48]                  ; 8-byte Folded Reload
	add	x10, x10, x11
	str	x10, [sp, #128]                 ; 8-byte Folded Spill
	add	x12, x12, #4
	stur	x9, [x29, #-112]                ; 8-byte Folded Spill
	cmp	w16, w9
	b.eq	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	ldr	w9, [x8, x20, lsl #2]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x28, #0
	ldrsw	x8, [x8]
	str	x12, [sp, #64]                  ; 8-byte Folded Spill
	mul	x8, x12, x8
	str	x8, [sp, #120]                  ; 8-byte Folded Spill
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldp	x8, x9, [x19, #32]
	ldr	x10, [sp, #120]                 ; 8-byte Folded Reload
	add	x8, x8, x10
	lsl	x11, x28, #2
	stur	x11, [x29, #-96]                ; 8-byte Folded Spill
	add	x9, x9, x10
	ldr	w26, [x9, x11]
	ldur	x27, [x29, #-112]               ; 8-byte Folded Reload
	add	w0, w26, w27
	stur	w0, [x29, #-100]                ; 4-byte Folded Spill
	ldr	w20, [x8, x11]
	mov	w1, #0
	ldr	w25, [sp, #96]                  ; 4-byte Folded Reload
	mov	x2, x25
	bl	_av_clip
	mov	x23, x0
	add	w24, w28, w20
	mov	x0, x24
	mov	w1, #0
	ldr	w19, [sp, #100]                 ; 4-byte Folded Reload
	mov	x2, x19
	bl	_av_clip
	ldp	x21, x22, [sp, #104]            ; 16-byte Folded Reload
	madd	w8, w23, w21, w0
	ldr	w23, [x22, w8, sxtw #2]
	sub	w26, w27, w26
	mov	x0, x26
	mov	w1, #0
	mov	x2, x25
	bl	_av_clip
	mov	x27, x0
	mov	x0, x24
	mov	w1, #0
	mov	x2, x19
	bl	_av_clip
	madd	w8, w27, w21, w0
	ldr	w24, [x22, w8, sxtw #2]
	mov	x0, x26
	mov	w1, #0
	mov	x2, x25
	bl	_av_clip
	mov	x26, x0
	sub	w27, w28, w20
	mov	x0, x27
	mov	w1, #0
	mov	x2, x19
	bl	_av_clip
	madd	w8, w26, w21, w0
	ldr	w26, [x22, w8, sxtw #2]
	ldur	w0, [x29, #-100]                ; 4-byte Folded Reload
	mov	w1, #0
	mov	x2, x25
	bl	_av_clip
	mov	x25, x0
	mov	x0, x27
	mov	w1, #0
	mov	x2, x19
	bl	_av_clip
	madd	w8, w25, w21, w0
	ldr	w27, [x22, w8, sxtw #2]
	ldr	x8, [sp, #128]                  ; 8-byte Folded Reload
	ldur	x9, [x29, #-96]                 ; 8-byte Folded Reload
	ldr	w25, [x8, x9]
	ldr	x19, [sp, #72]                  ; 8-byte Folded Reload
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x0, x23
	mov	x1, x24
	mov	x2, x26
	mov	x3, x27
	bl	_get_avg
	mov	x23, x0
	sub	w0, w25, w0
	bl	_FFABS
	ldr	w21, [sp, #92]                  ; 4-byte Folded Reload
	cmp	w0, w21
	csel	w25, w23, w25, lt
	b	LBB0_16
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=3
	sub	w0, w25, w23
	bl	_FFABS
	ldr	w21, [sp, #92]                  ; 4-byte Folded Reload
	cmp	w0, w21
	b.ge	LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=3
	sub	w0, w25, w24
	bl	_FFABS
	cmp	w0, w21
	b.ge	LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=3
	sub	w0, w25, w26
	bl	_FFABS
	cmp	w0, w21
	b.ge	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=3
	sub	w0, w25, w27
	bl	_FFABS
	cmp	w0, w21
	ldr	x20, [sp, #80]                  ; 8-byte Folded Reload
	b.ge	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x0, x23
	mov	x1, x24
	mov	x2, x26
	mov	x3, x27
	bl	_get_avg
	mov	x25, x0
	b	LBB0_17
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=3
	ldr	x20, [sp, #80]                  ; 8-byte Folded Reload
LBB0_17:                                ;   in Loop: Header=BB0_9 Depth=3
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	str	w25, [x8, x28, lsl #2]
	add	x28, x28, #1
	ldr	x8, [x19, #24]
	ldrsw	x9, [x8, x20, lsl #2]
	cmp	x28, x9
	b.lt	LBB0_9
; %bb.18:                               ;   in Loop: Header=BB0_7 Depth=2
	ldr	w16, [sp, #44]                  ; 4-byte Folded Reload
	ldr	x12, [sp, #64]                  ; 8-byte Folded Reload
	b	LBB0_6
LBB0_19:
	mov	w0, #0
	ldp	x29, x30, [sp, #256]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #240]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #224]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #208]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #192]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #176]            ; 16-byte Folded Reload
	add	sp, sp, #272
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_deband_8_c
.subsections_via_symbols
