	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pager_unlock
_pager_unlock:                          ## @pager_unlock
	.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, %rbx
	movq	(%rdi), %rax
	movq	_PAGER_READER@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	sete	%cl
	movq	_PAGER_OPEN@GOTPCREL(%rip), %r12
	cmpq	(%r12), %rax
	sete	%dl
	orb	%cl, %dl
	movq	_PAGER_ERROR@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	sete	%al
	orb	%dl, %al
	movzbl	%al, %edi
	callq	_assert
	movq	80(%rbx), %rdi
	callq	_sqlite3BitvecDestroy
	movq	$0, 80(%rbx)
	movq	%rbx, %rdi
	callq	_releaseAllSavepoints
	movq	%rbx, %rdi
	callq	_pagerUseWal
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	52(%rbx), %edi
	callq	_isOpen
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
	movl	72(%rbx), %edi
	callq	_sqlite3WalEndReadTransaction
LBB0_15:
	movq	_PAGER_OPEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	jmp	LBB0_16
LBB0_2:
	cmpl	$0, 68(%rbx)
	je	LBB0_3
LBB0_16:
	movl	12(%rbx), %eax
	movq	_SQLITE_OK@GOTPCREL(%rip), %r14
	cmpl	(%r14), %eax
	sete	%al
	movq	_MEMDB@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %edi
	callq	_assert
	cmpl	$0, 12(%rbx)
	je	LBB0_25
## %bb.17:
	cmpq	$0, 16(%rbx)
	je	LBB0_18
## %bb.19:
	movl	52(%rbx), %edi
	callq	_isOpen
	testq	%rax, %rax
	jne	LBB0_21
## %bb.20:
	movq	%r15, %r12
LBB0_21:
	movq	(%r12), %rax
	jmp	LBB0_22
LBB0_18:
	movq	%rbx, %rdi
	callq	_pager_reset
	movq	$0, 56(%rbx)
	movq	_PAGER_OPEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_22:
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	callq	_USEFETCH
	testq	%rax, %rax
	je	LBB0_24
## %bb.23:
	movl	48(%rbx), %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_sqlite3OsUnfetch
LBB0_24:
	movl	(%r14), %eax
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	callq	_setGetterMethod
LBB0_25:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%rbx)
	movq	$0, 40(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	48(%rbx), %edi
	callq	_isOpen
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	48(%rbx), %edi
	callq	_sqlite3OsDeviceCharacteristics
	movl	%eax, %r14d
	jmp	LBB0_6
LBB0_4:
	xorl	%r14d, %r14d
LBB0_6:
	movq	_PAGER_JOURNALMODE_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	$5, %eax
	xorl	%edi, %edi
	cmpl	$1, %eax
	setne	%dil
	callq	_assert
	movq	_PAGER_JOURNALMODE_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	$5, %eax
	xorl	%edi, %edi
	cmpl	$1, %eax
	setne	%dil
	callq	_assert
	movq	_PAGER_JOURNALMODE_WAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	$5, %eax
	xorl	%edi, %edi
	cmpl	$1, %eax
	setne	%dil
	callq	_assert
	movq	_PAGER_JOURNALMODE_DELETE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	$5, %eax
	xorl	%edi, %edi
	cmpl	$1, %eax
	setne	%dil
	callq	_assert
	movq	_PAGER_JOURNALMODE_TRUNCATE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	$5, %eax
	xorl	%edi, %edi
	cmpl	$1, %eax
	sete	%dil
	callq	_assert
	movq	_PAGER_JOURNALMODE_PERSIST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	$5, %eax
	xorl	%edi, %edi
	cmpl	$1, %eax
	sete	%dil
	callq	_assert
	movq	_SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_8
## %bb.7:
	movl	8(%rbx), %eax
	andl	$5, %eax
	cmpl	$1, %eax
	je	LBB0_9
LBB0_8:
	movl	52(%rbx), %edi
	callq	_sqlite3OsClose
LBB0_9:
	movq	_NO_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pagerUnlockDb
	movq	_SQLITE_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_12
## %bb.10:
	movq	(%rbx), %rax
	cmpq	(%r13), %rax
	jne	LBB0_12
## %bb.11:
	movq	_UNKNOWN_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%rbx)
LBB0_12:
	movl	$1, %edi
	cmpl	$0, 12(%rbx)
	jne	LBB0_14
