	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_resolve_tilde                  ## -- Begin function resolve_tilde
	.p2align	4, 0x90
_resolve_tilde:                         ## @resolve_tilde
	.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, %r15
	movl	$47, %esi
	callq	_strchr
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r14, %rsi
	subq	%r15, %rsi
	jmp	LBB0_3
LBB0_2:
	movq	%r15, %rdi
	callq	_strlen
	movq	%rax, %rsi
LBB0_3:
	movq	%r15, %rdi
	callq	_sstrndup
	movq	%rax, %rbx
	movq	_GLOB_TILDE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	_resolve_tilde.globbuf(%rip), %rcx
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_glob
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_free
	movq	_GLOB_NOMATCH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_5
## %bb.4:
	cmpl	$1, _resolve_tilde.globbuf(%rip)
	jne	LBB0_5
## %bb.6:
	testl	%r12d, %r12d
	je	LBB0_8
## %bb.7:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_err
                                        ## implicit-def: $rbx
	jmp	LBB0_13
LBB0_5:
	movq	%r15, %rdi
	callq	_sstrdup
	movq	%rax, %rbx
LBB0_13:
	leaq	_resolve_tilde.globbuf(%rip), %rdi
	callq	_globfree
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_resolve_tilde.globbuf+8(%rip), %rax
	movq	(%rax), %r15
	movq	%r15, %rdi
	callq	_strlen
	movq	%rax, %rbx
	testq	%r14, %r14
	je	LBB0_9
## %bb.10:
	movq	%r14, %rdi
	callq	_strlen
	jmp	LBB0_11
LBB0_9:
	xorl	%eax, %eax
LBB0_11:
	leaq	(%rbx,%rax), %rdi
	incq	%rdi
	movl	$1, %esi
	callq	_scalloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_strcpy
	testq	%r14, %r14
	je	LBB0_13
## %bb.12:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_strcat
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_resolve_tilde.globbuf,16,3 ## @resolve_tilde.globbuf
	.comm	_GLOB_TILDE,4,2                 ## @GLOB_TILDE
	.comm	_GLOB_NOMATCH,4,2               ## @GLOB_NOMATCH
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"glob() failed"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_resolve_tilde                  ; -- Begin function resolve_tilde
	.p2align	2
_resolve_tilde:                         ; @resolve_tilde
	.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	x20, x0
	mov	w1, #47
	bl	_strchr
	mov	x19, x0
	cbz	x0, LBB0_2
; %bb.1:
	sub	x1, x19, x20
	b	LBB0_3
LBB0_2:
	mov	x0, x20
	bl	_strlen
	mov	x1, x0
LBB0_3:
	mov	x0, x20
	bl	_sstrndup
	mov	x22, x0
Lloh0:
	adrp	x8, _GLOB_TILDE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GLOB_TILDE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x23, _resolve_tilde.globbuf@PAGE
Lloh4:
	add	x23, x23, _resolve_tilde.globbuf@PAGEOFF
	mov	x2, #0
	mov	x3, x23
	bl	_glob
	mov	x21, x0
	mov	x0, x22
	bl	_free
Lloh5:
	adrp	x8, _GLOB_NOMATCH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GLOB_NOMATCH@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	ldr	w9, [x23]
	cmp	w21, w8
	ccmp	w9, #1, #0, ne
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x20
	bl	_sstrdup
	mov	x21, x0
	b	LBB0_12
LBB0_5:
	cbz	w21, LBB0_7
; %bb.6:
Lloh8:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
                                        ; implicit-def: $x21
	b	LBB0_12
LBB0_7:
Lloh13:
	adrp	x8, _resolve_tilde.globbuf@PAGE+8
Lloh14:
	ldr	x8, [x8, _resolve_tilde.globbuf@PAGEOFF+8]
	ldr	x20, [x8]
	mov	x0, x20
	bl	_strlen
	mov	x21, x0
	cbz	x19, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_strlen
	b	LBB0_10
LBB0_9:
	mov	x0, #0
LBB0_10:
	add	x8, x21, x0
	add	x0, x8, #1
	mov	w1, #1
	bl	_scalloc
	mov	x21, x0
	mov	x1, x20
	bl	_strcpy
	cbz	x19, LBB0_12
; %bb.11:
	mov	x0, x21
	mov	x1, x19
	bl	_strcat
LBB0_12:
Lloh15:
	adrp	x0, _resolve_tilde.globbuf@PAGE
Lloh16:
	add	x0, x0, _resolve_tilde.globbuf@PAGEOFF
	bl	_globfree
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdr	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_resolve_tilde.globbuf,16,3 ; @resolve_tilde.globbuf
	.comm	_GLOB_TILDE,4,2                 ; @GLOB_TILDE
	.comm	_GLOB_NOMATCH,4,2               ; @GLOB_NOMATCH
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"glob() failed"

.subsections_via_symbols
