	.file	"extr_callback.c_sqlite3FindFunction.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	sqlite3FindFunction
	.type	sqlite3FindFunction, @function
sqlite3FindFunction:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, r8
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rdi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rcx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	movsx	rbx, edx
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	QWORD PTR 8[rsp], rdi
	xor	edi, edi
	cmp	ebx, -2
	setge	dil
	mov	QWORD PTR [rsp], r8
	call	assert@PLT
	cmp	ebx, -1
	setge	dil
	test	r15, r15
	sete	al
	or	edi, eax
	movzx	edi, dil
	call	assert@PLT
	mov	rdi, r14
	call	sqlite3Strlen30@PLT
	mov	rsi, r14
	mov	DWORD PTR 20[rsp], eax
	lea	rax, 4[r13]
	mov	rdi, rax
	mov	QWORD PTR 24[rsp], rax
	call	sqlite3HashFind@PLT
	test	rax, rax
	je	.L2
	mov	r15, rax
	xor	r12d, r12d
	xor	r13d, r13d
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdx, rbp
	mov	esi, ebx
	mov	rdi, r15
	call	matchQuality@PLT
	cmp	eax, r12d
	jle	.L3
	mov	r12d, eax
	mov	r13, r15
.L3:
	mov	r15, QWORD PTR 16[r15]
	test	r15, r15
	jne	.L4
	cmp	QWORD PTR [rsp], 0
	jne	.L8
	test	r13, r13
	je	.L6
	mov	rax, QWORD PTR 8[rsp]
	mov	eax, DWORD PTR [rax]
	test	DWORD PTR DBFLAG_PreferBuiltin[rip], eax
	je	.L10
	movsx	rdx, BYTE PTR [r14]
	mov	rax, QWORD PTR sqlite3UpperToLower[rip]
	mov	esi, DWORD PTR 20[rsp]
	mov	rdi, QWORD PTR [rax+rdx*8]
	call	SQLITE_FUNC_HASH@PLT
	mov	rsi, r14
	mov	edi, eax
	call	sqlite3FunctionSearch@PLT
	mov	r12, rax
	test	rax, rax
	je	.L10
.L21:
	xor	r14d, r14d
	.p2align 4,,10
	.p2align 3
.L12:
	mov	rdx, rbp
	mov	esi, ebx
	mov	rdi, r12
	call	matchQuality@PLT
	cmp	eax, r14d
	jle	.L11
	mov	r14d, eax
	mov	r13, r12
.L11:
	mov	r12, QWORD PTR 16[r12]
	test	r12, r12
	jne	.L12
	test	r13, r13
	je	.L46
.L10:
	mov	rax, QWORD PTR [rsp]
	or	rax, QWORD PTR 8[r13]
	jne	.L1
.L46:
	xor	r13d, r13d
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L8:
	cmp	DWORD PTR FUNC_PERFECT_MATCH[rip], r12d
	jg	.L20
	test	r13, r13
	je	.L46
.L1:
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	rax, r13
	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
.L2:
	.cfi_restore_state
	cmp	QWORD PTR [rsp], 0
	je	.L6
	mov	eax, DWORD PTR FUNC_PERFECT_MATCH[rip]
	test	eax, eax
	jle	.L46
	.p2align 4,,10
	.p2align 3
.L20:
	mov	eax, DWORD PTR 20[rsp]
	mov	rdi, QWORD PTR 8[rsp]
	lea	esi, 41[rax]
	call	sqlite3DbMallocZero@PLT
	mov	r13, rax
	test	rax, rax
	je	.L46
	lea	rdi, 40[rax]
	mov	edx, DWORD PTR 20[rsp]
	mov	QWORD PTR 32[rax], rbx
	mov	rsi, r14
	mov	QWORD PTR [rax], rdi
	mov	QWORD PTR 24[rax], rbp
	add	edx, 1
	call	memcpy@PLT
	mov	rsi, QWORD PTR 0[r13]
	mov	rdx, QWORD PTR [rsi]
	test	rdx, rdx
	je	.L16
	mov	rcx, QWORD PTR sqlite3UpperToLower[rip]
	mov	rax, rsi
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdx, QWORD PTR [rcx+rdx*8]
	add	rax, 8
	mov	QWORD PTR -8[rax], rdx
	mov	rdx, QWORD PTR [rax]
	test	rdx, rdx
	jne	.L17
.L16:
	mov	rdi, QWORD PTR 24[rsp]
	mov	rdx, r13
	call	sqlite3HashInsert@PLT
	cmp	r13, rax
	je	.L48
	mov	QWORD PTR 16[r13], rax
	jmp	.L10
.L6:
	movsx	rdx, BYTE PTR [r14]
	mov	rax, QWORD PTR sqlite3UpperToLower[rip]
	xor	r13d, r13d
	mov	esi, DWORD PTR 20[rsp]
	mov	rdi, QWORD PTR [rax+rdx*8]
	call	SQLITE_FUNC_HASH@PLT
	mov	rsi, r14
	mov	edi, eax
	call	sqlite3FunctionSearch@PLT
	mov	r12, rax
	test	rax, rax
	jne	.L21
	jmp	.L46
.L48:
	mov	rbx, QWORD PTR 8[rsp]
	mov	rsi, r13
	mov	rdi, rbx
	call	sqlite3DbFree@PLT
	mov	rdi, rbx
	call	sqlite3OomFault@PLT
	jmp	.L46
	.cfi_endproc
