	.file	"extr_vnodeQueryImpl.c_vnodeQuerySingleMeterPrepare.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"QInfo:%p no result in time range %lld-%lld, order %d"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"QInfo:%p no result in query"
	.text
	.p2align 4
	.globl	vnodeQuerySingleMeterPrepare
	.type	vnodeQuerySingleMeterPrepare, @function
vnodeQuerySingleMeterPrepare:
.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
	mov	r14, rsi
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	mov	r13, rcx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	lea	r12, 16[rdi]
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdx
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	mov	rbx, rdi
	mov	rdi, r12
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	call	QUERY_IS_ASC_QUERY@PLT
	test	rax, rax
	je	.L2
	mov	rdx, QWORD PTR 16[rbx]
	mov	rcx, QWORD PTR 24[rbx]
	cmp	rdx, rcx
	jg	.L3
.L2:
	mov	rdi, r12
	call	QUERY_IS_ASC_QUERY@PLT
	test	rax, rax
	jne	.L4
	mov	rcx, QWORD PTR 24[rbx]
	mov	rdx, QWORD PTR 16[rbx]
	cmp	rcx, rdx
	jg	.L3
.L4:
	mov	rdi, r12
	lea	r15, 24[rbp]
	call	setScanLimitationByResultBuffer@PLT
	xor	esi, esi
	mov	rdi, r12
	call	changeExecuteScanOrder@PLT
	mov	rax, QWORD PTR 16[rbx]
	mov	DWORD PTR [rbx], 0
	lea	rdi, 76[rbp]
	mov	QWORD PTR 8[rbx], 0
	mov	QWORD PTR 104[rbx], 0
	mov	QWORD PTR 32[rbx], rax
	call	vnodeInitDataBlockInfo@PLT
	lea	rdi, 72[rbp]
	call	vnodeInitLoadCompBlockInfo@PLT
	mov	QWORD PTR 64[rbp], r12
	mov	rsi, r14
	mov	rdi, r15
	lea	rcx, 12[rsp]
	lea	rdx, 16[rsp]
	mov	DWORD PTR 12[rsp], 1
	mov	DWORD PTR 16[rsp], 1
	call	vnodeCheckIfDataExists@PLT
	mov	eax, DWORD PTR 12[rsp]
	or	eax, DWORD PTR 16[rsp]
	je	.L35
	mov	QWORD PTR 48[rbp], r13
	mov	r8, QWORD PTR 56[rbx]
	mov	DWORD PTR 56[rbp], -1
	test	r13, r13
	je	.L7
	mov	esi, DWORD PTR TSQL_SO_DESC[rip]
	cmp	QWORD PTR 0[r13], r8
	jne	.L9
	mov	esi, DWORD PTR TSQL_SO_ASC[rip]
.L9:
	mov	rdi, r13
	call	tsBufSetTraverseOrder@PLT
	mov	r8, QWORD PTR 56[rbx]
.L7:
	xor	r9d, r9d
	xor	ecx, ecx
	mov	rdx, r15
	mov	rsi, r12
	mov	rdi, r14
	call	setupQueryRuntimeEnv@PLT
	cmp	QWORD PTR TSDB_CODE_SUCCESS[rip], rax
	je	.L36
.L1:
	mov	rsi, QWORD PTR 24[rsp]
	xor	rsi, QWORD PTR fs:40
	jne	.L37
	add	rsp, 40
	.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
