	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function detachFunc
_detachFunc:                            ## @detachFunc
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdx), %rdi
	callq	_sqlite3_value_text
	movq	%rax, %r12
	movq	%rbx, -184(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_sqlite3_context_db_handle
	movq	%rax, %r13
	movl	%r15d, %edi
	callq	_UNUSED_PARAMETER
	testq	%r12, %r12
	leaq	L_.str(%rip), %r15
	cmovneq	%r12, %r15
	movl	(%r13), %ecx
	leaq	L_.str.1(%rip), %rdx
	testl	%ecx, %ecx
	jle	LBB0_8
## %bb.1:
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r12
	movslq	%ecx, %rdx
	leaq	24(%rbx), %rax
	cmpq	%rdx, %r12
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rbx
	movq	8(%r13), %r14
	cmpq	$0, (%r14,%rax)
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	16(%r14,%rbx), %edi
	movq	%r15, %rsi
	callq	_sqlite3StrICmp
	movl	(%r13), %ecx
	testq	%rax, %rax
	jne	LBB0_4
LBB0_5:
	cmpl	%r12d, %ecx
	leaq	L_.str.1(%rip), %rdx
	jle	LBB0_8
## %bb.6:
	cmpl	$2, %r12d
	jae	LBB0_10
## %bb.7:
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_8
LBB0_10:
	movq	(%r14,%rbx), %rdi
	callq	_sqlite3BtreeIsInReadTrans
	leaq	L_.str.3(%rip), %rdx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.11:
	movq	(%r14,%rbx), %rdi
	movq	%rdx, %r12
	callq	_sqlite3BtreeIsInBackup
	movq	%r12, %rdx
	testq	%rax, %rax
	je	LBB0_12
LBB0_8:
	leaq	-176(%rbp), %rbx
	movl	$128, %edi
	movq	%rbx, %rsi
	movq	%r15, %rcx
	callq	_sqlite3_snprintf
	movq	-184(%rbp), %rdi                ## 8-byte Reload
	movq	%rbx, %rsi
	movl	$-1, %edx
	callq	_sqlite3_result_error
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.9:
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	(%r14,%rbx), %rdi
	callq	_sqlite3BtreeClose
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r14,%rbx)
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	movq	%r13, %rdi
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sqlite3CollapseDatabaseArray   ## TAILCALL
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

L_.str.1:                               ## @.str.1
	.asciz	"no such database: %s"

L_.str.2:                               ## @.str.2
	.asciz	"cannot detach database %s"

L_.str.3:                               ## @.str.3
	.asciz	"database %s is locked"

	.no_dead_strip	_detachFunc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function detachFunc
_detachFunc:                            ; @detachFunc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #208
	.cfi_def_cfa_offset 208
	stp	x24, x23, [sp, #144]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #160]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #176]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #192]            ; 16-byte Folded Spill
	add	x29, sp, #192
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x0, [x2]
	bl	_sqlite3_value_text
	mov	x22, x0
	mov	x0, x19
	bl	_sqlite3_context_db_handle
	mov	x21, x0
	mov	x0, x20
	bl	_UNUSED_PARAMETER
Lloh3:
	adrp	x8, l_.str@PAGE
Lloh4:
	add	x8, x8, l_.str@PAGEOFF
	cmp	x22, #0
	csel	x20, x8, x22, eq
	ldr	w8, [x21]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x9, #0
	mov	x24, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	add	x9, x22, #24
	cmp	x24, w8, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x22, x9
	ldr	x23, [x21, #8]
	ldr	x9, [x23, x9]
	cbz	x9, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x23, x22
	ldr	w0, [x8, #16]
	mov	x1, x20
	bl	_sqlite3StrICmp
	ldr	w8, [x21]
	cbnz	x0, LBB0_2
LBB0_5:
	cmp	w8, w24
	b.le	LBB0_8
; %bb.6:
	cmp	w24, #2
	b.hs	LBB0_11
; %bb.7:
Lloh5:
	adrp	x2, l_.str.2@PAGE
Lloh6:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
LBB0_9:
	add	x1, sp, #8
	mov	w0, #128
	mov	x3, x20
	bl	_sqlite3_snprintf
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #-1
	bl	_sqlite3_result_error
	ldur	x8, [x29, #-56]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.10:
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #208
	ret
LBB0_11:
	ldr	x0, [x23, x22]
	bl	_sqlite3BtreeIsInReadTrans
	cbnz	x0, LBB0_13
; %bb.12:
	ldr	x0, [x23, x22]
	bl	_sqlite3BtreeIsInBackup
	cbz	x0, LBB0_14
LBB0_13:
Lloh12:
	adrp	x2, l_.str.3@PAGE
Lloh13:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_9
LBB0_14:
	add	x19, x23, x22
	ldr	x0, [x19]
	bl	_sqlite3BtreeClose
	stp	xzr, xzr, [x19]
	ldur	x8, [x29, #-56]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x21
	ldp	x29, x30, [sp, #192]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #176]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #160]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #208
	b	_sqlite3CollapseDatabaseArray
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

l_.str.1:                               ; @.str.1
	.asciz	"no such database: %s"

l_.str.2:                               ; @.str.2
	.asciz	"cannot detach database %s"

l_.str.3:                               ; @.str.3
	.asciz	"database %s is locked"

	.no_dead_strip	_detachFunc
.subsections_via_symbols
