	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getcwd                         ## -- Begin function getcwd
	.p2align	4, 0x90
_getcwd:                                ## @getcwd
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rsi, %rbx
	cmpq	$1, %rsi
	je	LBB0_6
## %bb.2:
	testq	%rbx, %rbx
	jne	LBB0_8
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	%r12, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_66
## %bb.5:
	movq	%rax, %r15
	movq	%rax, %rbx
	addq	%r12, %rbx
	jmp	LBB0_9
LBB0_6:
	movq	_ERANGE@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_66
LBB0_8:
	movq	%rdi, %r15
	addq	%rdi, %rbx
	xorl	%r12d, %r12d
LBB0_9:
	movl	%ebx, %esi
	subl	%r15d, %esi
	movq	%r15, %rdi
	callq	___getcwd
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:
	movb	$0, -1(%rbx)
	leaq	L_.str(%rip), %rdi
	leaq	-80(%rbp), %rsi
	callq	_stat
	testq	%rax, %rax
	je	LBB0_16
LBB0_11:
	xorl	%r13d, %r13d
	jmp	LBB0_61
LBB0_12:
	cmpb	$47, (%r15)
	je	LBB0_67
## %bb.13:
	movq	%r15, %rdi
	callq	_strlen
	cltq
	addq	%r15, %rax
	decq	%rax
	cmpq	%rax, %r15
	jae	LBB0_67
## %bb.14:
	leaq	1(%r15), %rcx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movzbl	-1(%rcx), %edx
	movzbl	(%rax), %ebx
	movb	%bl, -1(%rcx)
	movb	%dl, (%rax)
	decq	%rax
	leaq	1(%rcx), %rdx
	cmpq	%rax, %rcx
	movq	%rdx, %rcx
	jb	LBB0_15
	jmp	LBB0_67
LBB0_16:
	leaq	-1(%rbx), %r14
	movq	-80(%rbp), %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	-72(%rbp), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	_errno@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	xorl	%eax, %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
