	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nlmeans_alloc
_nlmeans_alloc:                         ## @nlmeans_alloc
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r15d
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r12d
	movl	%edx, %r13d
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rdi, %rbx
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	leal	(%rsi,%r15,2), %r14d
	leal	(%r12,%r15,2), %edi
	imull	%r14d, %edi
	shll	$2, %edi
	callq	_malloc
	movslq	%r15d, %rcx
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rcx,4), %rax
	movl	%r14d, %ecx
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	imull	%r15d, %ecx
	movslq	%ecx, %rcx
	leaq	(%rax,%rcx,4), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	testl	%r12d, %r12d
	jle	LBB0_3
## %bb.1:
	movslq	%r14d, %r14
	movslq	%r13d, %r12
	movl	-56(%rbp), %r13d                ## 4-byte Reload
	shlq	$2, %r12
	shlq	$2, %r14
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcpy
	addq	%r12, %rbx
	addq	%r14, %r15
	decq	%r13
	jne	LBB0_2
LBB0_3:
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%rdi, 40(%rbx)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 24(%rbx)
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%esi, (%rbx)
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%edx, 4(%rbx)
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%ecx, 8(%rbx)
                                        ## kill: def $esi killed $esi killed $rsi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_nlmeans_border
	movq	24(%rbx), %rax
	movq	40(%rbx), %rcx
	movq	%rcx, 48(%rbx)
	movq	%rax, 32(%rbx)
	movq	$0, 16(%rbx)
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nlmeans_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nlmeans_alloc
_nlmeans_alloc:                         ; @nlmeans_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x5
	mov	x19, x4
	mov	x21, x3
	mov	x25, x2
	mov	x22, x1
	mov	x23, x0
	lsl	w8, w5, #1
	add	w26, w8, w1
	add	w8, w8, w3
	mul	w8, w8, w26
	lsl	w0, w8, #2
	bl	_malloc
	mov	x24, x0
	add	x8, x0, w20, sxtw #2
	mul	w9, w26, w20
	add	x8, x8, w9, sxtw #2
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	cmp	w21, #1
	b.lt	LBB0_3
; %bb.1:
	sbfiz	x27, x25, #2, #32
	sbfiz	x28, x26, #2, #32
	ldr	x25, [sp, #8]                   ; 8-byte Folded Reload
	mov	w26, w21
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	mov	x1, x23
	mov	x2, x22
	bl	_memcpy
	add	x23, x23, x27
	add	x25, x25, x28
	subs	x26, x26, #1
	b.ne	LBB0_2
LBB0_3:
	str	x24, [x19, #40]
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x8, [x19, #24]
	stp	w22, w21, [x19]
	str	w20, [x19, #8]
	mov	x0, x24
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_nlmeans_border
	ldr	x8, [x19, #40]
	str	x8, [x19, #48]
	ldr	x8, [x19, #24]
	str	x8, [x19, #32]
	str	xzr, [x19, #16]
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nlmeans_alloc
.subsections_via_symbols
