	.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, %r14
	movq	%r8, %r12
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	xorl	%edi, %edi
	testq	%r9, %r9
	setne	%dil
	callq	_assert
	movq	$0, (%r14)
	movq	%rbx, %rdi
	callq	_sqlite3SafetyCheckOk
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%rbx), %edi
	callq	_sqlite3_mutex_enter
	movq	%rbx, %rdi
	callq	_sqlite3BtreeEnterAll
	movq	16(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, %r8
	movq	%r14, %r9
	callq	_sqlite3Prepare
	movl	%eax, %r12d
	movq	_SQLITE_SCHEMA@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_4
## %bb.3:
	movq	(%r14), %rdi
	callq	_sqlite3_finalize
	movq	16(%rbp), %rax
	movq	%rax, (%rsp)
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	%r14, %r9
	callq	_sqlite3Prepare
	movl	%eax, %r12d
LBB0_4:
	movq	%rbx, %rdi
	callq	_sqlite3BtreeLeaveAll
	movl	(%rbx), %edi
	callq	_sqlite3_mutex_leave
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	$1, %edi
	cmpl	(%rax), %r12d
	je	LBB0_6
## %bb.5:
	xorl	%edi, %edi
	cmpq	$0, (%r14)
	sete	%dil
LBB0_6:
	callq	_assert
	jmp	LBB0_7
LBB0_1:
	movq	_SQLITE_MISUSE_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
LBB0_7:
	movl	%r12d, %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_SCHEMA,4,2              ## @SQLITE_SCHEMA
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.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	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x21, x6
	mov	x19, x5
	mov	x22, x4
	mov	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x20, x0
	cmp	x5, #0
	cset	w0, ne
	bl	_assert
	str	xzr, [x19]
	mov	x0, x20
	bl	_sqlite3SafetyCheckOk
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w0, [x20]
	bl	_sqlite3_mutex_enter
	mov	x0, x20
	bl	_sqlite3BtreeEnterAll
	mov	x0, x20
	mov	x1, x25
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	mov	x5, x19
	mov	x6, x21
	bl	_sqlite3Prepare
	mov	x26, x0
Lloh0:
	adrp	x8, _SQLITE_SCHEMA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SQLITE_SCHEMA@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_3
; %bb.2:
	ldr	x0, [x19]
	bl	_sqlite3_finalize
	mov	x0, x20
	mov	x1, x25
	mov	x2, x24
	mov	x3, x23
	mov	x4, x22
	mov	x5, x19
	mov	x6, x21
	bl	_sqlite3Prepare
	mov	x26, x0
LBB0_3:
	mov	x0, x20
	bl	_sqlite3BtreeLeaveAll
	ldr	w0, [x20]
	bl	_sqlite3_mutex_leave
Lloh3:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w26, w8
	b.ne	LBB0_6
; %bb.4:
	mov	w0, #1
	b	LBB0_7
LBB0_5:
Lloh6:
	adrp	x8, _SQLITE_MISUSE_BKPT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SQLITE_MISUSE_BKPT@GOTPAGEOFF]
Lloh8:
	ldr	w26, [x8]
	b	LBB0_8
LBB0_6:
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, eq
LBB0_7:
	bl	_assert
LBB0_8:
	mov	x0, x26
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_MISUSE_BKPT,4,2         ; @SQLITE_MISUSE_BKPT
	.comm	_SQLITE_SCHEMA,4,2              ; @SQLITE_SCHEMA
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.no_dead_strip	_sqlite3LockAndPrepare
.subsections_via_symbols
