	.file	"extr_fts3.c_fts3EvalGatherStats.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	fts3EvalGatherStats, @function
fts3EvalGatherStats:
.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
	mov	r14, rdi
	xor	edi, edi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR SQLITE_OK[rip]
	mov	DWORD PTR 20[rsp], eax
	mov	rax, QWORD PTR FTSQUERY_PHRASE[rip]
	cmp	QWORD PTR [rsi], rax
	sete	dil
	call	assert@PLT
	cmp	QWORD PTR 8[rbp], 0
	jne	.L2
	mov	rax, QWORD PTR [r14]
	mov	r13, QWORD PTR 32[r14]
	mov	QWORD PTR 8[rsp], rax
	mov	rax, QWORD PTR FTSQUERY_NEAR[rip]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L36:
	cmp	QWORD PTR 0[rbp], rax
	jne	.L3
.L4:
	mov	rbx, rbp
	mov	rbp, QWORD PTR 56[rbp]
	test	rbp, rbp
	jne	.L36
.L3:
	mov	rax, QWORD PTR 16[rbx]
	mov	edi, DWORD PTR 32[rbx]
	mov	rbp, rbx
	mov	r15, QWORD PTR 24[rbx]
	mov	QWORD PTR [rsp], rax
	call	assert@PLT
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rax, QWORD PTR FTSQUERY_PHRASE[rip]
	mov	r12, rbp
	cmp	QWORD PTR 0[rbp], rax
	je	.L5
	mov	r12, QWORD PTR 40[rbp]
.L5:
	xor	edi, edi
	cmp	QWORD PTR 8[r12], 0
	sete	dil
	call	assert@PLT
	mov	eax, DWORD PTR 0[r13]
	lea	edi, [rax+rax*2]
	sal	edi, 2
	call	sqlite3_malloc64@PLT
	mov	QWORD PTR 8[r12], rax
	mov	rdi, rax
	test	rax, rax
	je	.L37
	mov	eax, DWORD PTR 0[r13]
	xor	esi, esi
	lea	edx, [rax+rax*2]
	sal	edx, 2
	call	memset@PLT
	mov	rbp, QWORD PTR 48[rbp]
	test	rbp, rbp
	jne	.L8
	lea	rbp, 20[rsp]
	mov	rsi, rbx
	mov	rdi, r14
	movabs	r12, 4294967297
	mov	rdx, rbp
	call	fts3EvalRestart@PLT
	cmp	QWORD PTR 8[r14], 0
	jne	.L13
	.p2align 4,,10
	.p2align 3
.L9:
	mov	eax, DWORD PTR SQLITE_OK[rip]
	cmp	DWORD PTR 20[rsp], eax
	je	.L15
	jmp	.L13
	.p2align 4,,10
	.p2align 3
.L12:
	call	sqlite3_data_count@PLT
	xor	edi, edi
	test	rax, rax
	sete	dil
	call	assert@PLT
	mov	rdx, rbp
	mov	rsi, rbx
	mov	rdi, r14
	call	fts3EvalNextRow@PLT
	mov	rax, QWORD PTR 24[rbx]
	mov	rdx, QWORD PTR 16[rbx]
	mov	QWORD PTR 16[r14], r12
	mov	QWORD PTR 8[r14], rax
	mov	QWORD PTR [r14], rdx
	test	rax, rax
	jne	.L13
	mov	rax, QWORD PTR FTSQUERY_NEAR[rip]
	cmp	QWORD PTR [rbx], rax
	jne	.L14
	mov	rsi, rbp
	mov	rdi, r14
	call	sqlite3Fts3EvalTestDeferred@PLT
	test	rax, rax
	je	.L38
.L15:
	mov	eax, DWORD PTR 16[r14]
	mov	edi, DWORD PTR 24[r14]
	test	eax, eax
	jne	.L12
	call	sqlite3_reset@PLT
	mov	edi, DWORD PTR 24[r14]
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L2:
	mov	eax, DWORD PTR 20[rsp]
