	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function expand_dir
_expand_dir:                            ## @expand_dir
	.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
	pushq	%rax
	.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, %r13
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_dollar
	movq	%rax, %rbx
	movq	_xfree@GOTPCREL(%rip), %rsi
	movq	%rax, %rdi
	callq	_cleanup_push
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_tilde
	testq	%rax, %rax
	je	LBB0_9
LBB0_3:
	xorl	%r13d, %r13d
LBB0_4:
	movq	%r13, %rdi
	callq	_xfree
	movq	_SPELL@GOTPCREL(%rip), %rax
	cmpq	%r12, (%rax)
	je	LBB0_8
## %bb.5:
	movq	_SearchNoDirErr@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_8
## %bb.6:
	cmpl	$0, (%r15)
	je	LBB0_11
## %bb.7:
	movq	8(%r15), %r14
	jmp	LBB0_12
LBB0_8:
	movq	%rbx, %rdi
	callq	_cleanup_until
	movl	$-2, %eax
	jmp	LBB0_26
LBB0_9:
	cmpl	$0, (%r15)
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	jne	LBB0_16
## %bb.10:
	movq	_STRdot@GOTPCREL(%rip), %rax
	jmp	LBB0_17
LBB0_11:
	testq	%rbx, %rbx
	cmovneq	%rbx, %r14
LBB0_12:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ENOTDIR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.13:
	leaq	L_.str.1(%rip), %rdx
	movl	$30, %edi
	movl	$10, %esi
	jmp	LBB0_25
LBB0_14:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.15:
	leaq	L_.str.2(%rip), %rdx
	movl	$30, %edi
	movl	$11, %esi
	jmp	LBB0_25
LBB0_16:
	leaq	8(%r15), %rax
LBB0_17:
	movq	_symlinks@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_SYM_IGNORE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	sete	%dl
	movq	_SYM_EXPAND@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rcx
	movq	(%rax), %rdi
	sete	%al
	orb	%dl, %al
	movzbl	%al, %esi
	callq	_dnormalize
	testq	%rax, %rax
	je	LBB0_3
## %bb.18:
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_short2str
	movl	%eax, %edi
	callq	_opendir
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_4
## %bb.19:
	movq	%rbx, %rdi
	callq	_cleanup_until
	cmpb	$0, (%r14)
	je	LBB0_30
## %bb.20:
	movslq	(%r15), %rax
	testq	%rax, %rax
	je	LBB0_28
## %bb.21:
	movq	8(%r15), %rcx
	movb	-1(%rax,%rcx), %bl
	movl	$0, (%r15)
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_Strbuf_append
	cmpb	$47, %bl
	jne	LBB0_29
## %bb.22:
	movq	8(%r15), %rax
	movslq	(%r15), %rcx
	cmpb	$47, -1(%rcx,%rax)
	je	LBB0_29
## %bb.23:
	movq	%r15, %rdi
	movl	$47, %esi
	callq	_Strbuf_append1
	jmp	LBB0_29
LBB0_24:
	leaq	L_.str.3(%rip), %rdx
	movl	$30, %edi
	movl	$12, %esi
LBB0_25:
	callq	_CGETS
	movl	%eax, %edx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	callq	_xprintf
	movq	_NeedsRedraw@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	%rbx, %rdi
	callq	_cleanup_until
	movl	$-1, %eax
LBB0_26:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_28:
	movl	$0, (%r15)
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_Strbuf_append
LBB0_29:
	movq	%r15, %rdi
	callq	_Strbuf_terminate
LBB0_30:
	movq	%r13, %rdi
	callq	_xfree
	xorl	%eax, %eax
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_STRdot,8,3                     ## @STRdot
	.comm	_symlinks,8,3                   ## @symlinks
	.comm	_SYM_IGNORE,8,3                 ## @SYM_IGNORE
	.comm	_SYM_EXPAND,8,3                 ## @SYM_EXPAND
	.comm	_SPELL,8,3                      ## @SPELL
	.comm	_SearchNoDirErr,8,3             ## @SearchNoDirErr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n%S %s\n"

	.comm	_errno,8,3                      ## @errno
	.comm	_ENOTDIR,8,3                    ## @ENOTDIR
L_.str.1:                               ## @.str.1
	.asciz	"not a directory"

	.comm	_ENOENT,8,3                     ## @ENOENT
L_.str.2:                               ## @.str.2
	.asciz	"not found"

L_.str.3:                               ## @.str.3
	.asciz	"unreadable"

	.comm	_NeedsRedraw,4,2                ## @NeedsRedraw
	.no_dead_strip	_expand_dir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function expand_dir
_expand_dir:                            ; @expand_dir
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x24, x2
	mov	x20, x1
	mov	x21, x0
	bl	_dollar
	mov	x19, x0
Lloh0:
	adrp	x1, _xfree@GOTPAGE
Lloh1:
	ldr	x1, [x1, _xfree@GOTPAGEOFF]
	bl	_cleanup_push
	cbz	x19, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	x1, x19
	bl	_tilde
	cbz	x0, LBB0_7
LBB0_2:
	mov	x23, #0
