	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fts_safe_changedir
_fts_safe_changedir:                    ## @fts_safe_changedir
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	_FTS_NOCHDIR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ISSET
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_12
## %bb.1:
	movl	%r12d, %r14d
	testl	%r12d, %r12d
	jns	LBB0_4
## %bb.2:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movq	_O_CLOEXEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	__open
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_3
LBB0_4:
	leaq	-56(%rbp), %rsi
	movl	%r14d, %edi
	callq	_freebsd11_fstat
	movl	$-1, %ebx
	testq	%rax, %rax
	jne	LBB0_9
## %bb.5:
	movq	(%r15), %rax
	cmpq	-56(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movq	8(%r15), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.8:
	movl	%r14d, %edi
	callq	_fchdir
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_7:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_9:
	movq	_errno@GOTPCREL(%rip), %r15
	movl	(%r15), %r13d
	testl	%r12d, %r12d
	jns	LBB0_11
## %bb.10:
	movl	%r14d, %edi
	callq	__close
LBB0_11:
	movl	%r13d, (%r15)
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	$-1, %ebx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_FTS_NOCHDIR,4,2                ## @FTS_NOCHDIR
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_fts_safe_changedir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fts_safe_changedir
_fts_safe_changedir:                    ; @fts_safe_changedir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x22, x3
	mov	x19, x2
	mov	x21, x1
Lloh0:
	adrp	x8, _FTS_NOCHDIR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FTS_NOCHDIR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ISSET
	cbz	x0, LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_13
LBB0_2:
	mov	x20, x19
	tbz	w19, #31, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _O_CLOEXEC@GOTPAGE
Lloh7:
	ldr	x9, [x9, _O_CLOEXEC@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x22
	mov	w2, #0
	bl	__open
	mov	x20, x0
	tbnz	w0, #31, LBB0_14
LBB0_4:
	mov	x1, sp
	mov	x0, x20
	bl	_freebsd11_fstat
Lloh9:
	adrp	x22, _errno@GOTPAGE
Lloh10:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
	cbnz	x0, LBB0_9
; %bb.5:
	ldr	x8, [x21]
	ldr	x9, [sp]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.6:
	ldr	x8, [x21, #8]
	ldr	x9, [sp, #8]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_fchdir
	mov	x21, x0
	b	LBB0_10
LBB0_8:
Lloh11:
	adrp	x8, _ENOENT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [x22]
LBB0_9:
	mov	w21, #-1
LBB0_10:
	ldr	w23, [x22]
	tbz	w19, #31, LBB0_12
; %bb.11:
	mov	x0, x20
	bl	__close
LBB0_12:
	str	w23, [x22]
LBB0_13:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_14:
	mov	w21, #-1
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_FTS_NOCHDIR,4,2                ; @FTS_NOCHDIR
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_fts_safe_changedir
.subsections_via_symbols
