	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_freebsd11_fts_close            ## -- Begin function freebsd11_fts_close
	.p2align	4, 0x90
_freebsd11_fts_close:                   ## @freebsd11_fts_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, %r14
	movq	56(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movq	(%rdi), %rax
	movq	_FTS_ROOTLEVEL@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jge	LBB0_3
## %bb.2:
	movq	%rdi, %rbx
LBB0_6:
	movq	%rbx, %rdi
	callq	_free
LBB0_7:
	movq	32(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_fts_lfree
LBB0_9:
	movq	24(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_11
## %bb.10:
	callq	_free
LBB0_11:
	movq	16(%r14), %rdi
	callq	_free
	movq	_FTS_NOCHDIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ISSET
	testl	%eax, %eax
	je	LBB0_12
LBB0_15:
	movq	%r14, %rdi
	callq	_free
	xorl	%eax, %eax
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	callq	_free
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	cmpq	(%r15), %rax
	jl	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%rdi), %rbx
	testq	%rbx, %rbx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	40(%rdi), %rbx
	jmp	LBB0_5
LBB0_12:
	movl	8(%r14), %edi
	callq	_fchdir
	movq	%rax, %rbx
	movq	_errno@GOTPCREL(%rip), %r15
	movl	(%r15), %r12d
	movl	8(%r14), %edi
	callq	__close
	testq	%rbx, %rbx
	je	LBB0_15
## %bb.13:
	testl	%r12d, %r12d
	je	LBB0_15
## %bb.14:
	movq	%r14, %rdi
	callq	_free
	movl	%r12d, (%r15)
	movl	$-1, %eax
LBB0_16:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FTS_ROOTLEVEL,8,3              ## @FTS_ROOTLEVEL
	.comm	_FTS_NOCHDIR,4,2                ## @FTS_NOCHDIR
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_freebsd11_fts_close            ; -- Begin function freebsd11_fts_close
	.p2align	2
_freebsd11_fts_close:                   ; @freebsd11_fts_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
	mov	x19, x0
	ldr	x0, [x0, #56]
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x0]
Lloh0:
	adrp	x21, _FTS_ROOTLEVEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FTS_ROOTLEVEL@GOTPAGEOFF]
	ldr	x9, [x21]
	cmp	x8, x9
	b.ge	LBB0_11
; %bb.2:
	mov	x20, x0
LBB0_3:
	mov	x0, x20
	bl	_free
LBB0_4:
	ldr	x0, [x19, #32]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_fts_lfree
LBB0_6:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_free
LBB0_8:
	ldr	x0, [x19, #16]
	bl	_free
Lloh2:
	adrp	x8, _FTS_NOCHDIR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FTS_NOCHDIR@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_ISSET
	cbz	w0, LBB0_13
LBB0_9:
	mov	x0, x19
	bl	_free
	mov	w0, #0
	b	LBB0_16
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	bl	_free
	ldr	x8, [x20]
	ldr	x9, [x21]
	mov	x0, x20
	cmp	x8, x9
	b.lt	LBB0_3
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x0, #48]
	cbnz	x20, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	x20, [x0, #40]
	b	LBB0_10
LBB0_13:
	ldr	w0, [x19, #8]
	bl	_fchdir
	mov	x20, x0
Lloh5:
	adrp	x21, _errno@GOTPAGE
Lloh6:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
	ldr	w22, [x21]
	ldr	w0, [x19, #8]
	bl	__close
	cbz	x20, LBB0_9
; %bb.14:
	cbz	w22, LBB0_9
; %bb.15:
	mov	x0, x19
	bl	_free
	str	w22, [x21]
	mov	w0, #-1
LBB0_16:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_FTS_ROOTLEVEL,8,3              ; @FTS_ROOTLEVEL
	.comm	_FTS_NOCHDIR,4,2                ; @FTS_NOCHDIR
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
