	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	movq	_PAGER_READER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_PAGER_OPEN@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	sete	%dl
	orb	%cl, %dl
	movq	_PAGER_ERROR@GOTPCREL(%rip), %r12
	cmpq	(%r12), %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	60(%rbx), %edi
	callq	_isOpen
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_assert
	movl	72(%rbx), %edi
	callq	_sqlite3WalEndReadTransaction
LBB0_15:
	movq	(%r15), %rax
	movq	%rax, (%rbx)
	jmp	LBB0_16
LBB0_2:
	cmpl	$0, 68(%rbx)
	je	LBB0_3
LBB0_16:
	cmpl	$0, 12(%rbx)
	je	LBB0_18
## %bb.17:
	movq	_MEMDB@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	$0, (%rax)
	sete	%dil
	callq	_assert
	movq	%rbx, %rdi
	callq	_pager_reset
	movq	40(%rbx), %rax
	movq	%rax, 48(%rbx)
	movq	(%r15), %rax
	movq	%rax, (%rbx)
	movq	_SQLITE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
LBB0_18:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
	movq	$0, 32(%rbx)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	64(%rbx), %edi
	callq	_isOpen
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movl	64(%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	60(%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	(%r12), %rax
	jne	LBB0_12
## %bb.11:
	movq	_UNKNOWN_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%rbx)
LBB0_12:
	movl	$1, %edi
	cmpl	$0, 12(%rbx)
	jne	LBB0_14
## %bb.13:
	movq	(%rbx), %rax
	xorl	%edi, %edi
	cmpq	(%r12), %rax
	setne	%dil
LBB0_14:
	callq	_assert
	movq	$0, 48(%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	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
Lloh0:
	adrp	x8, _PAGER_READER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGER_READER@GOTPAGEOFF]
	ldr	x9, [x0]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, x8
Lloh3:
	adrp	x21, _PAGER_OPEN@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PAGER_OPEN@GOTPAGEOFF]
	ldr	x8, [x21]
	ccmp	x9, x8, #4, ne
Lloh5:
	adrp	x22, _PAGER_ERROR@GOTPAGE
Lloh6:
	ldr	x22, [x22, _PAGER_ERROR@GOTPAGEOFF]
	ldr	x8, [x22]
	ccmp	x9, x8, #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
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x19, #60]
	bl	_isOpen
	cmp	x0, #0
	cset	w0, eq
	bl	_assert
	ldr	w0, [x19, #72]
	bl	_sqlite3WalEndReadTransaction
LBB0_2:
	ldr	x8, [x21]
	str	x8, [x19]
	b	LBB0_4
LBB0_3:
	ldr	w8, [x19, #68]
	cbz	w8, LBB0_7
LBB0_4:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_6
; %bb.5:
Lloh7:
	adrp	x8, _MEMDB@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MEMDB@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, #0
	cset	w0, eq
	bl	_assert
	mov	x0, x19
	bl	_pager_reset
	ldr	x8, [x19, #40]
	str	x8, [x19, #48]
	ldr	x8, [x21]
	str	x8, [x19]
Lloh10:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19, #12]
LBB0_6:
	stp	xzr, xzr, [x19, #16]
	str	xzr, [x19, #32]
	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
LBB0_7:
	ldr	w0, [x19, #64]
	bl	_isOpen
	cbz	x0, LBB0_9
; %bb.8:
	ldr	w0, [x19, #64]
	bl	_sqlite3OsDeviceCharacteristics
	mov	x20, x0
	b	LBB0_10
LBB0_9:
	mov	w20, #0
LBB0_10:
Lloh13:
	adrp	x8, _PAGER_JOURNALMODE_MEMORY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PAGER_JOURNALMODE_MEMORY@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	mov	w23, #5
	and	w8, w8, w23
	cmp	w8, #1
	cset	w0, ne
	bl	_assert
Lloh16:
	adrp	x8, _PAGER_JOURNALMODE_OFF@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PAGER_JOURNALMODE_OFF@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	and	w8, w8, w23
	cmp	w8, #1
	cset	w0, ne
	bl	_assert
Lloh19:
	adrp	x8, _PAGER_JOURNALMODE_WAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PAGER_JOURNALMODE_WAL@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	and	w8, w8, w23
	cmp	w8, #1
	cset	w0, ne
	bl	_assert
Lloh22:
	adrp	x8, _PAGER_JOURNALMODE_DELETE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _PAGER_JOURNALMODE_DELETE@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	and	w8, w8, w23
	cmp	w8, #1
	cset	w0, ne
	bl	_assert
Lloh25:
	adrp	x8, _PAGER_JOURNALMODE_TRUNCATE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _PAGER_JOURNALMODE_TRUNCATE@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	and	w8, w8, w23
	cmp	w8, #1
	cset	w0, eq
	bl	_assert
Lloh28:
	adrp	x8, _PAGER_JOURNALMODE_PERSIST@GOTPAGE
Lloh29:
	ldr	x8, [x8, _PAGER_JOURNALMODE_PERSIST@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	and	w8, w8, w23
	cmp	w8, #1
	cset	w0, eq
	bl	_assert
Lloh31:
	adrp	x8, _SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.11:
	ldr	w8, [x19, #8]
	and	w8, w8, w23
	cmp	w8, #1
	b.eq	LBB0_13
LBB0_12:
	ldr	w0, [x19, #60]
	bl	_sqlite3OsClose
LBB0_13:
Lloh34:
	adrp	x8, _NO_LOCK@GOTPAGE
Lloh35:
	ldr	x8, [x8, _NO_LOCK@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_pagerUnlockDb
Lloh37:
	adrp	x8, _SQLITE_OK@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SQLITE_OK@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_16
; %bb.14:
	ldr	x8, [x19]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
Lloh40:
	adrp	x8, _UNKNOWN_LOCK@GOTPAGE
Lloh41:
	ldr	x8, [x8, _UNKNOWN_LOCK@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	str	w8, [x19, #56]
LBB0_16:
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_18
; %bb.17:
	mov	w0, #1
	b	LBB0_19
LBB0_18:
	ldr	x8, [x19]
	ldr	x9, [x22]
	cmp	x8, x9
	cset	w0, ne
LBB0_19:
	bl	_assert
	str	xzr, [x19, #48]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.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
