	.file	"extr_sqlite3.c_trimFunc.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	trimFunc, @function
trimFunc:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	mov	r15, rdx
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	ebx, esi
	sub	rsp, 56
	.cfi_def_cfa_offset 112
	mov	QWORD PTR 32[rsp], rdi
	mov	rdi, QWORD PTR [rdx]
	call	sqlite3_value_type@PLT
	cmp	rax, QWORD PTR SQLITE_NULL[rip]
	je	.L1
	mov	rdi, QWORD PTR [r15]
	call	sqlite3_value_text@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L1
	mov	rdi, QWORD PTR [r15]
	lea	r12, azOne.1963[rip]
	lea	r14, lenOne.1962[rip]
	call	sqlite3_value_bytes@PLT
	mov	rdi, QWORD PTR [r15]
	mov	r13d, eax
	call	sqlite3_value_text@PLT
	xor	edi, edi
	cmp	rbp, rax
	sete	dil
	call	assert@PLT
	mov	QWORD PTR 24[rsp], 0
	cmp	ebx, 1
	jne	.L53
.L5:
	mov	rdi, QWORD PTR 32[rsp]
	call	sqlite3_user_data@PLT
	mov	edi, eax
	call	SQLITE_PTR_TO_INT@PLT
	mov	DWORD PTR 44[rsp], eax
	test	al, 1
	je	.L54
	lea	eax, -1[rbx]
	mov	DWORD PTR 40[rsp], eax
	test	r13d, r13d
	jle	.L19
	.p2align 4,,10
	.p2align 3
.L16:
	mov	r11d, DWORD PTR 40[rsp]
	xor	ebx, ebx
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L15:
	lea	rax, 1[rbx]
	cmp	r11, rbx
	je	.L55
	mov	rbx, rax
.L12:
	movzx	r15d, BYTE PTR [r14+rbx]
	cmp	r15d, r13d
	jg	.L15
	mov	rsi, QWORD PTR [r12+rbx*8]
	mov	edx, r15d
	mov	rdi, rbp
	mov	QWORD PTR 16[rsp], r11
	mov	BYTE PTR 12[rsp], r15b
	call	memcmp@PLT
	movzx	r10d, BYTE PTR 12[rsp]
	mov	r11, QWORD PTR 16[rsp]
	test	rax, rax
	jne	.L15
	sub	r13d, r15d
	add	rbp, r10
	test	r13d, r13d
	jg	.L16
	.p2align 4,,10
	.p2align 3
.L19:
	cmp	QWORD PTR 24[rsp], 0
	je	.L6
	mov	rdi, r12
	call	sqlite3_free@PLT
.L6:
	mov	ecx, DWORD PTR SQLITE_TRANSIENT[rip]
	mov	rdi, QWORD PTR 32[rsp]
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	edx, r13d
	pop	rbx
	.cfi_def_cfa_offset 48
	mov	rsi, rbp
	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
	jmp	sqlite3_result_text@PLT
	.p2align 4,,10
	.p2align 3
.L53:
	.cfi_restore_state
	mov	rdi, QWORD PTR 8[r15]
	call	sqlite3_value_text@PLT
	mov	QWORD PTR 24[rsp], rax
	test	rax, rax
	jne	.L56
.L1:
	add	rsp, 56
	.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
.L56:
	.cfi_restore_state
	cmp	BYTE PTR [rax], 0
	je	.L6
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L7:
	mov	r14, QWORD PTR 24[rsp]
	add	ebx, 1
	mov	rdi, r14
	call	SQLITE_SKIP_UTF8@PLT
	cmp	BYTE PTR [r14], 0
	jne	.L7
	mov	rdi, QWORD PTR 32[rsp]
	lea	esi, [rbx+rbx*8]
	call	contextMalloc@PLT
	mov	r12, rax
	test	rax, rax
	je	.L1
	movsx	rbx, ebx
	lea	r14, [rax+rbx*8]
	mov	rax, QWORD PTR 24[rsp]
	cmp	BYTE PTR [rax], 0
	je	.L6
	mov	r15d, 1
	.p2align 4,,10
	.p2align 3
