	.file	"extr_stream.c_main.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"usage: %s server-ip dbname tblname\n"
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"failed to malloc"
.LC2:
	.string	"taosdata"
.LC3:
	.string	"root"
	.section	.rodata.str1.8
	.align 8
.LC4:
	.string	"failed to connet to server:%s\n"
	.align 8
.LC5:
	.string	"please input stream SQL:[e.g., select count(*) from tblname interval(5s) sliding(2s);]"
	.align 8
.LC6:
	.string	"input NULL stream SQL, so exit!"
	.section	.rodata.str1.1
.LC7:
	.string	"failed to create stream"
.LC8:
	.string	"presss any key to exit"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	mov	r8d, edi
	pxor	xmm0, xmm0
	mov	ecx, 126
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rsi
	sub	rsp, 1192
	.cfi_def_cfa_offset 1232
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 1176[rsp], rax
	xor	eax, eax
	lea	rdi, 160[rsp]
	movaps	XMMWORD PTR 144[rsp], xmm0
	rep stosq
	cmp	r8d, 4
	je	.L2
	mov	rsi, QWORD PTR [rsi]
	lea	rdi, .LC0[rip]
	call	printf@PLT
	xor	edi, edi
	call	exit@PLT
.L2:
	xor	eax, eax
	lea	r12, 16[rsp]
	lea	r13, 80[rsp]
	call	taos_init@PLT
	mov	rsi, QWORD PTR 16[rbx]
	mov	rdi, r12
	call	strcpy@PLT
	mov	rsi, QWORD PTR 24[rbx]
	mov	rdi, r13
	call	strcpy@PLT
	mov	edi, 24
	call	malloc@PLT
	mov	rbp, rax
	test	rax, rax
	je	.L13
.L3:
	mov	edx, 24
	xor	esi, esi
	mov	rdi, rbp
	call	memset@PLT
	mov	rsi, QWORD PTR 8[rbx]
	mov	rdi, QWORD PTR 0[rbp]
	call	strcpy@PLT
	mov	rdi, QWORD PTR 8[rbp]
	mov	rsi, r12
	call	strcpy@PLT
	mov	rdi, QWORD PTR 16[rbp]
	mov	rsi, r13
	call	strcpy@PLT
	mov	rcx, rbp
	xor	esi, esi
	lea	rdi, 12[rsp]
	mov	rdx, QWORD PTR insert_rows[rip]
	call	pthread_create@PLT
	mov	edi, 3
	call	sleep@PLT
	mov	rdi, QWORD PTR 8[rbx]
	mov	rcx, r12
	xor	r8d, r8d
	lea	rdx, .LC2[rip]
	lea	rsi, .LC3[rip]
	call	taos_connect@PLT
	mov	r12, rax
	test	rax, rax
	je	.L14
.L4:
	lea	rdi, .LC5[rip]
	lea	r13, 144[rsp]
	call	puts@PLT
	mov	edx, DWORD PTR stdin[rip]
	mov	esi, 1024
	mov	rdi, r13
	call	fgets@PLT
	cmp	BYTE PTR 144[rsp], 0
	je	.L15
.L5:
	mov	edx, DWORD PTR streamCallBack[rip]
	mov	rsi, r13
	xor	r9d, r9d
	xor	r8d, r8d
	xor	ecx, ecx
	mov	rdi, r12
	call	taos_open_stream@PLT
	mov	r13, rax
	test	rax, rax
	je	.L16
