	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pagerOpenWal
_pagerOpenWal:                          ## @pagerOpenWal
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_SQLITE_OK@GOTPCREL(%rip), %r15
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	jne	LBB0_2
## %bb.1:
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	sete	%dil
LBB0_2:
	movl	(%r15), %r14d
	callq	_assert
	movq	16(%rbx), %rax
	movq	_SHARED_LOCK@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%cl
	movq	_EXCLUSIVE_LOCK@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %edi
	callq	_assert
	cmpq	$0, 32(%rbx)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_pagerExclusiveLock
	movl	%eax, %r14d
LBB0_4:
	cmpl	(%r15), %r14d
	jne	LBB0_6
## %bb.5:
	movl	48(%rbx), %edi
	movl	44(%rbx), %esi
	movl	40(%rbx), %edx
	movq	32(%rbx), %rcx
	movl	24(%rbx), %r8d
	movq	%rbx, %r9
	callq	_sqlite3WalOpen
	movl	%eax, %r14d
LBB0_6:
	movq	%rbx, %rdi
	callq	_pagerFixMaplimit
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_SHARED_LOCK,8,3                ## @SHARED_LOCK
	.comm	_EXCLUSIVE_LOCK,8,3             ## @EXCLUSIVE_LOCK
	.no_dead_strip	_pagerOpenWal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pagerOpenWal
_pagerOpenWal:                          ; @pagerOpenWal
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SQLITE_OK@GOTPAGEOFF]
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	ldr	x8, [x19, #8]
	cmp	x8, #0
	cset	w0, eq
LBB0_3:
	ldr	w20, [x21]
	bl	_assert
	ldr	x8, [x19, #16]
Lloh2:
	adrp	x9, _SHARED_LOCK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _SHARED_LOCK@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh5:
	adrp	x9, _EXCLUSIVE_LOCK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EXCLUSIVE_LOCK@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, eq
	bl	_assert
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_pagerExclusiveLock
	mov	x20, x0
LBB0_5:
	ldr	w8, [x21]
	cmp	w20, w8
	b.ne	LBB0_7
; %bb.6:
	ldp	w1, w0, [x19, #44]
	ldr	w2, [x19, #40]
	ldr	x3, [x19, #32]
	ldr	w4, [x19, #24]
	mov	x5, x19
	bl	_sqlite3WalOpen
	mov	x20, x0
LBB0_7:
	mov	x0, x19
	bl	_pagerFixMaplimit
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_SHARED_LOCK,8,3                ; @SHARED_LOCK
	.comm	_EXCLUSIVE_LOCK,8,3             ; @EXCLUSIVE_LOCK
	.no_dead_strip	_pagerOpenWal
.subsections_via_symbols
