	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function openDirectory
_openDirectory:                         ## @openDirectory
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_MAX_PATHNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	leal	1(%r12), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	leaq	L_.str(%rip), %rdx
	movl	%r12d, %edi
	movq	%rbx, %rsi
	movq	%r15, %rcx
	callq	_sqlite3_snprintf
	movq	%rbx, %rdi
	callq	_strlen
	testl	%eax, %eax
	jle	LBB0_4
## %bb.1:
	movl	%eax, %eax
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %ecx
	cmpb	$47, (%rbx,%rcx)
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	decq	%rax
	leal	1(%rax), %ecx
	cmpl	$1, %ecx
	jg	LBB0_2
LBB0_4:
	movl	$1, %eax
	cmpb	$47, (%rbx)
	je	LBB0_6
## %bb.5:
	movb	$46, (%rbx)
LBB0_6:
	movb	$0, (%rbx,%rax)
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movq	_O_BINARY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_robust_open
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_OSTRACE
	movl	%r15d, (%r14)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
LBB0_8:
	movl	%r15d, (%r14)
	movq	_SQLITE_CANTOPEN_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	callq	_unixLogError
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_11
## %bb.10:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PATHNAME,4,2               ## @MAX_PATHNAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_O_BINARY,4,2                   ## @O_BINARY
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_SQLITE_CANTOPEN_BKPT,4,2       ## @SQLITE_CANTOPEN_BKPT
L_.str.2:                               ## @.str.2
	.asciz	"openDirectory"

	.no_dead_strip	_openDirectory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function openDirectory
_openDirectory:                         ; @openDirectory
	.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	x19, x1
	mov	x3, 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	x8, _MAX_PATHNAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_PATHNAME@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	w8, w0, #1
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x20
	bl	_sqlite3_snprintf
	mov	x0, x20
	bl	_strlen
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w8, w0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w9, [x20, w8, uxtw]
	cmp	w9, #47
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x8, x8, #1
	add	w9, w8, #1
	cmp	w9, #1
	b.gt	LBB0_2
LBB0_4:
	ldrb	w8, [x20]
	cmp	w8, #47
	b.eq	LBB0_6
; %bb.5:
	mov	w8, #46
	strb	w8, [x20]
LBB0_6:
	mov	w8, #1
LBB0_7:
	strb	wzr, [x20, x8]
Lloh10:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _O_BINARY@GOTPAGE
Lloh14:
	ldr	x9, [x9, _O_BINARY@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	mov	w2, #0
	bl	_robust_open
	mov	x21, x0
	tbnz	w0, #31, LBB0_9
; %bb.8:
	mov	x0, x20
	bl	_OSTRACE
	str	w21, [x19]
Lloh16:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	b	LBB0_10
LBB0_9:
	str	w21, [x19]
Lloh19:
	adrp	x8, _SQLITE_CANTOPEN_BKPT@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SQLITE_CANTOPEN_BKPT@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_unixLogError
LBB0_10:
	ldur	x8, [x29, #-40]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	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_12:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PATHNAME,4,2               ; @MAX_PATHNAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_O_BINARY,4,2                   ; @O_BINARY
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_CANTOPEN_BKPT,4,2       ; @SQLITE_CANTOPEN_BKPT
l_.str.2:                               ; @.str.2
	.asciz	"openDirectory"

	.no_dead_strip	_openDirectory
.subsections_via_symbols