## %bb.13:
	movq	(%rbx), %rax
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	setne	%dil
LBB0_14:
	callq	_assert
	movq	$0, 56(%rbx)
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGER_READER,8,3               ## @PAGER_READER
	.comm	_PAGER_OPEN,8,3                 ## @PAGER_OPEN
	.comm	_PAGER_ERROR,8,3                ## @PAGER_ERROR
	.comm	_PAGER_JOURNALMODE_MEMORY,4,2   ## @PAGER_JOURNALMODE_MEMORY
	.comm	_PAGER_JOURNALMODE_OFF,4,2      ## @PAGER_JOURNALMODE_OFF
	.comm	_PAGER_JOURNALMODE_WAL,4,2      ## @PAGER_JOURNALMODE_WAL
	.comm	_PAGER_JOURNALMODE_DELETE,4,2   ## @PAGER_JOURNALMODE_DELETE
	.comm	_PAGER_JOURNALMODE_TRUNCATE,4,2 ## @PAGER_JOURNALMODE_TRUNCATE
	.comm	_PAGER_JOURNALMODE_PERSIST,4,2  ## @PAGER_JOURNALMODE_PERSIST
	.comm	_SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN,4,2 ## @SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
	.comm	_NO_LOCK,4,2                    ## @NO_LOCK
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_UNKNOWN_LOCK,4,2               ## @UNKNOWN_LOCK
	.comm	_MEMDB,4,2                      ## @MEMDB
	.no_dead_strip	_pager_unlock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pager_unlock
_pager_unlock:                          ; @pager_unlock
	.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, x0
Lloh0:
	adrp	x23, _PAGER_READER@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PAGER_READER@GOTPAGEOFF]
	ldr	x8, [x0]
	ldr	x9, [x23]
	cmp	x8, x9
Lloh2:
	adrp	x22, _PAGER_OPEN@GOTPAGE
Lloh3:
	ldr	x22, [x22, _PAGER_OPEN@GOTPAGEOFF]
	ldr	x9, [x22]
	ccmp	x8, x9, #4, ne
Lloh4:
	adrp	x24, _PAGER_ERROR@GOTPAGE