.LFE0:
	.size	sqlite3FindFunction, .-sqlite3FindFunction
	.comm	sqlite3UpperToLower,8,8
	.comm	FUNC_PERFECT_MATCH,4,4
	.comm	DBFLAG_PreferBuiltin,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_callback.c_sqlite3FindFunction.c"
	.text
	.align	2
	.global	sqlite3FindFunction
	.syntax unified
	.arm
	.fpu softvfp
	.type	sqlite3FindFunction, %function
sqlite3FindFunction:
	@ args = 4, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r6, r2
	mov	r8, r1
	cmn	r2, #2
	sub	sp, sp, #12
	mov	r9, r0
	movlt	r0, #0
	movge	r0, #1
	mov	r7, r3
	bl	assert
	ldr	r3, [sp, #48]
	cmn	r6, #1
	movlt	r0, #0
	movge	r0, #1
	cmp	r3, #0
	moveq	r0, #1
	bl	assert
	mov	r0, r8
	bl	sqlite3Strlen30
	mov	r10, r0
	add	fp, r9, #4
	mov	r0, fp
	mov	r1, r8
	str	r10, [sp, #4]
	bl	sqlite3HashFind
	subs	r4, r0, #0
	beq	.L2
	mov	r5, #0
	mov	r10, r5
.L4:
	mov	r0, r4
	mov	r2, r7
	mov	r1, r6
	bl	matchQuality
	cmp	r0, r5
	movgt	r10, r4
	ldr	r4, [r4, #8]
	movgt	r5, r0
	cmp	r4, #0
	bne	.L4
	ldr	r3, [sp, #48]
	cmp	r3, #0
	bne	.L8
	cmp	r10, #0
	beq	.L6
	ldr	r2, .L48
	ldr	r1, [r9]
	ldr	r2, [r2]
	tst	r1, r2
	beq	.L10
	ldr	r2, .L48+4
	ldrb	r0, [r8]	@ zero_extendqisi2
	ldr	r2, [r2]
	ldr	r1, [sp, #4]
	ldr	r0, [r2, r0, lsl #2]
	bl	SQLITE_FUNC_HASH
	mov	r1, r8
	bl	sqlite3FunctionSearch
	subs	r4, r0, #0
	beq	.L10
.L21:
	mov	r5, #0
.L12:
	mov	r0, r4
	mov	r2, r7
	mov	r1, r6
	bl	matchQuality
	cmp	r0, r5
	movgt	r10, r4
	ldr	r4, [r4, #8]
	movgt	r5, r0
	cmp	r4, #0
	bne	.L12
	cmp	r10, #0
	beq	.L46
.L10:
	ldr	r2, [r10, #4]
	ldr	r3, [sp, #48]
	orrs	r3, r3, r2
	bne	.L1
.L46:
	mov	r10, #0
	mov	r0, r10
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	ldr	r2, .L48+8
	ldr	r2, [r2]
	cmp	r2, r5
	bgt	.L20
	cmp	r10, #0
	beq	.L46
.L1:
	mov	r0, r10
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r3, [sp, #48]
	cmp	r3, #0
	beq	.L6
	ldr	r3, .L48+8
	ldr	r3, [r3]
	cmp	r3, #0
	ble	.L46
.L20:
	ldr	r3, [sp, #4]
	mov	r0, r9
	add	r1, r3, #21
	bl	sqlite3DbMallocZero
	subs	r10, r0, #0
	beq	.L46
	ldr	r3, [sp, #4]
	add	r4, r10, #20
	add	r2, r3, #1
	mov	r1, r8
	mov	r0, r4
	str	r6, [r10, #16]
	str	r7, [r10, #12]
	str	r4, [r10]
	bl	memcpy
	ldr	r2, [r10, #20]
	cmp	r2, #0
	beq	.L16
	mov	r1, r4
	ldr	r0, .L48+4
	ldr	r0, [r0]
.L17:
	ldr	r3, [r0, r2, lsl #2]
	str	r3, [r1]
	ldr	r2, [r1, #4]!
	cmp	r2, #0
	bne	.L17
.L16:
	mov	r1, r4
	mov	r0, fp
	mov	r2, r10
	bl	sqlite3HashInsert
	cmp	r10, r0
	strne	r0, [r10, #8]
	bne	.L10
	mov	r1, r10
	mov	r0, r9
	bl	sqlite3DbFree
	mov	r0, r9
	bl	sqlite3OomFault
	b	.L46
.L6:
	ldr	r3, .L48+4
	ldrb	r2, [r8]	@ zero_extendqisi2
	ldr	r3, [r3]
	ldr	r1, [sp, #4]
	ldr	r0, [r3, r2, lsl #2]
	bl	SQLITE_FUNC_HASH
	mov	r1, r8
	bl	sqlite3FunctionSearch
	subs	r4, r0, #0
	movne	r10, #0
	bne	.L21
	b	.L46
.L49:
	.align	2
.L48:
	.word	DBFLAG_PreferBuiltin
	.word	sqlite3UpperToLower
	.word	FUNC_PERFECT_MATCH
	.size	sqlite3FindFunction, .-sqlite3FindFunction
	.comm	sqlite3UpperToLower,4,4
	.comm	FUNC_PERFECT_MATCH,4,4
	.comm	DBFLAG_PreferBuiltin,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
