	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nlmeans_filter_thread
_nlmeans_filter_thread:                 ## @nlmeans_filter_thread
	.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	16(%rdi), %r12
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %r14d
	leaq	L_.str(%rip), %rsi
	movl	$3, %edi
	movl	%r14d, %edx
	callq	_hb_deep_log
	leaq	16(%r12), %rbx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_taskset_thread_wait4start
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %esi
	callq	_taskset_thread_stop
	testq	%rax, %rax
	je	LBB0_1
LBB0_10:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_taskset_thread_complete        ## TAILCALL
LBB0_1:
	movslq	-44(%rbp), %rax                 ## 4-byte Folded Reload
	leaq	88(%r12), %rcx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rax,2), %r15
	movq	_NLMEANS_PREFILTER_MODE_PASSTHRU@GOTPCREL(%rip), %r14
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r12), %rax
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	movl	(%rax,%r15,8), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rcx, 8(%rax)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %esi
	callq	_taskset_thread_complete
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_taskset_thread_wait4start
	movq	%r14, %rdi
	movq	_NLMEANS_PREFILTER_MODE_PASSTHRU@GOTPCREL(%rip), %r14
	movl	%ebx, %esi
	callq	_taskset_thread_stop
	testq	%rax, %rax
	jne	LBB0_10
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movq	24(%r12), %rax
	leaq	(%rax,%r15,8), %rbx
	movl	108(%r12), %edi
	movl	16(%rax,%r15,8), %edx
	movl	20(%rax,%r15,8), %esi
	callq	_hb_frame_buffer_init
	movups	92(%r12), %xmm0
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movups	%xmm0, 16(%rax)
	xorl	%r13d, %r13d
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_3 Depth=2
	movq	8(%rbx), %rdi
	addq	%r13, %rdi
	movl	%edx, %esi
	callq	_nlmeans_prefilter
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=2
	movq	8(%rbx), %rdi
	addq	%r13, %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	12(%rax,%r13,4), %esi
	movl	8(%rax,%r13,4), %edx
	movl	(%rax,%r13,4), %r8d
	movl	4(%rax,%r13,4), %ecx
	callq	_nlmeans_deborder
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=2
	incl	%r15d
	addq	$4, %r13
	cmpq	$12, %r13
	je	LBB0_9