.L8:
	mov	rbx, QWORD PTR 24[rsp]
	mov	QWORD PTR -8[r12+r15*8], rbx
	mov	rdi, rbx
	call	SQLITE_SKIP_UTF8@PLT
	mov	rcx, rbx
	mov	rax, rbx
	sub	rax, QWORD PTR -8[r12+r15*8]
	mov	BYTE PTR -1[r14+r15], al
	mov	ebx, r15d
	add	r15, 1
	cmp	BYTE PTR [rcx], 0
	jne	.L8
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L55:
	test	BYTE PTR 44[rsp], 2
	je	.L19
	.p2align 4,,10
	.p2align 3
.L25:
	mov	r15d, DWORD PTR 40[rsp]
	xor	ebx, ebx
	jmp	.L21
	.p2align 4,,10
	.p2align 3
.L23:
	lea	rax, 1[rbx]
	cmp	r15, rbx
	je	.L19
	mov	rbx, rax
.L21:
	movzx	edx, BYTE PTR [r14+rbx]
	cmp	edx, r13d
	jg	.L23
	mov	r10d, r13d
	mov	rsi, QWORD PTR [r12+rbx*8]
	sub	r10d, edx
	movsx	rdi, r10d
	mov	DWORD PTR 12[rsp], r10d
	add	rdi, rbp
	call	memcmp@PLT
	mov	r10d, DWORD PTR 12[rsp]
	test	rax, rax
	jne	.L23
	mov	r13d, r10d
	test	r10d, r10d
	jg	.L25
	jmp	.L19
.L54:
	test	BYTE PTR 44[rsp], 2
	je	.L19
	test	r13d, r13d
	jle	.L19
	lea	eax, -1[rbx]
	mov	DWORD PTR 40[rsp], eax
	jmp	.L25
	.cfi_endproc
.LFE0:
	.size	trimFunc, .-trimFunc
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	" "
	.section	.data.rel.ro.local,"aw"
	.align 8
	.type	azOne.1963, @object
	.size	azOne.1963, 8
azOne.1963:
	.quad	.LC0
	.section	.rodata
	.type	lenOne.1962, @object
	.size	lenOne.1962, 1
lenOne.1962:
	.ascii	"\001"
	.comm	SQLITE_TRANSIENT,4,4
	.comm	SQLITE_NULL,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_sqlite3.c_trimFunc.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	trimFunc, %function
