	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xgetcwd                        ## -- Begin function xgetcwd
	.p2align	4, 0x90
_xgetcwd:                               ## @xgetcwd
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAXPATHLEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	(%rbx), %r15d
	addl	%r15d, %r15d
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r13
	leaq	L_.str(%rip), %rdi
	leaq	-208(%rbp), %rsi
	callq	_stat
	cmpl	$-1, %eax
	je	LBB0_22
## %bb.1:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movslq	(%rbx), %rbx
	movb	$0, -1(%r14,%rbx)
	movb	$0, -1(%r13,%rbx)
	leaq	L_.str.2(%rip), %rdi
	leaq	-128(%rbp), %rsi
	callq	_lstat
	cmpl	$-1, %eax
	je	LBB0_23
## %bb.2:
	leaq	-1(%rbx), %rdx
	leaq	(%r14,%rbx), %rax
	decq	%rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	-1(%r13,%rbx), %r12
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_strnrcpy
	movq	%rax, %rcx
	movq	-208(%rbp), %rax
	movl	-200(%rbp), %edx
	movl	%edx, -96(%rbp)                 ## 4-byte Spill
	addq	%r13, %r15
	movq	%r12, %rdx
	notq	%rdx
	addq	%r15, %rdx
	movq	%rdx, -160(%rbp)                ## 8-byte Spill
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%r14, -152(%rbp)                ## 8-byte Spill
	movq	%r13, -144(%rbp)                ## 8-byte Spill
	movq	%r12, -104(%rbp)                ## 8-byte Spill
	movq	%rax, -136(%rbp)                ## 8-byte Spill
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
                                        ##     Child Loop BB0_14 Depth 2
	movq	-128(%rbp), %r15
	cmpq	%rax, %r15
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rbx, %r14
	movq	%rcx, %rbx
	movl	-120(%rbp), %edi
	movl	-96(%rbp), %esi                 ## 4-byte Reload
	callq	_DEV_DEV_COMPARE
	movq	%rbx, %rcx
	movq	%r14, %rbx
	testq	%rax, %rax
	jne	LBB0_35
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%rcx, %r12
	movq	%rcx, %rdi
	leaq	-176(%rbp), %rsi
	callq	_stat
	cmpl	$-1, %eax
	je	LBB0_32
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_33
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%rax, %r13
	movl	-168(%rbp), %edi
	movl	-120(%rbp), %r12d
	movl	%r12d, %esi
	callq	_DEV_DEV_COMPARE
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	_readdir
	movq	%rax, %rbx
	testq	%r14, %r14
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%rbx, %rbx
	movq	-104(%rbp), %r12                ## 8-byte Reload
	je	LBB0_26
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	%r15, (%rbx)
	je	LBB0_21
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movq	%r13, %rdi
	callq	_readdir
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_9
	jmp	LBB0_26
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%r12d, -92(%rbp)                ## 4-byte Spill
	testq	%rbx, %rbx
	movq	-104(%rbp), %r12                ## 8-byte Reload
	je	LBB0_26
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_14 Depth=2
	movq	%r13, %rdi
	callq	_readdir
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_25
LBB0_14:                                ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%rbx), %rdi
	callq	_ISDOT
	testq	%rax, %rax
	jne	LBB0_13
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	8(%rbx), %rdi
	callq	_ISDOTDOT
	testq	%rax, %rax
	jne	LBB0_13
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	8(%rbx), %rsi
	movq	%r12, %rdi
	movq	-160(%rbp), %rdx                ## 8-byte Reload
	callq	_strncpy
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	leaq	-192(%rbp), %rsi
	callq	_lstat
	cmpl	$-1, %eax
	je	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_14 Depth=2
	cmpq	%r15, -192(%rbp)
	jne	LBB0_13
## %bb.18:                              ##   in Loop: Header=BB0_14 Depth=2
	movl	-184(%rbp), %edi
	movl	-92(%rbp), %esi                 ## 4-byte Reload
	callq	_DEV_DEV_COMPARE
	testq	%rax, %rax
	je	LBB0_13
	jmp	LBB0_21
