	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lsapi_check_path
_lsapi_check_path:                      ## @lsapi_check_path
	.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
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leal	1(%rbx), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	xorl	%eax, %eax
	cmpb	$47, (%r15)
	je	LBB0_3
## %bb.1:
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_getcwd
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%r12, %rdi
	callq	_strlen
	cltq
	movb	$47, (%r12,%rax)
	incl	%eax
	movq	_PATH_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
LBB0_3:
	cltq
	leaq	(%r12,%rax), %rdi
	subl	%eax, %ebx
	movq	%r15, %rsi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	callq	_memccpy
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_realpath
	testq	%rax, %rax
	je	LBB0_6
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	$5, %edx
	callq	_strncmp
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_12
## %bb.9:
	movq	_EPERM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	movq	(%rax), %rax
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_11:
	movl	$-1, %eax
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_14
## %bb.13:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_ENOENT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rcx
	je	LBB0_8
## %bb.7:
	movq	_EACCES@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_12
	jmp	LBB0_8
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_errno,8,3                      ## @errno
	.comm	_ENOENT,8,3                     ## @ENOENT
	.comm	_EACCES,8,3                     ## @EACCES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/etc/"

	.comm	_EPERM,8,3                      ## @EPERM
	.no_dead_strip	_lsapi_check_path
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lsapi_check_path
_lsapi_check_path:                      ; @lsapi_check_path
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	sp, sp, #16
	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, #-40]
Lloh3:
	adrp	x22, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x22, [x22, _PATH_MAX@GOTPAGEOFF]
	ldr	w12, [x22]
	add	w8, w12, #1
	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
	ldrb	w8, [x0]
	cmp	w8, #47
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #0
	b	LBB0_4
LBB0_2:
	mov	x0, x20
	mov	x1, x2
	bl	_getcwd
	cbz	x0, LBB0_12
; %bb.3:
	mov	x0, x20
	bl	_strlen
	mov	w8, #47
	strb	w8, [x20, w0, sxtw]
	add	w8, w0, #1
	ldr	w12, [x22]
LBB0_4:
	add	x0, x20, w8, sxtw
	sub	w3, w12, w8
	mov	x1, x21
	mov	w2, #0
	bl	_memccpy
	cbz	x0, LBB0_9
; %bb.5:
	mov	x0, x20
	mov	x1, x19
	bl	_realpath
	cbnz	x0, LBB0_7
; %bb.6:
Lloh7:
	adrp	x8, _errno@GOTPAGE
Lloh8:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
Lloh10:
	adrp	x9, _ENOENT@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ENOENT@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
Lloh13:
	adrp	x10, _EACCES@GOTPAGE
Lloh14:
	ldr	x10, [x10, _EACCES@GOTPAGEOFF]
Lloh15:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_12
LBB0_7:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	w2, #5
	bl	_strncmp
	cbz	x0, LBB0_10
; %bb.8:
	mov	w0, #0
	b	LBB0_13
LBB0_9:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh20:
	adrp	x8, _EPERM@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
LBB0_11:
	ldr	x8, [x8]
Lloh22:
	adrp	x9, _errno@GOTPAGE
Lloh23:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh24:
	str	x8, [x9]
LBB0_12:
	mov	w0, #-1
LBB0_13:
	ldur	x8, [x29, #-40]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	sub	sp, x29, #32
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_errno,8,3                      ; @errno
	.comm	_ENOENT,8,3                     ; @ENOENT
	.comm	_EACCES,8,3                     ; @EACCES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/etc/"

	.comm	_EPERM,8,3                      ; @EPERM
	.no_dead_strip	_lsapi_check_path
.subsections_via_symbols
