	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function walDecodeFrame
_walDecodeFrame:                        ## @walDecodeFrame
	.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
	movq	%r8, %r12
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	24(%rdi), %rbx
	movq	_WAL_FRAME_HDRSIZE@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	$24, (%rax)
	sete	%dil
	callq	_assert
	leaq	16(%r15), %rdi
	leaq	32(%r12), %rsi
	movl	$8, %edx
	callq	_memcmp
	xorl	%ecx, %ecx
	testq	%rax, %rax
	jne	LBB0_1
## %bb.2:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_sqlite3Get4byte
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r15), %rax
	movq	_SQLITE_BIGENDIAN@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	cmpq	(%rcx), %rax
	sete	%r14b
	movl	%r14d, %edi
	movq	%r12, %rsi
	movl	$8, %edx
	movq	%rbx, %rcx
	movq	%rbx, %r8
	callq	_walChecksumBytes
	movl	(%r15), %edx
	movl	%r14d, %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	%rbx, %rcx
	movq	%rbx, %r8
	callq	_walChecksumBytes
	movq	(%rbx), %r14
	leaq	64(%r12), %rdi
	callq	_sqlite3Get4byte
	cmpq	%rax, %r14
	jne	LBB0_7
## %bb.4:
	movq	8(%rbx), %r14
	leaq	80(%r12), %rdi
	callq	_sqlite3Get4byte
	cmpq	%rax, %r14
	movl	$0, %ecx
	jne	LBB0_1
## %bb.5:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax)
	addq	$16, %r12
	movq	%r12, %rdi
	callq	_sqlite3Get4byte
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	$1, %ecx
	jmp	LBB0_1
LBB0_7:
	xorl	%ecx, %ecx
LBB0_1:
	movl	%ecx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_WAL_FRAME_HDRSIZE,4,2          ## @WAL_FRAME_HDRSIZE
	.comm	_SQLITE_BIGENDIAN,8,3           ## @SQLITE_BIGENDIAN
	.no_dead_strip	_walDecodeFrame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function walDecodeFrame
_walDecodeFrame:                        ; @walDecodeFrame
	.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	x20, x4
	mov	x23, x3
	mov	x19, x2
	mov	x21, x1
	mov	x25, x0
	ldr	x22, [x0, #24]
Lloh0:
	adrp	x8, _WAL_FRAME_HDRSIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WAL_FRAME_HDRSIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #24
	cset	w0, eq
	bl	_assert
	add	x0, x25, #16
	add	x1, x20, #32
	mov	w2, #8
	bl	_memcmp
	cbz	x0, LBB0_3
LBB0_1:
	mov	w0, #0
LBB0_2:
	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_3:
	mov	x0, x20
	bl	_sqlite3Get4byte
	cbz	x0, LBB0_2
; %bb.4:
	mov	x24, x0
	ldr	x8, [x25, #8]
Lloh3:
	adrp	x9, _SQLITE_BIGENDIAN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SQLITE_BIGENDIAN@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w26, eq
	mov	x0, x26
	mov	x1, x20
	mov	w2, #8
	mov	x3, x22
	mov	x4, x22
	bl	_walChecksumBytes
	ldr	w2, [x25]
	mov	x0, x26
	mov	x1, x23
	mov	x3, x22
	mov	x4, x22
	bl	_walChecksumBytes
	ldr	x23, [x22]
	add	x0, x20, #64
	bl	_sqlite3Get4byte
	cmp	x23, x0
	b.ne	LBB0_1
; %bb.5:
	ldr	x22, [x22, #8]
	add	x0, x20, #80
	bl	_sqlite3Get4byte
	cmp	x22, x0
	b.ne	LBB0_1
; %bb.6:
	str	x24, [x21]
	add	x0, x20, #16
	bl	_sqlite3Get4byte
	str	x0, [x19]
	mov	w0, #1
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_WAL_FRAME_HDRSIZE,4,2          ; @WAL_FRAME_HDRSIZE
	.comm	_SQLITE_BIGENDIAN,8,3           ; @SQLITE_BIGENDIAN
	.no_dead_strip	_walDecodeFrame
.subsections_via_symbols