LBB0_3:
	mov	x0, x23
	bl	_xfree
Lloh2:
	adrp	x8, _SPELL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SPELL@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _SearchNoDirErr@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SearchNoDirErr@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x22
	ccmp	x9, #0, #0, ne
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_cleanup_until
	mov	w0, #-2
	b	LBB0_21
LBB0_5:
	ldr	w8, [x20]
	cbz	w8, LBB0_14
; %bb.6:
	ldr	x20, [x20, #8]
	b	LBB0_15
LBB0_7:
	mov	x8, x20
	ldr	w9, [x8], #8
Lloh8:
	adrp	x10, _STRdot@GOTPAGE
Lloh9:
	ldr	x10, [x10, _STRdot@GOTPAGEOFF]
	cmp	w9, #0
	csel	x8, x10, x8, eq
	ldr	x0, [x8]
Lloh10:
	adrp	x8, _symlinks@GOTPAGE
Lloh11:
	ldr	x8, [x8, _symlinks@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
Lloh13:
	adrp	x9, _SYM_IGNORE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SYM_IGNORE@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh16:
	adrp	x9, _SYM_EXPAND@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SYM_EXPAND@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w1, eq
	bl	_dnormalize
	mov	x23, x0
	cbz	x0, LBB0_3
; %bb.8:
	mov	x0, x23
	bl	_short2str
	bl	_opendir
	str	x0, [x24]
	cbz	x0, LBB0_3
; %bb.9:
	mov	x0, x19
	bl	_cleanup_until
	ldrb	w8, [x21]
	cbz	w8, LBB0_24
; %bb.10:
	ldrsw	x8, [x20]
	cbz	w8, LBB0_22
; %bb.11:
	ldr	x9, [x20, #8]
	add	x8, x8, x9
	ldurb	w19, [x8, #-1]
	str	wzr, [x20]
	mov	x0, x20
	mov	x1, x23
	bl	_Strbuf_append
	cmp	w19, #47
	b.ne	LBB0_23
; %bb.12:
	ldr	x8, [x20, #8]
	ldrsw	x9, [x20]
	add	x8, x9, x8
	ldurb	w8, [x8, #-1]
	cmp	w8, #47
	b.eq	LBB0_23
; %bb.13:
	mov	x0, x20
	mov	w1, #47
	bl	_Strbuf_append1
	b	LBB0_23
LBB0_14:
	cmp	x19, #0
	csel	x20, x21, x19, eq
LBB0_15:
Lloh19:
	adrp	x8, _errno@GOTPAGE
Lloh20:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
Lloh22:
	adrp	x9, _ENOTDIR@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ENOTDIR@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_17
; %bb.16:
Lloh25:
	adrp	x2, l_.str.1@PAGE
Lloh26:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w0, #30
	mov	w1, #10
	b	LBB0_20
LBB0_17:
Lloh27:
	adrp	x9, _ENOENT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_19
; %bb.18:
Lloh30:
	adrp	x2, l_.str.2@PAGE
Lloh31:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	w0, #30
	mov	w1, #11
	b	LBB0_20
LBB0_19:
Lloh32:
	adrp	x2, l_.str.3@PAGE
Lloh33:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w0, #30
	mov	w1, #12
LBB0_20:
	bl	_CGETS
	mov	x2, x0
Lloh34:
	adrp	x0, l_.str@PAGE
Lloh35:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_xprintf
Lloh36:
	adrp	x8, _NeedsRedraw@GOTPAGE
Lloh37:
	ldr	x8, [x8, _NeedsRedraw@GOTPAGEOFF]
	mov	w9, #1
Lloh38:
	str	w9, [x8]
	mov	x0, x19
	bl	_cleanup_until
	mov	w0, #-1
LBB0_21:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_22:
	str	wzr, [x20]
	mov	x0, x20
	mov	x1, x23
	bl	_Strbuf_append
LBB0_23:
	mov	x0, x20
	bl	_Strbuf_terminate
LBB0_24:
	mov	x0, x23
	bl	_xfree
	mov	w0, #0
	b	LBB0_21
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotStr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_STRdot,8,3                     ; @STRdot
	.comm	_symlinks,8,3                   ; @symlinks
	.comm	_SYM_IGNORE,8,3                 ; @SYM_IGNORE
	.comm	_SYM_EXPAND,8,3                 ; @SYM_EXPAND
	.comm	_SPELL,8,3                      ; @SPELL
	.comm	_SearchNoDirErr,8,3             ; @SearchNoDirErr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n%S %s\n"

	.comm	_errno,8,3                      ; @errno
	.comm	_ENOTDIR,8,3                    ; @ENOTDIR
l_.str.1:                               ; @.str.1
	.asciz	"not a directory"

	.comm	_ENOENT,8,3                     ; @ENOENT
l_.str.2:                               ; @.str.2
	.asciz	"not found"

l_.str.3:                               ; @.str.3
	.asciz	"unreadable"

	.comm	_NeedsRedraw,4,2                ; @NeedsRedraw
	.no_dead_strip	_expand_dir
.subsections_via_symbols