.L1:
	mov	rcx, QWORD PTR 24[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L39
	add	rsp, 40
	.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
.L14:
	.cfi_restore_state
	mov	eax, DWORD PTR 20[rsp]
	cmp	DWORD PTR SQLITE_OK[rip], eax
	jne	.L9
.L20:
	mov	esi, DWORD PTR 0[r13]
	mov	rdi, rbx
	call	fts3EvalUpdateCounts@PLT
	mov	rax, QWORD PTR 8[r14]
.L16:
	test	rax, rax
	je	.L9
	.p2align 4,,10
	.p2align 3
.L13:
	mov	rax, QWORD PTR 8[rsp]
	mov	QWORD PTR 8[r14], 0
	mov	QWORD PTR [r14], rax
	test	r15, r15
	je	.L40
	mov	QWORD PTR 24[rbx], r15
	mov	eax, DWORD PTR 20[rsp]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L38:
	mov	rax, QWORD PTR 8[r14]
	mov	ecx, DWORD PTR SQLITE_OK[rip]
	cmp	DWORD PTR 20[rsp], ecx
	jne	.L16
	test	rax, rax
	jne	.L13
	jmp	.L20
	.p2align 4,,10
	.p2align 3
.L37:
	mov	eax, DWORD PTR SQLITE_NOMEM[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L40:
	mov	rdx, rbp
	mov	rsi, rbx
	mov	rdi, r14
	call	fts3EvalRestart@PLT
	jmp	.L19
	.p2align 4,,10
	.p2align 3
.L18:
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	jne	.L1
.L19:
	mov	rdx, rbp
	mov	rsi, rbx
	mov	rdi, r14
	call	fts3EvalNextRow@PLT
	xor	edi, edi
	cmp	QWORD PTR 24[rbx], 0
	sete	dil
	call	assert@PLT
	mov	rax, QWORD PTR [rsp]
	cmp	QWORD PTR 16[rbx], rax
	mov	eax, DWORD PTR 20[rsp]
	jne	.L18
	jmp	.L1
.L39:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	fts3EvalGatherStats, .-fts3EvalGatherStats
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_NOMEM,4,4
	.comm	FTSQUERY_PHRASE,8,8
	.comm	FTSQUERY_NEAR,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_fts3.c_fts3EvalGatherStats.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	fts3EvalGatherStats, %function
fts3EvalGatherStats:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r6, .L44
	mov	r4, r0
	ldr	r2, [r6]
	ldr	r0, [r1]
	mov	r10, r1
	sub	r0, r0, r2
	clz	r0, r0
	ldr	r9, .L44+4
	ldr	r2, .L44+8
	ldr	r3, [r9]
	sub	sp, sp, #28
	lsr	r0, r0, #5
	ldr	r2, [r2]
	str	r2, [sp, #20]
	mov	r2,#0
	str	r3, [sp, #16]
	bl	assert
	ldr	r3, [r10, #4]
	cmp	r3, #0
	bne	.L2
	ldr	r7, .L44+12
	ldr	r3, [r4]
	ldr	r8, [r4, #20]
	ldr	r2, [r7]
	str	r3, [sp, #8]
	b	.L4
.L39:
	ldr	r3, [r10]
	cmp	r3, r2
	bne	.L3
.L4:
	mov	r5, r10
	ldr	r10, [r10, #28]
	cmp	r10, #0
	bne	.L39
.L3:
	ldr	r3, [r5, #8]
	ldr	r0, [r5, #16]
	str	r3, [sp, #12]
	ldr	r3, [r5, #12]
	mov	r10, r5
	str	r3, [sp, #4]
	bl	assert
.L8:
	ldr	r2, [r10]
	ldr	r3, [r6]
	cmp	r2, r3
	moveq	fp, r10
	ldrne	fp, [r10, #20]
	ldr	r0, [fp, #4]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r0, [r8]
	add	r0, r0, r0, lsl #1
	lsl	r0, r0, #2
	bl	sqlite3_malloc64
	cmp	r0, #0
	str	r0, [fp, #4]
	beq	.L40
	ldr	r2, [r8]
	mov	r1, #0
	add	r2, r2, r2, lsl #1
	lsl	r2, r2, #2
	bl	memset
	ldr	r10, [r10, #24]
	cmp	r10, #0
	bne	.L8
	mov	r1, r5
	mov	r0, r4
	add	r2, sp, #16
	bl	fts3EvalRestart
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bne	.L13
	mov	r6, #1
	ldr	r3, [sp, #16]
.L9:
	ldr	r2, [r9]
	cmp	r3, r2
	beq	.L15
	b	.L13
.L12:
	bl	sqlite3_data_count
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	add	r2, sp, #16
	mov	r1, r5
	mov	r0, r4
	bl	fts3EvalNextRow
	ldr	r3, [r5, #12]
	ldr	r2, [r5, #8]
	cmp	r3, #0
	stmib	r4, {r3, r6}
	str	r6, [r4, #12]
	str	r2, [r4]
	bne	.L13
	ldr	r2, [r5]
	ldr	r3, [r7]
	cmp	r2, r3
	bne	.L14
	mov	r0, r4
	add	r1, sp, #16
	bl	sqlite3Fts3EvalTestDeferred
	cmp	r0, #0
	beq	.L41
.L15:
	ldr	r3, [r4, #8]
	ldr	r0, [r4, #16]
	cmp	r3, #0
	bne	.L12
	bl	sqlite3_reset
	ldr	r0, [r4, #16]
	b	.L12
.L2:
	ldr	r0, [sp, #16]
.L1:
	ldr	r3, .L44+8
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L42
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L14:
	ldr	r2, [r9]
	ldr	r3, [sp, #16]
	cmp	r2, r3
	bne	.L9
.L20:
	mov	r0, r5
	ldr	r1, [r8]
	bl	fts3EvalUpdateCounts
	ldr	r2, [r4, #4]
.L16:
	cmp	r2, #0
	bne	.L13
	ldr	r3, [sp, #16]
	ldr	r2, [r9]
	cmp	r3, r2
	beq	.L15
.L13:
	mov	r3, #0
	ldr	r2, [sp, #4]
	cmp	r2, r3
	ldr	r2, [sp, #8]
	stm	r4, {r2, r3}
	beq	.L43
	ldr	r3, [sp, #4]
	ldr	r0, [sp, #16]
	str	r3, [r5, #12]
	b	.L1
.L41:
	ldr	r3, [sp, #16]
	ldr	r1, [r9]
	ldr	r2, [r4, #4]
	cmp	r3, r1
	bne	.L16
	cmp	r2, #0
	bne	.L13
	b	.L20
.L40:
	ldr	r3, .L44+16
	ldr	r0, [r3]
	b	.L1
.L43:
	mov	r1, r5
	mov	r0, r4
	add	r2, sp, #16
	bl	fts3EvalRestart
	ldr	r6, [sp, #12]
	b	.L19
.L18:
	ldr	r3, [r9]
	cmp	r0, r3
	bne	.L1
.L19:
	mov	r1, r5
	add	r2, sp, #16
	mov	r0, r4
	bl	fts3EvalNextRow
	ldr	r0, [r5, #12]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	ldr	r3, [r5, #8]
	ldr	r0, [sp, #16]
	cmp	r3, r6
	bne	.L18
	b	.L1
.L42:
	bl	__stack_chk_fail
.L45:
	.align	2
.L44:
	.word	FTSQUERY_PHRASE
	.word	SQLITE_OK
	.word	.LC0
	.word	FTSQUERY_NEAR
	.word	SQLITE_NOMEM
	.size	fts3EvalGatherStats, .-fts3EvalGatherStats
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_NOMEM,4,4
	.comm	FTSQUERY_PHRASE,4,4
	.comm	FTSQUERY_NEAR,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
