	.file	"extr_vnodeQueryImpl.c_forwardQueryStartPosIfNeeded.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	forwardQueryStartPosIfNeeded, @function
forwardQueryStartPosIfNeeded:
.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, 8
	.cfi_def_cfa_offset 64
	cmp	QWORD PTR 8[rdi], 0
	jg	.L4
	cmp	QWORD PTR 8[rsi], 0
	mov	rbp, rsi
	je	.L25
.L4:
	mov	r12d, 1
.L1:
	add	rsp, 8
	.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
.L25:
	.cfi_restore_state
	cmp	QWORD PTR 64[rdi], 0
	mov	rbx, rdi
	jle	.L4
	lea	r13, 8[rdi]
	mov	r15d, edx
	mov	r14d, ecx
	mov	rdi, r13
	call	isTopBottomQuery@PLT
	test	eax, eax
	jne	.L4
	mov	rax, QWORD PTR TSDB_INTERPO_NONE[rip]
	cmp	QWORD PTR 16[rbx], rax
	jne	.L4
	cmp	QWORD PTR 24[rbx], 0
	jg	.L12
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L28:
	add	rax, 1
.L7:
	mov	rdx, QWORD PTR 0[rbp]
	mov	QWORD PTR 32[rbx], rax
	cmp	rdx, rax
	jl	.L26
.L8:
	cmp	rax, rdx
	jge	.L10
	mov	rdi, r13
	call	QUERY_IS_ASC_QUERY@PLT
	test	rax, rax
	je	.L23
	mov	rdx, QWORD PTR 0[rbp]
	mov	rax, QWORD PTR 32[rbx]
.L10:
	mov	QWORD PTR 40[rbx], rdx
	xor	ecx, ecx
	mov	rdx, rbp
	mov	esi, r14d
	mov	QWORD PTR 48[rbx], rax
	mov	edi, r15d
	call	normalizedFirstQueryRange@PLT
	mov	r12d, eax
	test	eax, eax
	je	.L27
	sub	QWORD PTR 64[rbx], 1
	je	.L4
.L12:
	mov	rdi, r13
	call	QUERY_IS_ASC_QUERY@PLT
	test	rax, rax
	mov	rax, QWORD PTR 40[rbx]
	jne	.L28
	sub	rax, 1
	jmp	.L7
	.p2align 4,,10
	.p2align 3
.L26:
	mov	rdi, r13
	call	QUERY_IS_ASC_QUERY@PLT
	test	rax, rax
	jne	.L23
	mov	rax, QWORD PTR 32[rbx]
	mov	rdx, QWORD PTR 0[rbp]
	jmp	.L8
.L5:
	lea	rdi, 8[rbp]
	call	forwardQueryStartPosition@PLT
	mov	edi, DWORD PTR 56[rbx]
	mov	esi, DWORD PTR QUERY_NO_DATA_TO_CHECK[rip]
	call	Q_STATUS_EQUAL@PLT
	test	rax, rax
	je	.L4
.L23:
	mov	esi, DWORD PTR QUERY_COMPLETED[rip]
	mov	rdi, r13
	xor	r12d, r12d
	call	setQueryStatus@PLT
	lea	rdi, 4[rbx]
	call	sem_post@PLT
	mov	DWORD PTR [rbx], 1
	jmp	.L1
.L27:
	lea	rdi, 4[rbx]
	call	sem_post@PLT
	mov	DWORD PTR [rbx], 1
	jmp	.L1
	.cfi_endproc
.LFE0:
	.size	forwardQueryStartPosIfNeeded, .-forwardQueryStartPosIfNeeded
	.comm	TSDB_INTERPO_NONE,8,8
	.comm	QUERY_NO_DATA_TO_CHECK,4,4
	.comm	QUERY_COMPLETED,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_vnodeQueryImpl.c_forwardQueryStartPosIfNeeded.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	forwardQueryStartPosIfNeeded, %function
forwardQueryStartPosIfNeeded:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r4, r0
	ldr	r0, [r0, #8]
	cmp	r0, #0
	bgt	.L4
	mov	r7, r3
	ldr	r3, [r1, #4]
	mov	r5, r1
	cmp	r3, #0
	beq	.L25
.L4:
	mov	r6, #1
.L1:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L25:
	ldr	r3, [r4, #36]
	cmp	r3, #0
	ble	.L4
	add	r9, r4, #8
	mov	r0, r9
	mov	r8, r2
	bl	isTopBottomQuery
	subs	r6, r0, #0
	bne	.L4
	ldr	r3, .L26
	ldr	r2, [r4, #12]
	ldr	r3, [r3]
	cmp	r2, r3
	bne	.L4
	ldr	r3, [r4, #16]
	cmp	r3, #0
	bgt	.L12
	b	.L5
.L8:
	cmp	r3, r2
	bge	.L10
	mov	r0, r9
	bl	QUERY_IS_ASC_QUERY
	cmp	r0, #0
	beq	.L9
	ldr	r2, [r5]
	ldr	r3, [r4, #20]
.L10:
	str	r2, [r4, #24]
	str	r3, [r4, #28]
	mov	r2, r5
	mov	r3, #0
	mov	r1, r7
	mov	r0, r8
	bl	normalizedFirstQueryRange
	subs	r6, r0, #0
	beq	.L23
	ldr	r3, [r4, #36]
	sub	r3, r3, #1
	cmp	r3, #0
	str	r3, [r4, #36]
	beq	.L4
.L12:
	mov	r0, r9
	bl	QUERY_IS_ASC_QUERY
	ldr	r3, [r4, #24]
	cmp	r0, #0
	ldr	r2, [r5]
	addne	r3, r3, #1
	subeq	r3, r3, #1
	cmp	r2, r3
	str	r3, [r4, #20]
	bge	.L8
	mov	r0, r9
	bl	QUERY_IS_ASC_QUERY
	cmp	r0, #0
	bne	.L9
	ldr	r3, [r4, #20]
	ldr	r2, [r5]
	b	.L8
.L5:
	add	r0, r5, #4
	bl	forwardQueryStartPosition
	ldr	r3, .L26+4
	ldr	r0, [r4, #32]
	ldr	r1, [r3]
	bl	Q_STATUS_EQUAL
	cmp	r0, #0
	beq	.L4
	ldr	r3, .L26+8
	mov	r0, r9
	ldr	r1, [r3]
	bl	setQueryStatus
.L23:
	add	r0, r4, #4
	bl	sem_post
	mov	r3, #1
	str	r3, [r4]
	b	.L1
.L9:
	ldr	r3, .L26+8
	mov	r0, r9
	ldr	r1, [r3]
	bl	setQueryStatus
	add	r0, r4, #4
	bl	sem_post
	mov	r3, #1
	mov	r6, #0
	str	r3, [r4]
	b	.L1
.L27:
	.align	2
.L26:
	.word	TSDB_INTERPO_NONE
	.word	QUERY_NO_DATA_TO_CHECK
	.word	QUERY_COMPLETED
	.size	forwardQueryStartPosIfNeeded, .-forwardQueryStartPosIfNeeded
	.comm	TSDB_INTERPO_NONE,4,4
	.comm	QUERY_NO_DATA_TO_CHECK,4,4
	.comm	QUERY_COMPLETED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
