	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function samedirent
_samedirent:                            ## @samedirent
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	movl	$47, %esi
	callq	_strrchr
	leaq	1(%rax), %r14
	testq	%rax, %rax
	cmoveq	%rbx, %r14
	movq	%r12, %rdi
	movl	$47, %esi
	callq	_strrchr
	leaq	1(%rax), %r13
	testq	%rax, %rax
	cmoveq	%r12, %r13
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_strcmp
	xorl	%edx, %edx
	testq	%rax, %rax
	jne	LBB0_15
## %bb.3:
	movq	%r15, %rcx
	movq	%r14, %r15
	subq	%rbx, %r15
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	cmpq	%rax, %r15
	jge	LBB0_15
## %bb.4:
	movq	%r13, %rsi
	subq	%r12, %rsi
	cmpq	%rax, %rsi
	jge	LBB0_15
## %bb.5:
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	cmpq	%rbx, %r14
	je	LBB0_6
## %bb.7:
	movq	%rcx, %r14
	movq	%rcx, %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_memcpy
	movb	$0, (%r14,%r15)
	movq	%r14, %rbx
	jmp	LBB0_8
LBB0_1:
	movl	$1, %edx
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	movl	%edx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%rcx, %rbx
	movq	%rcx, %rdi
	movl	$2, %edx
	callq	_memcpy
LBB0_8:
	leaq	-88(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	xorl	%edx, %edx
	jmp	LBB0_15
LBB0_10:
	cmpq	%r12, %r13
	je	LBB0_11
## %bb.12:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_memcpy
	movb	$0, (%rbx,%r14)
	jmp	LBB0_13
LBB0_11:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	$2, %edx
	callq	_memcpy
LBB0_13:
	leaq	-72(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_stat
	testq	%rax, %rax
	movl	$0, %edx
	jne	LBB0_15
## %bb.14:
	movq	-88(%rbp), %rax
	movq	-80(%rbp), %rcx
	xorq	-72(%rbp), %rax
	xorq	-64(%rbp), %rcx
	xorl	%edx, %edx
	orq	%rax, %rcx
	sete	%dl
	jmp	LBB0_15
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

	.no_dead_strip	_samedirent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function samedirent
_samedirent:                            ; @samedirent
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	sp, sp, #48
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x23, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x23, [x23, _PATH_MAX@GOTPAGEOFF]
	ldr	w8, [x23]
	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	x19, x9, x8
	mov	sp, x19
	bl	_strcmp
	cbz	x0, LBB0_6
; %bb.1:
	mov	x0, x21
	mov	w1, #47
	bl	_strrchr
	cmp	x0, #0
	csinc	x24, x21, x0, eq
	mov	x0, x20
	mov	w1, #47
	bl	_strrchr
	cmp	x0, #0
	csinc	x22, x20, x0, eq
	mov	x0, x24
	mov	x1, x22
	bl	_strcmp
	cbnz	x0, LBB0_13
; %bb.2:
	ldrsw	x8, [x23]
	sub	x25, x24, x21
	cmp	x25, x8
	b.ge	LBB0_13
; %bb.3:
	sub	x23, x22, x20
	cmp	x23, x8
	b.ge	LBB0_13
; %bb.4:
	cmp	x24, x21
	b.eq	LBB0_7
; %bb.5:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x25
	bl	_memcpy
	strb	wzr, [x19, x25]
	b	LBB0_8
LBB0_6:
	mov	w0, #1
	b	LBB0_14
LBB0_7:
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #2
	bl	_memcpy
LBB0_8:
	sub	x1, x29, #88
	mov	x0, x19
	bl	_stat
	cbnz	x0, LBB0_13
; %bb.9:
	cmp	x22, x20
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	bl	_memcpy
	strb	wzr, [x19, x23]
	b	LBB0_12
LBB0_11:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #2
	bl	_memcpy
LBB0_12:
	sub	x1, x29, #104
	mov	x0, x19
	bl	_stat
	cbz	x0, LBB0_16
LBB0_13:
	mov	w0, #0
LBB0_14:
	ldur	x8, [x29, #-72]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.15:
	sub	sp, x29, #64
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_16:
	ldp	x8, x9, [x29, #-88]
	ldp	x10, x11, [x29, #-104]
	cmp	x8, x10
	ccmp	x9, x11, #0, eq
	cset	w0, eq
	b	LBB0_14
LBB0_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

	.no_dead_strip	_samedirent
.subsections_via_symbols
