	.file	"extr_sqlite3.c_walEncodeFrame.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	walEncodeFrame, @function
walEncodeFrame:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rcx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14d, esi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, r8
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	r12, QWORD PTR 32[rdi]
	xor	edi, edi
	cmp	DWORD PTR WAL_FRAME_HDRSIZE[rip], 24
	sete	dil
	call	assert@PLT
	mov	esi, r14d
	mov	rdi, rbx
	call	sqlite3Put4byte@PLT
	lea	rdi, 16[rbx]
	mov	esi, r13d
	call	sqlite3Put4byte@PLT
	cmp	QWORD PTR 0[rbp], 0
	lea	rdi, 32[rbx]
	jne	.L2
	mov	esi, DWORD PTR 24[rbp]
	mov	edx, 8
	xor	r13d, r13d
	call	memcpy@PLT
	mov	r8, r12
	mov	rcx, r12
	mov	rsi, rbx
	mov	rax, QWORD PTR SQLITE_BIGENDIAN[rip]
	cmp	QWORD PTR 16[rbp], rax
	mov	edx, 8
	sete	r13b
	mov	edi, r13d
	call	walChecksumBytes@PLT
	mov	edx, DWORD PTR 8[rbp]
	mov	r8, r12
	mov	rcx, r12
	mov	rsi, r15
	mov	edi, r13d
	call	walChecksumBytes@PLT
	mov	esi, DWORD PTR [r12]
	lea	rdi, 64[rbx]
	call	sqlite3Put4byte@PLT
	mov	esi, DWORD PTR 4[r12]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	lea	rdi, 80[rbx]
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	sqlite3Put4byte@PLT
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	add	rsp, 8
	.cfi_def_cfa_offset 56
	mov	edx, 16
	xor	esi, esi
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	memset@PLT
	.cfi_endproc
.LFE0:
	.size	walEncodeFrame, .-walEncodeFrame
	.comm	WAL_FRAME_HDRSIZE,4,4
	.comm	SQLITE_BIGENDIAN,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_sqlite3.c_walEncodeFrame.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	walEncodeFrame, %function
walEncodeFrame:
	@ args = 4, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, lr}
	mov	r4, r0
	ldr	r0, .L5
	mov	r8, r1
	ldr	r0, [r0]
	mov	r7, r2
	sub	r0, r0, #24
	clz	r0, r0
	sub	sp, sp, #12
	ldr	r5, [sp, #40]
	lsr	r0, r0, #5
	mov	r9, r3
	ldr	r6, [r4, #16]
	bl	assert
	mov	r1, r8
	mov	r0, r5
	bl	sqlite3Put4byte
	mov	r1, r7
	add	r0, r5, #16
	bl	sqlite3Put4byte
	ldr	r3, [r4]
	add	r0, r5, #32
	cmp	r3, #0
	bne	.L2
	ldr	r1, [r4, #12]
	mov	r2, #8
	bl	memcpy
	ldr	r3, .L5+4
	ldr	r7, [r4, #8]
	ldr	r3, [r3]
	mov	r1, r5
	sub	r7, r7, r3
	clz	r7, r7
	lsr	r7, r7, #5
	mov	r3, r6
	mov	r0, r7
	mov	r2, #8
	str	r6, [sp]
	bl	walChecksumBytes
	str	r6, [sp]
	mov	r1, r9
	mov	r3, r6
	ldr	r2, [r4, #4]
	mov	r0, r7
	bl	walChecksumBytes
	ldr	r1, [r6]
	add	r0, r5, #64
	bl	sqlite3Put4byte
	ldr	r1, [r6, #4]
	add	r0, r5, #80
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	b	sqlite3Put4byte
.L2:
	mov	r2, #16
	mov	r1, #0
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, lr}
	b	memset
.L6:
	.align	2
.L5:
	.word	WAL_FRAME_HDRSIZE
	.word	SQLITE_BIGENDIAN
	.size	walEncodeFrame, .-walEncodeFrame
	.comm	WAL_FRAME_HDRSIZE,4,4
	.comm	SQLITE_BIGENDIAN,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
