	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nlmeans_filter_median
_nlmeans_filter_median:                 ## @nlmeans_filter_median
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r9d killed $r9d def $r9
	movl	%r8d, %r12d
	movl	%ecx, %r14d
                                        ## kill: def $edx killed $edx def $rdx
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, -120(%rbp)                ## 8-byte Spill
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	movl	%r9d, %eax
	imull	%eax, %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	testl	%r14d, %r14d
	jle	LBB0_8
## %bb.1:
	movq	%rbx, %r10
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	leal	1(%rcx), %eax
	shrl	$31, %eax
	leal	(%rcx,%rax), %edx
	incl	%edx
	sarl	%edx
	leal	-1(%rcx), %eax
	shrl	$31, %eax
	leal	(%rcx,%rax), %esi
	decl	%esi
	sarl	%esi
	negl	%esi
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leal	(%rcx,%r12,2), %eax
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movslq	%esi, %r11
	cltq
	movl	%r14d, %esi
	movq	%rsi, -128(%rbp)                ## 8-byte Spill
	movl	%ecx, %ecx
	movq	%rcx, -136(%rbp)                ## 8-byte Spill
	movl	%edx, -64(%rbp)                 ## 4-byte Spill
	movslq	%edx, %r14
	movq	%r14, %rcx
	subq	%r11, %rcx
	movq	%rcx, -200(%rbp)                ## 8-byte Spill
	movq	%r11, %rcx
	notq	%rcx
	movq	%rcx, -192(%rbp)                ## 8-byte Spill
	leaq	1(%r11), %rcx
	movq	%rcx, -168(%rbp)                ## 8-byte Spill
	movq	%r14, %rcx
	negq	%rcx
	movq	%rcx, -184(%rbp)                ## 8-byte Spill
	leaq	(,%rax,4), %rcx
	movq	%rcx, -160(%rbp)                ## 8-byte Spill
	leaq	(%rbx,%r11,4), %rcx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	leaq	(,%rax,8), %r12
	movl	$1, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -144(%rbp)                ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	incq	%rcx
	incq	-96(%rbp)                       ## 8-byte Folded Spill
	movq	%rcx, %rax
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	cmpq	-128(%rbp), %rcx                ## 8-byte Folded Reload
	je	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
                                        ##         Child Loop BB0_13 Depth 4
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	jle	LBB0_16
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rsi, %rax
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	imulq	%rdx, %rax
	movq	-120(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rax
	movq	%rax, -152(%rbp)                ## 8-byte Spill
	leaq	(%rsi,%r11), %rax
	imulq	%rdx, %rax
	movq	%rax, -176(%rbp)                ## 8-byte Spill
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	%r15, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r11, %rbx
	callq	_nlmeans_filter_median_opt
	movq	%rbx, %r11
	movq	-144(%rbp), %r10                ## 8-byte Reload
	movq	-152(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx,%r13,4)
	incq	%r13
	addq	$4, -88(%rbp)                   ## 8-byte Folded Spill
	cmpq	-136(%rbp), %r13                ## 8-byte Folded Reload
	je	LBB0_16
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
                                        ##         Child Loop BB0_13 Depth 4
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	cmpl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_15
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	-88(%rbp), %r8                  ## 8-byte Reload
	movq	%r11, %r9
	xorl	%edx, %edx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_6 Depth=3
	incq	%r9
	addq	$4, %r8
	cmpq	%r14, %r9
	je	LBB0_15
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Loop Header: Depth=3
                                        ##         Child Loop BB0_13 Depth 4
	movslq	%edx, %rdx
	testb	$1, -200(%rbp)                  ## 1-byte Folded Reload
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=3
	movq	%r11, %rsi
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=3
	leaq	(%r9,%r13), %rax
	leaq	(%r10,%rax,4), %rax
	movq	-176(%rbp), %rcx                ## 8-byte Reload
	movl	(%rax,%rcx,4), %eax
	movl	%eax, (%r15,%rdx,4)
	incq	%rdx
	movq	-168(%rbp), %rsi                ## 8-byte Reload
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=3
	movq	-184(%rbp), %rax                ## 8-byte Reload
	cmpq	%rax, -192(%rbp)                ## 8-byte Folded Reload
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_6 Depth=3
	movq	%r14, %rdi
	subq	%rsi, %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%rsi, %rax
	movq	-160(%rbp), %rcx                ## 8-byte Reload
	imulq	%rcx, %rax
	addq	-96(%rbp), %rsi                 ## 8-byte Folded Reload
	imulq	%rcx, %rsi
	movq	%r8, %rcx
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ##       Parent Loop BB0_6 Depth=3
                                        ## =>      This Inner Loop Header: Depth=4
	movl	(%rcx,%rax), %ebx
	movl	%ebx, (%r15,%rdx,4)
	movl	(%rcx,%rsi), %ebx
	movl	%ebx, 4(%r15,%rdx,4)
	addq	$2, %rdx
	addq	%r12, %rcx
	addq	$-2, %rdi
	jne	LBB0_13
	jmp	LBB0_14
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.9:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nlmeans_filter_median
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nlmeans_filter_median
_nlmeans_filter_median:                 ; @nlmeans_filter_median
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #160
	stur	w2, [x29, #-212]                ; 4-byte Folded Spill
	stur	x1, [x29, #-232]                ; 8-byte Folded Spill
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	stur	w5, [x29, #-156]                ; 4-byte Folded Spill
	mul	w8, w5, w5
	lsl	x8, x8, #2
	mov	x9, x8
Lloh3:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh4:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	cmp	w3, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x6, #0
	ldur	w10, [x29, #-156]               ; 4-byte Folded Reload
	add	w8, w10, #1
	add	w9, w10, #2
	cmp	w8, #0
	csinc	w8, w9, w10, lt
	sub	w9, w10, #1
	cmp	w9, #0
	csel	w9, w10, w9, lt
	neg	w9, w9, asr #1
	ldur	w11, [x29, #-212]               ; 4-byte Folded Reload
	add	w10, w11, w4, lsl #1
	sxtw	x23, w9
	sxtw	x7, w10
	mov	w12, w3
	stur	x12, [x29, #-224]               ; 8-byte Folded Spill
	mov	w11, w11
	stur	x11, [x29, #-168]               ; 8-byte Folded Spill
	sbfx	x28, x8, #1, #31
	sub	x21, x28, x23
	and	x20, x21, #0xfffffffffffffffc
	add	x4, x20, x23
	smaddl	x8, w10, w9, x7
	add	x8, x8, x23
	add	x11, x0, x8, lsl #2
	sbfiz	x19, x10, #2, #32
	sbfiz	x27, x10, #4, #32
	add	x8, x23, #2
	madd	x8, x8, x7, x23
	add	x8, x0, x8, lsl #2
	stp	x8, x11, [x29, #-192]           ; 16-byte Folded Spill
	add	x8, x23, #3
	madd	x8, x8, x7, x23
	add	x10, x0, x8, lsl #2
	add	x8, x19, #4
	madd	x8, x8, x23, x0
	stp	x8, x10, [x29, #-208]           ; 16-byte Folded Spill
	add	x8, x0, w9, sxtw #2
	stur	x8, [x29, #-240]                ; 8-byte Folded Spill
	add	x5, x22, #8
	stur	x23, [x29, #-176]               ; 8-byte Folded Spill
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x6, x6, #1
	ldur	x8, [x29, #-184]                ; 8-byte Folded Reload
	add	x8, x8, x19
	stur	x8, [x29, #-184]                ; 8-byte Folded Spill
	ldur	x8, [x29, #-192]                ; 8-byte Folded Reload
	add	x8, x8, x19
	stur	x8, [x29, #-192]                ; 8-byte Folded Spill
	ldur	x8, [x29, #-200]                ; 8-byte Folded Reload
	add	x8, x8, x19
	stur	x8, [x29, #-200]                ; 8-byte Folded Spill
	ldur	x8, [x29, #-208]                ; 8-byte Folded Reload
	add	x8, x8, x19
	stur	x8, [x29, #-208]                ; 8-byte Folded Spill
	ldur	x8, [x29, #-224]                ; 8-byte Folded Reload
	cmp	x6, x8
	b.eq	LBB0_15
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
                                        ;         Child Loop BB0_11 Depth 4
                                        ;         Child Loop BB0_14 Depth 4
	ldur	w8, [x29, #-212]                ; 4-byte Folded Reload
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x10, #0
	mul	x8, x6, x7
	ldp	x24, x9, [x29, #-240]           ; 16-byte Folded Reload
	add	x8, x9, x8, lsl #2
	stp	x6, x8, [x29, #-152]            ; 16-byte Folded Spill
	ldp	x25, x26, [x29, #-208]          ; 16-byte Folded Reload
	ldp	x30, x8, [x29, #-192]           ; 16-byte Folded Reload
	stur	x8, [x29, #-104]                ; 8-byte Folded Spill
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x22
	ldur	w1, [x29, #-156]                ; 4-byte Folded Reload
	stp	x26, x25, [x29, #-136]          ; 16-byte Folded Spill
	mov	x26, x4
	mov	x23, x5
	stur	x24, [x29, #-120]               ; 8-byte Folded Spill
	mov	x24, x7
	mov	x25, x30
	bl	_nlmeans_filter_median_opt
	mov	x30, x25
	mov	x7, x24
	ldp	x25, x24, [x29, #-128]          ; 16-byte Folded Reload
	ldp	x6, x8, [x29, #-152]            ; 16-byte Folded Reload
	mov	x5, x23
	mov	x4, x26
	ldur	x26, [x29, #-136]               ; 8-byte Folded Reload
	ldur	x10, [x29, #-112]               ; 8-byte Folded Reload
	str	w0, [x8, x10, lsl #2]
	add	x10, x10, #1
	ldur	x8, [x29, #-104]                ; 8-byte Folded Reload
	add	x8, x8, #4
	stur	x8, [x29, #-104]                ; 8-byte Folded Spill
	add	x30, x30, #4
	add	x26, x26, #4
	add	x25, x25, #4
	add	x24, x24, #4
	ldp	x23, x8, [x29, #-176]           ; 16-byte Folded Reload
	cmp	x10, x8
	b.eq	LBB0_2
LBB0_6:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
                                        ;         Child Loop BB0_11 Depth 4
                                        ;         Child Loop BB0_14 Depth 4
	stur	x10, [x29, #-112]               ; 8-byte Folded Spill
	cmp	w23, w28
	b.ge	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	mov	x10, #0
	mov	x8, x24
	mov	x9, x25
	mov	x11, x26
	mov	x12, x30
	ldur	x13, [x29, #-104]               ; 8-byte Folded Reload
	mov	x14, x23
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=3
	add	x14, x14, #1
	add	x13, x13, #4
	add	x12, x12, #4
	add	x11, x11, #4
	add	x9, x9, #4
	add	x8, x8, #4
	cmp	x14, x28
	b.eq	LBB0_5
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ; =>    This Loop Header: Depth=3
                                        ;         Child Loop BB0_11 Depth 4
                                        ;         Child Loop BB0_14 Depth 4
	sxtw	x17, w10
	mov	x10, x17
	mov	x16, x23
	cmp	x21, #4
	b.lo	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x15, #0
	add	x10, x17, x20
	mov	x16, x20
	add	x17, x5, x17, lsl #2
LBB0_11:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ;       Parent Loop BB0_9 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	ldr	w0, [x9, x15]
	ldr	w1, [x13, x15]
	ldr	w2, [x12, x15]
	ldr	w3, [x11, x15]
	stp	w0, w1, [x17, #-8]
	stp	w2, w3, [x17], #16
	add	x15, x15, x27
	subs	x16, x16, #4
	b.ne	LBB0_11
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=3
	mov	x16, x4
	cmp	x21, x20
	b.eq	LBB0_8
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=3
	add	x15, x6, x16
	mul	x15, x7, x15
	add	x15, x8, x15, lsl #2
	sub	x16, x28, x16
LBB0_14:                                ;   Parent Loop BB0_3 Depth=1
                                        ;     Parent Loop BB0_6 Depth=2
                                        ;       Parent Loop BB0_9 Depth=3
                                        ; =>      This Inner Loop Header: Depth=4
	ldr	w17, [x15]
	str	w17, [x22, x10, lsl #2]
	add	x10, x10, #1
	add	x15, x15, x19
	subs	x16, x16, #1
	b.ne	LBB0_14
	b	LBB0_8
LBB0_15:
	ldur	x8, [x29, #-96]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nlmeans_filter_median
.subsections_via_symbols
