	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function walEncodeFrame
_walEncodeFrame:                        ## @walEncodeFrame
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	32(%rdi), %r14
	movq	_WAL_FRAME_HDRSIZE@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	$24, (%rax)
	sete	%dil
	callq	_assert
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_sqlite3Put4byte
	leaq	16(%rbx), %rdi
	movl	%r13d, %esi
	callq	_sqlite3Put4byte
	leaq	32(%rbx), %rdi
	cmpq	$0, (%r12)
	je	LBB0_1
## %bb.2:
	xorl	%esi, %esi
	movl	$16, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memset                         ## TAILCALL
LBB0_1:
	movl	24(%r12), %esi
	movl	$8, %edx
	callq	_memcpy
	movq	16(%r12), %rax
	movq	_SQLITE_BIGENDIAN@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	(%rcx), %rax
	sete	%r15b
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movl	$8, %edx
	movq	%r14, %rcx
	movq	%r14, %r8
	callq	_walChecksumBytes
	movl	8(%r12), %edx
	movl	%r15d, %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rcx
	movq	%r14, %r8
	callq	_walChecksumBytes
	leaq	64(%rbx), %rdi
	movl	(%r14), %esi
	callq	_sqlite3Put4byte
	addq	$80, %rbx
	movl	4(%r14), %esi
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sqlite3Put4byte                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WAL_FRAME_HDRSIZE,4,2          ## @WAL_FRAME_HDRSIZE
	.comm	_SQLITE_BIGENDIAN,8,3           ## @SQLITE_BIGENDIAN
	.no_dead_strip	_walEncodeFrame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function walEncodeFrame
_walEncodeFrame:                        ; @walEncodeFrame
	.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, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	x22, x0
	ldr	x20, [x0, #32]
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
	mov	x0, x19
	mov	x1, x24
	bl	_sqlite3Put4byte
	add	x0, x19, #16
	mov	x1, x23
	bl	_sqlite3Put4byte
	ldr	x8, [x22]
	add	x0, x19, #32
	cbz	x8, LBB0_2
; %bb.1:
	mov	w1, #0
	mov	w2, #16
	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
	b	_memset
LBB0_2:
	ldr	w1, [x22, #24]
	mov	w2, #8
	bl	_memcpy
	ldr	x8, [x22, #16]
Lloh3:
	adrp	x9, _SQLITE_BIGENDIAN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SQLITE_BIGENDIAN@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w23, eq
	mov	x0, x23
	mov	x1, x19
	mov	w2, #8
	mov	x3, x20
	mov	x4, x20
	bl	_walChecksumBytes
	ldr	w2, [x22, #8]
	mov	x0, x23
	mov	x1, x21
	mov	x3, x20
	mov	x4, x20
	bl	_walChecksumBytes
	add	x0, x19, #64
	ldr	w1, [x20]
	bl	_sqlite3Put4byte
	add	x0, x19, #80
	ldr	w1, [x20, #4]
	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
	b	_sqlite3Put4byte
	.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	_walEncodeFrame
.subsections_via_symbols
