	.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_7
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_sqlite3SafetyCheckSickOrOk
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movl	4(%rbx), %edi
	callq	_sqlite3_mutex_enter
	movq	%rbx, %rdi
	callq	_disconnectAllVtab
	movq	%rbx, %rdi
	callq	_sqlite3VtabRollback
	testl	%r14d, %r14d
	je	LBB0_4
LBB0_6:
	movq	_SQLITE_MAGIC_ZOMBIE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_sqlite3LeaveMutexAndCloseZombie
	jmp	LBB0_7
LBB0_2:
	movq	_SQLITE_MISUSE_BKPT@GOTPCREL(%rip), %r15
	jmp	LBB0_7
LBB0_4:
	movq	%rbx, %rdi
	callq	_connectionIsBusy
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_SQLITE_BUSY@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_sqlite3Error
	movl	4(%rbx), %edi
	callq	_sqlite3_mutex_leave
LBB0_7:
	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_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_4
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	bl	_sqlite3SafetyCheckSickOrOk
	cbz	w0, LBB0_5
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_sqlite3_mutex_enter
	mov	x0, x19
	bl	_disconnectAllVtab
	mov	x0, x19
	bl	_sqlite3VtabRollback
	cbz	w20, LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _SQLITE_MAGIC_ZOMBIE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_MAGIC_ZOMBIE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x0, x19
	bl	_sqlite3LeaveMutexAndCloseZombie
LBB0_4:
Lloh3:
	adrp	x20, _SQLITE_OK@GOTPAGE
Lloh4:
	ldr	x20, [x20, _SQLITE_OK@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
Lloh5:
	adrp	x20, _SQLITE_MISUSE_BKPT@GOTPAGE
Lloh6:
	ldr	x20, [x20, _SQLITE_MISUSE_BKPT@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:
	mov	x0, x19
	bl	_connectionIsBusy
	cbz	x0, LBB0_3
; %bb.7:
Lloh7:
	adrp	x20, _SQLITE_BUSY@GOTPAGE
Lloh8:
	ldr	x20, [x20, _SQLITE_BUSY@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh9:
	adrp	x2, l_.str@PAGE
Lloh10:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_sqlite3Error
	ldr	w0, [x19, #4]
	bl	_sqlite3_mutex_leave
LBB0_8:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_MISUSE_BKPT,4,2         ; @SQLITE_MISUSE_BKPT
	.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