LBB0_3:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	(%r12), %rax
	movl	(%rax,%r13), %edx
	testl	%edx, (%r14)
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	8(%r12), %rax
	movq	(%rax,%r13,2), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	80(%r12), %rcx
	movl	(%rcx,%r13), %r8d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rcx), %rcx
	movl	12(%rcx,%r13,4), %r9d
	movl	8(%rcx,%r13,4), %esi
	movq	%rsi, -136(%rbp)                ## 8-byte Spill
	movl	(%rcx,%r13,4), %esi
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	movl	4(%rcx,%r13,4), %ecx
	movq	%rcx, -128(%rbp)                ## 8-byte Spill
	movq	72(%r12), %rcx
	movl	(%rcx,%r13), %ecx
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movq	64(%r12), %rcx
	movl	(%rcx,%r13), %ecx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	56(%r12), %rcx
	movl	(%rcx,%r13), %ecx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	48(%r12), %rcx
	movl	(%rcx,%r13), %r14d
	movq	32(%r12), %rcx
	movq	40(%r12), %rsi
	movl	(%rsi,%r13), %r11d
	movl	(%rcx,%r13), %r10d
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r15d, %ecx
	pushq	%r10
	pushq	%r11
	pushq	%r14
	movq	_NLMEANS_PREFILTER_MODE_PASSTHRU@GOTPCREL(%rip), %r14
	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_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NLMeans thread started for segment %d"

	.comm	_NLMEANS_PREFILTER_MODE_PASSTHRU,4,2 ## @NLMEANS_PREFILTER_MODE_PASSTHRU
	.no_dead_strip	_nlmeans_filter_thread
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nlmeans_filter_thread
_nlmeans_filter_thread:                 ; @nlmeans_filter_thread
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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	x26, [x0, #16]
	str	x0, [sp, #48]                   ; 8-byte Folded Spill
	ldr	w22, [x0]
	sxtw	x20, w22
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #3
	mov	x2, x22
	bl	_hb_deep_log
	add	x19, x26, #16
	mov	x0, x19
	mov	x1, x22
	bl	_taskset_thread_wait4start
	str	x19, [sp, #56]                  ; 8-byte Folded Spill
	mov	x0, x19
	mov	x1, x22
	bl	_taskset_thread_stop
	cbz	x0, LBB0_2
LBB0_1:
	ldr	x0, [sp, #56]                   ; 8-byte Folded Reload
	mov	x1, x20
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	b	_taskset_thread_complete
LBB0_2:
	add	x22, x26, #88
	mov	w21, #24
Lloh2:
	adrp	x28, _NLMEANS_PREFILTER_MODE_PASSTHRU@GOTPAGE
Lloh3:
	ldr	x28, [x28, _NLMEANS_PREFILTER_MODE_PASSTHRU@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x26, #24]
	mov	w21, #24
	mul	x9, x20, x21
	ldr	w8, [x8, x9]
	str	w8, [x24]
	ldp	x8, x19, [sp, #48]              ; 16-byte Folded Reload
	str	x24, [x8, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_taskset_thread_complete
	mov	x0, x19
	mov	x1, x20
	bl	_taskset_thread_wait4start
	mov	x0, x19
	mov	x1, x20
	bl	_taskset_thread_stop
	cbnz	x0, LBB0_1
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	ldr	x8, [x26, #24]
	madd	x23, x20, x21, x8
	ldr	w0, [x26, #108]
	ldp	w2, w1, [x23, #16]
	bl	_hb_frame_buffer_init
	mov	x24, x0
	mov	x27, #0
	mov	x25, #0
	ldur	q0, [x26, #92]
	str	q0, [x0, #16]
	add	x19, x23, #8
	mov	w21, #12
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldr	x8, [x19]
	add	x0, x8, x27
	mov	x1, x2
	bl	_nlmeans_prefilter
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldr	x8, [x19]
	add	x0, x8, x27
	ldr	x8, [x24, #8]
	add	x9, x8, x21
	ldr	w1, [x9]
	add	x8, x8, x27, lsl #2
	ldp	w3, w2, [x8, #4]
	ldur	w4, [x9, #-12]
	bl	_nlmeans_deborder
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x25, x25, #1
	add	x27, x27, #4
	add	x21, x21, #16
	cmp	x27, #12
	b.eq	LBB0_3
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26]
	ldr	w2, [x8, x27]
	ldr	w8, [x28]
	tst	w8, w2
	b.ne	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	x8, [x26, #8]
	ldr	x8, [x8, x25, lsl #3]
	cbz	x8, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	x9, [x26, #80]
	ldr	w4, [x9, x27]
	ldr	x9, [x24, #8]
	add	x10, x9, x21
	ldr	w5, [x10]
	add	x9, x9, x27, lsl #2
	ldp	w7, w6, [x9, #4]
	ldur	w9, [x10, #-12]
	ldp	x11, x10, [x26, #64]
	ldr	w10, [x10, x27]
	ldr	w11, [x11, x27]
	ldp	x13, x12, [x26, #48]
	ldr	w12, [x12, x27]
	ldr	w13, [x13, x27]
	ldp	x15, x14, [x26, #32]
	ldr	w14, [x14, x27]
	ldr	w15, [x15, x27]
	stp	w14, w15, [sp, #32]
	stp	w12, w13, [sp, #24]
	stp	w10, w11, [sp, #16]
	str	x8, [sp, #8]
	str	w9, [sp]
	mov	x0, x22
	mov	x1, x23
	mov	x3, x25
	bl	_nlmeans_plane
	b	LBB0_7
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NLMeans thread started for segment %d"

	.comm	_NLMEANS_PREFILTER_MODE_PASSTHRU,4,2 ; @NLMEANS_PREFILTER_MODE_PASSTHRU
	.no_dead_strip	_nlmeans_filter_thread
.subsections_via_symbols
