	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tree_close
_tree_close:                            ## @tree_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	testl	%edi, %edi
	js	LBB0_3
## %bb.2:
	leaq	32(%rbx), %rdx
	movq	%rbx, %rsi
	callq	_close_and_restore_time
	movl	$-1, (%rbx)
LBB0_3:
	movq	8(%rbx), %rdi
	movq	_INVALID_DIR_HANDLE@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rdi
	je	LBB0_5
## %bb.4:
	callq	_closedir
	movq	(%r14), %rax
	movq	%rax, 8(%rbx)
LBB0_5:
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:
	movq	_isDirLink@GOTPCREL(%rip), %r14
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	%rbx, %rdi
	callq	_tree_pop
	movq	24(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %ecx
	testl	%ecx, (%rax)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	4(%rax), %edi
	callq	_close
	jmp	LBB0_9
LBB0_10:
	movl	16(%rbx), %edi
	testl	%edi, %edi
	js	LBB0_12
## %bb.11:
	callq	_close
	movl	$-1, 16(%rbx)
LBB0_12:
	movl	20(%rbx), %edi
	testl	%edi, %edi
	js	LBB0_14
## %bb.13:
	callq	_close
	movl	$-1, 20(%rbx)
LBB0_14:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_DIR_HANDLE,8,3         ## @INVALID_DIR_HANDLE
	.comm	_isDirLink,4,2                  ## @isDirLink
	.no_dead_strip	_tree_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tree_close
_tree_close:                            ; @tree_close
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_14
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0]
	tbnz	w0, #31, LBB0_3
; %bb.2:
	add	x2, x19, #32
	mov	x1, x19
	bl	_close_and_restore_time
	mov	w8, #-1
	str	w8, [x19]
LBB0_3:
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x20, _INVALID_DIR_HANDLE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _INVALID_DIR_HANDLE@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.4:
	bl	_closedir
	ldr	x8, [x20]
	str	x8, [x19, #8]
LBB0_5:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.6:
Lloh2:
	adrp	x20, _isDirLink@GOTPAGE
Lloh3:
	ldr	x20, [x20, _isDirLink@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x0, x19
	bl	_tree_pop
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x8]
	ldr	w10, [x20]
	tst	w10, w9
	b.eq	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w0, [x8, #4]
	bl	_close
	b	LBB0_7
LBB0_10:
	ldr	w0, [x19, #16]
	tbnz	w0, #31, LBB0_12
; %bb.11:
	bl	_close
	mov	w8, #-1
	str	w8, [x19, #16]
LBB0_12:
	ldr	w0, [x19, #20]
	tbnz	w0, #31, LBB0_14
; %bb.13:
	bl	_close
	mov	w8, #-1
	str	w8, [x19, #20]
LBB0_14:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_DIR_HANDLE,8,3         ; @INVALID_DIR_HANDLE
	.comm	_isDirLink,4,2                  ; @isDirLink
	.no_dead_strip	_tree_close
.subsections_via_symbols