.L3:
	.cfi_restore_state
	mov	r8, QWORD PTR 56[rbx]
	mov	rsi, rbx
	lea	rdi, .LC0[rip]
	xor	eax, eax
	call	dTrace@PLT
	lea	rdi, 4[rbx]
	call	sem_post@PLT
	mov	DWORD PTR [rbx], 1
	mov	rax, QWORD PTR TSDB_CODE_SUCCESS[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L36:
	mov	esi, DWORD PTR 8[r14]
	mov	rdi, rbx
	call	vnodeOpenAllFiles@PLT
	mov	edi, DWORD PTR 96[rbx]
	call	isGroupbyNormalCol@PLT
	test	rax, rax
	je	.L10
	xor	edx, edx
	mov	rsi, r12
	mov	rdi, rbp
	call	allocateOutputBufForGroup@PLT
	cmp	QWORD PTR TSDB_CODE_SUCCESS[rip], rax
	jne	.L1
	mov	edx, DWORD PTR taosHashInt[rip]
	mov	esi, 8
	mov	edi, 10039
	call	taosInitIntHash@PLT
	mov	QWORD PTR 32[rbp], 0
	mov	DWORD PTR 40[rbp], eax
	mov	eax, DWORD PTR 80[rbp]
	mov	DWORD PTR 28[rbp], eax
.L10:
	mov	rdi, r12
	call	isFirstLastRowQuery@PLT
	test	rax, rax
	jne	.L11
	mov	rax, QWORD PTR 16[rbx]
	mov	rdx, QWORD PTR 24[rbx]
.L12:
	mov	QWORD PTR 8[rbp], rdx
	mov	esi, DWORD PTR QUERY_NOT_COMPLETED[rip]
	mov	rdi, r12
	lea	r13, 20[rsp]
	mov	QWORD PTR 0[rbp], rax
	mov	DWORD PTR 16[rbp], 1
	call	setQueryStatus@PLT
	mov	rsi, r13
	mov	rdi, r12
	mov	DWORD PTR 20[rsp], 0
	call	pointInterpSupporterInit@PLT
	mov	esi, DWORD PTR 12[rsp]
	mov	edi, DWORD PTR 16[rsp]
	mov	rcx, r13
	mov	rdx, rbp
	call	normalizedFirstQueryRange@PLT
	test	eax, eax
	je	.L18
	mov	rdi, r12
	call	isFixedOutputQuery@PLT
	test	rax, rax
	je	.L17
	mov	rdi, r12
	call	isTopBottomQuery@PLT
	test	rax, rax
	jne	.L17
	cmp	QWORD PTR 88[rbx], 0
	jg	.L18
	.p2align 4,,10
	.p2align 3
.L17:
	mov	rdi, r12
	call	isTopBottomQuery@PLT
	test	rax, rax
	je	.L16
	mov	rax, QWORD PTR 80[rbx]
	mov	rax, QWORD PTR 8[rax]
	mov	rax, QWORD PTR [rax]
	cmp	QWORD PTR 88[rbx], rax
	jge	.L18
.L16:
	mov	rsi, r13
	mov	rdi, rbx
	call	pointInterpSupporterSetData@PLT
	mov	rdi, r13
	call	pointInterpSupporterDestroy@PLT
	mov	ecx, DWORD PTR 12[rsp]
	mov	edx, DWORD PTR 16[rsp]
	mov	rsi, rbp
	mov	rdi, rbx
	call	forwardQueryStartPosIfNeeded@PLT
	test	eax, eax
	jne	.L19
.L33:
	mov	rax, QWORD PTR TSDB_CODE_SUCCESS[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L35:
	mov	rsi, rbx
	lea	rdi, .LC1[rip]
	xor	eax, eax
	call	dTrace@PLT
	lea	rdi, 4[rbx]
	call	sem_post@PLT
	mov	DWORD PTR [rbx], 1
	mov	rax, QWORD PTR TSDB_CODE_SUCCESS[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L18:
	lea	rdi, 4[rbx]
	call	sem_post@PLT
	mov	DWORD PTR [rbx], 1
	mov	rdi, r13
	call	pointInterpSupporterDestroy@PLT
	mov	rax, QWORD PTR TSDB_CODE_SUCCESS[rip]
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L11:
	mov	rax, QWORD PTR [r14]
	mov	QWORD PTR 16[rbx], rax
	mov	rdx, rax
	mov	QWORD PTR 24[rbx], rax
	mov	QWORD PTR 32[rbx], rax
	jmp	.L12
	.p2align 4,,10
	.p2align 3
.L19:
	mov	ecx, DWORD PTR 64[rbx]
	mov	edx, DWORD PTR 68[rbx]
	mov	esi, DWORD PTR 72[rbx]
	mov	rdi, QWORD PTR 0[rbp]
	call	taosGetIntervalStartTimestamp@PLT
	mov	rsi, QWORD PTR 56[rbx]
	xor	r8d, r8d
	xor	ecx, ecx
	mov	edx, eax
	mov	rdi, r15
	call	taosInitInterpoInfo@PLT
	mov	rdx, r14
	mov	rsi, r12
	mov	rdi, rbp
	call	allocMemForInterpo@PLT
	mov	rdi, r12
	call	isPointInterpoQuery@PLT
	mov	edi, eax
	test	eax, eax
	jne	.L20
	cmp	QWORD PTR 40[rbx], 0
	js	.L21
	mov	rdi, QWORD PTR 48[rbx]
	not	rdi
	shr	rdi, 63
.L21:
	call	assert@PLT
.L20:
	mov	rax, QWORD PTR 16[rbx]
	mov	QWORD PTR 32[rbx], rax
	jmp	.L33
.L37:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	vnodeQuerySingleMeterPrepare, .-vnodeQuerySingleMeterPrepare
	.comm	taosHashInt,4,4
	.comm	TSQL_SO_DESC,4,4
	.comm	TSQL_SO_ASC,4,4
	.comm	TSDB_CODE_SUCCESS,8,8
	.comm	QUERY_NOT_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_vnodeQuerySingleMeterPrepare.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"QInfo:%p no result in time range %lld-%lld, order %"
	.ascii	"d\000"
	.align	2
.LC1:
	.ascii	"QInfo:%p no result in query\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	vnodeQuerySingleMeterPrepare
	.syntax unified
	.arm
	.fpu softvfp
	.type	vnodeQuerySingleMeterPrepare, %function
vnodeQuerySingleMeterPrepare:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, lr}
	mov	r7, r3
	add	r6, r0, #12
	ldr	r3, .L37
	sub	sp, sp, #24
	mov	r4, r0
	mov	r0, r6
	mov	r8, r1
	mov	r5, r2
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	bl	QUERY_IS_ASC_QUERY
	cmp	r0, #0
	beq	.L2
	ldr	r2, [r4, #12]
	ldr	r3, [r4, #16]
	cmp	r2, r3
	bgt	.L3
.L2:
	mov	r0, r6
	bl	QUERY_IS_ASC_QUERY
	cmp	r0, #0
	bne	.L4
	ldr	r3, [r4, #16]
	ldr	r2, [r4, #12]
	cmp	r3, r2
	bgt	.L3
.L4:
	mov	r0, r6
	bl	setScanLimitationByResultBuffer
	mov	r1, #0
	mov	r0, r6
	bl	changeExecuteScanOrder
	mov	r3, #0
	mov	r10, #1
	ldr	r2, [r4, #12]
	str	r3, [r4]
	str	r3, [r4, #8]
	str	r3, [r4, #60]
	str	r2, [r4, #20]
	add	r0, r5, #44
	bl	vnodeInitDataBlockInfo
	add	r9, r5, #12
	add	r0, r5, #40
	bl	vnodeInitLoadCompBlockInfo
	add	r3, sp, #8
	add	r2, sp, #12
	mov	r0, r9
	mov	r1, r8
	str	r6, [r5, #36]
	str	r10, [sp, #8]
	str	r10, [sp, #12]
	bl	vnodeCheckIfDataExists
	ldr	r2, [sp, #8]
	ldr	r3, [sp, #12]
	orrs	r3, r2, r3
	beq	.L34
	mvn	r3, #0
	cmp	r7, #0
	str	r3, [r5, #32]
	str	r7, [r5, #28]
	ldr	r3, [r4, #32]
	beq	.L7
	ldr	r2, [r7]
	mov	r0, r7
	cmp	r2, r3
	ldreq	r3, .L37+4
	ldrne	r3, .L37+8
	ldr	r1, [r3]
	bl	tsBufSetTraverseOrder
	ldr	r3, [r4, #32]
.L7:
	mov	r7, #0
	mov	r2, r9
	stm	sp, {r3, r7}
	mov	r1, r6
	mov	r3, r7
	mov	r0, r8
	bl	setupQueryRuntimeEnv
	ldr	r10, .L37+12
	ldr	r3, [r10]
	cmp	r3, r0
	beq	.L35
.L1:
	ldr	r3, .L37
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L36
	add	sp, sp, #24
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, pc}
.L3:
	ldr	r1, [r4, #32]
	ldr	r0, .L37+16
	str	r1, [sp]
	mov	r1, r4
	bl	dTrace
	add	r0, r4, #4
	bl	sem_post
	mov	r2, #1
	ldr	r3, .L37+12
	str	r2, [r4]
	ldr	r0, [r3]
	b	.L1
.L35:
	ldr	r1, [r8, #4]
	mov	r0, r4
	bl	vnodeOpenAllFiles
	ldr	r0, [r4, #56]
	bl	isGroupbyNormalCol
	cmp	r0, r7
	beq	.L10
	mov	r2, r7
	mov	r1, r6
	mov	r0, r5
	bl	allocateOutputBufForGroup
	ldr	r3, [r10]
	cmp	r3, r0
	bne	.L1
	ldr	r3, .L37+20
	mov	r1, #4
	ldr	r2, [r3]
	ldr	r0, .L37+24
	bl	taosInitIntHash
	ldr	r3, [r5, #48]
	str	r0, [r5, #24]
	str	r7, [r5, #20]
	str	r3, [r5, #16]
.L10:
	mov	r0, r6
	bl	isFirstLastRowQuery
	cmp	r0, #0
	ldrne	r3, [r8]
	mov	r1, #1
	movne	r0, r3
	ldreq	r3, [r4, #12]
	ldreq	r0, [r4, #16]
	ldr	r2, .L37+28
	strne	r3, [r4, #12]
	strne	r3, [r4, #16]
	strne	r3, [r4, #20]
	stmib	r5, {r0, r1}
	str	r3, [r5]
	ldr	r1, [r2]
	mov	r0, r6
	bl	setQueryStatus
	mov	r3, #0
	add	r1, sp, #16
	mov	r0, r6
	str	r3, [sp, #16]
	bl	pointInterpSupporterInit
	mov	r2, r5
	ldr	r1, [sp, #8]
	ldr	r0, [sp, #12]
	add	r3, sp, #16
	bl	normalizedFirstQueryRange
	cmp	r0, #0
	beq	.L18
	mov	r0, r6
	bl	isFixedOutputQuery
	cmp	r0, #0
	beq	.L17
	mov	r0, r6
	bl	isTopBottomQuery
	cmp	r0, #0
	bne	.L17
	ldr	r3, [r4, #52]
	cmp	r3, #0
	bgt	.L18
.L17:
	mov	r0, r6
	bl	isTopBottomQuery
	cmp	r0, #0
	beq	.L16
	ldr	r3, [r4, #48]
	ldr	r2, [r4, #52]
	ldr	r3, [r3, #4]
	ldr	r3, [r3]
	cmp	r2, r3
	bge	.L18
.L16:
	add	r1, sp, #16
	mov	r0, r4
	bl	pointInterpSupporterSetData
	add	r0, sp, #16
	bl	pointInterpSupporterDestroy
	mov	r1, r5
	mov	r0, r4
	ldr	r3, [sp, #8]
	ldr	r2, [sp, #12]
	bl	forwardQueryStartPosIfNeeded
	cmp	r0, #0
	bne	.L19
	ldr	r0, [r10]
	b	.L1
.L34:
	mov	r1, r4
	ldr	r0, .L37+32
	bl	dTrace
	add	r0, r4, #4
	bl	sem_post
	ldr	r3, .L37+12
	str	r10, [r4]
	ldr	r0, [r3]
	b	.L1
.L18:
	add	r0, r4, #4
	bl	sem_post
	mov	r3, #1
	add	r0, sp, #16
	str	r3, [r4]
	bl	pointInterpSupporterDestroy
	ldr	r0, [r10]
	b	.L1
.L19:
	ldr	r3, [r4, #36]
	ldr	r2, [r4, #40]
	ldr	r1, [r4, #44]
	ldr	r0, [r5]
	bl	taosGetIntervalStartTimestamp
	mov	r3, #0
	str	r3, [sp]
	mov	r2, r0
	ldr	r1, [r4, #32]
	mov	r0, r9
	bl	taosInitInterpoInfo
	mov	r2, r8
	mov	r1, r6
	mov	r0, r5
	bl	allocMemForInterpo
	mov	r0, r6
	bl	isPointInterpoQuery
	cmp	r0, #0
	bne	.L20
	ldr	r3, [r4, #24]
	cmp	r3, #0
	ldrge	r0, [r4, #28]
	mvnge	r0, r0
	lsrge	r0, r0, #31
	bl	assert
.L20:
	ldr	r3, [r4, #12]
	ldr	r0, [r10]
	str	r3, [r4, #20]
	b	.L1
.L36:
	bl	__stack_chk_fail
.L38:
	.align	2
.L37:
	.word	.LC2
	.word	TSQL_SO_ASC
	.word	TSQL_SO_DESC
	.word	TSDB_CODE_SUCCESS
	.word	.LC0
	.word	taosHashInt
	.word	10039
	.word	QUERY_NOT_COMPLETED
	.word	.LC1
	.size	vnodeQuerySingleMeterPrepare, .-vnodeQuerySingleMeterPrepare
	.comm	taosHashInt,4,4
	.comm	TSQL_SO_DESC,4,4
	.comm	TSQL_SO_ASC,4,4
	.comm	TSDB_CODE_SUCCESS,4,4
	.comm	QUERY_NOT_COMPLETED,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
