	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sqlite3Close
_sqlite3Close:                          ## @sqlite3Close
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_SQLITE_OK@GOTPCREL(%rip), %r15
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_sqlite3SafetyCheckSickOrOk
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	8(%rbx), %edi
	callq	_sqlite3_mutex_enter
	movq	_SQLITE_TRACE_CLOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testl	%edi, (%rbx)
	je	LBB0_5
## %bb.4:
	movl	12(%rbx), %esi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	*16(%rbx)
LBB0_5:
	movq	%rbx, %rdi
	callq	_disconnectAllVtab
	movq	%rbx, %rdi
	callq	_sqlite3VtabRollback
	testl	%r14d, %r14d
	je	LBB0_6
LBB0_8:
	movq	_SQLITE_MAGIC_ZOMBIE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_sqlite3LeaveMutexAndCloseZombie
	jmp	LBB0_9
LBB0_2:
	movq	_SQLITE_MISUSE_BKPT@GOTPCREL(%rip), %r15
	jmp	LBB0_9
LBB0_6:
	movq	%rbx, %rdi
	callq	_connectionIsBusy
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_SQLITE_BUSY@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_sqlite3ErrorWithMsg
	movl	8(%rbx), %edi
	callq	_sqlite3_mutex_leave
LBB0_9:
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_SQLITE_MISUSE_BKPT,4,2         ## @SQLITE_MISUSE_BKPT
	.comm	_SQLITE_TRACE_CLOSE,4,2         ## @SQLITE_TRACE_CLOSE
	.comm	_SQLITE_BUSY,4,2                ## @SQLITE_BUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to close due to unfinalized statements or unfinished backups"

	.comm	_SQLITE_MAGIC_ZOMBIE,4,2        ## @SQLITE_MAGIC_ZOMBIE
	.comm	_sqlite3GlobalConfig,16,3       ## @sqlite3GlobalConfig
	.no_dead_strip	_sqlite3Close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sqlite3Close
_sqlite3Close:                          ; @sqlite3Close
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	bl	_sqlite3SafetyCheckSickOrOk
	cbz	w0, LBB0_7
; %bb.2:
	ldr	w0, [x19, #8]
	bl	_sqlite3_mutex_enter
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _SQLITE_TRACE_CLOSE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SQLITE_TRACE_CLOSE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x9]
	tst	w0, w8
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x19, #16]
	ldr	w1, [x19, #12]
	mov	x2, x19
	mov	w3, #0
	blr	x8
LBB0_4:
	mov	x0, x19
	bl	_disconnectAllVtab
	mov	x0, x19
	bl	_sqlite3VtabRollback
	cbz	w20, LBB0_8
LBB0_5:
Lloh3:
	adrp	x8, _SQLITE_MAGIC_ZOMBIE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SQLITE_MAGIC_ZOMBIE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_sqlite3LeaveMutexAndCloseZombie
LBB0_6:
Lloh6:
	adrp	x20, _SQLITE_OK@GOTPAGE
Lloh7:
	ldr	x20, [x20, _SQLITE_OK@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
Lloh8:
	adrp	x20, _SQLITE_MISUSE_BKPT@GOTPAGE
Lloh9:
	ldr	x20, [x20, _SQLITE_MISUSE_BKPT@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
	mov	x0, x19
	bl	_connectionIsBusy
	cbz	x0, LBB0_5
; %bb.9:
Lloh10:
	adrp	x20, _SQLITE_BUSY@GOTPAGE
Lloh11:
	ldr	x20, [x20, _SQLITE_BUSY@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_sqlite3ErrorWithMsg
	ldr	w0, [x19, #8]
	bl	_sqlite3_mutex_leave
LBB0_10:
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_MISUSE_BKPT,4,2         ; @SQLITE_MISUSE_BKPT
	.comm	_SQLITE_TRACE_CLOSE,4,2         ; @SQLITE_TRACE_CLOSE
	.comm	_SQLITE_BUSY,4,2                ; @SQLITE_BUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to close due to unfinalized statements or unfinished backups"

	.comm	_SQLITE_MAGIC_ZOMBIE,4,2        ; @SQLITE_MAGIC_ZOMBIE
	.comm	_sqlite3GlobalConfig,16,3       ; @sqlite3GlobalConfig
	.no_dead_strip	_sqlite3Close
.subsections_via_symbols
