	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nlmeans_filter_flush
_nlmeans_filter_flush:                  ## @nlmeans_filter_flush
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	-44(%rbp), %rdi
	callq	_hb_buffer_list_clear
	cmpl	$0, (%rbx)
	jle	LBB0_6
## %bb.1:
	leaq	80(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_NLMEANS_PREFILTER_MODE_PASSTHRU@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, (%rsi)
	leaq	-44(%rbp), %rdi
	callq	_hb_buffer_list_append
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	incq	%rdx
	movslq	(%rbx), %rax
	movq	%rdx, %rcx
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	cmpq	%rax, %rdx
	jge	LBB0_6
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	104(%rbx), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rcx,2), %rcx
	leaq	(%rax,%rcx,8), %rdx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	100(%rbx), %edi
	movl	16(%rax,%rcx,8), %edx
	movl	20(%rax,%rcx,8), %esi
	callq	_hb_frame_buffer_init
	movups	84(%rbx), %xmm0
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movups	%xmm0, 16(%rax)
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=2
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	8(%r12), %rdi
	addq	%r14, %rdi
	movl	%edx, %esi
	callq	_nlmeans_prefilter
	movq	8(%r12), %rdi
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=2
	addq	%r14, %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	12(%rax,%r14,4), %esi
	movl	8(%rax,%r14,4), %edx
	movl	(%rax,%r14,4), %r8d
	movl	4(%rax,%r14,4), %ecx
	callq	_nlmeans_deborder
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=2
	incl	%r15d
	addq	$4, %r14
	cmpq	$12, %r14
	je	LBB0_5
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx), %rax
	movl	(%rax,%r14), %edx
	testl	%edx, (%r13)
	jne	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	72(%rbx), %rax
	movl	(%rax,%r14), %eax
	testl	%eax, %eax
	je	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=2
	movl	(%rbx), %r8d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	subl	%ecx, %r8d
	movq	16(%rbx), %rcx
	movl	(%rcx,%r14), %ecx
	cmpl	%r8d, %ecx
	cmovll	%ecx, %r8d
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	movl	12(%rcx,%r14,4), %r9d
	movl	8(%rcx,%r14,4), %esi
	movq	%rsi, -136(%rbp)                ## 8-byte Spill
	movl	(%rcx,%r14,4), %esi
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	movl	4(%rcx,%r14,4), %ecx
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	movq	64(%rbx), %rcx
	movl	(%rcx,%r14), %ecx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movq	56(%rbx), %rcx
	movl	(%rcx,%r14), %ecx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	48(%rbx), %rcx
	movl	(%rcx,%r14), %ecx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	40(%rbx), %rcx
	movl	(%rcx,%r14), %ecx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	32(%rbx), %rcx
	movl	(%rcx,%r14), %r11d
	movq	24(%rbx), %rcx
	movl	(%rcx,%r14), %r12d
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %ecx
	pushq	%r12
	pushq	%r11
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	pushq	-96(%rbp)                       ## 8-byte Folded Reload
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	pushq	-112(%rbp)                      ## 8-byte Folded Reload
	pushq	%rax
	pushq	-120(%rbp)                      ## 8-byte Folded Reload
	pushq	-128(%rbp)                      ## 8-byte Folded Reload
	pushq	-136(%rbp)                      ## 8-byte Folded Reload
	callq	_nlmeans_plane
	addq	$80, %rsp
	jmp	LBB0_11
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=2
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdi
	jmp	LBB0_9
LBB0_6:
	leaq	-44(%rbp), %rdi
	callq	_hb_buffer_list_clear
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NLMEANS_PREFILTER_MODE_PASSTHRU,4,2 ## @NLMEANS_PREFILTER_MODE_PASSTHRU
	.no_dead_strip	_nlmeans_filter_flush
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nlmeans_filter_flush
_nlmeans_filter_flush:                  ; @nlmeans_filter_flush
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	add	x0, sp, #44
	bl	_hb_buffer_list_clear
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.1:
	mov	x24, #0
	add	x20, x19, #80
Lloh0:
	adrp	x26, _NLMEANS_PREFILTER_MODE_PASSTHRU@GOTPAGE
Lloh1:
	ldr	x26, [x26, _NLMEANS_PREFILTER_MODE_PASSTHRU@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x21]
	str	w8, [x22]
	add	x0, sp, #44
	mov	x1, x22
	bl	_hb_buffer_list_append
	add	x24, x24, #1
	ldrsw	x8, [x19]
	cmp	x24, x8
	b.ge	LBB0_10
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x8, [x19, #104]
	mov	w9, #24
	madd	x21, x24, x9, x8
	ldr	w0, [x19, #100]
	ldp	w2, w1, [x21, #16]
	bl	_hb_frame_buffer_init
	mov	x22, x0
	mov	x27, #0
	mov	w23, #0
	ldur	q0, [x19, #84]
	str	q0, [x0, #16]
	add	x28, x21, #8
	mov	w25, #12
	b	LBB0_7
LBB0_4:                                 ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x28]
	add	x0, x8, x27
	mov	x1, x2
	bl	_nlmeans_prefilter
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x28]
	add	x0, x8, x27
	ldr	x8, [x22, #8]
	add	x9, x8, x25
	ldr	w1, [x9]
	add	x8, x8, x27, lsl #2
	ldp	w3, w2, [x8, #4]
	ldur	w4, [x9, #-12]
	bl	_nlmeans_deborder
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	w23, w23, #1
	add	x27, x27, #4
	add	x25, x25, #16
	cmp	x27, #12
	b.eq	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x19, #8]
	ldr	w2, [x8, x27]
	ldr	w8, [x26]
	tst	w8, w2
	b.ne	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [x19, #72]
	ldr	w8, [x8, x27]
	cbz	w8, LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	w9, [x19]
	ldp	x10, x11, [x19, #16]
	ldr	w10, [x10, x27]
	sub	w9, w9, w24
	cmp	w10, w9
	csel	w4, w10, w9, lt
	ldr	x9, [x22, #8]
	add	x10, x9, x25
	ldr	w5, [x10]
	add	x9, x9, x27, lsl #2
	ldp	w7, w6, [x9, #4]
	ldur	w9, [x10, #-12]
	ldp	x12, x10, [x19, #56]
	ldr	w10, [x10, x27]
	ldp	x14, x13, [x19, #40]
	ldr	w12, [x12, x27]
	ldr	w13, [x13, x27]
	ldr	x15, [x19, #32]
	ldr	w14, [x14, x27]
	ldr	w15, [x15, x27]
	ldr	w11, [x11, x27]
	stp	w15, w11, [sp, #24]
	stp	w13, w14, [sp, #16]
	stp	w10, w12, [sp, #8]
	stp	w9, w8, [sp]
	mov	x0, x20
	mov	x1, x21
	mov	x3, x23
	bl	_nlmeans_plane
	b	LBB0_6
LBB0_10:
	add	x0, sp, #44
	bl	_hb_buffer_list_clear
	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
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NLMEANS_PREFILTER_MODE_PASSTHRU,4,2 ; @NLMEANS_PREFILTER_MODE_PASSTHRU
	.no_dead_strip	_nlmeans_filter_flush
.subsections_via_symbols
