	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hqdn3d_denoise
_hqdn3d_denoise:                        ## @hqdn3d_denoise
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r14d
	movl	%r8d, %ebx
	movq	%rcx, %r12
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rbp), %r9
	movq	16(%rbp), %rax
	movq	(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.23:
	cmpw	$0, (%rax)
	je	LBB0_26
LBB0_24:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%r13, %rdx
	movl	%ebx, %r8d
	movl	%r14d, %r9d
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hqdn3d_denoise_spatial         ## TAILCALL
LBB0_1:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movl	%ebx, %edi
	imull	%r14d, %edi
	addl	%edi, %edi
	callq	_malloc
	movq	%rax, %rcx
	movq	%rax, (%r12)
	testl	%r14d, %r14d
	jle	LBB0_25
## %bb.2:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movslq	%ebx, %r8
	movl	%r8d, %edx
	movl	%edx, %eax
	andl	$-16, %eax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	addq	$-16, %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	%rax, %rsi
	shrq	$4, %rsi
	incq	%rsi
	movq	%rsi, %rax
	movq	%rsi, -104(%rbp)                ## 8-byte Spill
	andq	$-2, %rsi
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	andl	$3, %r12d
	leaq	(%r8,%r8), %r10
	xorl	%edi, %edi
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	movq	%r9, %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rdi
	addq	%r8, %r13
	addq	%r10, %rcx
	cmpl	%r14d, %edi
	je	LBB0_22
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_12 Depth 2
                                        ##     Child Loop BB0_18 Depth 2
                                        ##     Child Loop BB0_20 Depth 2
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$16, %ebx
	jb	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rdi, %rax
	imulq	%r8, %rax
	addq	%rdx, %rax
	leaq	(%r9,%rax), %rsi
	cmpq	%rcx, %rsi
	jbe	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	leaq	(%rsi,%rax,2), %rax
	cmpq	%rax, %r13
	jae	LBB0_10
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	xorl	%r11d, %r11d
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r11, %rsi
	notq	%rsi
	addq	%rdx, %rsi
	testq	%r12, %r12
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rax
	.p2align	4, 0x90
LBB0_18:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%r13,%r11), %r15d
	shll	$8, %r15d
	movw	%r15w, (%rcx,%r11,2)
	incq	%r11
	decq	%rax
	jne	LBB0_18
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$3, %rsi
	jb	LBB0_3
	.p2align	4, 0x90
