	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function setSharedCacheTableLock
_setSharedCacheTableLock:               ## @setSharedCacheTableLock
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	16(%rdi), %r13
	callq	_sqlite3BtreeHoldsMutex
	movl	%eax, %edi
	callq	_assert
	movq	_READ_LOCK@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	sete	%al
	movq	_WRITE_LOCK@GOTPCREL(%rip), %rbx
	cmpq	%r14, (%rbx)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 8(%r15)
	setne	%dil
	callq	_assert
	movq	8(%r15), %rax
	movq	_SQLITE_ReadUncommit@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	sete	%al
	cmpq	%r14, (%rbx)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	movl	(%r15), %edi
	callq	_assert
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_querySharedCacheTableLock
	xorl	%edi, %edi
	cmpq	%rax, %rbx
	sete	%dil
	callq	_assert
	movq	(%r13), %rbx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	16(%rbx), %rbx
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%r12, (%rbx)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpq	%r15, 24(%rbx)
	jne	LBB0_4
	jmp	LBB0_8
LBB0_5:
	movl	$32, %edi
	callq	_sqlite3MallocZero
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %rbx
	movq	%r12, (%rax)
	movq	%r15, 24(%rax)
	movq	(%r13), %rax
	movq	%rax, 16(%rbx)
	movq	%rbx, (%r13)
LBB0_8:
	movq	_WRITE_LOCK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%edi, %edi
	movq	_READ_LOCK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setg	%dil
	callq	_assert
	cmpq	%r14, 8(%rbx)
	jge	LBB0_10
## %bb.9:
	movq	%r14, 8(%rbx)
LBB0_10:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_6:
	movq	_SQLITE_NOMEM_BKPT@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_READ_LOCK,8,3                  ## @READ_LOCK
	.comm	_WRITE_LOCK,8,3                 ## @WRITE_LOCK
	.comm	_SQLITE_ReadUncommit,4,2        ## @SQLITE_ReadUncommit
	.comm	_SQLITE_OK,8,3                  ## @SQLITE_OK
	.comm	_SQLITE_NOMEM_BKPT,4,2          ## @SQLITE_NOMEM_BKPT
	.no_dead_strip	_setSharedCacheTableLock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function setSharedCacheTableLock
_setSharedCacheTableLock:               ; @setSharedCacheTableLock
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x23, [x0, #16]
	bl	_sqlite3BtreeHoldsMutex
	bl	_assert
Lloh0:
	adrp	x24, _READ_LOCK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _READ_LOCK@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x8, x19
Lloh2:
	adrp	x25, _WRITE_LOCK@GOTPAGE
Lloh3:
	ldr	x25, [x25, _WRITE_LOCK@GOTPAGEOFF]
	ldr	x8, [x25]
	ccmp	x8, x19, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x20, #8]
Lloh4:
	adrp	x9, _SQLITE_ReadUncommit@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SQLITE_ReadUncommit@GOTPAGEOFF]
	ldr	w8, [x8]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	ldr	x8, [x25]
	ccmp	x8, x19, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	w0, [x20]
	bl	_assert
Lloh7:
	adrp	x26, _SQLITE_OK@GOTPAGE
Lloh8:
	ldr	x26, [x26, _SQLITE_OK@GOTPAGEOFF]
	ldr	x22, [x26]
	mov	x0, x20
	mov	x1, x21
	mov	x2, x19
	bl	_querySharedCacheTableLock
	cmp	x22, x0
	cset	w0, eq
	bl	_assert
	ldr	x22, [x23]
	cbnz	x22, LBB0_4
LBB0_1:
	mov	w0, #32
	bl	_sqlite3MallocZero
	cbz	x0, LBB0_9
; %bb.2:
	mov	x22, x0
	str	x21, [x0]
	ldr	x8, [x23]
	stp	x8, x20, [x0, #16]
	str	x0, [x23]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x22, [x22, #16]
	cbz	x22, LBB0_1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	cmp	x8, x21
	b.ne	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x22, #24]
	cmp	x8, x20
	b.ne	LBB0_3
LBB0_6:
	ldr	x8, [x25]
	ldr	x9, [x24]
	cmp	x8, x9
	cset	w0, gt
	bl	_assert
	ldr	x8, [x22, #8]
	cmp	x8, x19
	b.ge	LBB0_8
; %bb.7:
	str	x19, [x22, #8]
LBB0_8:
	ldr	w0, [x26]
	b	LBB0_10
LBB0_9:
Lloh9:
	adrp	x8, _SQLITE_NOMEM_BKPT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SQLITE_NOMEM_BKPT@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
LBB0_10:
	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 AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_READ_LOCK,8,3                  ; @READ_LOCK
	.comm	_WRITE_LOCK,8,3                 ; @WRITE_LOCK
	.comm	_SQLITE_ReadUncommit,4,2        ; @SQLITE_ReadUncommit
	.comm	_SQLITE_OK,8,3                  ; @SQLITE_OK
	.comm	_SQLITE_NOMEM_BKPT,4,2          ; @SQLITE_NOMEM_BKPT
	.no_dead_strip	_setSharedCacheTableLock
.subsections_via_symbols
