	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function clearAllSharedCacheTableLocks
_clearAllSharedCacheTableLocks:         ## @clearAllSharedCacheTableLocks
	.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	%rdi, %r14
	movq	48(%rdi), %r15
	leaq	16(%r15), %r12
	callq	_sqlite3BtreeHoldsMutex
	movl	%eax, %edi
	callq	_assert
	movl	$1, %edi
	cmpq	$0, 40(%r14)
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, (%r12)
	sete	%dil
LBB0_2:
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, (%r14)
	setg	%dil
	callq	_assert
	movq	(%r12), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.3:
	leaq	8(%r14), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_BTS_EXCLUSIVE@GOTPCREL(%rip), %r13
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$16, %rbx
	movq	%rbx, %r12
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	(%r12), %rbx
	testq	%rbx, %rbx
	je	LBB0_12
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %eax
	testl	%eax, (%r15)
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r15), %rax
	cmpq	24(%rbx), %rax
	sete	%al
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=1
	movb	$1, %al
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	movzbl	%al, %edi
	callq	_assert
	movq	24(%rbx), %rax
	movq	(%rax), %rax
	xorl	%edi, %edi
	cmpq	(%rbx), %rax
	setge	%dil
	callq	_assert
	cmpq	%r14, 24(%rbx)
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rbx), %rax
	movq	%rax, (%r12)
	cmpl	$1, 8(%rbx)
	setne	%al
	cmpq	-48(%rbp), %rbx                 ## 8-byte Folded Reload
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	cmpl	$1, 8(%rbx)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rdi
	callq	_sqlite3_free
	jmp	LBB0_11
LBB0_12:
	movq	_BTS_PENDING@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, (%r15)
	je	LBB0_13
## %bb.14:
	xorl	%edi, %edi
	cmpq	$0, 8(%r15)
	setne	%dil
	jmp	LBB0_15
LBB0_13:
	movl	$1, %edi
LBB0_15:
	callq	_assert
	cmpq	%r14, 8(%r15)
	je	LBB0_16
## %bb.17:
	cmpl	$2, 4(%r15)
	jne	LBB0_20
## %bb.18:
	movl	(%rbx), %eax
	jmp	LBB0_19
LBB0_16:
	movq	$0, 8(%r15)
	movq	_BTS_EXCLUSIVE@GOTPCREL(%rip), %rcx
	movl	(%rbx), %eax
	orl	(%rcx), %eax
LBB0_19:
	notl	%eax
	andl	%eax, (%r15)
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BTS_EXCLUSIVE,4,2              ## @BTS_EXCLUSIVE
	.comm	_BTS_PENDING,4,2                ## @BTS_PENDING
	.no_dead_strip	_clearAllSharedCacheTableLocks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function clearAllSharedCacheTableLocks
_clearAllSharedCacheTableLocks:         ; @clearAllSharedCacheTableLocks
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x21, [x0, #48]
	add	x22, x21, #16
	bl	_sqlite3BtreeHoldsMutex
	bl	_assert
	ldr	x8, [x19, #40]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	ldr	x8, [x22]
	cmp	x8, #0
	cset	w0, eq
LBB0_3:
	bl	_assert
	ldr	x8, [x19]
	cmp	x8, #0
	cset	w0, gt
	bl	_assert
	ldr	x20, [x22]
Lloh0:
	adrp	x23, _BTS_EXCLUSIVE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _BTS_EXCLUSIVE@GOTPAGEOFF]
	cbz	x20, LBB0_13
; %bb.4:
	add	x24, x19, #8
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x22, x20, #16
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x20, [x22]
	cbz	x20, LBB0_13
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	ldr	w9, [x23]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x21, #8]
	ldr	x9, [x20, #24]
	cmp	x8, x9
	cset	w0, eq
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #1
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_assert
	ldr	x8, [x20, #24]
	ldr	x8, [x8]
	ldr	x9, [x20]
	cmp	x8, x9
	cset	w0, ge
	bl	_assert
	ldr	x8, [x20, #24]
	cmp	x8, x19
	b.ne	LBB0_5
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x20, #16]
	str	x8, [x22]
	ldr	w8, [x20, #8]
	cmp	w8, #1
	ccmp	x20, x24, #4, eq
	cset	w0, eq
	bl	_assert
	ldr	w8, [x20, #8]
	cmp	w8, #1
	b.eq	LBB0_6
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_sqlite3_free
	b	LBB0_6
LBB0_13:
	ldr	w8, [x21]
Lloh2:
	adrp	x20, _BTS_PENDING@GOTPAGE
Lloh3:
	ldr	x20, [x20, _BTS_PENDING@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.14:
	ldr	x8, [x21, #8]
	cmp	x8, #0
	cset	w0, ne
	b	LBB0_16
LBB0_15:
	mov	w0, #1
LBB0_16:
	bl	_assert
	ldr	x8, [x21, #8]
	cmp	x8, x19
	b.eq	LBB0_19
; %bb.17:
	ldr	w8, [x21, #4]
	cmp	w8, #2
	b.ne	LBB0_21
; %bb.18:
	ldr	w8, [x20]
	b	LBB0_20
LBB0_19:
	str	xzr, [x21, #8]
	ldr	w8, [x23]
	ldr	w9, [x20]
	orr	w8, w9, w8
LBB0_20:
	ldr	w9, [x21]
	bic	w8, w9, w8
	str	w8, [x21]
LBB0_21:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_BTS_EXCLUSIVE,4,2              ; @BTS_EXCLUSIVE
	.comm	_BTS_PENDING,4,2                ; @BTS_PENDING
	.no_dead_strip	_clearAllSharedCacheTableLocks
.subsections_via_symbols
