	.file	"extr_btree.c_sqlite3BtreeCount.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sqlite3BtreeCount
	.type	sqlite3BtreeCount, @function
sqlite3BtreeCount:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	call	moveToRoot@PLT
	cmp	DWORD PTR SQLITE_EMPTY[rip], eax
	je	.L2
	xor	ebx, ebx
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	jne	.L1
	.p2align 4,,10
	.p2align 3
.L3:
	mov	rdi, QWORD PTR 16[rbp]
	cmp	QWORD PTR 16[rdi], 0
	mov	eax, DWORD PTR [rdi]
	je	.L18
	add	ebx, eax
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rdi, rbp
	call	moveToParent@PLT
	mov	rdi, QWORD PTR 16[rbp]
	mov	esi, DWORD PTR 0[rbp]
	mov	eax, DWORD PTR [rdi]
	cmp	esi, eax
	jl	.L19
.L9:
	cmp	QWORD PTR 8[rbp], 0
	jne	.L8
	mov	DWORD PTR [r12], ebx
	mov	rdi, rbp
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	moveToRoot@PLT
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	mov	edx, DWORD PTR 24[rdi]
	mov	esi, DWORD PTR 0[rbp]
	test	edx, edx
	jne	.L7
	add	ebx, eax
.L7:
	cmp	eax, esi
	je	.L20
	call	findCell@PLT
	mov	rdi, rax
	call	get4byte@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	moveToChild@PLT
.L11:
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	je	.L3
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	movsx	rdx, DWORD PTR 4[rdi]
	mov	rax, QWORD PTR 8[rdi]
	lea	rdi, 32[rax+rdx*4]
	call	get4byte@PLT
	mov	rdi, rbp
	mov	esi, eax
	call	moveToChild@PLT
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L19:
	add	esi, 1
	mov	DWORD PTR 0[rbp], esi
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L2:
	mov	DWORD PTR [r12], 0
	pop	rbx
	.cfi_def_cfa_offset 24
	mov	eax, DWORD PTR SQLITE_OK[rip]
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	sqlite3BtreeCount, .-sqlite3BtreeCount
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_EMPTY,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_btree.c_sqlite3BtreeCount.c"
	.text
	.align	2
	.global	sqlite3BtreeCount
	.syntax unified
	.arm
	.fpu softvfp
	.type	sqlite3BtreeCount, %function
sqlite3BtreeCount:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r7, r1
	mov	r4, r0
	bl	moveToRoot
	ldr	r3, .L22
	ldr	r3, [r3]
	cmp	r3, r0
	beq	.L2
	ldr	r6, .L22+4
	ldr	r3, [r6]
	cmp	r0, r3
	popne	{r4, r5, r6, r7, r8, pc}
	mov	r5, #0
.L3:
	ldr	r0, [r4, #8]
	ldr	r2, [r0, #12]
	ldr	r3, [r0]
	cmp	r2, #0
	beq	.L19
	add	r5, r5, r3
	b	.L9
.L8:
	mov	r0, r4
	bl	moveToParent
	ldr	r0, [r4, #8]
	ldr	r2, [r4]
	ldr	r3, [r0]
	cmp	r2, r3
	blt	.L20
.L9:
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bne	.L8
	mov	r0, r4
	str	r5, [r7]
	pop	{r4, r5, r6, r7, r8, lr}
	b	moveToRoot
.L19:
	ldr	r2, [r0, #16]
	ldr	r1, [r4]
	cmp	r2, #0
	addeq	r5, r5, r3
.L7:
	cmp	r3, r1
	beq	.L21
	bl	findCell
	bl	get4byte
	mov	r1, r0
	mov	r0, r4
	bl	moveToChild
.L11:
	ldr	r3, [r6]
	cmp	r0, r3
	beq	.L3
	pop	{r4, r5, r6, r7, r8, pc}
.L21:
	ldr	r3, [r0, #4]
	ldr	r0, [r0, #8]
	add	r3, r3, #8
	add	r0, r0, r3, lsl #2
	bl	get4byte
	mov	r1, r0
	mov	r0, r4
	bl	moveToChild
	b	.L11
.L20:
	add	r1, r2, #1
	str	r1, [r4]
	b	.L7
.L2:
	mov	r2, #0
	ldr	r3, .L22+4
	str	r2, [r7]
	ldr	r0, [r3]
	pop	{r4, r5, r6, r7, r8, pc}
.L23:
	.align	2
.L22:
	.word	SQLITE_EMPTY
	.word	SQLITE_OK
	.size	sqlite3BtreeCount, .-sqlite3BtreeCount
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_EMPTY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