Lloh5:
	ldr	x24, [x24, _PAGER_ERROR@GOTPAGEOFF]
	ldr	x9, [x24]
	ccmp	x8, x9, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x0, [x19, #80]
	bl	_sqlite3BitvecDestroy
	str	xzr, [x19, #80]
	mov	x0, x19
	bl	_releaseAllSavepoints
	mov	x0, x19
	bl	_pagerUseWal
Lloh6:
	adrp	x21, _SQLITE_OK@GOTPAGE
Lloh7:
	ldr	x21, [x21, _SQLITE_OK@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x19, #52]
	bl	_isOpen
	cmp	x0, #0
	cset	w0, eq
	bl	_assert
	ldr	w0, [x19, #72]
	bl	_sqlite3WalEndReadTransaction
LBB0_2:
	ldr	x8, [x22]
	str	x8, [x19]
	b	LBB0_4
LBB0_3:
	ldr	w8, [x19, #68]
	cbz	w8, LBB0_12
LBB0_4:
	ldr	w8, [x19, #12]
	ldr	w9, [x21]
	cmp	w8, w9
Lloh8:
	adrp	x8, _MEMDB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MEMDB@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	ccmp	w8, #0, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_11
; %bb.5:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
; %bb.6:
	ldr	w0, [x19, #52]
	bl	_isOpen
	cmp	x0, #0
	csel	x8, x23, x22, eq
	ldr	x8, [x8]
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_pager_reset
	str	xzr, [x19, #56]
	ldr	x8, [x22]
LBB0_8:
	str	x8, [x19]
	mov	x0, x19
	bl	_USEFETCH
	cbz	x0, LBB0_10
; %bb.9:
	ldr	w0, [x19, #48]
	mov	w1, #0
	mov	w2, #0
	bl	_sqlite3OsUnfetch
LBB0_10:
	ldr	w8, [x21]
	str	w8, [x19, #12]
	mov	x0, x19
	bl	_setGetterMethod
LBB0_11:
	stp	xzr, xzr, [x19, #24]
	str	xzr, [x19, #40]
	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
LBB0_12:
	ldr	w0, [x19, #48]
	bl	_isOpen
	cbz	x0, LBB0_14
; %bb.13:
	ldr	w0, [x19, #48]
	bl	_sqlite3OsDeviceCharacteristics
	mov	x20, x0
	b	LBB0_15
LBB0_14:
	mov	w20, #0
LBB0_15:
Lloh11:
	adrp	x8, _PAGER_JOURNALMODE_MEMORY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PAGER_JOURNALMODE_MEMORY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	mov	w25, #5
	and	w8, w8, w25
	cmp	w8, #1
	cset	w0, ne
	bl	_assert
Lloh14:
	adrp	x8, _PAGER_JOURNALMODE_OFF@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PAGER_JOURNALMODE_OFF@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	and	w8, w8, w25
	cmp	w8, #1
	cset	w0, ne
	bl	_assert
Lloh17:
	adrp	x8, _PAGER_JOURNALMODE_WAL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _PAGER_JOURNALMODE_WAL@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	and	w8, w8, w25
	cmp	w8, #1
	cset	w0, ne
	bl	_assert
Lloh20:
	adrp	x8, _PAGER_JOURNALMODE_DELETE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PAGER_JOURNALMODE_DELETE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	and	w8, w8, w25
	cmp	w8, #1
	cset	w0, ne
	bl	_assert
Lloh23:
	adrp	x8, _PAGER_JOURNALMODE_TRUNCATE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _PAGER_JOURNALMODE_TRUNCATE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	and	w8, w8, w25
	cmp	w8, #1
	cset	w0, eq
	bl	_assert
Lloh26:
	adrp	x8, _PAGER_JOURNALMODE_PERSIST@GOTPAGE
Lloh27:
	ldr	x8, [x8, _PAGER_JOURNALMODE_PERSIST@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	and	w8, w8, w25
	cmp	w8, #1
	cset	w0, eq
	bl	_assert
Lloh29:
	adrp	x8, _SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_17
; %bb.16:
	ldr	w8, [x19, #8]
	and	w8, w8, w25
	cmp	w8, #1
	b.eq	LBB0_18
LBB0_17:
	ldr	w0, [x19, #52]
	bl	_sqlite3OsClose
LBB0_18:
Lloh32:
	adrp	x8, _NO_LOCK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _NO_LOCK@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pagerUnlockDb
	ldr	w8, [x21]
	cmp	w0, w8
	b.eq	LBB0_21
; %bb.19:
	ldr	x8, [x19]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_21
; %bb.20:
Lloh35:
	adrp	x8, _UNKNOWN_LOCK@GOTPAGE
Lloh36:
	ldr	x8, [x8, _UNKNOWN_LOCK@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	str	w8, [x19, #64]
LBB0_21:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_23
; %bb.22:
	mov	w0, #1
	b	LBB0_24
LBB0_23:
	ldr	x8, [x19]
	ldr	x9, [x24]
	cmp	x8, x9
	cset	w0, ne
LBB0_24:
	bl	_assert
	str	xzr, [x19, #56]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGER_READER,8,3               ; @PAGER_READER
	.comm	_PAGER_OPEN,8,3                 ; @PAGER_OPEN
	.comm	_PAGER_ERROR,8,3                ; @PAGER_ERROR
	.comm	_PAGER_JOURNALMODE_MEMORY,4,2   ; @PAGER_JOURNALMODE_MEMORY
	.comm	_PAGER_JOURNALMODE_OFF,4,2      ; @PAGER_JOURNALMODE_OFF
	.comm	_PAGER_JOURNALMODE_WAL,4,2      ; @PAGER_JOURNALMODE_WAL
	.comm	_PAGER_JOURNALMODE_DELETE,4,2   ; @PAGER_JOURNALMODE_DELETE
	.comm	_PAGER_JOURNALMODE_TRUNCATE,4,2 ; @PAGER_JOURNALMODE_TRUNCATE
	.comm	_PAGER_JOURNALMODE_PERSIST,4,2  ; @PAGER_JOURNALMODE_PERSIST
	.comm	_SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN,4,2 ; @SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
	.comm	_NO_LOCK,4,2                    ; @NO_LOCK
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_UNKNOWN_LOCK,4,2               ; @UNKNOWN_LOCK
	.comm	_MEMDB,4,2                      ; @MEMDB
	.no_dead_strip	_pager_unlock
.subsections_via_symbols
