	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pager_open_journal
_pager_open_journal:                    ## @pager_open_journal
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_SQLITE_OK@GOTPCREL(%rip), %r12
	movl	(%r12), %r14d
	movq	(%rdi), %rax
	movq	88(%rdi), %r15
	movq	_PAGER_WRITER_LOCKED@GOTPCREL(%rip), %r13
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_assert
	movq	%rbx, %rdi
	callq	_assert_pager_state
	movl	%eax, %edi
	callq	_assert
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	sete	%dil
	callq	_assert
	movl	16(%rbx), %edi
	callq	_NEVER
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	16(%rbx), %r14d
	jmp	LBB0_22
LBB0_2:
	movq	%rbx, %rdi
	callq	_pagerUseWal
	testl	%eax, %eax
	jne	LBB0_19
## %bb.3:
	movq	24(%rbx), %rax
	movq	_PAGER_JOURNALMODE_OFF@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.4:
	movl	80(%rbx), %edi
	callq	_sqlite3BitvecCreate
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movl	64(%rbx), %edi
	callq	_isOpen
	testq	%rax, %rax
	jne	LBB0_17
## %bb.7:
	movq	24(%rbx), %rax
	movq	_PAGER_JOURNALMODE_MEMORY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movl	64(%rbx), %edi
	callq	_sqlite3MemJournalOpen
	jmp	LBB0_14
LBB0_5:
	movq	_SQLITE_NOMEM_BKPT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	jmp	LBB0_22
LBB0_9:
	movq	_SQLITE_OPEN_READWRITE@GOTPCREL(%rip), %rax
	movq	_SQLITE_OPEN_CREATE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	cmpq	$0, 72(%rbx)
	je	LBB0_11
## %bb.10:
	movq	_SQLITE_OPEN_DELETEONCLOSE@GOTPCREL(%rip), %rax
	movq	_SQLITE_OPEN_TEMP_JOURNAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movq	_sqlite3Config@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_12
LBB0_11:
	movq	_SQLITE_OPEN_MAIN_JOURNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_jrnlBufferSize
LBB0_12:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_databaseIsUnmoved
	movl	%eax, %r14d
	cmpl	(%r12), %eax
	jne	LBB0_14
## %bb.13:
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	orl	-48(%rbp), %ecx                 ## 4-byte Folded Reload
	movl	64(%rbx), %edx
	movl	68(%rbx), %esi
	movq	%r15, %rdi
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_sqlite3JournalOpen
	movl	%eax, %r14d
LBB0_14:
	movl	$1, %edi
	cmpl	(%r12), %r14d
	jne	LBB0_16
## %bb.15:
	movl	64(%rbx), %edi
	callq	_isOpen
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
LBB0_16:
	callq	_assert
LBB0_17:
	cmpl	(%r12), %r14d
	jne	LBB0_19
## %bb.18:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%rbx)
	movups	%xmm0, 32(%rbx)
	movq	%rbx, %rdi
	callq	_writeJournalHdr
	movl	%eax, %r14d
LBB0_19:
	cmpl	(%r12), %r14d
	jne	LBB0_20
## %bb.21:
	movq	(%rbx), %rax
	xorl	%edi, %edi
	cmpq	(%r13), %rax
	sete	%dil
	callq	_assert
	movq	_PAGER_WRITER_CACHEMOD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	jmp	LBB0_22
LBB0_20:
	movq	8(%rbx), %rdi
	callq	_sqlite3BitvecDestroy
	movq	$0, 8(%rbx)
LBB0_22:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_PAGER_WRITER_LOCKED,8,3        ## @PAGER_WRITER_LOCKED
	.comm	_PAGER_JOURNALMODE_OFF,8,3      ## @PAGER_JOURNALMODE_OFF
	.comm	_SQLITE_NOMEM_BKPT,4,2          ## @SQLITE_NOMEM_BKPT
	.comm	_PAGER_JOURNALMODE_MEMORY,8,3   ## @PAGER_JOURNALMODE_MEMORY
	.comm	_SQLITE_OPEN_READWRITE,4,2      ## @SQLITE_OPEN_READWRITE
	.comm	_SQLITE_OPEN_CREATE,4,2         ## @SQLITE_OPEN_CREATE
	.comm	_SQLITE_OPEN_DELETEONCLOSE,4,2  ## @SQLITE_OPEN_DELETEONCLOSE
	.comm	_SQLITE_OPEN_TEMP_JOURNAL,4,2   ## @SQLITE_OPEN_TEMP_JOURNAL
	.comm	_sqlite3Config,4,2              ## @sqlite3Config
	.comm	_SQLITE_OPEN_MAIN_JOURNAL,4,2   ## @SQLITE_OPEN_MAIN_JOURNAL
	.comm	_PAGER_WRITER_CACHEMOD,8,3      ## @PAGER_WRITER_CACHEMOD
	.no_dead_strip	_pager_open_journal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pager_open_journal