.L6:
	lea	rdi, .LC8[rip]
	call	puts@PLT
	xor	eax, eax
	call	getchar@PLT
	mov	rdi, r13
	call	taos_close_stream@PLT
	mov	edi, DWORD PTR 12[rsp]
	xor	esi, esi
	mov	DWORD PTR g_thread_exit_flag[rip], 1
	call	pthread_join@PLT
	mov	rdi, r12
	call	taos_close@PLT
	mov	rdi, rbp
	call	free@PLT
	mov	rax, QWORD PTR 1176[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L17
	add	rsp, 1192
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
.L13:
	.cfi_restore_state
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L3
.L15:
	lea	rdi, .LC6[rip]
	call	puts@PLT
	mov	rdi, rbp
	call	free@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L5
.L14:
	mov	rsi, QWORD PTR 8[rbx]
	lea	rdi, .LC4[rip]
	xor	eax, eax
	call	printf@PLT
	mov	rdi, rbp
	call	free@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L4
.L16:
	lea	rdi, .LC7[rip]
	call	puts@PLT
	mov	rdi, rbp
	call	free@PLT
	mov	edi, 1
	call	exit@PLT
	jmp	.L6
.L17:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.comm	streamCallBack,4,4
	.comm	stdin,4,4
	.comm	insert_rows,8,8
	.comm	g_thread_exit_flag,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_stream.c_main.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"usage: %s server-ip dbname tblname\012\000"
	.align	2
.LC1:
	.ascii	"failed to malloc\000"
	.align	2
.LC2:
	.ascii	"taosdata\000"
	.align	2
.LC3:
	.ascii	"root\000"
	.align	2
.LC4:
	.ascii	"failed to connet to server:%s\012\000"
	.align	2
.LC5:
	.ascii	"please input stream SQL:[e.g., select count(*) from"
	.ascii	" tblname interval(5s) sliding(2s);]\000"
	.align	2
.LC6:
	.ascii	"input NULL stream SQL, so exit!\000"
	.align	2
.LC7:
	.ascii	"failed to create stream\000"
	.align	2
.LC8:
	.ascii	"presss any key to exit\000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC9:
	.word	__stack_chk_guard
	.section	.text.startup,"ax",%progbits
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1168
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, lr}
	mov	r6, #0
	mov	r4, r0
	sub	sp, sp, #1168
	sub	sp, sp, #8
	ldr	r3, .L18
	mov	r5, r1
	mov	r2, #1020
	mov	r1, r6
	add	r0, sp, #152
	ldr	r3, [r3]
	str	r3, [sp, #1172]
	mov	r3,#0
	str	r6, [sp, #148]
	bl	memset
	cmp	r4, #4
	beq	.L2
	ldr	r1, [r5]
	ldr	r0, .L18+4
	bl	printf
	mov	r0, r6
	bl	exit
.L2:
	bl	taos_init
	ldr	r1, [r5, #8]
	add	r0, sp, #20
	bl	strcpy
	ldr	r1, [r5, #12]
	add	r0, sp, #84
	bl	strcpy
	mov	r0, #12
	bl	malloc
	subs	r4, r0, #0
	beq	.L13
.L3:
	mov	r6, #0
	ldr	r1, [r5, #4]
	mov	r0, r6
	str	r6, [r4]
	str	r6, [r4, #4]
	str	r6, [r4, #8]
	bl	strcpy
	add	r1, sp, #20
	ldr	r0, [r4, #4]
	bl	strcpy
	add	r1, sp, #84
	ldr	r0, [r4, #8]
	bl	strcpy
	ldr	r3, .L18+8
	mov	r1, r6
	ldr	r2, [r3]
	add	r0, sp, #16
	mov	r3, r4
	bl	pthread_create
	mov	r0, #3
	bl	sleep
	str	r6, [sp]
	ldr	r2, .L18+12
	ldr	r1, .L18+16
	ldr	r0, [r5, #4]
	add	r3, sp, #20
	bl	taos_connect
	subs	r6, r0, #0
	beq	.L14
.L4:
	ldr	r0, .L18+20
	bl	puts
	ldr	r3, .L18+24
	add	r2, sp, #148
	mov	r0, r2
	str	r2, [sp, #12]
	mov	r1, #1024
	ldr	r2, [r3]
	bl	fgets
	ldrb	r3, [sp, #148]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L15
.L5:
	mov	r3, #0
	ldr	r2, .L18+28
	str	r3, [sp, #4]
	str	r3, [sp]
	mov	r0, r6
	ldr	r1, [sp, #12]
	ldr	r2, [r2]
	bl	taos_open_stream
	subs	r5, r0, #0
	beq	.L16
.L6:
	ldr	r0, .L18+32
	bl	puts
	bl	getchar
	mov	r0, r5
	bl	taos_close_stream
	mov	r2, #1
	ldr	r3, .L18+36
	mov	r1, #0
	ldr	r0, [sp, #16]
	str	r2, [r3]
	bl	pthread_join
	mov	r0, r6
	bl	taos_close
	mov	r0, r4
	bl	free
	ldr	r3, .L18
	ldr	r2, [r3]
	ldr	r3, [sp, #1172]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L17
	mov	r0, #0
	add	sp, sp, #1168
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L15:
	ldr	r0, .L18+40
	bl	puts
	mov	r0, r4
	bl	free
	mov	r0, #1
	bl	exit
	b	.L5
.L14:
	ldr	r1, [r5, #4]
	ldr	r0, .L18+44
	bl	printf
	mov	r0, r4
	bl	free
	mov	r0, #1
	bl	exit
	b	.L4
.L16:
	ldr	r0, .L18+48
	bl	puts
	mov	r0, r4
	bl	free
	mov	r0, #1
	bl	exit
	b	.L6
.L17:
	bl	__stack_chk_fail
.L13:
	ldr	r0, .L18+52
	bl	puts
	mov	r0, #1
	bl	exit
	b	.L3
.L19:
	.align	2
.L18:
	.word	.LC9
	.word	.LC0
	.word	insert_rows
	.word	.LC2
	.word	.LC3
	.word	.LC5
	.word	stdin
	.word	streamCallBack
	.word	.LC8
	.word	g_thread_exit_flag
	.word	.LC6
	.word	.LC4
	.word	.LC7
	.word	.LC1
	.size	main, .-main
	.comm	streamCallBack,4,4
	.comm	stdin,4,4
	.comm	insert_rows,4,4
	.comm	g_thread_exit_flag,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
