	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function querySharedCacheTableLock
_querySharedCacheTableLock:             ## @querySharedCacheTableLock
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	24(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	callq	_sqlite3BtreeHoldsMutex
	movl	%eax, %edi
	callq	_assert
	movq	_READ_LOCK@GOTPCREL(%rip), %r13
	cmpq	%r14, (%r13)
	sete	%al
	movq	_WRITE_LOCK@GOTPCREL(%rip), %r12
	cmpq	%r14, (%r12)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	setne	%dil
	callq	_assert
	movq	8(%rbx), %rax
	movq	_SQLITE_ReadUncommit@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	sete	%al
	cmpq	%r14, (%r12)
	sete	%cl
	cmpl	$1, %r15d
	sete	%dl
	orb	%cl, %dl
	orb	%al, %dl
	movzbl	%dl, %edi
	callq	_assert
	movl	$1, %r12d
	movl	$1, %edi
	cmpq	%r14, (%r13)
	je	LBB0_3
## %bb.1:
	xorl	%edi, %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rbx, 16(%rax)
	jne	LBB0_3
## %bb.2:
	movq	(%rbx), %rax
	movq	_TRANS_WRITE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
LBB0_3:
	callq	_assert
	cmpq	%r14, (%r13)
	je	LBB0_5
## %bb.4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_TRANS_WRITE@GOTPCREL(%rip), %rcx
	xorl	%r12d, %r12d
	cmpq	(%rcx), %rax
	sete	%r12b
LBB0_5:
	movl	%r12d, %edi
	callq	_assert
	movq	_SQLITE_OK@GOTPCREL(%rip), %rsi
	cmpl	$0, 16(%rbx)
	je	LBB0_20
## %bb.6:
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	16(%rdx), %rax
	cmpq	%rbx, %rax
	je	LBB0_9
## %bb.7:
	movq	_BTS_EXCLUSIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%rdx)
	je	LBB0_9
## %bb.8:
	movq	8(%rbx), %rdi
	movq	8(%rax), %rsi
	callq	_sqlite3ConnectionBlocked
	movq	_SQLITE_LOCKED_SHAREDCACHE@GOTPCREL(%rip), %rsi
	jmp	LBB0_20
LBB0_9:
	movq	24(%rdx), %r12
	testq	%r12, %r12
	jne	LBB0_10
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	24(%r12), %r12
	testq	%r12, %r12
	je	LBB0_19
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	cmpq	(%r13), %rax
	sete	%cl
	movq	_WRITE_LOCK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	movq	(%r13), %rcx
	movb	$1, %al
	cmpq	%r14, %rcx
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%rbx, 16(%r12)
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%rcx, (%r12)
	sete	%al
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	movzbl	%al, %edi
	callq	_assert
	movq	16(%r12), %rax
	cmpq	%rbx, %rax
	je	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	%r15d, 8(%r12)
	jne	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpq	%r14, (%r12)
	je	LBB0_18
## %bb.16:
	movq	8(%rbx), %rdi
	movq	8(%rax), %rsi
	callq	_sqlite3ConnectionBlocked
	movq	_SQLITE_LOCKED_SHAREDCACHE@GOTPCREL(%rip), %rsi
	movq	_WRITE_LOCK@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_20
## %bb.17:
	xorl	%edi, %edi
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	cmpq	%rbx, 16(%r14)
	sete	%dil
	movq	%rsi, %rbx
	callq	_assert
	movq	%rbx, %rsi
	movq	_BTS_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
	jmp	LBB0_20
LBB0_19:
	movq	_SQLITE_OK@GOTPCREL(%rip), %rsi
LBB0_20:
	movl	(%rsi), %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	_TRANS_WRITE,8,3                ## @TRANS_WRITE
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_BTS_EXCLUSIVE,4,2              ## @BTS_EXCLUSIVE
	.comm	_SQLITE_LOCKED_SHAREDCACHE,4,2  ## @SQLITE_LOCKED_SHAREDCACHE
	.comm	_BTS_PENDING,4,2                ## @BTS_PENDING
	.no_dead_strip	_querySharedCacheTableLock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function querySharedCacheTableLock
