	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nlmeans_close
_nlmeans_close:                         ## @nlmeans_close
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	testq	%r15, %r15
	je	LBB0_29
## %bb.1:
	movq	%rdi, %r14
	leaq	40(%r15), %rdi
	callq	_taskset_fini
	movq	(%r15), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_9
## %bb.2:
	movq	24(%r15), %rax
	movl	$32, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r12
	movq	(%r15), %rcx
	movslq	(%rcx), %rdx
	addq	$48, %rbx
	cmpq	%rdx, %r12
	jge	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rbx), %rcx
	movq	16(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	8(%rcx), %rdi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	callq	_free
	movq	24(%r15), %rax
	movq	(%rax,%rbx), %rcx
	movq	$0, 16(%rcx)
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	8(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	callq	_free
	movq	24(%r15), %rax
	movq	(%rax,%rbx), %rcx
	movq	$0, 8(%rcx)
	jmp	LBB0_8
LBB0_9:
	cmpl	$0, 4(%rcx)
	jle	LBB0_17
## %bb.10:
	movq	24(%r15), %rax
	movl	$32, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%r12
	movq	(%r15), %rcx
	movslq	4(%rcx), %rdx
	addq	$48, %rbx
	cmpq	%rdx, %r12
	jge	LBB0_17
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rbx), %rcx
	movq	40(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpq	32(%rcx), %rdi
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	callq	_free
	movq	24(%r15), %rax
	movq	(%rax,%rbx), %rcx
	movq	$0, 40(%rcx)
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	32(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	callq	_free
	movq	24(%r15), %rax
	movq	(%rax,%rbx), %rcx
	movq	$0, 32(%rcx)
	jmp	LBB0_16
LBB0_17:
	cmpl	$0, 8(%rcx)
	jle	LBB0_25
## %bb.18:
	movq	24(%r15), %rax
	movl	$32, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_19 Depth=1
	incq	%r12
	movq	(%r15), %rcx
	movslq	8(%rcx), %rcx
	addq	$48, %rbx
	cmpq	%rcx, %r12
	jge	LBB0_25
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rax,%rbx), %rcx
	movq	64(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	cmpq	56(%rcx), %rdi
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	callq	_free
	movq	24(%r15), %rax
	movq	(%rax,%rbx), %rcx
	movq	$0, 64(%rcx)
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	56(%rcx), %rdi
	testq	%rdi, %rdi
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_19 Depth=1
	callq	_free
	movq	24(%r15), %rax
	movq	(%rax,%rbx), %rcx
	movq	$0, 56(%rcx)
	jmp	LBB0_24
LBB0_25:
	movl	12(%r15), %eax
	addl	8(%r15), %eax
	jle	LBB0_28
## %bb.26:
	movl	$32, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_27:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	movq	(%rax,%rbx), %rdi
	callq	_hb_lock_close
	movq	24(%r15), %rax
	movq	(%rax,%rbx), %rdi
	addq	$24, %rdi
	callq	_hb_lock_close
	movq	24(%r15), %rax
	movq	(%rax,%rbx), %rdi
	addq	$48, %rdi
	callq	_hb_lock_close
	incq	%r12
	movslq	8(%r15), %rax
	movslq	12(%r15), %rcx
	addq	%rax, %rcx
	addq	$48, %rbx
	cmpq	%rcx, %r12
	jl	LBB0_27
LBB0_28:
	movq	24(%r15), %rdi
	callq	_free
	movq	16(%r15), %rdi
	callq	_free
	movq	%r15, %rdi
	callq	_free
	movq	$0, (%r14)
LBB0_29:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_nlmeans_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nlmeans_close
_nlmeans_close:                         ; @nlmeans_close
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x20, [x0]
	cbz	x20, LBB0_29
; %bb.1:
	mov	x19, x0
	add	x0, x20, #40
	bl	_taskset_fini
	ldr	x9, [x20]
	ldr	w8, [x9]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.2:
	mov	x21, #0
	ldr	x8, [x20, #24]
	mov	w22, #32
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	ldr	x9, [x20]
	ldrsw	x10, [x9]
	add	x22, x22, #48
	cmp	x21, x10
	b.ge	LBB0_9
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, x22]
	ldr	x0, [x9, #16]
	cbz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [x9, #8]
	cmp	x0, x10
	b.eq	LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_free
	ldr	x8, [x20, #24]
	ldr	x9, [x8, x22]
	str	xzr, [x9, #16]
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x0, [x9, #8]
	cbz	x0, LBB0_3
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_free
	ldr	x8, [x20, #24]
	ldr	x9, [x8, x22]
	str	xzr, [x9, #8]
	b	LBB0_3
LBB0_9:
	ldr	w8, [x9, #4]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.10:
	mov	x21, #0
	ldr	x8, [x20, #24]
	mov	w22, #32
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x21, x21, #1
	ldr	x9, [x20]
	ldrsw	x10, [x9, #4]
	add	x22, x22, #48
	cmp	x21, x10
	b.ge	LBB0_17
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, x22]
	ldr	x0, [x9, #40]
	cbz	x0, LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x10, [x9, #32]
	cmp	x0, x10
	b.eq	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_free
	ldr	x8, [x20, #24]
	ldr	x9, [x8, x22]
	str	xzr, [x9, #40]
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x0, [x9, #32]
	cbz	x0, LBB0_11
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_free
	ldr	x8, [x20, #24]
	ldr	x9, [x8, x22]
	str	xzr, [x9, #32]
	b	LBB0_11
LBB0_17:
	ldr	w8, [x9, #8]
	cmp	w8, #1
	b.lt	LBB0_25
; %bb.18:
	mov	x21, #0
	ldr	x8, [x20, #24]
	mov	w22, #32
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x21, x21, #1
	ldr	x9, [x20]
	ldrsw	x9, [x9, #8]
	add	x22, x22, #48
	cmp	x21, x9
	b.ge	LBB0_25
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8, x22]
	ldr	x0, [x9, #64]
	cbz	x0, LBB0_23
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	x10, [x9, #56]
	cmp	x0, x10
	b.eq	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	bl	_free
	ldr	x8, [x20, #24]
	ldr	x9, [x8, x22]
	str	xzr, [x9, #64]
LBB0_23:                                ;   in Loop: Header=BB0_20 Depth=1
	ldr	x0, [x9, #56]
	cbz	x0, LBB0_19
; %bb.24:                               ;   in Loop: Header=BB0_20 Depth=1
	bl	_free
	ldr	x8, [x20, #24]
	ldr	x9, [x8, x22]
	str	xzr, [x9, #56]
	b	LBB0_19
LBB0_25:
	ldp	w8, w9, [x20, #8]
	add	w8, w9, w8
	cmp	w8, #1
	b.lt	LBB0_28
; %bb.26:
	mov	x21, #0
	mov	w22, #32
LBB0_27:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #24]
	ldr	x0, [x8, x22]
	bl	_hb_lock_close
	ldr	x8, [x20, #24]
	ldr	x8, [x8, x22]
	add	x0, x8, #24
	bl	_hb_lock_close
	ldr	x8, [x20, #24]
	ldr	x8, [x8, x22]
	add	x0, x8, #48
	bl	_hb_lock_close
	add	x21, x21, #1
	ldpsw	x8, x9, [x20, #8]
	add	x22, x22, #48
	add	x8, x9, x8
	cmp	x21, x8
	b.lt	LBB0_27
LBB0_28:
	ldr	x0, [x20, #24]
	bl	_free
	ldr	x0, [x20, #16]
	bl	_free
	mov	x0, x20
	bl	_free
	str	xzr, [x19]
LBB0_29:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_nlmeans_close
.subsections_via_symbols
