	.file	"extr_sqlite3.c_vdbeSorterInitMerge.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	vdbeSorterInitMerge, @function
vdbeSorterInitMerge:
.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
	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
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	r15, QWORD PTR [rsi]
	mov	r12d, DWORD PTR SQLITE_OK[rip]
	mov	QWORD PTR [rsp], rsi
	mov	QWORD PTR 8[rsp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR SORTER_MAX_MERGE_COUNT[rip]
	mov	DWORD PTR 20[rsp], 0
	test	eax, eax
	jle	.L2
	mov	edx, DWORD PTR 8[r15]
	mov	r13, rdi
	xor	ebx, ebx
	lea	r14, 20[rsp]
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L18:
	mov	edx, DWORD PTR 8[r15]
	cmp	edx, DWORD PTR 4[r15]
	jge	.L2
	add	rbx, 1
	cmp	DWORD PTR SORTER_MAX_MERGE_COUNT[rip], ebx
	jle	.L2
.L5:
	mov	rax, QWORD PTR 16[r15]
	mov	rdi, r13
	mov	r8, r14
	mov	rsi, r15
	lea	rbp, [rax+rbx*4]
	mov	rcx, rbp
	call	vdbeSorterIterInit@PLT
	mov	edi, 1
	mov	r12d, eax
	mov	eax, DWORD PTR 0[rbp]
	cmp	DWORD PTR SQLITE_OK[rip], r12d
	mov	DWORD PTR 8[r15], eax
	jne	.L3
	xor	edi, edi
	cmp	eax, DWORD PTR 4[r15]
	setle	dil
.L3:
	call	assert@PLT
	cmp	DWORD PTR SQLITE_OK[rip], r12d
	je	.L18
.L4:
	mov	eax, DWORD PTR 20[rsp]
	mov	rcx, QWORD PTR 8[rsp]
	mov	DWORD PTR [rcx], eax
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L19
	add	rsp, 40
	.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
.L2:
	.cfi_restore_state
	mov	ebx, DWORD PTR [r15]
	sub	ebx, 1
	.p2align 4,,10
	.p2align 3
.L16:
	test	ebx, ebx
	jle	.L4
	mov	rdi, QWORD PTR [rsp]
	mov	esi, ebx
	sub	ebx, 1
	call	vdbeSorterDoCompare@PLT
	cmp	DWORD PTR SQLITE_OK[rip], eax
	mov	r12d, eax
	je	.L16
	jmp	.L4
.L19:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vdbeSorterInitMerge, .-vdbeSorterInitMerge
	.comm	SQLITE_OK,4,4
	.comm	SORTER_MAX_MERGE_COUNT,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_vdbeSorterInitMerge.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	vdbeSorterInitMerge, %function
vdbeSorterInitMerge:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, #0
	ldr	r9, .L17
	sub	sp, sp, #28
	ldr	r3, [r9]
	ldr	r5, .L17+4
	cmp	r3, r4
	ldr	r3, .L17+8
	str	r2, [sp, #12]
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	mov	r7, r1
	ldr	r10, [r1]
	ldr	fp, [r5]
	str	r4, [sp, #16]
	ble	.L2
	mov	r8, r0
	ldr	r2, [r10, #8]
	b	.L5
.L15:
	ldr	r2, [r10, #8]
	ldr	r3, [r10, #4]
	cmp	r2, r3
	bge	.L2
	ldr	r3, [r9]
	add	r4, r4, #1
	cmp	r3, r4
	ble	.L2
.L5:
	ldr	r6, [r10, #12]
	add	r3, sp, #16
	str	r3, [sp]
	mov	r1, r10
	add	r3, r6, r4, lsl #2
	mov	r0, r8
	bl	vdbeSorterIterInit
	mov	fp, r0
	ldr	r3, [r5]
	ldr	r0, [r6, r4, lsl #2]
	cmp	r3, fp
	str	r0, [r10, #8]
	movne	r0, #1
	bne	.L3
	ldr	r3, [r10, #4]
	cmp	r0, r3
	movgt	r0, #0
	movle	r0, #1
.L3:
	bl	assert
	ldr	r3, [r5]
	cmp	r3, fp
	beq	.L15
.L4:
	ldr	r2, [sp, #16]
	ldr	r3, [sp, #12]
	str	r2, [r3]
	ldr	r3, .L17+8
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L16
	mov	r0, fp
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L2:
	ldr	r4, [r10]
	sub	r4, r4, #1
	cmp	r4, #0
	ble	.L4
.L6:
	mov	r1, r4
	mov	r0, r7
	bl	vdbeSorterDoCompare
	ldr	r3, [r5]
	sub	r4, r4, #1
	sub	r3, r3, r0
	clz	r3, r3
	cmp	r4, #0
	lsr	r3, r3, #5
	movle	r3, #0
	cmp	r3, #0
	bne	.L6
	mov	fp, r0
	b	.L4
.L16:
	bl	__stack_chk_fail
.L18:
	.align	2
.L17:
	.word	SORTER_MAX_MERGE_COUNT
	.word	SQLITE_OK
	.word	.LC0
	.size	vdbeSorterInitMerge, .-vdbeSorterInitMerge
	.comm	SQLITE_OK,4,4
	.comm	SORTER_MAX_MERGE_COUNT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
