	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hqdn3d_denoise_spatial
_hqdn3d_denoise_spatial:                ## @hqdn3d_denoise_spatial
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -52(%rbp)                 ## 4-byte Spill
                                        ## kill: def $r8d killed $r8d def $r8
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	$8192, %eax                     ## imm = 0x2000
	movq	16(%rbp), %rcx
	addq	%rax, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	addq	24(%rbp), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r8, -80(%rbp)                  ## 8-byte Spill
	testl	%r8d, %r8d
	jle	LBB0_3
## %bb.1:
	movq	%rsi, %r12
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movzbl	(%rax), %eax
	movl	%eax, %r13d
	shll	$8, %r13d
	movl	-80(%rbp), %r14d                ## 4-byte Reload
	decq	%r14
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	%al, %esi
	shll	$8, %esi
	movzwl	%r13w, %edi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_hqdn3d_lowpass_mul
	movl	%eax, %r13d
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movw	%r13w, (%rax,%rbx,2)
	movzwl	(%r15,%rbx,2), %edi
	movl	%r13d, %esi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_hqdn3d_lowpass_mul
	movw	%ax, (%r15,%rbx,2)
	addl	$127, %eax
	movq	%r12, %rsi
	movb	%ah, (%rsi,%rbx)
	cmpq	%rbx, %r14
	je	LBB0_3
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movzbl	1(%rax,%rbx), %eax
	incq	%rbx
	jmp	LBB0_2