_pager_open_journal:                    ; @pager_open_journal
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x24, _SQLITE_OK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SQLITE_OK@GOTPAGEOFF]
	ldr	w20, [x24]
	ldr	x21, [x0, #88]
	ldr	x8, [x0]
Lloh2:
	adrp	x23, _PAGER_WRITER_LOCKED@GOTPAGE
Lloh3:
	ldr	x23, [x23, _PAGER_WRITER_LOCKED@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
	mov	x0, x19
	bl	_assert_pager_state
	bl	_assert
	ldr	x8, [x19, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	w0, [x19, #16]
	bl	_NEVER
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w20, [x19, #16]
	b	LBB0_23
LBB0_2:
	mov	x0, x19
	bl	_pagerUseWal
	cbnz	w0, LBB0_20
; %bb.3:
	ldr	x8, [x19, #24]
Lloh4:
	adrp	x9, _PAGER_JOURNALMODE_OFF@GOTPAGE
Lloh5:
	ldr	x9, [x9, _PAGER_JOURNALMODE_OFF@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_20
; %bb.4:
	ldr	w0, [x19, #80]
	bl	_sqlite3BitvecCreate
	str	x0, [x19, #8]
	cbz	x0, LBB0_8
; %bb.5:
	ldr	w0, [x19, #64]
	bl	_isOpen
	cbnz	x0, LBB0_18
; %bb.6:
	ldr	x8, [x19, #24]
Lloh7:
	adrp	x9, _PAGER_JOURNALMODE_MEMORY@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PAGER_JOURNALMODE_MEMORY@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
	ldr	w0, [x19, #64]
	bl	_sqlite3MemJournalOpen
	b	LBB0_14
LBB0_8:
Lloh10:
	adrp	x8, _SQLITE_NOMEM_BKPT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SQLITE_NOMEM_BKPT@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
	b	LBB0_23
LBB0_9:
Lloh13:
	adrp	x8, _SQLITE_OPEN_READWRITE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SQLITE_OPEN_READWRITE@GOTPAGEOFF]
Lloh15:
	ldr	w25, [x8]
Lloh16:
	adrp	x8, _SQLITE_OPEN_CREATE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _SQLITE_OPEN_CREATE@GOTPAGEOFF]
Lloh18:
	ldr	w26, [x8]
	ldr	x8, [x19, #72]
	cbz	x8, LBB0_11
; %bb.10:
Lloh19:
	adrp	x8, _SQLITE_OPEN_DELETEONCLOSE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SQLITE_OPEN_DELETEONCLOSE@GOTPAGEOFF]
Lloh21:
	adrp	x9, _SQLITE_OPEN_TEMP_JOURNAL@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SQLITE_OPEN_TEMP_JOURNAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	ldr	w9, [x9]
	orr	w27, w9, w8
Lloh25:
	adrp	x8, _sqlite3Config@GOTPAGE
Lloh26:
	ldr	x8, [x8, _sqlite3Config@GOTPAGEOFF]
Lloh27:
	ldr	w22, [x8]
	b	LBB0_12
LBB0_11:
Lloh28:
	adrp	x8, _SQLITE_OPEN_MAIN_JOURNAL@GOTPAGE
Lloh29:
	ldr	x8, [x8, _SQLITE_OPEN_MAIN_JOURNAL@GOTPAGEOFF]
Lloh30:
	ldr	w27, [x8]
	mov	x0, x19
	bl	_jrnlBufferSize
	mov	x22, x0
LBB0_12:
	mov	x0, x19
	bl	_databaseIsUnmoved
	mov	x20, x0
	ldr	w8, [x24]
	cmp	w0, w8
	b.ne	LBB0_14
; %bb.13:
	orr	w8, w26, w25
	orr	w3, w8, w27
	ldp	w2, w1, [x19, #64]
	mov	x0, x21
	mov	x4, x22
	bl	_sqlite3JournalOpen
	mov	x20, x0
LBB0_14:
	ldr	w8, [x24]
	cmp	w20, w8
	b.ne	LBB0_16
; %bb.15:
	ldr	w0, [x19, #64]
	bl	_isOpen
	cmp	x0, #0
	cset	w0, ne
	b	LBB0_17
LBB0_16:
	mov	w0, #1
LBB0_17:
	bl	_assert
LBB0_18:
	ldr	w8, [x24]
	cmp	w20, w8
	b.ne	LBB0_20
; %bb.19:
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x19, #32]
	mov	x0, x19
	bl	_writeJournalHdr
	mov	x20, x0
LBB0_20:
	ldr	w8, [x24]
	cmp	w20, w8
	b.ne	LBB0_22
; %bb.21:
	ldr	x8, [x19]
	ldr	x9, [x23]
	cmp	x8, x9
	cset	w0, eq
	bl	_assert
Lloh31:
	adrp	x8, _PAGER_WRITER_CACHEMOD@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PAGER_WRITER_CACHEMOD@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	str	x8, [x19]
	b	LBB0_23
LBB0_22:
	ldr	x0, [x19, #8]
	bl	_sqlite3BitvecDestroy
	str	xzr, [x19, #8]
LBB0_23:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh23
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_PAGER_WRITER_LOCKED,8,3        ; @PAGER_WRITER_LOCKED
	.comm	_PAGER_JOURNALMODE_OFF,8,3      ; @PAGER_JOURNALMODE_OFF
	.comm	_SQLITE_NOMEM_BKPT,4,2          ; @SQLITE_NOMEM_BKPT
	.comm	_PAGER_JOURNALMODE_MEMORY,8,3   ; @PAGER_JOURNALMODE_MEMORY
	.comm	_SQLITE_OPEN_READWRITE,4,2      ; @SQLITE_OPEN_READWRITE
	.comm	_SQLITE_OPEN_CREATE,4,2         ; @SQLITE_OPEN_CREATE
	.comm	_SQLITE_OPEN_DELETEONCLOSE,4,2  ; @SQLITE_OPEN_DELETEONCLOSE
	.comm	_SQLITE_OPEN_TEMP_JOURNAL,4,2   ; @SQLITE_OPEN_TEMP_JOURNAL
	.comm	_sqlite3Config,4,2              ; @sqlite3Config
	.comm	_SQLITE_OPEN_MAIN_JOURNAL,4,2   ; @SQLITE_OPEN_MAIN_JOURNAL
	.comm	_PAGER_WRITER_CACHEMOD,8,3      ; @PAGER_WRITER_CACHEMOD
	.no_dead_strip	_pager_open_journal
.subsections_via_symbols
