	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_savedir                        ## -- Begin function savedir
	.p2align	4, 0x90
_savedir:                               ## @savedir
	.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
	movq	%rcx, %r12
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	callq	_opendir
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	cmpl	$2, %ebx
	movl	$1, %edi
	cmovgel	%ebx, %edi
	movl	%edi, -68(%rbp)                 ## 4-byte Spill
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %rbx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	movq	%r15, %rax
	orq	%r12, %rax
	setne	-41(%rbp)                       ## 1-byte Folded Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_26
LBB0_19:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rcx
	subq	%rbx, %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	%rcx, %rdi
	movq	%rax, %rbx
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14), %rsi
	callq	_stpcpy
	incq	%rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_readdir
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_22
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	cmpb	$46, (%rax)
	jne	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movzbl	1(%rax), %ecx
	cmpb	$46, %cl
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	testb	%cl, %cl
	jne	LBB0_11
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpb	$0, 2(%rax)
	je	LBB0_21
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r14, %rdi
	callq	_NAMLEN
	movl	%eax, %r13d
	cmpb	$0, -41(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_17
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_isdir1
	testl	%eax, %eax
	jne	LBB0_17
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	testq	%r15, %r15
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_path@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_excluded_filename
	testq	%rax, %rax
	je	LBB0_21
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	testq	%r12, %r12
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_path@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_excluded_filename
	testq	%rax, %rax
	jne	LBB0_21
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%edi, %eax
	subl	%ebx, %eax
	addl	%r13d, %eax
	addl	$2, %eax
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	subl	%esi, %eax
	jle	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_7 Depth=1
	addl	$1023, %eax                     ## imm = 0x3FF
	andl	$-1024, %eax                    ## imm = 0xFC00
	addl	%eax, %esi
	movq	%rbx, %rdi
	movl	%esi, -68(%rbp)                 ## 4-byte Spill
	callq	_realloc
	testq	%rax, %rax
	jne	LBB0_19
LBB0_3:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_closedir
	xorl	%ebx, %ebx
	jmp	LBB0_26
LBB0_5:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
LBB0_22:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movb	$0, (%rax)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_CLOSEDIR
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movq	%rbx, %rdi
	callq	_free
	xorl	%ebx, %ebx
	jmp	LBB0_26
LBB0_24:
	movq	_path@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.25:
	callq	_free
	movq	$0, (%r14)
	movq	_pathlen@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
LBB0_26:
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_path,8,3                       ## @path
	.comm	_pathlen,8,3                    ## @pathlen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_savedir                        ; -- Begin function savedir
	.p2align	2
_savedir:                               ; @savedir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x23, x0
	bl	_opendir
	cbz	x0, LBB0_19
; %bb.1:
	mov	x20, x0
	cmp	w19, #1
	csinc	w24, w19, wzr, gt
	mov	x0, x24
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_20
; %bb.2:
	mov	x0, x20
	bl	_readdir
	cbz	x0, LBB0_21
; %bb.3:
	mov	x26, x0
	orr	x8, x22, x21
	cmp	x8, #0
	cset	w28, ne
Lloh0:
	adrp	x25, _path@GOTPAGE
Lloh1:
	ldr	x25, [x25, _path@GOTPAGEOFF]
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [x26]
	mov	x0, x9
	bl	_stpcpy
	add	x8, x0, #1
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x20
	bl	_readdir
	mov	x26, x0
	cbz	x0, LBB0_22
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	ldrb	w9, [x8]
	cmp	w9, #46
	b.ne	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w9, [x8, #1]
	cmp	w9, #46
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	cbnz	w9, LBB0_10
	b	LBB0_5
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x8, #2]
	cbz	w8, LBB0_5
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x26
	bl	_NAMLEN
	mov	x27, x0
	cbz	w28, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [x26]
	mov	x0, x23
	bl	_isdir1
	cbnz	w0, LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	cbz	x22, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [x25]
	mov	x0, x22
	mov	w2, #0
	bl	_excluded_filename
	cbz	x0, LBB0_5
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	x21, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [x25]
	mov	x0, x21
	mov	w2, #0
	bl	_excluded_filename
	cbnz	x0, LBB0_5
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	sub	w8, w9, w19
	add	w8, w8, w27
	add	w8, w8, #2
	subs	w8, w8, w24
	b.le	LBB0_4
; %bb.17:                               ;   in Loop: Header=BB0_6 Depth=1
	add	w8, w8, #1023
	and	w8, w8, #0xfffffc00
	add	w24, w24, w8
	mov	x0, x19
	mov	x1, x24
	bl	_realloc
	cbz	x0, LBB0_27
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
	sub	x8, x0, x19
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	add	x9, x9, x8
	mov	x19, x0
	b	LBB0_4
LBB0_19:
	mov	x19, #0
	b	LBB0_26
LBB0_20:
	mov	x0, x20
	bl	_closedir
	b	LBB0_26
LBB0_21:
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
LBB0_22:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	strb	wzr, [x8]
	mov	x0, x20
	bl	_CLOSEDIR
	cbz	x0, LBB0_24
; %bb.23:
	mov	x0, x19
	bl	_free
	mov	x19, #0
	b	LBB0_26
LBB0_24:
Lloh2:
	adrp	x20, _path@GOTPAGE
Lloh3:
	ldr	x20, [x20, _path@GOTPAGEOFF]
	ldr	x0, [x20]
	cbz	x0, LBB0_26
; %bb.25:
	bl	_free
	str	xzr, [x20]
Lloh4:
	adrp	x8, _pathlen@GOTPAGE
Lloh5:
	ldr	x8, [x8, _pathlen@GOTPAGEOFF]
Lloh6:
	str	xzr, [x8]
LBB0_26:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_27:
	mov	x0, x20
	bl	_closedir
	mov	x19, #0
	b	LBB0_26
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotStr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_path,8,3                       ; @path
	.comm	_pathlen,8,3                    ; @pathlen
.subsections_via_symbols
