	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function readMasterJournal
_readMasterJournal:                     ## @readMasterJournal
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movb	$0, (%rsi)
	movq	_SQLITE_OK@GOTPCREL(%rip), %r12
	movl	(%r12), %ebx
	leaq	-60(%rbp), %rsi
	callq	_sqlite3OsFileSize
	cmpl	%eax, %ebx
	jne	LBB0_14
## %bb.1:
	movl	-60(%rbp), %esi
	cmpl	$16, %esi
	jl	LBB0_14
## %bb.2:
	movl	(%r12), %ebx
	addl	$-16, %esi
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	callq	_read32bits
	cmpl	%eax, %ebx
	jne	LBB0_14
## %bb.3:
	movl	-64(%rbp), %ecx
	cmpl	%r13d, %ecx
	jge	LBB0_13
## %bb.4:
	testl	%ecx, %ecx
	je	LBB0_13
## %bb.5:
	movl	-60(%rbp), %esi
	leal	-16(%rsi), %edx
	movl	%ebx, %eax
	cmpl	%edx, %ecx
	jg	LBB0_14
## %bb.6:
	movl	(%r12), %ebx
	addl	$-12, %esi
	leaq	-68(%rbp), %rdx
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_read32bits
	cmpl	%eax, %ebx
	jne	LBB0_14
## %bb.7:
	movl	(%r12), %ebx
	movl	-60(%rbp), %ecx
	addl	$-8, %ecx
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	movl	$8, %edx
	xorl	%eax, %eax
	callq	_sqlite3OsRead
	cmpl	%eax, %ebx
	jne	LBB0_14
## %bb.8:
	movq	_aJournalMagic@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdi
	movl	$8, %edx
	callq	_memcmp
	movq	%rax, %rcx
	movl	%ebx, %eax
	testq	%rcx, %rcx
	jne	LBB0_14
## %bb.9:
	movl	(%r12), %ebx
	movl	-64(%rbp), %edx
	movl	-60(%rbp), %ecx
	subl	%edx, %ecx
	addl	$-16, %ecx
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_sqlite3OsRead
	cmpl	%eax, %ebx
	jne	LBB0_14
## %bb.10:
	movl	-64(%rbp), %eax
	movl	-68(%rbp), %edx
	testl	%eax, %eax
	jle	LBB0_26
## %bb.11:
	cmpl	$8, %eax
	jae	LBB0_17
## %bb.12:
	xorl	%ecx, %ecx
	jmp	LBB0_24
LBB0_13:
	movl	%ebx, %eax
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_27
## %bb.15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movl	%eax, %ecx
	andl	$-8, %ecx
	movd	%edx, %xmm0
	leaq	-8(%rcx), %rsi
	movq	%rsi, %rdx
	shrq	$3, %rdx
	incq	%rdx
	testq	%rsi, %rsi
	je	LBB0_20
## %bb.18:
	movq	%rdx, %rdi
	andq	$-2, %rdi
	pxor	%xmm1, %xmm1
	xorl	%esi, %esi
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	pmovsxbd	(%r14,%rsi), %xmm2
	pmovsxbd	4(%r14,%rsi), %xmm3
	pmovsxbd	8(%r14,%rsi), %xmm4
	paddd	%xmm2, %xmm4
	psubd	%xmm4, %xmm0
	pmovsxbd	12(%r14,%rsi), %xmm2
	paddd	%xmm3, %xmm2
	psubd	%xmm2, %xmm1
	addq	$16, %rsi
	addq	$-2, %rdi
	jne	LBB0_19
	jmp	LBB0_21
LBB0_20:
	pxor	%xmm1, %xmm1
	xorl	%esi, %esi
LBB0_21:
	testb	$1, %dl
	je	LBB0_23
## %bb.22:
	pmovsxbd	(%r14,%rsi), %xmm2
	psubd	%xmm2, %xmm0
	pmovsxbd	4(%r14,%rsi), %xmm2
	psubd	%xmm2, %xmm1
LBB0_23:
	paddd	%xmm1, %xmm0
	pshufd	$238, %xmm0, %xmm1              ## xmm1 = xmm0[2,3,2,3]
	paddd	%xmm0, %xmm1
	pshufd	$85, %xmm1, %xmm0               ## xmm0 = xmm1[1,1,1,1]
	paddd	%xmm1, %xmm0
	movd	%xmm0, %edx
	cmpq	%rax, %rcx
	je	LBB0_25
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movsbl	(%r14,%rcx), %esi
	subl	%esi, %edx
	incq	%rcx
	cmpq	%rcx, %rax
	jne	LBB0_24
LBB0_25:
	movl	%edx, -68(%rbp)
LBB0_26:
	xorl	%ecx, %ecx
	testl	%edx, %edx
	cmovel	%eax, %ecx
	movslq	%ecx, %rax
	movb	$0, (%r14,%rax)
	movl	(%r12), %eax
	jmp	LBB0_14
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SQLITE_OK,4,2                  ## @SQLITE_OK
	.comm	_aJournalMagic,4,2              ## @aJournalMagic
	.no_dead_strip	_readMasterJournal
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function readMasterJournal
_readMasterJournal:                     ; @readMasterJournal
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	strb	wzr, [x1]
Lloh3:
	adrp	x22, _SQLITE_OK@GOTPAGE