LBB0_19:                                ##   in Loop: Header=BB0_14 Depth=2
	testl	%r14d, %r14d
	jne	LBB0_13
## %bb.20:                              ##   in Loop: Header=BB0_14 Depth=2
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_13
LBB0_21:                                ##   in Loop: Header=BB0_3 Depth=1
	movups	-176(%rbp), %xmm0
	movaps	%xmm0, -128(%rbp)
	movq	8(%rbx), %rsi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%edi, %edx
	movq	-152(%rbp), %r14                ## 8-byte Reload
	subl	%r14d, %edx
	callq	_strnrcpy
	movl	%eax, %edx
	subl	%r14d, %edx
	movq	%rax, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strnrcpy
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movl	%edi, %edx
	movq	-144(%rbp), %rbx                ## 8-byte Reload
	subl	%ebx, %edx
	leaq	L_.str.4(%rip), %rsi
	callq	_strnrcpy
	movq	%rax, %r15
	movb	$0, (%r12)
	movq	%r13, %rdi
	callq	_closedir
	movq	%r15, %rcx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-136(%rbp), %rax                ## 8-byte Reload
	jmp	LBB0_3
LBB0_22:
	leaq	L_.str.1(%rip), %rdx
	movl	$23, %edi
	movl	$23, %esi
	callq	_CGETS
	movl	%eax, %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movslq	%eax, %rcx
	movq	%r12, %rdi
	jmp	LBB0_24
LBB0_23:
	leaq	L_.str.3(%rip), %rdx
	movl	$23, %edi
	movl	$24, %esi
	callq	_CGETS
	movl	%eax, %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movslq	%eax, %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
LBB0_24:
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_xsnprintf
	jmp	LBB0_29
LBB0_25:
	leaq	L_.str.7(%rip), %rdx
	movl	$23, %edi
	movl	$27, %esi
	callq	_CGETS
	movl	%eax, %ebx
	testl	%r14d, %r14d
	jne	LBB0_28
	jmp	LBB0_27
LBB0_26:
	leaq	L_.str.7(%rip), %rdx
	movl	$23, %edi
	movl	$27, %esi
	callq	_CGETS
	movl	%eax, %ebx
LBB0_27:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_28:
	movl	%r14d, %edi
	callq	_strerror
	movslq	%eax, %rcx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_xsnprintf
	movq	%r13, %rdi
	callq	_closedir
LBB0_29:
	xorl	%ebx, %ebx
LBB0_30:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_36
## %bb.31:
	movq	%rbx, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_32:
	leaq	L_.str.5(%rip), %rdx
	movl	$23, %edi
	movl	$25, %esi
	callq	_CGETS
	movl	%eax, %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movq	%r12, %rcx
	jmp	LBB0_34
LBB0_33:
	leaq	L_.str.6(%rip), %rdx
	movl	$23, %edi
	movl	$26, %esi
	callq	_CGETS
	movl	%eax, %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	%r14d, %edx
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
LBB0_34:
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_xsnprintf
	jmp	LBB0_29
