	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dir_read
_dir_read:                              ## @dir_read
	.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
	xorps	%xmm0, %xmm0
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movups	%xmm0, (%rsi)
	xorl	%ebx, %ebx
	cmpl	$-1, (%rdi)
	je	LBB0_1
## %bb.2:
	movl	4(%rdi), %edi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_27
## %bb.3:
	movq	%rax, %r15
	movl	$512, %ebx                      ## imm = 0x200
	movl	$512, %edi                      ## imm = 0x200
	callq	_xmalloc
	movq	%rax, %r12
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, 8(%rax)
	movq	_errno@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	%r15, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	xorl	%ecx, %ecx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	_excluded@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_excluded_filename
	testq	%rax, %rax
	je	LBB0_12
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	%r13, %r14
LBB0_17:                                ##   in Loop: Header=BB0_6 Depth=1
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	_errno@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	movq	%r15, %rdi
	callq	_readdir
	movq	%r14, %r13
	testq	%rax, %rax
	je	LBB0_18
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
	movq	(%rax), %r15
	movq	%rax, %rdi
	callq	_NAMLEN
	movl	%eax, %r14d
	cmpb	$46, (%r15)
	jne	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movb	1(%r15), %al
	testb	%al, %al
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpb	$46, %al
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_6 Depth=1
	cmpb	$0, 2(%r15)
	jne	LBB0_11
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	incl	%r14d
	movslq	%r14d, %rax
	leaq	(%rax,%r13), %r14
	cmpq	%r14, %rbx
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jb	LBB0_13
LBB0_16:                                ##   in Loop: Header=BB0_6 Depth=1
	addq	%r12, %r13
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	callq	_memcpy
	incq	-56(%rbp)                       ## 8-byte Folded Spill
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=2
	addq	%rbx, %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_xrealloc
	movq	%rax, %r12
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, 8(%rax)
	cmpq	%r14, %rbx
	jae	LBB0_16
LBB0_13:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_PTRDIFF_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %rax
	cmpq	%rax, %rbx
	jb	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	xorl	%eax, %eax
	callq	_xalloc_die
	jmp	LBB0_15
LBB0_1:
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
LBB0_21:
	movq	_PTRDIFF_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	shrq	$3, %rax
	decq	%rax
	cmpq	%r15, %rax
	ja	LBB0_23
## %bb.22:
	xorl	%eax, %eax
	callq	_xalloc_die
LBB0_23:
	leaq	8(,%r15,8), %rdi
	callq	_xmalloc
	movq	%rax, %r14
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	movq	%r15, 16(%rax)
	testq	%r15, %r15
	je	LBB0_26
## %bb.24:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, (%r14,%rbx,8)
	movq	%r12, %rdi
	callq	_strlen
	addq	%rax, %r12
	incq	%r12
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_25
LBB0_26:
	movq	$0, (%r14,%r15,8)
	movl	$1, %ebx
	jmp	LBB0_27
LBB0_4:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
LBB0_18:
	movq	_errno@GOTPCREL(%rip), %r14
	movl	(%r14), %ebx
	movq	%r15, %rdi
	callq	_closedir
	testl	%ebx, %ebx
	je	LBB0_20
## %bb.19:
	movl	%ebx, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_20:
	xorl	%ebx, %ebx
	testq	%rax, %rax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_21
LBB0_27:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,4,2                      ## @errno
	.comm	_excluded,4,2                   ## @excluded
	.comm	_PTRDIFF_MAX,4,2                ## @PTRDIFF_MAX
	.no_dead_strip	_dir_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dir_read
_dir_read:                              ; @dir_read
	.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	x19, x1
	stp	xzr, xzr, [x1]
	ldr	w8, [x0]
	cmn	w8, #1
	b.eq	LBB0_16