LBB0_3:
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	cmpl	$2, %r8d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jl	LBB0_11
## %bb.4:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movslq	%eax, %r12
	decl	%eax
	movq	%rax, -160(%rbp)                ## 8-byte Spill
	leaq	(%rsi,%r12), %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r12,2), %rbx
	leaq	(%r12,%r12), %rax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	leaq	(%r12,%r15), %rcx
	incq	%rcx
	movl	$1, %eax
	movq	%r12, -144(%rbp)                ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-144(%rbp), %r12                ## 8-byte Reload
	addq	%r12, %r15
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	leaq	(%r15,%r12,2), %r15
	movl	%eax, %ebx
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movzwl	(%r14,%rbx,2), %edi
	movl	%r13d, %esi
	callq	_hqdn3d_lowpass_mul
	movw	%ax, (%r14,%rbx,2)
	movzwl	(%r15,%rbx,2), %edi
	movl	%eax, %esi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_hqdn3d_lowpass_mul
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movw	%ax, (%r15,%rbx,2)
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	addl	$127, %eax
	movq	-152(%rbp), %rsi                ## 8-byte Reload
	movb	%ah, (%rsi,%rbx)
	movl	-100(%rbp), %eax                ## 4-byte Reload
	incl	%eax
	movq	-128(%rbp), %rdi                ## 8-byte Reload
	addq	%r12, %rdi
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	addq	-136(%rbp), %rbx                ## 8-byte Folded Reload
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	addq	%r12, %rcx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	cmpl	%r8d, %eax
	je	LBB0_11
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	addq	%r12, %rsi
	movzbl	(%r15,%r12), %r13d
	shll	$8, %r13d
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	cmpl	$2, %edx
	movq	%rsi, -152(%rbp)                ## 8-byte Spill
	movq	%rdi, -128(%rbp)                ## 8-byte Spill
	movq	%rbx, -120(%rbp)                ## 8-byte Spill
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movl	%eax, -100(%rbp)                ## 4-byte Spill
	jl	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-96(%rbp), %r15                 ## 8-byte Reload
	movzwl	(%r15,%rbx,2), %edi
	movl	%r13d, %esi
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_hqdn3d_lowpass_mul
	movl	%eax, %r12d
	movw	%r12w, (%r15,%rbx,2)
	leaq	1(%rbx), %r15
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movzbl	(%rax,%rbx), %esi
	shll	$8, %esi
	movzwl	%r13w, %edi
	movq	%r14, %rdx
	callq	_hqdn3d_lowpass_mul
	movl	%eax, %r13d
	movq	-120(%rbp), %r14                ## 8-byte Reload
	movzwl	(%r14,%rbx,2), %edi
	movl	%r12d, %esi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_hqdn3d_lowpass_mul
	movq	-160(%rbp), %rcx                ## 8-byte Reload
	movw	%ax, (%r14,%rbx,2)
	addl	$127, %eax
	movq	-128(%rbp), %rdx                ## 8-byte Reload
	movb	%ah, (%rdx,%rbx)
	movq	%r15, %rbx
	cmpq	%r15, %rcx
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%ecx, %eax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_11:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_hqdn3d_denoise_spatial
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hqdn3d_denoise_spatial
_hqdn3d_denoise_spatial:                ; @hqdn3d_denoise_spatial
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	str	w5, [sp, #12]                   ; 4-byte Folded Spill
                                        ; kill: def $w4 killed $w4 def $x4
	mov	x21, x3
	str	x2, [sp, #16]                   ; 8-byte Folded Spill
	mov	x23, x1
	mov	x26, x0
	add	x24, x6, #2, lsl #12            ; =8192
	add	x8, x7, #2, lsl #12             ; =8192
	str	x8, [sp, #72]                   ; 8-byte Folded Spill
	subs	w8, w4, #1
	stp	x8, x4, [sp, #32]               ; 16-byte Folded Spill
	b.lt	LBB0_4
; %bb.1:
	mov	x25, x26
	ldrb	w8, [x25], #1
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	mov	w9, w9
	lsl	w27, w8, #8
	sub	x20, x9, #1
	ldr	x22, [sp, #16]                  ; 8-byte Folded Reload
	mov	x28, x21
	mov	x19, x23
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	and	w8, w8, #0xff
	lsl	w1, w8, #8
	and	w0, w27, #0xffff
	mov	x2, x24
	bl	_hqdn3d_lowpass_mul
	mov	x27, x0
	strh	w0, [x22]
	ldrh	w0, [x28]
	mov	x1, x27
	ldr	x2, [sp, #72]                   ; 8-byte Folded Reload
	bl	_hqdn3d_lowpass_mul
	strh	w0, [x28]
	add	w8, w0, #127
	lsr	w8, w8, #8
	strb	w8, [x19]
	cbz	x20, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x25], #1
	add	x19, x19, #1
	add	x28, x28, #2
	add	x22, x22, #2
	sub	x20, x20, #1
	b	LBB0_2
LBB0_4:
	ldr	w25, [sp, #12]                  ; 4-byte Folded Reload
	cmp	w25, #1
	ldr	x22, [sp, #16]                  ; 8-byte Folded Reload
	ldr	x28, [sp, #72]                  ; 8-byte Folded Reload
	b.le	LBB0_12
; %bb.5:
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	sxtw	x20, w8
	sbfiz	x8, x8, #1, #32
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	mov	w9, #1
	str	x20, [sp, #48]                  ; 8-byte Folded Spill
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	w8, #0
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	x26, [sp, #56]                  ; 8-byte Folded Reload
	add	x23, x23, x20
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	add	x21, x21, x9
	mov	w19, w8
	lsl	x20, x19, #1
	ldrh	w0, [x22, x20]
	mov	x1, x27
	mov	x2, x24
	bl	_hqdn3d_lowpass_mul
	mov	x1, x0
	strh	w0, [x22, x20]
	ldrh	w0, [x21, x20]
	mov	x2, x28
	bl	_hqdn3d_lowpass_mul
	strh	w0, [x21, x20]
	ldr	x20, [sp, #48]                  ; 8-byte Folded Reload
	add	w8, w0, #127
	lsr	w8, w8, #8
	strb	w8, [x23, x19]
	ldr	w9, [sp, #68]                   ; 4-byte Folded Reload
	add	w9, w9, #1
	cmp	w9, w25
	b.eq	LBB0_12
LBB0_8:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	add	x8, x26, x20
	str	x8, [sp, #56]                   ; 8-byte Folded Spill
	ldrb	w8, [x8]
	lsl	w27, w8, #8
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	cmp	w8, #2
	str	w9, [sp, #68]                   ; 4-byte Folded Spill
	b.lt	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x19, [sp, #32]                  ; 8-byte Folded Reload
LBB0_10:                                ;   Parent Loop BB0_8 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrh	w0, [x22]
	mov	x1, x27
	mov	x2, x24
	bl	_hqdn3d_lowpass_mul
	mov	x28, x0
	strh	w0, [x22], #2
	add	x8, x26, x20
	ldrb	w8, [x8, #1]
	lsl	w1, w8, #8
	and	w0, w27, #0xffff
	mov	x2, x24
	bl	_hqdn3d_lowpass_mul
	mov	x27, x0
	lsl	x25, x20, #1
	ldrh	w0, [x21, x25]
	mov	x1, x28
	ldr	x28, [sp, #72]                  ; 8-byte Folded Reload
	mov	x2, x28
	bl	_hqdn3d_lowpass_mul
	strh	w0, [x21, x25]
	add	w8, w0, #127
	lsr	w8, w8, #8
	strb	w8, [x23, x20]
	add	x20, x20, #1
	subs	x19, x19, #1
	b.ne	LBB0_10
; %bb.11:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
                                        ; kill: def $w8 killed $w8 killed $x8
	ldr	w25, [sp, #12]                  ; 4-byte Folded Reload
	ldr	x22, [sp, #16]                  ; 8-byte Folded Reload
	ldr	x20, [sp, #48]                  ; 8-byte Folded Reload
	b	LBB0_7
LBB0_12:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_hqdn3d_denoise_spatial
.subsections_via_symbols
