	.file	"extr_fts5_storage.c_sqlite3Fts5StorageIndexInsert.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sqlite3Fts5StorageIndexInsert
	.type	sqlite3Fts5StorageIndexInsert, @function
sqlite3Fts5StorageIndexInsert:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rsi
	xor	esi, esi
	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
	sub	rsp, 72
	.cfi_def_cfa_offset 128
	mov	rbx, QWORD PTR 24[rdi]
	mov	QWORD PTR 8[rsp], rdx
	lea	r12, 28[rsp]
	mov	edx, 4
	mov	rdi, r12
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 56[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR SQLITE_OK[rip]
	mov	DWORD PTR 24[rsp], eax
	call	memset@PLT
	mov	esi, 1
	mov	rdi, rbp
	mov	QWORD PTR 48[rsp], rbp
	call	fts5StorageLoadTotals@PLT
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	mov	DWORD PTR 24[rsp], eax
	je	.L16
	mov	QWORD PTR 32[rsp], 0
	.p2align 4,,10
	.p2align 3
.L4:
	add	DWORD PTR 0[rbp], 1
.L8:
	mov	edi, DWORD PTR 28[rsp]
	call	sqlite3_free@PLT
	mov	eax, DWORD PTR 24[rsp]
	mov	rbx, QWORD PTR 56[rsp]
	xor	rbx, QWORD PTR fs:40
	jne	.L17
	add	rsp, 72
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	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
	ret
	.p2align 4,,10
	.p2align 3
.L16:
	.cfi_restore_state
	mov	edi, DWORD PTR 16[rbp]
	mov	rdx, QWORD PTR 8[rsp]
	xor	esi, esi
	call	sqlite3Fts5IndexBeginWrite@PLT
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	mov	QWORD PTR 32[rsp], 0
	mov	DWORD PTR 24[rsp], eax
	jne	.L4
	xor	eax, eax
	lea	r15, 32[rsp]
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L5:
	mov	rsi, r12
	lea	rdi, 24[rsp]
	call	sqlite3Fts5BufferAppendVarint@PLT
	mov	rax, QWORD PTR 32[rsp]
	mov	rdx, QWORD PTR 8[rbp]
	mov	rcx, QWORD PTR 40[rsp]
	add	DWORD PTR [rdx+rax*4], ecx
	add	rax, 1
	mov	esi, DWORD PTR SQLITE_OK[rip]
	mov	QWORD PTR 32[rsp], rax
	cmp	DWORD PTR 24[rsp], esi
	jne	.L4
.L3:
	cmp	rax, QWORD PTR [rbx]
	jnb	.L18
	mov	rcx, QWORD PTR 8[rbx]
	xor	edx, edx
	mov	QWORD PTR 40[rsp], 0
	lea	rsi, 0[0+rax*8]
	cmp	QWORD PTR [rcx+rax*8], 0
	jne	.L5
	mov	r9d, DWORD PTR fts5StorageInsertCallback[rip]
	mov	rdi, QWORD PTR 16[r13+rsi]
	mov	DWORD PTR 4[rsp], r9d
	call	sqlite3_value_bytes@PLT
	mov	r14d, eax
	mov	rax, QWORD PTR 32[rsp]
	mov	rdi, QWORD PTR 16[r13+rax*8]
	call	sqlite3_value_text@PLT
	mov	r9d, DWORD PTR 4[rsp]
	mov	r8, r15
	mov	ecx, r14d
	mov	esi, DWORD PTR FTS5_TOKENIZE_DOCUMENT[rip]
	mov	rdx, rax
	mov	rdi, rbx
	call	sqlite3Fts5Tokenize@PLT
	mov	rdx, QWORD PTR 40[rsp]
	mov	DWORD PTR 24[rsp], eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L18:
	add	DWORD PTR 0[rbp], 1
	mov	rsi, QWORD PTR 8[rsp]
	mov	rdx, r12
	mov	rdi, rbp
	call	fts5StorageInsertDocsize@PLT
	mov	DWORD PTR 24[rsp], eax
	jmp	.L8
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sqlite3Fts5StorageIndexInsert, .-sqlite3Fts5StorageIndexInsert
	.comm	fts5StorageInsertCallback,4,4
	.comm	SQLITE_OK,4,4
	.comm	FTS5_TOKENIZE_DOCUMENT,4,4
	.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_fts5_storage.c_sqlite3Fts5StorageIndexInsert.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sqlite3Fts5StorageIndexInsert
	.syntax unified
	.arm
	.fpu softvfp
	.type	sqlite3Fts5StorageIndexInsert, %function
sqlite3Fts5StorageIndexInsert:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r7, #0
	ldr	r6, .L19
	sub	sp, sp, #44
	ldr	r3, [r6]
	str	r2, [sp, #12]
	ldr	r2, .L19+4
	mov	r8, r1
	mov	r1, #1
	ldr	r2, [r2]
	str	r2, [sp, #36]
	mov	r2,#0
	mov	r5, r0
	str	r3, [sp, #16]
	ldr	r4, [r0, #12]
	str	r0, [sp, #32]
	str	r7, [sp, #20]
	bl	fts5StorageLoadTotals
	ldr	r3, [r6]
	str	r0, [sp, #16]
	cmp	r0, r3
	strne	r7, [sp, #24]
	beq	.L16
.L4:
	ldr	r3, [r5]
	add	r3, r3, #1
	str	r3, [r5]
.L8:
	ldr	r0, [sp, #20]
	bl	sqlite3_free
	ldr	r3, .L19+4
	ldr	r0, [sp, #16]
	ldr	r2, [r3]
	ldr	r3, [sp, #36]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	add	sp, sp, #44
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L16:
	mov	r1, r7
	ldr	r2, [sp, #12]
	ldr	r0, [r5, #8]
	bl	sqlite3Fts5IndexBeginWrite
	ldr	r3, [r6]
	str	r0, [sp, #16]
	cmp	r0, r3
	str	r7, [sp, #24]
	bne	.L4
	mov	r1, r7
	ldr	r10, .L19+8
	b	.L3
.L5:
	add	r1, sp, #20
	add	r0, sp, #16
	bl	sqlite3Fts5BufferAppendVarint
	ldr	r3, [sp, #24]
	ldr	r0, [r5, #4]
	ldr	ip, [sp, #28]
	ldr	r2, [r0, r3, lsl #2]
	add	r1, r3, #1
	add	r2, r2, ip
	str	r2, [r0, r3, lsl #2]
	ldr	r2, [sp, #16]
	ldr	r3, [r6]
	str	r1, [sp, #24]
	cmp	r2, r3
	bne	.L4
.L3:
	ldr	r3, [r4]
	cmp	r1, r3
	bcs	.L18
	ldr	r3, [r4, #4]
	str	r7, [sp, #28]
	ldr	r3, [r3, r1, lsl #2]
	lsl	r1, r1, #2
	cmp	r3, #0
	movne	r2, #0
	bne	.L5
	add	r1, r8, r1
	ldr	r3, .L19+12
	ldr	r0, [r1, #8]
	ldr	r9, [r3]
	bl	sqlite3_value_text
	ldr	r3, [sp, #24]
	mov	fp, r0
	add	r3, r3, #2
	ldr	r0, [r8, r3, lsl #2]
	bl	sqlite3_value_bytes
	ldr	lr, [r10]
	add	ip, sp, #24
	mov	r3, r0
	mov	r2, fp
	mov	r1, r9
	mov	r0, r4
	stm	sp, {ip, lr}
	bl	sqlite3Fts5Tokenize
	ldr	r2, [sp, #28]
	str	r0, [sp, #16]
	b	.L5
.L18:
	ldr	r3, [r5]
	mov	r0, r5
	add	r3, r3, #1
	ldr	r1, [sp, #12]
	add	r2, sp, #20
	str	r3, [r5]
	bl	fts5StorageInsertDocsize
	str	r0, [sp, #16]
	b	.L8
.L17:
	bl	__stack_chk_fail
.L20:
	.align	2
.L19:
	.word	SQLITE_OK
	.word	.LC0
	.word	fts5StorageInsertCallback
	.word	FTS5_TOKENIZE_DOCUMENT
	.size	sqlite3Fts5StorageIndexInsert, .-sqlite3Fts5StorageIndexInsert
	.comm	fts5StorageInsertCallback,4,4
	.comm	SQLITE_OK,4,4
	.comm	FTS5_TOKENIZE_DOCUMENT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