; %bb.1:
	ldr	w0, [x0, #4]
	bl	_opendir
	cbz	x0, LBB0_28
; %bb.2:
	mov	x21, x0
	mov	w0, #512
	bl	_xmalloc
	mov	x20, x0
	str	x0, [x19, #8]
Lloh0:
	adrp	x27, _errno@GOTPAGE
Lloh1:
	ldr	x27, [x27, _errno@GOTPAGEOFF]
	str	wzr, [x27]
	mov	x0, x21
	bl	_readdir
	cbz	x0, LBB0_23
; %bb.3:
	stp	xzr, xzr, [sp]                  ; 16-byte Folded Spill
	mov	w22, #512
Lloh2:
	adrp	x26, _excluded@GOTPAGE
Lloh3:
	ldr	x26, [x26, _excluded@GOTPAGEOFF]
Lloh4:
	adrp	x28, _PTRDIFF_MAX@GOTPAGE
Lloh5:
	ldr	x28, [x28, _PTRDIFF_MAX@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x0, x20, x8
	mov	x1, x23
	mov	x2, x24
	bl	_memcpy
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	add	x8, x8, #1
	stp	x8, x27, [sp]                   ; 16-byte Folded Spill
	mov	x27, x25
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	str	wzr, [x27]
	mov	x0, x21
	bl	_readdir
	cbz	x0, LBB0_24
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	x23, [x0]
	bl	_NAMLEN
	mov	x24, x0
	ldrb	w8, [x23]
	cmp	w8, #46
	b.ne	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x23, #1]
	cbz	w8, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w8, #46
	b.ne	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	ldrb	w8, [x23, #2]
	cbz	w8, LBB0_5
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w0, [x26]
	mov	x1, x23
	bl	_excluded_filename
	cbnz	x0, LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x25, x27
	add	w8, w24, #1
	sxtw	x24, w8
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x27, x8, x24
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=2
	lsl	x22, x22, #1
	mov	x0, x20
	mov	x1, x22
	bl	_xrealloc
	mov	x20, x0
	str	x0, [x19, #8]
LBB0_13:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	x22, x27
	b.hs	LBB0_4
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	w8, [x28]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	cmp	x22, w8, sxtw
	b.lo	LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=2
	bl	_xalloc_die
	b	LBB0_12
LBB0_16:
	mov	x20, #0
	mov	x23, #0
LBB0_17:
Lloh6:
	adrp	x8, _PTRDIFF_MAX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PTRDIFF_MAX@GOTPAGEOFF]
Lloh8:
	ldrsw	x8, [x8]
	lsr	x8, x8, #3
	sub	x8, x8, #1
	cmp	x8, x23
	b.hi	LBB0_19
; %bb.18:
	bl	_xalloc_die
LBB0_19:
	lsl	x8, x23, #3
	add	x0, x8, #8
	bl	_xmalloc
	mov	x21, x0
	str	x0, [x19]
	str	x23, [x19, #16]
	cbz	x23, LBB0_22
; %bb.20:
	mov	x19, x21
	mov	x22, x23
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	str	x20, [x19], #8
	mov	x0, x20
	bl	_strlen
	add	x8, x0, x20
	add	x20, x8, #1
	subs	x22, x22, #1
	b.ne	LBB0_21
LBB0_22:
	str	xzr, [x21, x23, lsl #3]
	mov	w0, #1
	b	LBB0_28
LBB0_23:
	str	xzr, [sp]                       ; 8-byte Folded Spill
LBB0_24:
	ldr	w22, [x27]
	mov	x0, x21
	bl	_closedir
	cbz	w22, LBB0_26
; %bb.25:
	mov	w0, #0
	str	w22, [x27]
	b	LBB0_28
LBB0_26:
	ldr	x23, [sp]                       ; 8-byte Folded Reload
	cbz	x0, LBB0_17
; %bb.27:
	mov	w0, #0
LBB0_28:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,4,2                      ; @errno
	.comm	_excluded,4,2                   ; @excluded
	.comm	_PTRDIFF_MAX,4,2                ; @PTRDIFF_MAX
	.no_dead_strip	_dir_read
.subsections_via_symbols