LBB0_17:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_46 Depth 2
                                        ##     Child Loop BB0_32 Depth 2
                                        ##     Child Loop BB0_36 Depth 2
	testq	%r13, %r13
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	je	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r13, %rdi
	callq	__dirfd
	movl	%eax, %edi
	leaq	-80(%rbp), %rsi
	callq	__fstat
	testq	%rax, %rax
	jne	LBB0_61
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	-80(%rbp), %r13
	movq	-72(%rbp), %r12
	cmpq	%r13, -120(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpq	%r12, -112(%rbp)                ## 8-byte Folded Reload
	je	LBB0_71
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	__dirfd
	movl	%eax, %edi
	jmp	LBB0_26
LBB0_22:                                ##   in Loop: Header=BB0_17 Depth=1
	leaq	L_.str.1(%rip), %rdi
	leaq	-80(%rbp), %rsi
	callq	_lstat
	testq	%rax, %rax
	jne	LBB0_11
## %bb.23:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	-80(%rbp), %r13
	movq	-72(%rbp), %r12
	cmpq	%r13, -120(%rbp)                ## 8-byte Folded Reload
	jne	LBB0_25
## %bb.24:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpq	%r12, -112(%rbp)                ## 8-byte Folded Reload
	je	LBB0_73
LBB0_25:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	_AT_FDCWD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
LBB0_26:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	_O_CLOEXEC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	__openat
	cmpl	$-1, %eax
	je	LBB0_59
## %bb.27:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	%eax, %r14d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_17 Depth=1
	callq	_closedir
LBB0_29:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	%r14d, %edi
	callq	_fdopendir
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_68
## %bb.30:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%rbx, %rdi
	callq	__dirfd
	movl	%eax, %edi
	leaq	-80(%rbp), %rsi
	callq	__fstat
	testq	%rax, %rax
	jne	LBB0_68
## %bb.31:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	cmpq	%r13, -80(%rbp)
	jne	LBB0_39
	.p2align	4, 0x90
LBB0_32:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_54
## %bb.33:                              ##   in Loop: Header=BB0_32 Depth=2
	movq	%rax, %r14
	cmpq	%r12, (%rax)
	jne	LBB0_32
LBB0_34:                                ##   in Loop: Header=BB0_17 Depth=1
	movzbl	-96(%rbp), %ecx                 ## 1-byte Folded Reload
	andl	$1, %ecx
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	%r15, %rdi
	subq	%r15, %r13
	movl	16(%r14), %eax
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	addl	%eax, %ecx
	incl	%ecx
	movslq	%ecx, %rcx
	cmpq	%rcx, %r13
	jge	LBB0_41
## %bb.35:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	-104(%rbp), %rax                ## 8-byte Reload
	incl	%eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_36:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testq	%rsi, %rsi
	je	LBB0_69
## %bb.37:                              ##   in Loop: Header=BB0_36 Depth=2
	addq	%rsi, %rsi
	movq	%rsi, %rbx
	callq	_reallocf
	testq	%rax, %rax
	je	LBB0_70
## %bb.38:                              ##   in Loop: Header=BB0_36 Depth=2
	subq	-88(%rbp), %r12                 ## 8-byte Folded Reload
	addq	%rax, %r13
	movq	%rax, %r15
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	addq	%rax, %rbx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	subq	%r12, %rbx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_memmove
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r13
	movq	%r15, %rdi
	subq	%r15, %r13
	movl	16(%r14), %eax
	movq	-104(%rbp), %rcx                ## 8-byte Reload
	addl	%eax, %ecx
	movslq	%ecx, %rcx
	movq	%rdx, %r12
	cmpq	%rcx, %r13
	jl	LBB0_36
	jmp	LBB0_42
LBB0_39:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_54
## %bb.40:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%rax, %r14
	xorl	%ebx, %ebx
	jmp	LBB0_46
LBB0_41:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
LBB0_42:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r12
	testb	$1, -96(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_52
## %bb.43:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movb	$47, -1(%rcx)
	decq	%rcx
	movl	16(%r14), %eax
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%rdi, %r15
	jmp	LBB0_53
LBB0_44:                                ##   in Loop: Header=BB0_46 Depth=2
	movq	_errno@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
	.p2align	4, 0x90
LBB0_45:                                ##   in Loop: Header=BB0_46 Depth=2
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_readdir
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_55
LBB0_46:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	callq	_ISDOT
	testq	%rax, %rax
	jne	LBB0_45
## %bb.47:                              ##   in Loop: Header=BB0_46 Depth=2
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	__dirfd
	movq	8(%r14), %rsi
	movq	_AT_SYMLINK_NOFOLLOW@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%eax, %edi
	leaq	-80(%rbp), %rdx
	callq	_fstatat
	testq	%rax, %rax
	jne	LBB0_50
## %bb.48:                              ##   in Loop: Header=BB0_46 Depth=2
	cmpq	%r13, -80(%rbp)
	jne	LBB0_45
## %bb.49:                              ##   in Loop: Header=BB0_46 Depth=2
	cmpq	%r12, -72(%rbp)
	jne	LBB0_45
	jmp	LBB0_34
LBB0_50:                                ##   in Loop: Header=BB0_46 Depth=2
	testl	%ebx, %ebx
	jne	LBB0_44
## %bb.51:                              ##   in Loop: Header=BB0_46 Depth=2
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_44
LBB0_52:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%rdi, %r15
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
LBB0_53:                                ##   in Loop: Header=BB0_17 Depth=1
	movslq	%eax, %rdx
	subq	%rdx, %rcx
	movq	8(%r14), %rsi
	movq	%rcx, %rdi
	movq	%rcx, %r14
	callq	_memmove
	movb	$1, %al
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_54:
	xorl	%ebx, %ebx
LBB0_55:
	movq	_errno@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jne	LBB0_59
## %bb.56:
	testl	%ebx, %ebx
	jne	LBB0_58
## %bb.57:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_58:
	movl	%ebx, (%rcx)
LBB0_59:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_60:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_61:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	testq	%r12, %r12
	je	LBB0_63
## %bb.62:
	movq	%r15, %rdi
	callq	_free
LBB0_63:
	testq	%r13, %r13
	je	LBB0_65
LBB0_64:
	movq	%r13, %rdi
	callq	_closedir
LBB0_65:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
LBB0_66:
	xorl	%r15d, %r15d
LBB0_67:
	movq	%r15, %rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_68:
	movl	%r14d, %edi
	callq	__close
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%rbx, %r13
	jmp	LBB0_61
LBB0_69:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_errno@GOTPCREL(%rip), %rax
	movl	%r14d, (%rax)
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	testq	%r13, %r13
	jne	LBB0_64
	jmp	LBB0_65
LBB0_70:
	xorl	%r15d, %r15d
	movq	%rbx, %r12
	jmp	LBB0_60
LBB0_71:
	movb	$47, -1(%r14)
	decq	%r14
	subq	%r14, %rbx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_memmove
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_closedir
	jmp	LBB0_67
LBB0_73:
	movb	$47, -1(%r14)
	decq	%r14
	subq	%r14, %rbx
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_memmove
	jmp	LBB0_67
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_errno,4,2                      ## @errno
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_PATH_MAX,8,3                   ## @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/"

L_.str.1:                               ## @.str.1
	.asciz	"."

	.comm	_AT_FDCWD,4,2                   ## @AT_FDCWD
L_.str.2:                               ## @.str.2
	.asciz	".."

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_CLOEXEC,4,2                  ## @O_CLOEXEC
	.comm	_AT_SYMLINK_NOFOLLOW,4,2        ## @AT_SYMLINK_NOFOLLOW
	.comm	_ENOENT,4,2                     ## @ENOENT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getcwd                         ; -- Begin function getcwd
	.p2align	2
_getcwd:                                ; @getcwd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	cbz	x0, LBB0_4
; %bb.1:
	cmp	x1, #1
	b.eq	LBB0_6
; %bb.2:
	cbnz	x1, LBB0_8
; %bb.3:
	mov	x19, #0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_7
LBB0_4:
Lloh2:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh4:
	ldr	x20, [x8]
	mov	x0, x20
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_56
; %bb.5:
	add	x26, x19, x20
	b	LBB0_9
LBB0_6:
	mov	x19, #0
Lloh5:
	adrp	x8, _ERANGE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _errno@GOTPAGE
Lloh8:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh9:
	str	w8, [x9]
	b	LBB0_56
LBB0_8:
	mov	x19, x0
	mov	x20, #0
	add	x26, x0, x1
LBB0_9:
	sub	w1, w26, w19
	mov	x0, x19
	bl	___getcwd
	cbz	x0, LBB0_12
; %bb.10:
	mov	x22, x26
	strb	wzr, [x22, #-1]!
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	add	x1, sp, #16
	bl	_stat
	cbz	x0, LBB0_16
LBB0_11:
	mov	x21, #0
	b	LBB0_51
LBB0_12:
	ldrb	w8, [x19]
	cmp	w8, #47
	b.eq	LBB0_56
; %bb.13:
	mov	x0, x19
	bl	_strlen
	add	x8, x19, w0, sxtw
	sub	x8, x8, #1
	cmp	x19, x8
	b.hs	LBB0_56
; %bb.14:
	add	x9, x19, #1
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldurb	w10, [x9, #-1]
	ldrb	w11, [x8]
	sturb	w11, [x9, #-1]
	strb	w10, [x8], #-1
	add	x10, x9, #1
	cmp	x9, x8
	mov	x9, x10
	b.lo	LBB0_15
	b	LBB0_56
LBB0_16:
	mov	w24, #0
	mov	x21, #0
	ldp	x23, x25, [sp, #16]
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	str	wzr, [x8]
	stp	x25, x23, [sp]                  ; 16-byte Folded Spill
	cbz	x21, LBB0_20
LBB0_17:
	mov	x0, x21
	bl	__dirfd
	add	x1, sp, #16
	bl	__fstat
	cbnz	x0, LBB0_51
; %bb.18:
	ldp	x28, x27, [sp, #16]
	cmp	x23, x28
	ccmp	x25, x27, #0, eq
	b.eq	LBB0_58
; %bb.19:
	mov	x0, x21
	bl	__dirfd
	b	LBB0_23
LBB0_20:
	add	x1, sp, #16
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_lstat
	cbnz	x0, LBB0_11
; %bb.21:
	ldp	x28, x27, [sp, #16]
	cmp	x23, x28
	ccmp	x25, x27, #0, eq
	b.eq	LBB0_59
; %bb.22:
Lloh17:
	adrp	x8, _AT_FDCWD@GOTPAGE
Lloh18:
	ldr	x8, [x8, _AT_FDCWD@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
LBB0_23:
Lloh20:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _O_CLOEXEC@GOTPAGE
Lloh24:
	ldr	x9, [x9, _O_CLOEXEC@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	__openat
	cmn	w0, #1
	b.eq	LBB0_51
; %bb.24:
	mov	x25, x0
	cbz	x21, LBB0_26
; %bb.25:
	mov	x0, x21
	bl	_closedir
LBB0_26:
	mov	x0, x25
	bl	_fdopendir
	mov	x21, x0
	cbz	x0, LBB0_50
; %bb.27:
	mov	x0, x21
	bl	__dirfd
	add	x1, sp, #16
	bl	__fstat
	cbnz	x0, LBB0_50
; %bb.28:
	ldr	x8, [sp, #16]
	cmp	x8, x28
	b.ne	LBB0_31
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_readdir
	cbz	x0, LBB0_47
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	mov	x25, x0
	ldr	x8, [x0]
	cmp	x8, x27
	b.ne	LBB0_29
	b	LBB0_39
LBB0_31:
	mov	x0, x21
	bl	_readdir
	cbz	x0, LBB0_47
; %bb.32:
	mov	x25, x0
	mov	w23, #0
	b	LBB0_35
LBB0_33:                                ;   in Loop: Header=BB0_35 Depth=1
Lloh28:
	adrp	x9, _errno@GOTPAGE
Lloh29:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
	ldr	w8, [x9]
	cmp	w23, #0
	csel	w23, w8, w23, eq
	str	wzr, [x9]
LBB0_34:                                ;   in Loop: Header=BB0_35 Depth=1
	mov	x0, x21
	bl	_readdir
	mov	x25, x0
	cbz	x0, LBB0_48
LBB0_35:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	bl	_ISDOT
	cbnz	x0, LBB0_34
; %bb.36:                               ;   in Loop: Header=BB0_35 Depth=1
	mov	x0, x21
	bl	__dirfd
	ldr	x1, [x25, #8]
Lloh30:
	adrp	x8, _AT_SYMLINK_NOFOLLOW@GOTPAGE
Lloh31:
	ldr	x8, [x8, _AT_SYMLINK_NOFOLLOW@GOTPAGEOFF]
Lloh32:
	ldr	w3, [x8]
	add	x2, sp, #16
	bl	_fstatat
	cbnz	x0, LBB0_33
; %bb.37:                               ;   in Loop: Header=BB0_35 Depth=1
	ldr	x8, [sp, #16]
	cmp	x8, x28
	b.ne	LBB0_34
; %bb.38:                               ;   in Loop: Header=BB0_35 Depth=1
	ldr	x8, [sp, #24]
	cmp	x8, x27
	b.ne	LBB0_34
LBB0_39:
	tst	w24, #0x1
	mov	w8, #1
	cinc	w23, w8, ne
LBB0_40:                                ; =>This Inner Loop Header: Depth=1
	sub	x27, x22, x19
	ldr	w8, [x25, #16]
	add	w9, w8, w23
	cmp	x27, w9, sxtw
	b.ge	LBB0_44
; %bb.41:                               ;   in Loop: Header=BB0_40 Depth=1
	cbz	x20, LBB0_57
; %bb.42:                               ;   in Loop: Header=BB0_40 Depth=1
	lsl	x20, x20, #1
	mov	x0, x19
	mov	x1, x20
	bl	_reallocf
	mov	x19, x0
	cbz	x0, LBB0_51
; %bb.43:                               ;   in Loop: Header=BB0_40 Depth=1
	sub	x2, x26, x22
	add	x1, x19, x27
	add	x26, x19, x20
	sub	x22, x26, x2
	mov	x0, x22
	bl	_memmove
	b	LBB0_40
LBB0_44:
	ldr	x23, [sp, #8]                   ; 8-byte Folded Reload
	tbz	w24, #0, LBB0_46
; %bb.45:
	mov	w8, #47
	strb	w8, [x22, #-1]!
	ldr	w8, [x25, #16]
LBB0_46:
	sxtw	x2, w8
	sub	x22, x22, x2
	ldr	x1, [x25, #8]
	mov	x0, x22
	bl	_memmove
	mov	w24, #1
	ldr	x25, [sp]                       ; 8-byte Folded Reload
	cbnz	x21, LBB0_17
	b	LBB0_20
LBB0_47:
	mov	w23, #0
LBB0_48:
Lloh33:
	adrp	x9, _errno@GOTPAGE
Lloh34:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
	ldr	w8, [x9]
	cbnz	w8, LBB0_51
; %bb.49:
Lloh35:
	adrp	x8, _ENOENT@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	cmp	w23, #0
	csel	w8, w8, w23, eq
	str	w8, [x9]
	b	LBB0_51
LBB0_50:
	mov	x0, x25
	bl	__close
LBB0_51:
Lloh38:
	adrp	x8, _errno@GOTPAGE
Lloh39:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh40:
	ldr	w22, [x8]
	cbz	x20, LBB0_53
; %bb.52:
	mov	x0, x19
	bl	_free
LBB0_53:
	cbz	x21, LBB0_55
LBB0_54:
	mov	x0, x21
	bl	_closedir
LBB0_55:
	mov	x19, #0
Lloh41:
	adrp	x8, _errno@GOTPAGE
Lloh42:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh43:
	str	w22, [x8]
LBB0_56:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_57:
Lloh44:
	adrp	x8, _ERANGE@GOTPAGE
Lloh45:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh46:
	ldr	w22, [x8]
Lloh47:
	adrp	x8, _errno@GOTPAGE
Lloh48:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh49:
	str	w22, [x8]
	cbnz	x21, LBB0_54
	b	LBB0_55
LBB0_58:
	mov	w8, #47
	strb	w8, [x22, #-1]!
	sub	x2, x26, x22
	mov	x0, x19
	mov	x1, x22
	bl	_memmove
	mov	x0, x21
	bl	_closedir
	b	LBB0_56
LBB0_59:
	mov	w8, #47
	strb	w8, [x22, #-1]!
	sub	x2, x26, x22
	mov	x0, x19
	mov	x1, x22
	bl	_memmove
	b	LBB0_56
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotStr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotStr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_errno,4,2                      ; @errno
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_PATH_MAX,8,3                   ; @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/"

l_.str.1:                               ; @.str.1
	.asciz	"."

	.comm	_AT_FDCWD,4,2                   ; @AT_FDCWD
l_.str.2:                               ; @.str.2
	.asciz	".."

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_CLOEXEC,4,2                  ; @O_CLOEXEC
	.comm	_AT_SYMLINK_NOFOLLOW,4,2        ; @AT_SYMLINK_NOFOLLOW
	.comm	_ENOENT,4,2                     ; @ENOENT
.subsections_via_symbols
