	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_existence
_check_existence:                       ## @check_existence
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rdx), %r15
	movq	_errno@GOTPCREL(%rip), %r13
	movq	$0, (%r13)
	movq	_FTYPE_MODE_EXIST_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %edi
	cmpl	$129, %edi
	je	LBB0_12
## %bb.1:
	cmpl	$128, %edi
	jne	LBB0_7
## %bb.2:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_stat
	movq	(%r13), %rcx
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_7
LBB0_4:
	testq	%rcx, %rcx
	jne	LBB0_6
## %bb.5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
LBB0_6:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	callq	_fserr_exit
LBB0_7:
	movq	_DIRCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_strrchr
	testq	%rax, %rax
	je	LBB0_14
## %bb.8:
	movq	%rax, %rbx
	subq	%r15, %rbx
	leaq	1(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_AGALOC
	movq	%rax, %r12
	movq	%rax, %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	movq	_NUL@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	movb	%al, (%r12,%rbx)
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_stat
	testl	%eax, %eax
	je	LBB0_9
LBB0_10:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	callq	_fserr_exit
	jmp	LBB0_11
LBB0_12:
	leaq	-48(%rbp), %rsi
	movq	%r15, %rdi
	callq	_stat
	testl	%eax, %eax
	je	LBB0_13
LBB0_15:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fserr_exit                     ## TAILCALL
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	movl	-48(%rbp), %edi
	callq	_S_ISDIR
	testl	%eax, %eax
	je	LBB0_10
LBB0_11:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AGFREE                         ## TAILCALL
LBB0_13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	movl	-48(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_15
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_errno,8,3                      ## @errno
	.comm	_FTYPE_MODE_EXIST_MASK,4,2      ## @FTYPE_MODE_EXIST_MASK
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_EINVAL,8,3                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stat"

	.comm	_DIRCH,4,2                      ## @DIRCH
L_.str.1:                               ## @.str.1
	.asciz	"fname"

	.comm	_NUL,1,0                        ## @NUL
	.no_dead_strip	_check_existence
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_existence
_check_existence:                       ; @check_existence
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x1
	ldr	x20, [x2]
Lloh0:
	adrp	x23, _errno@GOTPAGE
Lloh1:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
	str	xzr, [x23]
Lloh2:
	adrp	x8, _FTYPE_MODE_EXIST_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FTYPE_MODE_EXIST_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	and	w8, w8, w0
	cmp	w8, #129
	b.eq	LBB0_9
; %bb.1:
	cmp	w8, #128
	b.ne	LBB0_6
; %bb.2:
	add	x1, sp, #8
	mov	x0, x20
	bl	_stat
	ldr	x8, [x23]
Lloh5:
	adrp	x9, _ENOENT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	w0, #0
	ccmp	x8, x9, #0, ne
	b.eq	LBB0_6
; %bb.3:
	cbnz	x8, LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x23]
LBB0_5:
	ldr	w0, [x19]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_fserr_exit
LBB0_6:
Lloh13:
	adrp	x8, _DIRCH@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DIRCH@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_strrchr
	cbz	x0, LBB0_14
; %bb.7:
	sub	x22, x0, x20
	add	x0, x22, #1
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_AGALOC
	mov	x21, x0
	mov	x1, x20
	mov	x2, x22
	bl	_memcpy
Lloh18:
	adrp	x8, _NUL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NUL@GOTPAGEOFF]
	ldrb	w8, [x8]
	strb	w8, [x21, x22]
	add	x1, sp, #8
	mov	x0, x21
	bl	_stat
	cbz	w0, LBB0_11
LBB0_8:
	ldr	w0, [x19]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_fserr_exit
	b	LBB0_12
LBB0_9:
	add	x1, sp, #8
	mov	x0, x20
	bl	_stat
	cbz	w0, LBB0_13
LBB0_10:
	ldr	w0, [x19]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	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
	add	sp, sp, #80
	b	_fserr_exit
LBB0_11:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	x8, [x23]
	ldr	w0, [sp, #8]
	bl	_S_ISDIR
	cbz	w0, LBB0_8
LBB0_12:
	mov	x0, x21
	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
	add	sp, sp, #80
	b	_AGFREE
LBB0_13:
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	str	x8, [x23]
	ldr	w0, [sp, #8]
	bl	_S_ISREG
	cbz	w0, LBB0_10
LBB0_14:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_errno,8,3                      ; @errno
	.comm	_FTYPE_MODE_EXIST_MASK,4,2      ; @FTYPE_MODE_EXIST_MASK
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_EINVAL,8,3                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stat"

	.comm	_DIRCH,4,2                      ; @DIRCH
l_.str.1:                               ; @.str.1
	.asciz	"fname"

	.comm	_NUL,1,0                        ; @NUL
	.no_dead_strip	_check_existence
.subsections_via_symbols