_querySharedCacheTableLock:             ; @querySharedCacheTableLock
	.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	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	x22, [x0, #24]
	bl	_sqlite3BtreeHoldsMutex
	bl	_assert
Lloh0:
	adrp	x24, _READ_LOCK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _READ_LOCK@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x8, x20
Lloh2:
	adrp	x23, _WRITE_LOCK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _WRITE_LOCK@GOTPAGEOFF]
	ldr	x8, [x23]
	ccmp	x8, x20, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #8]
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
Lloh4:
	adrp	x9, _SQLITE_ReadUncommit@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SQLITE_ReadUncommit@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	ldr	x8, [x23]
	ccmp	x8, x20, #4, ne
	ccmp	w21, #1, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x8, [x24]
	cmp	x8, x20
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_5
LBB0_2:
	ldr	x8, [x22, #16]
	cmp	x8, x19
	b.eq	LBB0_4
; %bb.3:
	mov	w0, #0
	b	LBB0_5
LBB0_4:
	ldr	x8, [x19]
Lloh7:
	adrp	x9, _TRANS_WRITE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TRANS_WRITE@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
LBB0_5:
	bl	_assert
	ldr	x8, [x24]
	cmp	x8, x20
	b.ne	LBB0_7
; %bb.6:
	mov	w0, #1
	b	LBB0_8
LBB0_7:
	ldr	x8, [x22]
Lloh10:
	adrp	x9, _TRANS_WRITE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _TRANS_WRITE@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
LBB0_8:
	bl	_assert
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_25
; %bb.9:
	ldr	x8, [x22, #16]
	cmp	x8, x19
	b.eq	LBB0_13
; %bb.10:
	ldr	w9, [x22, #8]
Lloh13:
	adrp	x10, _BTS_EXCLUSIVE@GOTPAGE
Lloh14:
	ldr	x10, [x10, _BTS_EXCLUSIVE@GOTPAGEOFF]
Lloh15:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_13
; %bb.11:
	ldr	x0, [x19, #8]
	ldr	x1, [x8, #8]
	bl	_sqlite3ConnectionBlocked
LBB0_12:
Lloh16:
	adrp	x25, _SQLITE_LOCKED_SHAREDCACHE@GOTPAGE
Lloh17:
	ldr	x25, [x25, _SQLITE_LOCKED_SHAREDCACHE@GOTPAGEOFF]
	b	LBB0_26
LBB0_13:
	ldr	x26, [x22, #24]
	cbz	x26, LBB0_25
; %bb.14:
Lloh18:
	adrp	x25, _SQLITE_OK@GOTPAGE
Lloh19:
	ldr	x25, [x25, _SQLITE_OK@GOTPAGEOFF]
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	x26, [x26, #24]
	cbz	x26, LBB0_26
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	ldr	x9, [x24]
	cmp	x8, x9
	ldr	x9, [x23]
	ccmp	x8, x9, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x8, [x24]
	cmp	x8, x20
	b.eq	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x9, [x26, #16]
	cmp	x9, x19
	b.eq	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x9, [x26]
	cmp	x9, x8
	cset	w0, eq
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	w0, #1
LBB0_20:                                ;   in Loop: Header=BB0_16 Depth=1
	bl	_assert
	ldr	x8, [x26, #16]
	cmp	x8, x19
	b.eq	LBB0_15
; %bb.21:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w9, [x26, #8]
	cmp	w9, w21
	b.ne	LBB0_15
; %bb.22:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x9, [x26]
	cmp	x9, x20
	b.eq	LBB0_15
; %bb.23:
	ldr	x0, [x19, #8]
	ldr	x1, [x8, #8]
	bl	_sqlite3ConnectionBlocked
	ldr	x8, [x23]
	cmp	x8, x20
	b.ne	LBB0_12
; %bb.24:
	ldr	x8, [x22, #16]
	cmp	x8, x19
	cset	w0, eq
	bl	_assert
Lloh20:
	adrp	x8, _BTS_PENDING@GOTPAGE
Lloh21:
	ldr	x8, [x8, _BTS_PENDING@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	ldr	w9, [x22, #8]
	orr	w8, w9, w8
	str	w8, [x22, #8]
	b	LBB0_12
LBB0_25:
Lloh23:
	adrp	x25, _SQLITE_OK@GOTPAGE
Lloh24:
	ldr	x25, [x25, _SQLITE_OK@GOTPAGEOFF]
LBB0_26:
	ldr	w0, [x25]
	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	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.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	_TRANS_WRITE,8,3                ; @TRANS_WRITE
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_BTS_EXCLUSIVE,4,2              ; @BTS_EXCLUSIVE
	.comm	_SQLITE_LOCKED_SHAREDCACHE,4,2  ; @SQLITE_LOCKED_SHAREDCACHE
	.comm	_BTS_PENDING,4,2                ; @BTS_PENDING
	.no_dead_strip	_querySharedCacheTableLock
.subsections_via_symbols