trimFunc:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r10, r0
	sub	sp, sp, #20
	ldr	r0, [r2]
	mov	r5, r2
	mov	r8, r1
	bl	sqlite3_value_type
	ldr	r3, .L55
	ldr	r3, [r3]
	cmp	r0, r3
	beq	.L1
	ldr	r0, [r5]
	bl	sqlite3_value_text
	subs	r7, r0, #0
	beq	.L1
	ldr	r0, [r5]
	bl	sqlite3_value_bytes
	mov	r4, r0
	ldr	r0, [r5]
	bl	sqlite3_value_text
	sub	r0, r7, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	assert
	cmp	r8, #1
	beq	.L23
	ldr	r0, [r5, #4]
	bl	sqlite3_value_text
	subs	r9, r0, #0
	beq	.L1
	ldrb	r3, [r9]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L6
	mov	r5, #0
.L7:
	mov	r0, r9
	bl	SQLITE_SKIP_UTF8
	ldrb	r3, [r9]	@ zero_extendqisi2
	add	r5, r5, #1
	cmp	r3, #0
	bne	.L7
	add	r1, r5, r5, lsl #2
	mov	r0, r10
	bl	contextMalloc
	subs	r2, r0, #0
	str	r2, [sp]
	lsl	r5, r5, #2
	beq	.L1
	ldrb	r3, [r9]	@ zero_extendqisi2
	add	r5, r2, r5
	cmp	r3, #0
	beq	.L6
	sub	fp, r2, #4
	sub	r6, r5, #1
.L8:
	str	r9, [fp, #4]!
	mov	r0, r9
	bl	SQLITE_SKIP_UTF8
	ldr	r2, [fp]
	add	r3, r6, #2
	sub	r2, r9, r2
	strb	r2, [r6, #1]!
	ldrb	r2, [r9]	@ zero_extendqisi2
	sub	r8, r3, r5
	cmp	r2, #0
	bne	.L8
	b	.L5
.L1:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L23:
	mov	r9, #0
	ldr	r3, .L55+4
	str	r3, [sp]
	add	r5, r3, #4
.L5:
	mov	r0, r10
	bl	sqlite3_user_data
	bl	SQLITE_PTR_TO_INT
	tst	r0, #1
	str	r0, [sp, #8]
	beq	.L53
	cmp	r4, #0
	ble	.L15
	mov	fp, r7
	add	r3, r5, r8
	sub	r2, r5, #1
	str	r3, [sp, #12]
	str	r2, [sp, #4]
	sub	r6, r3, #1
.L16:
	ldr	r5, [sp, #4]
	ldr	r8, [sp]
.L13:
	ldrb	r7, [r5, #1]!	@ zero_extendqisi2
	cmp	r7, r4
	bgt	.L11
	mov	r2, r7
	mov	r0, fp
	ldr	r1, [r8]
	bl	memcmp
	cmp	r0, #0
	beq	.L12
.L11:
	cmp	r5, r6
	add	r8, r8, #4
	bne	.L13
	ldr	r3, [sp, #8]
	mov	r7, fp
	tst	r3, #2
	beq	.L15
.L14:
	ldr	r3, [sp, #12]
	str	r9, [sp, #8]
	mov	r9, r7
	ldr	r7, [sp, #4]
	sub	r8, r3, #1
.L22:
	mov	r5, r7
	ldr	r6, [sp]
.L21:
	ldrb	r2, [r5, #1]!	@ zero_extendqisi2
	sub	fp, r4, r2
	cmp	r2, r4
	add	r0, r9, fp
	bgt	.L19
	ldr	r1, [r6]
	bl	memcmp
	cmp	r0, #0
	beq	.L20
.L19:
	cmp	r5, r8
	add	r6, r6, #4
	bne	.L21
	mov	r7, r9
	ldr	r9, [sp, #8]
.L15:
	cmp	r9, #0
	beq	.L6
	ldr	r0, [sp]
	bl	sqlite3_free
.L6:
	mov	r2, r4
	mov	r1, r7
	mov	r0, r10
	ldr	r3, .L55+8
	ldr	r3, [r3]
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	sqlite3_result_text
.L20:
	cmp	fp, #0
	ble	.L54
	mov	r4, fp
	b	.L22
.L12:
	sub	r4, r4, r7
	cmp	r4, #0
	add	fp, fp, r7
	bgt	.L16
	mov	r7, fp
	b	.L15
.L53:
	ldr	r3, [sp, #8]
	tst	r3, #2
	beq	.L15
	cmp	r4, #0
	addgt	r3, r5, r8
	strgt	r3, [sp, #12]
	subgt	r3, r5, #1
	strgt	r3, [sp, #4]
	ble	.L15
	b	.L14
.L54:
	mov	r7, r9
	mov	r4, fp
	ldr	r9, [sp, #8]
	b	.L15
.L56:
	.align	2
.L55:
	.word	SQLITE_NULL
	.word	.LANCHOR0
	.word	SQLITE_TRANSIENT
	.size	trimFunc, .-trimFunc
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	" \000"
	.comm	SQLITE_TRANSIENT,4,4
	.comm	SQLITE_NULL,4,4
	.section	.rodata
	.align	2
	.set	.LANCHOR0,. + 0
	.type	azOne.4247, %object
	.size	azOne.4247, 4
azOne.4247:
	.word	.LC0
	.type	lenOne.4246, %object
	.size	lenOne.4246, 1
lenOne.4246:
	.ascii	"\001"
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
