	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$0, -48(%rbp)
	movl	$12, %edi
	movl	$64, %esi
	callq	_av_mallocz_array
	movq	%rax, %rbx
	movq	%rax, -80(%rbp)
	movl	$12, %edi
	movl	$64, %esi
	callq	_av_mallocz_array
	movq	%rax, -72(%rbp)
	movl	$-1, %r14d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.1:
	testq	%rax, %rax
	je	LBB0_10
## %bb.2:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	addq	$68, %r12
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rbx
	addq	$68, %rbx
	leaq	-48(%rbp), %rdi
	callq	_ff_nlmeans_init
	movl	$-3, %r13d
	leaq	_main.src(%rip), %r14
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movl	$-3, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_printf
	leaq	-48(%rbp), %rdi
	movq	%r12, %rsi
	movl	$16, %edx
	movq	%r14, %rcx
	movl	$8, %r8d
	movl	%r15d, %r9d
	pushq	$5
	pushq	$6
	pushq	$3
	pushq	%r13
	callq	_compute_ssd_integral_image
	addq	$32, %rsp
	movq	%r12, %rdi
	movl	$12, %esi
	movl	$11, %edx
	movl	$16, %ecx
	callq	_display_integral
	subq	$8, %rsp
	movq	%rbx, %rdi
	movl	$16, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movq	%r14, %r8
	movl	$8, %r9d
	pushq	$11
	pushq	$12
	pushq	$5
	pushq	$6
	pushq	$3
	pushq	%r13
	pushq	%r15
	callq	_compute_unsafe_ssd_integral_image
	addq	$64, %rsp
	movq	%rbx, %rdi
	movl	$12, %esi
	movl	$11, %edx
	movl	$16, %ecx
	callq	_display_integral
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	$768, %edx                      ## imm = 0x300
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=2
	incl	%r15d
	cmpl	$4, %r15d
	jne	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%r13d
	cmpl	$4, %r13d
	jne	LBB0_3
## %bb.8:
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_6:
	leaq	L_str(%rip), %rdi
	callq	_puts
	movl	$1, %r14d
LBB0_9:
	leaq	-80(%rbp), %rdi
	callq	_av_freep
	leaq	-72(%rbp), %rdi
	callq	_av_freep
LBB0_10:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @main.src
_main.src:
	.long	176                             ## 0xb0
	.long	113                             ## 0x71
	.long	251                             ## 0xfb
	.long	216                             ## 0xd8
	.long	1                               ## 0x1
	.long	217                             ## 0xd9
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	81                              ## 0x51
	.long	142                             ## 0x8e
	.long	65                              ## 0x41
	.long	15                              ## 0xf
	.long	132                             ## 0x84
	.long	88                              ## 0x58
	.long	3                               ## 0x3
	.long	4                               ## 0x4
	.long	199                             ## 0xc7
	.long	141                             ## 0x8d
	.long	7                               ## 0x7
	.long	112                             ## 0x70
	.long	92                              ## 0x5c
	.long	71                              ## 0x47
	.long	5                               ## 0x5
	.long	6                               ## 0x6
	.long	9                               ## 0x9
	.long	78                              ## 0x4e
	.long	252                             ## 0xfc
	.long	116                             ## 0x74
	.long	143                             ## 0x8f
	.long	154                             ## 0x9a
	.long	7                               ## 0x7
	.long	8                               ## 0x8
	.long	96                              ## 0x60
	.long	142                             ## 0x8e
	.long	32                              ## 0x20
	.long	170                             ## 0xaa
	.long	149                             ## 0x95
	.long	125                             ## 0x7d
	.long	9                               ## 0x9
	.long	10                              ## 0xa

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"xoff=%d yoff=%d\n"