Lloh4:
	ldr	x22, [x22, _SQLITE_OK@GOTPAGEOFF]
	ldr	w23, [x22]
	add	x1, sp, #40
	bl	_sqlite3OsFileSize
	ldr	w8, [sp, #40]
	cmp	w23, w0
	ccmp	w8, #16, #8, eq
	b.lt	LBB0_13
; %bb.1:
	ldr	w23, [x22]
	sub	w1, w8, #16
	add	x2, sp, #44
	mov	x0, x20
	bl	_read32bits
	cmp	w23, w0
	b.ne	LBB0_13
; %bb.2:
	ldr	w8, [sp, #44]
	cmp	w8, w21
	b.ge	LBB0_12
; %bb.3:
	cbz	w8, LBB0_12
; %bb.4:
	ldr	w9, [sp, #40]
	sub	w10, w9, #16
	mov	x0, x23
	cmp	w8, w10
	b.gt	LBB0_13
; %bb.5:
	ldr	w21, [x22]
	sub	w1, w9, #12
	add	x2, sp, #36
	mov	x0, x20
	bl	_read32bits
	cmp	w21, w0
	b.ne	LBB0_13
; %bb.6:
	ldr	w21, [x22]
	ldr	w8, [sp, #40]
	sub	w10, w8, #8
	mov	w8, #8
	add	x9, sp, #48
	stp	x8, x10, [sp, #8]
	str	x9, [sp]
	mov	x0, x20
	bl	_sqlite3OsRead
	cmp	w21, w0
	b.ne	LBB0_13
; %bb.7:
Lloh5:
	adrp	x8, _aJournalMagic@GOTPAGE
Lloh6:
	ldr	x8, [x8, _aJournalMagic@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x0, sp, #48
	mov	w2, #8
	bl	_memcmp
	mov	x8, x0
	mov	x0, x21
	cbnz	x8, LBB0_13
; %bb.8:
	ldr	w21, [x22]
	ldp	w9, w8, [sp, #40]
	sub	w9, w9, w8
	sub	w9, w9, #16
	stp	x19, x8, [sp]
	str	x9, [sp, #16]
	mov	x0, x20
	bl	_sqlite3OsRead
	cmp	w21, w0
	b.ne	LBB0_13
; %bb.9:
	ldr	w8, [sp, #44]
	ldr	w10, [sp, #36]
	cmp	w8, #1
	b.lt	LBB0_27
; %bb.10:
	cmp	w8, #8
	b.hs	LBB0_15
; %bb.11:
	mov	x9, #0
	b	LBB0_24
LBB0_12:
	mov	x0, x23
LBB0_13:
	ldr	x8, [sp, #56]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_28
; %bb.14:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_15:
	cmp	w8, #32
	b.hs	LBB0_17
; %bb.16:
	mov	x9, #0
	b	LBB0_21
LBB0_17:
	and	x9, x8, #0xffffffe0
	movi.2d	v1, #0000000000000000
	movi.2d	v0, #0000000000000000
	mov.s	v0[0], w10
	add	x10, x19, #16
	mov	x11, x9
	movi.2d	v2, #0000000000000000
	movi.2d	v3, #0000000000000000
	movi.2d	v4, #0000000000000000
	movi.2d	v6, #0000000000000000
	movi.2d	v5, #0000000000000000
	movi.2d	v7, #0000000000000000
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldp	q16, q17, [x10, #-16]
	sshll.8h	v18, v16, #0
	sshll2.8h	v16, v16, #0
	sshll.8h	v19, v17, #0
	sshll2.8h	v17, v17, #0
	ssubw2.4s	v3, v3, v16
	ssubw.4s	v2, v2, v16
	ssubw2.4s	v1, v1, v18
	ssubw.4s	v0, v0, v18
	ssubw2.4s	v7, v7, v17
	ssubw.4s	v5, v5, v17
	ssubw2.4s	v6, v6, v19
	ssubw.4s	v4, v4, v19
	add	x10, x10, #32
	subs	x11, x11, #32
	b.ne	LBB0_18
; %bb.19:
	add.4s	v1, v6, v1
	add.4s	v3, v7, v3
	add.4s	v0, v4, v0
	add.4s	v2, v5, v2
	add.4s	v0, v0, v2
	add.4s	v1, v1, v3
	add.4s	v0, v0, v1
	addv.4s	s0, v0
	fmov	w10, s0
	cmp	x9, x8
	b.eq	LBB0_26
; %bb.20:
	tst	x8, #0x18
	b.eq	LBB0_24
LBB0_21:
	mov	x11, x9
	and	x9, x8, #0xfffffff8
	movi.2d	v0, #0000000000000000
	movi.2d	v1, #0000000000000000
	mov.s	v1[0], w10
	add	x10, x19, x11
	sub	x11, x11, x9
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	d2, [x10], #8
	sshll.8h	v2, v2, #0
	ssubw2.4s	v0, v0, v2
	ssubw.4s	v1, v1, v2
	adds	x11, x11, #8
	b.ne	LBB0_22
; %bb.23:
	add.4s	v0, v1, v0
	addv.4s	s0, v0
	fmov	w10, s0
	cmp	x9, x8
	b.eq	LBB0_26
LBB0_24:
	add	x11, x19, x9
	sub	x9, x8, x9
LBB0_25:                                ; =>This Inner Loop Header: Depth=1
	ldrsb	w12, [x11], #1
	sub	w10, w10, w12
	subs	x9, x9, #1
	b.ne	LBB0_25
LBB0_26:
	str	w10, [sp, #36]
LBB0_27:
	cmp	w10, #0
	csel	w8, w8, wzr, eq
	strb	wzr, [x19, w8, sxtw]
	ldr	w0, [x22]
	b	LBB0_13
LBB0_28:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SQLITE_OK,4,2                  ; @SQLITE_OK
	.comm	_aJournalMagic,4,2              ; @aJournalMagic
	.no_dead_strip	_readMasterJournal
.subsections_via_symbols
