	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_realpath                       ## -- Begin function realpath
	.p2align	4, 0x90
_realpath:                              ## @realpath
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	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	_PATH_MAX@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	movq	%rax, -136(%rbp)                ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movl	(%r13), %r14d
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -144(%rbp)                ## 8-byte Spill
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rcx
	movb	(%r12), %al
	testb	%al, %al
	je	LBB0_5
## %bb.1:
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	movq	%r15, %rbx
	testq	%r15, %r15
	je	LBB0_7
## %bb.2:
	cmpb	$47, %al
	jne	LBB0_9
LBB0_3:
	movw	$47, (%rbx)
	cmpb	$0, 1(%r12)
	je	LBB0_50
## %bb.4:
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	incq	%r12
	movl	$1, %r15d
	jmp	LBB0_11
LBB0_5:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_6:
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_59
LBB0_7:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.8:
	movq	%rax, %rbx
	movb	(%r12), %al
	cmpb	$47, %al
	je	LBB0_3
LBB0_9:
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_getcwd
	testq	%rax, %rax
	je	LBB0_51
## %bb.10:
	movq	%r15, -128(%rbp)                ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_strlen
	movq	%rax, %r15
LBB0_11:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	-136(%rbp), %rbx                ## 8-byte Reload
	movl	%ebx, %edx
	callq	_strlcpy
	movq	_ENAMETOOLONG@GOTPCREL(%rip), %rcx
	cmpq	%rbx, %rax
	jae	LBB0_46
## %bb.12:
	movq	%rax, %r12
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	jae	LBB0_46
## %bb.13:
	testq	%r12, %r12
	je	LBB0_47