LBB0_35:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	cmpb	$47, (%rax)
	leaq	L_.str(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	%rbx, %r14
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_strncpy
	movb	$0, -1(%r14,%rbx)
	jmp	LBB0_30
LBB0_36:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAXPATHLEN,4,2                 ## @MAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

L_.str.1:                               ## @.str.1
	.asciz	"getcwd: Cannot stat \"/\" (%s)"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"."

L_.str.3:                               ## @.str.3
	.asciz	"getcwd: Cannot stat \".\" (%s)"

L_.str.4:                               ## @.str.4
	.asciz	"../"

L_.str.5:                               ## @.str.5
	.asciz	"getcwd: Cannot stat directory \"%s\" (%s)"

L_.str.6:                               ## @.str.6
	.asciz	"getcwd: Cannot open directory \"%s\" (%s)"

L_.str.7:                               ## @.str.7
	.asciz	"getcwd: Cannot find \".\" in \"..\" (%s)"

	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_xgetcwd                        ; -- Begin function xgetcwd
	.p2align	2
_xgetcwd:                               ; @xgetcwd
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #128
	mov	x26, x1
	mov	x19, x0
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x21, _MAXPATHLEN@GOTPAGE
Lloh4:
	ldr	x21, [x21, _MAXPATHLEN@GOTPAGEOFF]
	ldr	w8, [x21]
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	w8, [x21]
	lsl	w24, w8, #1
	mov	x9, x24
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x24, #15
	and	x9, x9, #0x1fffffff0
	sub	x27, x8, x9
	mov	sp, x27
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	sub	x1, x29, #104
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_21
; %bb.1:
	ldrsw	x8, [x21]
	sub	x21, x8, #1
	add	x28, x20, x21
	strb	wzr, [x28]
	add	x22, x27, x21
	strb	wzr, [x22]
Lloh11:
	adrp	x0, l_.str.2@PAGE
Lloh12:
	add	x0, x0, l_.str.2@PAGEOFF
	sub	x1, x29, #128
	bl	_lstat
	cmn	w0, #1
	b.eq	LBB0_22
; %bb.2:
	stp	x19, x23, [x29, #-192]          ; 16-byte Folded Spill
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x22
	mov	x2, x21
	bl	_strnrcpy
	mov	x21, x0
	ldur	x19, [x29, #-104]
	ldur	w8, [x29, #-96]
	stur	w8, [x29, #-204]                ; 4-byte Folded Spill
	mvn	x8, x22
	add	x9, x24, x27
	add	x8, x8, x9
	stp	x26, x8, [x29, #-176]           ; 16-byte Folded Spill
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;     Child Loop BB0_15 Depth 2
	ldur	x23, [x29, #-128]
	cmp	x23, x19
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	w0, [x29, #-120]
	ldur	w1, [x29, #-204]                ; 4-byte Folded Reload
	bl	_DEV_DEV_COMPARE
	cbnz	x0, LBB0_35
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	sub	x1, x29, #160
	mov	x0, x21
	bl	_stat
	cmn	w0, #1
	b.eq	LBB0_32
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_opendir
	cbz	x0, LBB0_33
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x25, x0
	stur	x28, [x29, #-200]               ; 8-byte Folded Spill
	ldur	w0, [x29, #-152]
	ldur	w24, [x29, #-120]
	mov	x1, x24
	bl	_DEV_DEV_COMPARE
	mov	x28, x0
	mov	x0, x25
	bl	_readdir
	mov	x26, x0
	cbz	x28, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x26, LBB0_25
LBB0_9:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x26]
	cmp	x8, x23
	b.eq	LBB0_20
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x0, x25
	bl	_readdir
	mov	x26, x0
	cbnz	x0, LBB0_9
	b	LBB0_25
LBB0_11:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x26, LBB0_25
; %bb.12:                               ;   in Loop: Header=BB0_3 Depth=1
	mov	w28, #0
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_15 Depth=2
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w28, #0
	csel	w28, w8, w28, eq
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=2
	mov	x0, x25
	bl	_readdir
	mov	x26, x0
	cbz	x0, LBB0_24
LBB0_15:                                ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x26, #8]
	bl	_ISDOT
	cbnz	x0, LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	x0, [x26, #8]
	bl	_ISDOTDOT
	cbnz	x0, LBB0_14
; %bb.17:                               ;   in Loop: Header=BB0_15 Depth=2
	ldr	x1, [x26, #8]
	mov	x0, x22
	ldur	x2, [x29, #-168]                ; 8-byte Folded Reload
	bl	_strncpy
	sub	x1, x29, #144
	mov	x0, x21
	bl	_lstat
	cmn	w0, #1
	b.eq	LBB0_13
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=2
	ldur	x8, [x29, #-144]
	cmp	x8, x23
	b.ne	LBB0_14
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=2
	ldur	w0, [x29, #-136]
	mov	x1, x24
	bl	_DEV_DEV_COMPARE
	cbz	x0, LBB0_14
LBB0_20:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	q0, [x29, #-160]
	stur	q0, [x29, #-128]
	ldr	x1, [x26, #8]
	ldur	x0, [x29, #-200]                ; 8-byte Folded Reload
	sub	w2, w0, w20
	bl	_strnrcpy
	sub	w2, w0, w20
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strnrcpy
	mov	x28, x0
	sub	w2, w21, w27
	mov	x0, x21
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_strnrcpy
	mov	x21, x0
	strb	wzr, [x22]
	mov	x0, x25
	bl	_closedir
	ldur	x26, [x29, #-176]               ; 8-byte Folded Reload
	b	LBB0_3
LBB0_21:
Lloh22:
	adrp	x2, l_.str.1@PAGE
Lloh23:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	w0, #23
	mov	w1, #23
	b	LBB0_23
LBB0_22:
Lloh24:
	adrp	x2, l_.str.3@PAGE
Lloh25:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w0, #23
	mov	w1, #24
LBB0_23:
	bl	_CGETS
	mov	x21, x0
Lloh26:
	adrp	x8, _errno@GOTPAGE
Lloh27:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x3, w0
	mov	x0, x19
	mov	x1, x26
	mov	x2, x21
	bl	_xsnprintf
	mov	x19, #0
	b	LBB0_30
LBB0_24:
Lloh29:
	adrp	x2, l_.str.7@PAGE
Lloh30:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	w0, #23
	mov	w1, #27
	bl	_CGETS
	mov	x21, x0
	cbnz	w28, LBB0_27
	b	LBB0_26
LBB0_25:
Lloh31:
	adrp	x2, l_.str.7@PAGE
Lloh32:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	w0, #23
	mov	w1, #27
	bl	_CGETS
	mov	x21, x0
LBB0_26:
Lloh33:
	adrp	x8, _ENOENT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh35:
	ldr	w28, [x8]
LBB0_27:
	mov	x0, x28
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x3, w0
	ldur	x0, [x29, #-192]                ; 8-byte Folded Reload
	ldur	x1, [x29, #-176]                ; 8-byte Folded Reload
	mov	x2, x21
	bl	_xsnprintf
	mov	x0, x25
	bl	_closedir
LBB0_28:
	mov	x19, #0
LBB0_29:
	ldur	x23, [x29, #-184]               ; 8-byte Folded Reload
LBB0_30:
	mov	sp, x23
	ldur	x8, [x29, #-88]
Lloh36:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh37:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_36
; %bb.31:
	mov	x0, x19
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_32:
Lloh39:
	adrp	x2, l_.str.5@PAGE
Lloh40:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	w0, #23
	mov	w1, #25
	b	LBB0_34
LBB0_33:
Lloh41:
	adrp	x2, l_.str.6@PAGE
Lloh42:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	w0, #23
	mov	w1, #26
LBB0_34:
	bl	_CGETS
	mov	x22, x0
Lloh43:
	adrp	x8, _errno@GOTPAGE
Lloh44:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
	ldur	x0, [x29, #-192]                ; 8-byte Folded Reload
	mov	x1, x26
	mov	x2, x22
	mov	x3, x21
	bl	_xsnprintf
	add	sp, sp, #16
	b	LBB0_28
LBB0_35:
	ldrb	w8, [x28]
	cmp	w8, #47
Lloh46:
	adrp	x8, l_.str@PAGE
Lloh47:
	add	x8, x8, l_.str@PAGEOFF
	csel	x1, x28, x8, eq
	ldur	x19, [x29, #-192]               ; 8-byte Folded Reload
	mov	x0, x19
	mov	x2, x26
	bl	_strncpy
	add	x8, x26, x19
	sturb	wzr, [x8, #-1]
	b	LBB0_29
LBB0_36:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_MAXPATHLEN,4,2                 ; @MAXPATHLEN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

l_.str.1:                               ; @.str.1
	.asciz	"getcwd: Cannot stat \"/\" (%s)"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"."

l_.str.3:                               ; @.str.3
	.asciz	"getcwd: Cannot stat \".\" (%s)"

l_.str.4:                               ; @.str.4
	.asciz	"../"

l_.str.5:                               ; @.str.5
	.asciz	"getcwd: Cannot stat directory \"%s\" (%s)"

l_.str.6:                               ; @.str.6
	.asciz	"getcwd: Cannot open directory \"%s\" (%s)"

l_.str.7:                               ; @.str.7
	.asciz	"getcwd: Cannot find \".\" in \"..\" (%s)"

	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
