	.file	"extr_sqlite3.c_sqlite3_declare_vtab.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s"
	.text
	.p2align 4
	.globl	sqlite3_declare_vtab
	.type	sqlite3_declare_vtab, @function
sqlite3_declare_vtab:
.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
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	sub	rsp, 88
	.cfi_def_cfa_offset 144
	mov	edi, DWORD PTR [rdi]
	mov	r12d, DWORD PTR SQLITE_OK[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 72[rsp], rax
	xor	eax, eax
	mov	QWORD PTR 24[rsp], 0
	call	sqlite3_mutex_enter@PLT
	mov	rbp, QWORD PTR 8[rbx]
	test	rbp, rbp
	je	.L2
	mov	ecx, DWORD PTR 0[rbp]
	test	ecx, ecx
	je	.L3
.L2:
	mov	esi, DWORD PTR SQLITE_MISUSE[rip]
	mov	rdi, rbx
	call	sqlite3Error@PLT
	mov	edi, DWORD PTR [rbx]
	call	sqlite3_mutex_leave@PLT
	mov	r12d, DWORD PTR SQLITE_MISUSE_BKPT[rip]
.L1:
	mov	rax, QWORD PTR 72[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L29
	add	rsp, 88
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	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
.L3:
	.cfi_restore_state
	mov	r15, QWORD PTR 16[rbp]
	lea	r14, 32[rsp]
	mov	rdi, r15
	call	IsVirtual@PLT
	mov	edi, eax
	call	assert@PLT
	xor	esi, esi
	mov	edx, 40
	mov	rdi, r14
	call	memset@PLT
	lea	rdx, 24[rsp]
	mov	rsi, r13
	mov	rdi, r14
	mov	eax, DWORD PTR PARSE_MODE_DECLARE_VTAB[rip]
	mov	QWORD PTR 64[rsp], rbx
	mov	DWORD PTR 32[rsp], 1
	mov	DWORD PTR 56[rsp], eax
	call	sqlite3RunParser@PLT
	cmp	eax, DWORD PTR SQLITE_OK[rip]
	je	.L30
.L5:
	mov	rcx, QWORD PTR 24[rsp]
	mov	eax, 0
	lea	rdx, .LC0[rip]
	mov	rdi, rbx
	mov	esi, DWORD PTR SQLITE_ERROR[rip]
	test	rcx, rcx
	cmove	rdx, rax
	call	sqlite3ErrorWithMsg@PLT
	mov	rsi, QWORD PTR 24[rsp]
	mov	rdi, rbx
	call	sqlite3DbFree@PLT
	mov	r12d, DWORD PTR SQLITE_ERROR[rip]
.L9:
	mov	eax, DWORD PTR PARSE_MODE_NORMAL[rip]
	mov	rdi, QWORD PTR 48[rsp]
	mov	DWORD PTR 56[rsp], eax
	test	rdi, rdi
	jne	.L31
.L11:
	mov	rsi, QWORD PTR 40[rsp]
	mov	rdi, rbx
	call	sqlite3DeleteTable@PLT
	mov	rdi, r14
	call	sqlite3ParserReset@PLT
	xor	edi, edi
	test	r12d, -256
	sete	dil
	call	assert@PLT
	mov	esi, r12d
	mov	rdi, rbx
	call	sqlite3ApiExit@PLT
	mov	edi, DWORD PTR [rbx]
	mov	r12d, eax
	call	sqlite3_mutex_leave@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L30:
	mov	rdi, QWORD PTR 40[rsp]
	test	rdi, rdi
	je	.L5
	mov	edx, DWORD PTR 4[rbx]
	test	edx, edx
	jne	.L5
	mov	eax, DWORD PTR 32[rdi]
	test	eax, eax
	jne	.L5
	call	IsVirtual@PLT
	test	eax, eax
	jne	.L5
	cmp	QWORD PTR 16[r15], 0
	je	.L32
.L6:
	mov	DWORD PTR 0[rbp], 1
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L31:
	call	sqlite3VdbeFinalize@PLT
	jmp	.L11
.L32:
	mov	r13, QWORD PTR 40[rsp]
	xor	edi, edi
	mov	rax, QWORD PTR 16[r13]
	mov	QWORD PTR 16[r15], rax
	mov	rax, QWORD PTR 24[r13]
	mov	QWORD PTR 24[r15], rax
	mov	eax, DWORD PTR TF_WithoutRowid[rip]
	or	eax, DWORD PTR TF_NoVisibleRowid[rip]
	and	eax, DWORD PTR 0[r13]
	or	DWORD PTR [r15], eax
	cmp	QWORD PTR 8[r15], 0
	mov	QWORD PTR 24[r13], 0
	sete	dil
	mov	QWORD PTR 16[r13], 0
	call	assert@PLT
	mov	rdi, r13
	call	HasRowid@PLT
	mov	edi, 1
	test	rax, rax
	je	.L33
.L7:
	call	assert@PLT
	mov	rdi, r13
	call	HasRowid@PLT
	test	rax, rax
	jne	.L8
	mov	rax, QWORD PTR 8[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR [rax], 0
	jne	.L34
.L8:
	mov	rdx, QWORD PTR 8[r13]
	test	rdx, rdx
	je	.L6
	cmp	QWORD PTR [rdx], 0
	mov	QWORD PTR 8[rsp], rdx
	sete	dil
	movzx	edi, dil
	call	assert@PLT
	mov	rdx, QWORD PTR 8[rsp]
	mov	QWORD PTR 8[r15], rdx
	mov	QWORD PTR 8[r13], 0
	mov	QWORD PTR 8[rdx], r15
	jmp	.L6
.L33:
	mov	rdi, r13
	call	sqlite3PrimaryKeyIndex@PLT
	xor	edi, edi
	test	rax, rax
	setne	dil
	jmp	.L7
.L34:
	mov	rdi, r13
	call	sqlite3PrimaryKeyIndex@PLT
	cmp	DWORD PTR [rax], 1
	je	.L8
	mov	r12d, DWORD PTR SQLITE_ERROR[rip]
	jmp	.L8
.L29:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	sqlite3_declare_vtab, .-sqlite3_declare_vtab
	.comm	TF_WithoutRowid,4,4
	.comm	TF_NoVisibleRowid,4,4
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_MISUSE_BKPT,4,4
	.comm	SQLITE_MISUSE,4,4
	.comm	SQLITE_ERROR,4,4
	.comm	PARSE_MODE_NORMAL,4,4
	.comm	PARSE_MODE_DECLARE_VTAB,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_sqlite3.c_sqlite3_declare_vtab.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC1:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	sqlite3_declare_vtab
	.syntax unified
	.arm
	.fpu softvfp
	.type	sqlite3_declare_vtab, %function
sqlite3_declare_vtab:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r3, #0
	mov	r4, r0
	ldr	r2, .L41
	ldr	r9, .L41+4
	sub	sp, sp, #36
	ldr	r0, [r0]
	ldr	r2, [r2]
	str	r2, [sp, #28]
	mov	r2,#0
	mov	r8, r1
	ldr	r7, [r9]
	str	r3, [sp, #4]
	bl	sqlite3_mutex_enter
	ldr	r5, [r4, #8]
	cmp	r5, #0
	beq	.L2
	ldr	r6, [r5]
	cmp	r6, #0
	beq	.L3
.L2:
	ldr	r3, .L41+8
	mov	r0, r4
	ldr	r1, [r3]
	bl	sqlite3Error
	ldr	r0, [r4]
	bl	sqlite3_mutex_leave
	ldr	r3, .L41+12
	ldr	r4, [r3]
.L1:
	ldr	r3, .L41
	ldr	r2, [r3]
	ldr	r3, [sp, #28]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L35
	mov	r0, r4
	add	sp, sp, #36
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L3:
	mov	fp, #1
	ldr	r10, [r5, #8]
	mov	r0, r10
	bl	IsVirtual
	bl	assert
	ldr	r3, .L41+16
	mov	r1, r8
	ldr	r3, [r3]
	add	r0, sp, #8
	add	r2, sp, #4
	str	r3, [sp, #20]
	str	r6, [sp, #12]
	str	r6, [sp, #16]
	str	r4, [sp, #24]
	str	fp, [sp, #8]
	bl	sqlite3RunParser
	ldr	r3, [r9]
	cmp	r0, r3
	beq	.L36
.L5:
	ldr	r3, [sp, #4]
	ldr	r5, .L41+20
	cmp	r3, #0
	ldr	r2, .L41+24
	ldr	r1, [r5]
	moveq	r2, #0
	mov	r0, r4
	bl	sqlite3ErrorWithMsg
	mov	r0, r4
	ldr	r1, [sp, #4]
	bl	sqlite3DbFree
	ldr	r7, [r5]
.L9:
	ldr	r3, .L41+28
	ldr	r0, [sp, #16]
	ldr	r3, [r3]
	cmp	r0, #0
	str	r3, [sp, #20]
	bne	.L37
.L11:
	ldr	r1, [sp, #12]
	mov	r0, r4
	bl	sqlite3DeleteTable
	add	r0, sp, #8
	bl	sqlite3ParserReset
	bics	r3, r7, #255
	moveq	r0, #1
	movne	r0, #0
	bl	assert
	mov	r1, r7
	mov	r0, r4
	bl	sqlite3ApiExit
	mov	r3, r0
	ldr	r0, [r4]
	mov	r4, r3
	bl	sqlite3_mutex_leave
	b	.L1
.L36:
	ldr	r0, [sp, #12]
	cmp	r0, #0
	beq	.L5
	ldr	r3, [r4, #4]
	cmp	r3, #0
	bne	.L5
	ldr	r3, [r0, #16]
	cmp	r3, #0
	bne	.L5
	bl	IsVirtual
	cmp	r0, #0
	bne	.L5
	ldr	r3, [r10, #8]
	cmp	r3, #0
	beq	.L38
.L6:
	mov	r3, #1
	str	r3, [r5]
	b	.L9
.L37:
	bl	sqlite3VdbeFinalize
	b	.L11
.L38:
	ldr	r0, [r10, #4]
	ldr	r2, .L41+32
	clz	r0, r0
	ldr	r1, .L41+36
	ldr	r6, [sp, #12]
	ldr	r1, [r1]
	ldr	r2, [r2]
	ldr	ip, [r6]
	orr	r2, r2, r1
	ldr	r1, [r10]
	and	r2, r2, ip
	orr	r2, r1, r2
	ldr	ip, [r6, #8]
	ldr	r1, [r6, #12]
	lsr	r0, r0, #5
	str	ip, [r10, #8]
	str	r2, [r10]
	str	r1, [r10, #12]
	str	r3, [r6, #12]
	str	r3, [r6, #8]
	bl	assert
	mov	r0, r6
	bl	HasRowid
	cmp	r0, #0
	movne	r0, fp
	beq	.L39
.L7:
	bl	assert
	mov	r0, r6
	bl	HasRowid
	cmp	r0, #0
	bne	.L8
	ldr	r3, [r5, #4]
	ldr	r3, [r3]
	ldr	r3, [r3]
	ldr	r3, [r3]
	cmp	r3, #0
	bne	.L40
.L8:
	ldr	r8, [r6, #4]
	cmp	r8, #0
	beq	.L6
	ldr	r0, [r8]
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	mov	r3, #0
	str	r8, [r10, #4]
	str	r3, [r6, #4]
	str	r10, [r8, #4]
	b	.L6
.L39:
	mov	r0, r6
	bl	sqlite3PrimaryKeyIndex
	subs	r0, r0, #0
	movne	r0, #1
	b	.L7
.L40:
	mov	r0, r6
	bl	sqlite3PrimaryKeyIndex
	ldr	r3, [r0]
	cmp	r3, #1
	ldrne	r3, .L41+20
	ldrne	r7, [r3]
	b	.L8
.L35:
	bl	__stack_chk_fail
.L42:
	.align	2
.L41:
	.word	.LC1
	.word	SQLITE_OK
	.word	SQLITE_MISUSE
	.word	SQLITE_MISUSE_BKPT
	.word	PARSE_MODE_DECLARE_VTAB
	.word	SQLITE_ERROR
	.word	.LC0
	.word	PARSE_MODE_NORMAL
	.word	TF_WithoutRowid
	.word	TF_NoVisibleRowid
	.size	sqlite3_declare_vtab, .-sqlite3_declare_vtab
	.comm	TF_WithoutRowid,4,4
	.comm	TF_NoVisibleRowid,4,4
	.comm	SQLITE_OK,4,4
	.comm	SQLITE_MISUSE_BKPT,4,4
	.comm	SQLITE_MISUSE,4,4
	.comm	SQLITE_ERROR,4,4
	.comm	PARSE_MODE_NORMAL,4,4
	.comm	PARSE_MODE_DECLARE_VTAB,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