LBB0_20:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzbl	(%r13,%r11), %eax
	shll	$8, %eax
	movw	%ax, (%rcx,%r11,2)
	movzbl	1(%r13,%r11), %eax
	shll	$8, %eax
	movw	%ax, 2(%rcx,%r11,2)
	movzbl	2(%r13,%r11), %eax
	shll	$8, %eax
	movw	%ax, 4(%rcx,%r11,2)
	movzbl	3(%r13,%r11), %eax
	shll	$8, %eax
	movw	%ax, 6(%rcx,%r11,2)
	addq	$4, %r11
	cmpq	%r11, %rdx
	jne	LBB0_20
	jmp	LBB0_3
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, -112(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_21
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	xorl	%esi, %esi
	.p2align	4, 0x90
LBB0_12:                                ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	pmovzxbw	(%r13,%rsi), %xmm0              ## xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero,mem[4],zero,mem[5],zero,mem[6],zero,mem[7],zero
	pmovzxbw	8(%r13,%rsi), %xmm1             ## xmm1 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero,mem[4],zero,mem[5],zero,mem[6],zero,mem[7],zero
	psllw	$8, %xmm0
	psllw	$8, %xmm1
	movdqu	%xmm0, (%rcx,%rsi,2)
	movdqu	%xmm1, 16(%rcx,%rsi,2)
	pmovzxbw	16(%r13,%rsi), %xmm0            ## xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero,mem[4],zero,mem[5],zero,mem[6],zero,mem[7],zero
	pmovzxbw	24(%r13,%rsi), %xmm1            ## xmm1 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero,mem[4],zero,mem[5],zero,mem[6],zero,mem[7],zero
	psllw	$8, %xmm0
	psllw	$8, %xmm1
	movdqu	%xmm0, 32(%rcx,%rsi,2)
	movdqu	%xmm1, 48(%rcx,%rsi,2)
	addq	$32, %rsi
	addq	$-2, %rax
	jne	LBB0_12
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	testb	$1, -104(%rbp)                  ## 1-byte Folded Reload
	je	LBB0_15
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	pmovzxbw	(%r13,%rsi), %xmm0              ## xmm0 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero,mem[4],zero,mem[5],zero,mem[6],zero,mem[7],zero
	pmovzxbw	8(%r13,%rsi), %xmm1             ## xmm1 = mem[0],zero,mem[1],zero,mem[2],zero,mem[3],zero,mem[4],zero,mem[5],zero,mem[6],zero,mem[7],zero
	psllw	$8, %xmm0
	psllw	$8, %xmm1
	movdqu	%xmm0, (%rcx,%rsi,2)
	movdqu	%xmm1, 16(%rcx,%rsi,2)
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movq	%rax, %r11
	cmpq	%rdx, %rax
	je	LBB0_3
	jmp	LBB0_16
LBB0_21:                                ##   in Loop: Header=BB0_4 Depth=1
	xorl	%esi, %esi
	testb	$1, -104(%rbp)                  ## 1-byte Folded Reload
	jne	LBB0_14
	jmp	LBB0_15
LBB0_22:
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpw	$0, (%rax)
	jne	LBB0_24
LBB0_26:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	movq	%rcx, %rdx
	movl	%ebx, %ecx
	movl	%r14d, %r8d
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_hqdn3d_denoise_temporal        ## TAILCALL
LBB0_25:
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpw	$0, (%rax)
	jne	LBB0_24
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_hqdn3d_denoise
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hqdn3d_denoise
_hqdn3d_denoise:                        ; @hqdn3d_denoise
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x7
	mov	x22, x6
	mov	x20, x5
	mov	x21, x4
	mov	x26, x3
	mov	x24, x2
	mov	x23, x1
	mov	x25, x0
	ldr	x3, [x3]
	cbz	x3, LBB0_3
LBB0_1:
	ldrh	w8, [x22]
	cbz	w8, LBB0_14
; %bb.2:
	mov	x0, x25
	mov	x1, x23
	mov	x2, x24
	mov	x4, x21
	mov	x5, x20
	mov	x6, x22
	mov	x7, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_hqdn3d_denoise_spatial
LBB0_3:
	mul	w8, w21, w20
	lsl	w0, w8, #1
	bl	_malloc
	mov	x3, x0
	str	x0, [x26]
	cmp	w20, #1
	b.lt	LBB0_1
; %bb.4:
	mov	x8, #0
	sxtw	x9, w21
	mov	w10, w21
	and	x11, x10, #0xffffffe0
	lsl	x12, x10, #1
	and	x12, x12, #0x1ffffffc0
	sbfiz	x13, x21, #1, #32
	add	x14, x25, #16
	mov	x15, x3
	mov	x16, x25
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x8, x8, #1
	add	x16, x16, x9
	add	x15, x15, x13
	add	x14, x14, x9
	cmp	w8, w20
	b.eq	LBB0_1
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
                                        ;     Child Loop BB0_13 Depth 2
	cmp	w21, #1
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w21, #32
	b.hs	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x17, #0
	b	LBB0_13
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	madd	x17, x8, x9, x10
	add	x0, x3, x17, lsl #1
	add	x17, x25, x17
	cmp	x17, x15
	mov	x17, #0
	ccmp	x16, x0, #2, hi
	b.lo	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x14
LBB0_11:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	d0, d1, [x0, #-16]
	ldp	d2, d3, [x0], #32
	shll.8h	v0, v0, #8
	shll.8h	v1, v1, #8
	shll.8h	v2, v2, #8
	shll.8h	v3, v3, #8
	add	x1, x15, x17
	stp	q0, q1, [x1]
	stp	q2, q3, [x1, #32]
	add	x17, x17, #64
	cmp	x12, x17
	b.ne	LBB0_11
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x17, x11
	cmp	x11, x10
	b.eq	LBB0_5
LBB0_13:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w0, [x16, x17]
	lsl	w0, w0, #8
	strh	w0, [x15, x17, lsl #1]
	add	x17, x17, #1
	cmp	x10, x17
	b.ne	LBB0_13
	b	LBB0_5
LBB0_14:
	mov	x0, x25
	mov	x1, x23
	mov	x2, x3
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_hqdn3d_denoise_temporal
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_hqdn3d_denoise
.subsections_via_symbols