L_str:                                  ## @str
	.asciz	"Integral mismatch"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	wzr, [sp, #40]
	mov	w0, #12
	mov	w1, #64
	bl	_av_mallocz_array
	mov	x19, x0
	str	x0, [sp, #32]
	mov	w0, #12
	mov	w1, #64
	bl	_av_mallocz_array
	str	x0, [sp, #24]
	mov	w21, #-1
	cbz	x19, LBB0_10
; %bb.1:
	mov	x20, x0
	cbz	x0, LBB0_10
; %bb.2:
	add	x21, x19, #68
	add	x22, x20, #68
	add	x0, sp, #40
	bl	_ff_nlmeans_init
	mov	w23, #-3
	mov	w28, #11
	mov	x27, #5
	movk	x27, #12, lsl #32
	mov	x24, #3
	movk	x24, #6, lsl #32
Lloh0:
	adrp	x25, _main.src@PAGE
Lloh1:
	add	x25, x25, _main.src@PAGEOFF
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	mov	w26, #-3
LBB0_4:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	stp	x26, x23, [sp]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	mov	x8, #6
	movk	x8, #5, lsl #32
	str	x8, [sp]
	add	x0, sp, #40
	mov	x1, x21
	mov	w2, #16
	mov	x3, x25
	mov	w4, #8
	mov	x5, x26
	mov	x6, x23
	mov	w7, #3
	bl	_compute_ssd_integral_image
	mov	x0, x21
	mov	w1, #12
	mov	w2, #11
	mov	w3, #16
	bl	_display_integral
	str	w28, [sp, #16]
	stp	x24, x27, [sp]
	mov	x0, x22
	mov	w1, #16
	mov	w2, #0
	mov	w3, #0
	mov	x4, x25
	mov	w5, #8
	mov	x6, x26
	mov	x7, x23
	bl	_compute_unsafe_ssd_integral_image
	mov	x0, x22
	mov	w1, #12
	mov	w2, #11
	mov	w3, #16
	bl	_display_integral
	mov	x0, x19
	mov	x1, x20
	mov	w2, #768
	bl	_memcmp
	cbnz	x0, LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	add	w26, w26, #1
	cmp	w26, #4
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w23, w23, #1
	cmp	w23, #4
	b.ne	LBB0_3
; %bb.7:
	mov	w21, #0
	b	LBB0_9
LBB0_8:
Lloh4:
	adrp	x0, l_str@PAGE
Lloh5:
	add	x0, x0, l_str@PAGEOFF
	bl	_puts
	mov	w21, #1
LBB0_9:
	add	x0, sp, #32
	bl	_av_freep
	add	x0, sp, #24
	bl	_av_freep
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @main.src
_main.src:
	.long	176                             ; 0xb0
	.long	113                             ; 0x71
	.long	251                             ; 0xfb
	.long	216                             ; 0xd8
	.long	1                               ; 0x1
	.long	217                             ; 0xd9
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	81                              ; 0x51
	.long	142                             ; 0x8e
	.long	65                              ; 0x41
	.long	15                              ; 0xf
	.long	132                             ; 0x84
	.long	88                              ; 0x58
	.long	3                               ; 0x3
	.long	4                               ; 0x4
	.long	199                             ; 0xc7
	.long	141                             ; 0x8d
	.long	7                               ; 0x7
	.long	112                             ; 0x70
	.long	92                              ; 0x5c
	.long	71                              ; 0x47
	.long	5                               ; 0x5
	.long	6                               ; 0x6
	.long	9                               ; 0x9
	.long	78                              ; 0x4e
	.long	252                             ; 0xfc
	.long	116                             ; 0x74
	.long	143                             ; 0x8f
	.long	154                             ; 0x9a
	.long	7                               ; 0x7
	.long	8                               ; 0x8
	.long	96                              ; 0x60
	.long	142                             ; 0x8e
	.long	32                              ; 0x20
	.long	170                             ; 0xaa
	.long	149                             ; 0x95
	.long	125                             ; 0x7d
	.long	9                               ; 0x9
	.long	10                              ; 0xa

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"xoff=%d yoff=%d\n"

l_str:                                  ; @str
	.asciz	"Integral mismatch"

.subsections_via_symbols
