	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sqlite3LockAndPrepare
_sqlite3LockAndPrepare:                 ## @sqlite3LockAndPrepare
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %rbx
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r12d
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	$0, (%r9)
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_sqlite3SafetyCheckOk
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movl	4(%r15), %edi
	callq	_sqlite3_mutex_enter
	movq	%r15, %rdi
	callq	_sqlite3BtreeEnterAll
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movzbl	%al, %edi
	callq	_assert
	movq	_SQLITE_ERROR_RETRY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbp), %rax
	movq	%rax, (%rsp)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%rbx, %r9
	callq	_sqlite3Prepare
	movl	%eax, %r15d
	movb	$1, %al
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, (%rbx)
	sete	%al
	jmp	LBB0_6
LBB0_2:
	movq	_SQLITE_MISUSE_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_15
LBB0_7:
	movq	_SQLITE_SCHEMA@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_14
## %bb.8:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$-1, %esi
	callq	_sqlite3ResetOneSchema
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movzbl	%al, %edi
	callq	_assert
	movq	_SQLITE_ERROR_RETRY@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbp), %rax
	movq	%rax, (%rsp)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%rbx, %r9
	callq	_sqlite3Prepare
	movl	%eax, %r15d
	movb	$1, %al
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %r15d
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, (%rbx)
	sete	%al
	jmp	LBB0_11
LBB0_12:
	movq	_SQLITE_SCHEMA@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_14
## %bb.13:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$-1, %esi
	callq	_sqlite3ResetOneSchema
LBB0_14:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_sqlite3BtreeLeaveAll
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_sqlite3ApiExit
	movl	%eax, %r14d
	movl	(%rbx), %eax
	notl	%eax
	xorl	%edi, %edi
	testl	%eax, %r14d
	sete	%dil
	callq	_assert
	movl	4(%rbx), %edi
	callq	_sqlite3_mutex_leave
LBB0_15:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_MISUSE_BKPT,4,2         ## @SQLITE_MISUSE_BKPT
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_SQLITE_ERROR_RETRY,4,2         ## @SQLITE_ERROR_RETRY
	.comm	_SQLITE_SCHEMA,4,2              ## @SQLITE_SCHEMA
	.no_dead_strip	_sqlite3LockAndPrepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sqlite3LockAndPrepare
_sqlite3LockAndPrepare:                 ; @sqlite3LockAndPrepare
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x6
	mov	x21, x5
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x19, x0
	str	xzr, [x5]
	bl	_sqlite3SafetyCheckOk
	cbz	x25, LBB0_7
; %bb.1:
	cbz	w0, LBB0_7
; %bb.2:
	ldr	w0, [x19, #4]
	bl	_sqlite3_mutex_enter
	mov	x0, x19
	bl	_sqlite3BtreeEnterAll
Lloh0:
	adrp	x27, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x27, [x27, _SQLITE_OK@GOTPAGEOFF]
Lloh2:
	adrp	x28, _SQLITE_ERROR_RETRY@GOTPAGE
Lloh3:
	ldr	x28, [x28, _SQLITE_ERROR_RETRY@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x21]
	cmp	x8, #0
	cset	w0, eq
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_assert
	ldr	w8, [x28]
	cmp	w26, w8
	b.ne	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x25
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	mov	x6, x20
	bl	_sqlite3Prepare
	mov	x26, x0
	ldr	w8, [x27]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	b	LBB0_4
LBB0_7:
Lloh4:
	adrp	x8, _SQLITE_MISUSE_BKPT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _SQLITE_MISUSE_BKPT@GOTPAGEOFF]
Lloh6:
	ldr	w20, [x8]
	b	LBB0_17
LBB0_8:
Lloh7:
	adrp	x8, _SQLITE_SCHEMA@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SQLITE_SCHEMA@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w26, w8
	b.ne	LBB0_16
; %bb.9:
	mov	x0, x19
	mov	w1, #-1
	bl	_sqlite3ResetOneSchema
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x21]
	cmp	x8, #0
	cset	w0, eq
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	bl	_assert
	ldr	w8, [x28]
	cmp	w26, w8
	b.ne	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x25
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	mov	x5, x21
	mov	x6, x20
	bl	_sqlite3Prepare
	mov	x26, x0
	ldr	w8, [x27]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	w0, #1
	b	LBB0_11
LBB0_14:
Lloh10:
	adrp	x8, _SQLITE_SCHEMA@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SQLITE_SCHEMA@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w26, w8
	b.ne	LBB0_16
; %bb.15:
	mov	x0, x19
	mov	w1, #-1
	bl	_sqlite3ResetOneSchema
LBB0_16:
	mov	x0, x19
	bl	_sqlite3BtreeLeaveAll
	mov	x0, x19
	mov	x1, x26
	bl	_sqlite3ApiExit
	mov	x20, x0
	ldr	w8, [x19]
	bics	wzr, w0, w8
	cset	w0, eq
	bl	_assert
	ldr	w0, [x19, #4]
	bl	_sqlite3_mutex_leave
LBB0_17:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_MISUSE_BKPT,4,2         ; @SQLITE_MISUSE_BKPT
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SQLITE_ERROR_RETRY,4,2         ; @SQLITE_ERROR_RETRY
	.comm	_SQLITE_SCHEMA,4,2              ; @SQLITE_SCHEMA
	.no_dead_strip	_sqlite3LockAndPrepare
.subsections_via_symbols