## %bb.14:
	movl	%r14d, -116(%rbp)               ## 4-byte Spill
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movslq	%eax, %rcx
	movq	%rcx, -152(%rbp)                ## 8-byte Spill
	decl	%eax
	movl	%eax, -120(%rbp)                ## 4-byte Spill
	movl	$0, -76(%rbp)                   ## 4-byte Folded Spill
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r15, %r14
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	%r15, %r14
	testq	%r12, %r12
	je	LBB0_47
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$47, %esi
	callq	_strchr
	leaq	(%r12,%r13), %r15
	testq	%rax, %rax
	cmovneq	%rax, %r15
	movq	%r15, %rbx
	subq	%r13, %rbx
	cmpq	-152(%rbp), %rbx                ## 8-byte Folded Reload
	jge	LBB0_53
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%r14, -160(%rbp)                ## 8-byte Spill
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	-144(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	subq	%rbx, %r12
	movb	$0, (%r14,%rbx)
	cmpq	$0, -104(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	incq	%r15
	leaq	1(%r12), %rdx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_memmove
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-160(%rbp), %rcx                ## 8-byte Reload
	cmpb	$47, -1(%rcx,%rax)
	jne	LBB0_21
## %bb.20:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%rcx, %r15
	jmp	LBB0_23
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_16 Depth=1
	leaq	1(%rcx), %r15
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	jae	LBB0_53
## %bb.22:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movw	$47, (%rax,%rcx)
LBB0_23:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-144(%rbp), %rbx                ## 8-byte Reload
	cmpb	$0, (%rbx)
	je	LBB0_15
## %bb.24:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_15
## %bb.25:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	jne	LBB0_28
## %bb.26:                              ##   in Loop: Header=BB0_16 Depth=1
	cmpq	$2, %r15
	jb	LBB0_15
## %bb.27:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movb	$0, -1(%r15,%rbx)
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strrchr
	movq	%rax, %r15
	movb	$0, 1(%rax)
	incq	%r15
	subq	%rbx, %r15
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_15
LBB0_28:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	_PATH_MAX@GOTPCREL(%rip), %r14
	movq	%rbx, %rsi
	movl	(%r14), %edx
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_strlcat
	movq	%rax, %r15
	movslq	(%r14), %rax
	cmpq	%rax, %r15
	jae	LBB0_53
## %bb.29:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%rbx, %rdi
	leaq	-112(%rbp), %rsi
	callq	_lstat
	testq	%rax, %rax
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_63
## %bb.30:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	-112(%rbp), %edi
	callq	_S_ISLNK
	testq	%rax, %rax
	je	LBB0_35
## %bb.31:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	-76(%rbp), %eax                 ## 4-byte Reload
	movq	_SYMLOOP_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	ja	LBB0_66
## %bb.32:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	-120(%rbp), %edx                ## 4-byte Reload
	callq	_readlink
	testl	%eax, %eax
	movq	_errno@GOTPCREL(%rip), %rbx
	js	LBB0_56
## %bb.33:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	%eax, %r13d
	movl	%eax, %r14d
	movb	$0, (%r12,%r14)
	cmpb	$47, (%r12)
	jne	LBB0_36
## %bb.34:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movb	$0, 1(%rax)
	movl	$1, %r15d
	jmp	LBB0_38
LBB0_35:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_44
LBB0_36:                                ##   in Loop: Header=BB0_16 Depth=1
	cmpq	$2, %r15
	jb	LBB0_38
## %bb.37:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movb	$0, -1(%r15,%rbx)
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strrchr
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	movq	%rax, %r15
	movb	$0, 1(%rax)
	incq	%r15
	subq	%rbx, %r15
	movq	_errno@GOTPCREL(%rip), %rbx
LBB0_38:                                ##   in Loop: Header=BB0_16 Depth=1
	cmpq	$0, -104(%rbp)                  ## 8-byte Folded Reload
	je	LBB0_43
## %bb.39:                              ##   in Loop: Header=BB0_16 Depth=1
	movslq	%r13d, %rax
	cmpb	$47, -1(%rax,%r12)
	je	LBB0_42
## %bb.40:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%r14, %rax
	incq	%rax
	cmpl	-88(%rbp), %eax                 ## 4-byte Folded Reload
	jge	LBB0_67
## %bb.41:                              ##   in Loop: Header=BB0_16 Depth=1
	movb	$47, (%r12,%r14)
	movb	$0, (%r12,%rax)
LBB0_42:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	%r12, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_strlcat
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	cmpq	%r14, %rax
	jae	LBB0_67
LBB0_43:                                ##   in Loop: Header=BB0_16 Depth=1
	incl	-76(%rbp)                       ## 4-byte Folded Spill
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	-136(%rbp), %rdx                ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_strlcpy
	movq	%rax, %r12
LBB0_44:                                ##   in Loop: Header=BB0_16 Depth=1
	testq	%r12, %r12
	je	LBB0_47
## %bb.45:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%r15, %r14
	jmp	LBB0_16
LBB0_46:
	movq	_errno@GOTPCREL(%rip), %rbx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_55
LBB0_47:
	cmpq	$2, %r15
	jb	LBB0_61
## %bb.48:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	cmpb	$47, -1(%r15,%rbx)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_59
## %bb.49:
	movb	$0, -1(%rbx,%r15)
	jmp	LBB0_59
LBB0_50:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_59
LBB0_51:
	testq	%r15, %r15
	je	LBB0_62
## %bb.52:
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_strlcpy
	jmp	LBB0_6
LBB0_53:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	_errno@GOTPCREL(%rip), %rbx
LBB0_54:
	movq	_ENAMETOOLONG@GOTPCREL(%rip), %rcx
LBB0_55:
	movl	(%rcx), %eax
	movl	%eax, (%rbx)
LBB0_56:
	cmpq	$0, -128(%rbp)                  ## 8-byte Folded Reload
	jne	LBB0_58
## %bb.57:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_free
LBB0_58:
	xorl	%ebx, %ebx
LBB0_59:
	movq	%r14, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_68
## %bb.60:
	movq	%rbx, %rax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_61:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_59
LBB0_62:
	movq	%rbx, %rdi
	callq	_free
	jmp	LBB0_6
LBB0_63:
	movq	_errno@GOTPCREL(%rip), %rdx
	movl	(%rdx), %eax
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movl	-116(%rbp), %eax                ## 4-byte Reload
	jne	LBB0_56
## %bb.64:
	cmpq	$0, -104(%rbp)                  ## 8-byte Folded Reload
	jne	LBB0_56
## %bb.65:
	movl	%eax, (%rdx)
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_59
LBB0_66:
	movq	_ELOOP@GOTPCREL(%rip), %rcx
	movq	_errno@GOTPCREL(%rip), %rbx
	jmp	LBB0_55
LBB0_67:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_54
LBB0_68:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_errno,4,2                      ## @errno
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

	.comm	_ENAMETOOLONG,4,2               ## @ENAMETOOLONG
L_.str.1:                               ## @.str.1
	.asciz	".."

	.comm	_SYMLOOP_MAX,4,2                ## @SYMLOOP_MAX
	.comm	_ELOOP,4,2                      ## @ELOOP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_realpath                       ; -- Begin function realpath
	.p2align	2
_realpath:                              ; @realpath
	.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, #64
	mov	x25, x1
	mov	x26, x0
	mov	x20, 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	x12, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x12, [x12, _PATH_MAX@GOTPAGEOFF]
	ldr	w21, [x12]
	mov	x9, x21
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x1fffffff0
	sub	x22, x8, x9
	mov	sp, x22
	ldr	w23, [x12]
	mov	x9, x23
Lloh7:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh8:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x23, #15
	and	x12, x9, #0x1fffffff0
	sub	x24, x8, x12
	mov	sp, x24
	mov	x9, x23
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x28, x8, x12
	mov	sp, x28
	ldrb	w8, [x0]
Lloh11:
	adrp	x9, _errno@GOTPAGE
Lloh12:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
	cbz	w8, LBB0_5
; %bb.1:
	ldr	w27, [x9]
	cbz	x25, LBB0_6
; %bb.2:
	mov	x19, x25
	cmp	w8, #47
	b.ne	LBB0_8
LBB0_3:
	strh	w8, [x19]
	ldrb	w8, [x26, #1]!
	cbz	w8, LBB0_17
; %bb.4:
	stp	x28, x25, [x29, #-128]          ; 16-byte Folded Spill
	stur	w27, [x29, #-132]               ; 4-byte Folded Spill
	stur	x20, [x29, #-112]               ; 8-byte Folded Spill
	mov	w27, #1
	b	LBB0_10
LBB0_5:
	mov	x19, #0
Lloh13:
	adrp	x8, _ENOENT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	str	w8, [x9]
	b	LBB0_17
LBB0_6:
	mov	x0, x23
	bl	_malloc
	mov	x19, x0
	cbz	x0, LBB0_17
; %bb.7:
	ldrb	w8, [x26]
	cmp	w8, #47
	b.eq	LBB0_3
LBB0_8:
Lloh16:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_getcwd
	cbz	x0, LBB0_52
; %bb.9:
	stp	x28, x25, [x29, #-128]          ; 16-byte Folded Spill
	stur	w27, [x29, #-132]               ; 4-byte Folded Spill
	stur	x20, [x29, #-112]               ; 8-byte Folded Spill
	mov	x0, x19
	bl	_strlen
	mov	x27, x0
LBB0_10:
	mov	x0, x22
	mov	x1, x26
	mov	x2, x21
	bl	_strlcpy
Lloh19:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh21:
	ldrsw	x8, [x8]
	cmp	x0, x21
	ccmp	x27, x8, #2, lo
	b.lo	LBB0_19
LBB0_11:
Lloh22:
	adrp	x8, _ENAMETOOLONG@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENAMETOOLONG@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _errno@GOTPAGE
Lloh25:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh26:
	str	w8, [x9]
LBB0_13:
	ldur	x8, [x29, #-120]                ; 8-byte Folded Reload
	cbnz	x8, LBB0_15
; %bb.14:
	mov	x0, x19
	bl	_free
LBB0_15:
	mov	x19, #0
LBB0_16:
	ldur	x20, [x29, #-112]               ; 8-byte Folded Reload
LBB0_17:
	mov	sp, x20
	ldur	x8, [x29, #-88]
Lloh27:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh28:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh29:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_59
; %bb.18:
	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_19:
	mov	x28, x0
	cbz	x0, LBB0_49
; %bb.20:
	sxtw	x8, w23
	stur	x8, [x29, #-104]                ; 8-byte Folded Spill
	sub	w8, w23, #1
	stp	w8, wzr, [x29, #-140]           ; 8-byte Folded Spill
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	cbz	x28, LBB0_49
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x22
	mov	w1, #47
	bl	_strchr
	add	x8, x22, x28
	cmp	x0, #0
	csel	x25, x8, x0, eq
	sub	x20, x25, x22
	ldur	x8, [x29, #-104]                ; 8-byte Folded Reload
	cmp	x20, x8
	b.ge	LBB0_11
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	x26, x0
	mov	x0, x24
	mov	x1, x22
	mov	x2, x20
	bl	_memcpy
	strb	wzr, [x24, x20]
	sub	x28, x28, x20
	cbz	x26, LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x1, x25, #1
	add	x2, x28, #1
	mov	x0, x22
	bl	_memmove
LBB0_25:                                ;   in Loop: Header=BB0_22 Depth=1
	add	x8, x27, x19
	ldurb	w8, [x8, #-1]
	cmp	w8, #47
	b.eq	LBB0_28
; %bb.26:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x8, x27, #1
Lloh30:
	adrp	x9, _PATH_MAX@GOTPAGE
Lloh31:
	ldr	x9, [x9, _PATH_MAX@GOTPAGEOFF]
Lloh32:
	ldrsw	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_11
; %bb.27:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	w9, #47
	strb	w9, [x19, x27]
	strb	wzr, [x19, x8]
	mov	x27, x8
LBB0_28:                                ;   in Loop: Header=BB0_22 Depth=1
	ldrb	w8, [x24]
	cbz	w8, LBB0_21
; %bb.29:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	x0, x24
Lloh33:
	adrp	x1, l_.str@PAGE
Lloh34:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_21
; %bb.30:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	x0, x24
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_strcmp
	cbnz	x0, LBB0_33
; %bb.31:                               ;   in Loop: Header=BB0_22 Depth=1
	cmp	x27, #2
	b.lo	LBB0_21
; %bb.32:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x8, x27, x19
	sturb	wzr, [x8, #-1]
	mov	x0, x19
	mov	w1, #47
	bl	_strrchr
	strb	wzr, [x0, #1]!
	sub	x27, x0, x19
	b	LBB0_21
LBB0_33:                                ;   in Loop: Header=BB0_22 Depth=1
Lloh37:
	adrp	x20, _PATH_MAX@GOTPAGE
Lloh38:
	ldr	x20, [x20, _PATH_MAX@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	x0, x19
	mov	x1, x24
	bl	_strlcat
	ldrsw	x8, [x20]
	cmp	x0, x8
	b.hs	LBB0_11
; %bb.34:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	x27, x0
	sub	x1, x29, #96
	mov	x0, x19
	bl	_lstat
	cbnz	x0, LBB0_55
; %bb.35:                               ;   in Loop: Header=BB0_22 Depth=1
	ldur	w0, [x29, #-96]
	bl	_S_ISLNK
	cbz	x0, LBB0_48
; %bb.36:                               ;   in Loop: Header=BB0_22 Depth=1
Lloh39:
	adrp	x8, _SYMLOOP_MAX@GOTPAGE
Lloh40:
	ldr	x8, [x8, _SYMLOOP_MAX@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	ldur	w9, [x29, #-136]                ; 4-byte Folded Reload
	cmp	w9, w8
	b.hi	LBB0_58
; %bb.37:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	x0, x19
	ldur	x25, [x29, #-128]               ; 8-byte Folded Reload
	mov	x1, x25
	ldur	w2, [x29, #-140]                ; 4-byte Folded Reload
	bl	_readlink
	tbnz	w0, #31, LBB0_13
; %bb.38:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	x28, x0
	mov	w20, w0
	strb	wzr, [x25, x20]
	ldrb	w8, [x25]
	cmp	w8, #47
	b.ne	LBB0_40
; %bb.39:                               ;   in Loop: Header=BB0_22 Depth=1
	strb	wzr, [x19, #1]
	mov	w27, #1
	b	LBB0_42
LBB0_40:                                ;   in Loop: Header=BB0_22 Depth=1
	cmp	x27, #2
	b.lo	LBB0_42
; %bb.41:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x8, x27, x19
	sturb	wzr, [x8, #-1]
	mov	x0, x19
	mov	w1, #47
	bl	_strrchr
	strb	wzr, [x0, #1]!
	sub	x27, x0, x19
LBB0_42:                                ;   in Loop: Header=BB0_22 Depth=1
	ldur	x25, [x29, #-128]               ; 8-byte Folded Reload
	cbz	x26, LBB0_47
; %bb.43:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x8, x25, w28, sxtw
	ldurb	w8, [x8, #-1]
	cmp	w8, #47
	b.eq	LBB0_46
; %bb.44:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x8, x20, #1
	ldur	x9, [x29, #-104]                ; 8-byte Folded Reload
	cmp	w8, w9
	b.ge	LBB0_11
; %bb.45:                               ;   in Loop: Header=BB0_22 Depth=1
	mov	w9, #47
	strb	w9, [x25, x20]
	strb	wzr, [x25, x8]
LBB0_46:                                ;   in Loop: Header=BB0_22 Depth=1
	mov	x0, x25
	mov	x1, x22
	ldur	x2, [x29, #-104]                ; 8-byte Folded Reload
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_strlcat
	cmp	x0, x23
	b.hs	LBB0_11
LBB0_47:                                ;   in Loop: Header=BB0_22 Depth=1
	ldur	w8, [x29, #-136]                ; 4-byte Folded Reload
	add	w8, w8, #1
	stur	w8, [x29, #-136]                ; 4-byte Folded Spill
	mov	x0, x22
	mov	x1, x25
	mov	x2, x21
	bl	_strlcpy
	mov	x28, x0
LBB0_48:                                ;   in Loop: Header=BB0_22 Depth=1
	cbnz	x28, LBB0_22
LBB0_49:
	cmp	x27, #2
	b.lo	LBB0_16
; %bb.50:
	sub	x8, x27, #1
	ldrb	w9, [x19, x8]
	cmp	w9, #47
	ldur	x20, [x29, #-112]               ; 8-byte Folded Reload
	b.ne	LBB0_17
; %bb.51:
	strb	wzr, [x19, x8]
	b	LBB0_17
LBB0_52:
	cbz	x25, LBB0_54
; %bb.53:
Lloh42:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh43:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
Lloh45:
	adrp	x1, l_.str@PAGE
Lloh46:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_strlcpy
	mov	x19, #0
	b	LBB0_17
LBB0_54:
	mov	x0, x19
	bl	_free
	mov	x19, #0
	b	LBB0_17
LBB0_55:
Lloh47:
	adrp	x8, _errno@GOTPAGE
Lloh48:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh49:
	ldr	w8, [x8]
Lloh50:
	adrp	x9, _ENOENT@GOTPAGE
Lloh51:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh52:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_13
; %bb.56:
	cbnz	x26, LBB0_13
; %bb.57:
Lloh53:
	adrp	x8, _errno@GOTPAGE
Lloh54:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
	ldur	w9, [x29, #-132]                ; 4-byte Folded Reload
Lloh55:
	str	w9, [x8]
	b	LBB0_16
LBB0_58:
Lloh56:
	adrp	x8, _ELOOP@GOTPAGE
Lloh57:
	ldr	x8, [x8, _ELOOP@GOTPAGEOFF]
	b	LBB0_12
LBB0_59:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotStr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotStr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_errno,4,2                      ; @errno
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

	.comm	_ENAMETOOLONG,4,2               ; @ENAMETOOLONG
l_.str.1:                               ; @.str.1
	.asciz	".."

	.comm	_SYMLOOP_MAX,4,2                ; @SYMLOOP_MAX
	.comm	_ELOOP,4,2                      ; @ELOOP
.subsections_via_symbols
