	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function residual_filter
_residual_filter:                       ## @residual_filter
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%r8d, %r8d
	jle	LBB0_12
## %bb.1:
	movl	$4294967294, %ebx               ## imm = 0xFFFFFFFE
	movq	_FILTER_ORDER@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r8d, %r8d
	leaq	-1(%r15), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leal	(%rbx,%r15), %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	movss	(%rsi,%r12,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
LBB0_11:                                ##   in Loop: Header=BB0_2 Depth=1
	movss	(%rdx), %xmm2                   ## xmm2 = mem[0],zero,zero,zero
	mulss	(%rcx), %xmm2
	addss	%xmm0, %xmm2
	movss	%xmm1, (%rcx)
	movss	%xmm2, (%rdi,%r12,4)
	incq	%r12
	cmpq	%r8, %r12
	je	LBB0_12
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movss	(%rsi,%r12,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	cmpl	$2, %r15d
	jl	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testb	$1, %r15b
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movss	(%rdx,%rax,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	mulss	(%rcx,%rax,4), %xmm0
	addss	%xmm0, %xmm1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movss	(%rcx,%rbx,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rcx,%rax,4)
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movaps	%xmm1, %xmm0
	cmpl	$2, %r15d
	je	LBB0_10
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movaps	%xmm1, %xmm0
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %r13
                                        ## implicit-def: $xmm0
	cmpl	$2, %r15d
	je	LBB0_10
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	2(%r13), %r10
	movl	$4294967294, %eax               ## imm = 0xFFFFFFFE
	leaq	(%rax,%r13), %r11
	incq	%r11
	addq	$-2, %r13
	movaps	%xmm1, %xmm0
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r11d, %r9d
	shlq	$2, %r9
	movss	(%rdx,%r9), %xmm1               ## xmm1 = mem[0],zero,zero,zero
	mulss	(%rcx,%r9), %xmm1
	addss	%xmm0, %xmm1
	leal	-1(%r11), %r14d
	movss	(%rcx,%r14,4), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, (%rcx,%r9)
	movl	%r13d, %ebx
	shlq	$2, %rbx
	movss	(%rdx,%rbx), %xmm0              ## xmm0 = mem[0],zero,zero,zero
	mulss	(%rcx,%rbx), %xmm0
	addss	%xmm1, %xmm0
	addq	$-2, %r11
	movl	%r11d, %eax
	movss	(%rcx,%rax,4), %xmm1            ## xmm1 = mem[0],zero,zero,zero
	movss	%xmm1, (%rcx,%rbx)
	addq	$-2, %r10
	addq	$-2, %r13
	cmpq	$3, %r10
	jg	LBB0_9
	jmp	LBB0_10
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FILTER_ORDER,4,2               ## @FILTER_ORDER
	.no_dead_strip	_residual_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function residual_filter
_residual_filter:                       ; @residual_filter
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	.cfi_offset w19, -8
	.cfi_offset w20, -16
	.cfi_offset w21, -24
	.cfi_offset w22, -32
	cmp	w4, #1
	b.lt	LBB0_12
; %bb.1:
	mov	x8, #0
Lloh0:
	adrp	x9, _FILTER_ORDER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _FILTER_ORDER@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	w10, w4
	sub	x11, x9, #2
	sub	w12, w9, #1
	sub	w13, w9, #2
	lsl	x14, x12, #2
	add	x15, x3, w13, uxtw #2
	sub	x16, x12, x9
	lsl	x16, x16, #2
	add	x16, x16, #8
	add	x17, x15, #4
	add	x4, x3, x16
	add	x5, x14, #4
	cmp	w12, w11
	cset	w12, lo
	tst	x11, #0xffffffff00000000
	cset	w6, ne
	cmp	w13, w11
	cset	w7, lo
	cmp	xzr, x11, lsr #62
	cset	w19, ne
	lsl	x20, x11, #2
	add	x11, x3, x14
	sub	x21, x11, x20
	cmp	x21, x11
	cset	w21, hi
	add	x11, x2, x14
	sub	x14, x11, x20
	cmp	x14, x11
	add	x14, x3, x5
	add	x16, x2, x16
	sub	x11, x13, x9
	add	x11, x3, x11, lsl #2
	add	x13, x11, #8
	sub	x11, x9, #1
	orr	w12, w12, w6
	orr	w6, w7, w6
	orr	w7, w21, w19
	cset	w21, hi
	orr	w21, w21, w19
	sub	x20, x15, x20
	cmp	x20, x15
	cset	w15, hi
	orr	w15, w15, w19
	orr	w12, w12, w6
	orr	w12, w12, w7
	orr	w12, w12, w21
	orr	w12, w12, w15
	add	x15, x2, x5
	cmp	x4, x15
	ccmp	x16, x14, #2, lo
	cset	w15, lo
	cmp	x4, x17
	ccmp	x13, x14, #2, lo
	cset	w13, lo
	orr	w13, w15, w13
	and	x14, x11, #0xfffffffffffffff0
	sub	x15, x9, x14
	mov	w16, #-1
	add	x16, x9, x16
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	fmov	s1, s0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	s2, [x2]
	ldr	s3, [x3]
	fmadd	s1, s2, s3, s1
	str	s0, [x3]
	str	s1, [x0, x8, lsl #2]
	add	x8, x8, #1
	cmp	x8, x10
	b.eq	LBB0_12
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
                                        ;     Child Loop BB0_10 Depth 2
	ldr	s0, [x1, x8, lsl #2]
	cmp	w9, #2
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	x11, #16
	cset	w17, lo
	orr	w17, w17, w12
	orr	w17, w17, w13
	tbz	w17, #0, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x17, x9
	b	LBB0_10
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x17, x16
	mov	x4, x14
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ubfiz	x5, x17, #2, #32
	add	x6, x2, x5
	ldur	q1, [x6, #-12]
	ldur	q2, [x6, #-28]
	ldur	q3, [x6, #-44]
	ldur	q4, [x6, #-60]
	add	x5, x3, x5
	ldur	q5, [x5, #-12]
	ldur	q6, [x5, #-28]
	ldur	q7, [x5, #-44]
	ldur	q16, [x5, #-60]
	fmul.4s	v1, v1, v5
	rev64.4s	v1, v1
	ext.16b	v1, v1, v1, #8
	mov	s5, v1[3]
	mov	s17, v1[2]
	mov	s18, v1[1]
	fmul.4s	v2, v2, v6
	rev64.4s	v2, v2
	ext.16b	v2, v2, v2, #8
	mov	s6, v2[3]
	mov	s19, v2[2]
	mov	s20, v2[1]
	fmul.4s	v3, v3, v7
	rev64.4s	v3, v3
	ext.16b	v3, v3, v3, #8
	mov	s7, v3[3]
	mov	s21, v3[2]
	mov	s22, v3[1]
	fmul.4s	v4, v4, v16
	rev64.4s	v4, v4
	ext.16b	v4, v4, v4, #8
	mov	s16, v4[3]
	mov	s23, v4[2]
	mov	s24, v4[1]
	fadd	s0, s0, s1
	fadd	s0, s0, s18
	fadd	s0, s0, s17
	fadd	s0, s0, s5
	fadd	s0, s0, s2
	fadd	s0, s0, s20
	fadd	s0, s0, s19
	fadd	s0, s0, s6
	fadd	s0, s0, s3
	fadd	s0, s0, s22
	fadd	s0, s0, s21
	fadd	s0, s0, s7
	fadd	s0, s0, s4
	fadd	s0, s0, s24
	fadd	s0, s0, s23
	sub	w6, w17, #1
	add	x6, x3, w6, uxtw #2
	ldur	q1, [x6, #-12]
	ldur	q2, [x6, #-28]
	ldur	q3, [x6, #-44]
	ldur	q4, [x6, #-60]
	stur	q1, [x5, #-12]
	stur	q2, [x5, #-28]
	fadd	s0, s0, s16
	stur	q3, [x5, #-44]
	stur	q4, [x5, #-60]
	sub	x17, x17, #16
	sub	x4, x4, #16
	cbnz	x4, LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x17, x15
	cmp	x11, x14
	b.eq	LBB0_11
LBB0_10:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w4, w17, #2
	sub	x5, x17, #1
	and	x6, x5, #0xffffffff
	lsl	x6, x6, #2
	ldr	s1, [x2, x6]
	ldr	s2, [x3, x6]
	fmadd	s0, s1, s2, s0
	ldr	s1, [x3, w4, uxtw #2]
	str	s1, [x3, x6]
	cmp	x17, #2
	mov	x17, x5
	b.gt	LBB0_10
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	fmov	s1, s0
	ldr	s0, [x1, x8, lsl #2]
	b	LBB0_3
LBB0_12:
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FILTER_ORDER,4,2               ; @FILTER_ORDER
	.no_dead_strip	_residual_filter
.subsections_via_symbols
