	.file	"extr_tscSecondaryMerge.c_tscDestroyLocalReducer.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"%p start to free local reducer"
	.align 8
.LC1:
	.string	"%p local reducer has been freed, abort"
	.align 8
.LC2:
	.string	"%p waiting for delete procedure, status: %d"
	.align 8
.LC3:
	.string	"%p already freed or another free function is invoked"
	.align 8
.LC4:
	.string	"%p free local reducer finished"
	.text
	.p2align 4
	.globl	tscDestroyLocalReducer
	.type	tscDestroyLocalReducer, @function
tscDestroyLocalReducer:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L1
	push	r14
	.cfi_def_cfa_offset 16
	.cfi_offset 14, -16
	mov	rsi, rdi
	xor	eax, eax
	push	r13
	.cfi_def_cfa_offset 24
	.cfi_offset 13, -24
	mov	r13, rdi
	lea	rdi, .LC0[rip]
	push	r12
	.cfi_def_cfa_offset 32
	.cfi_offset 12, -32
	push	rbp
	.cfi_def_cfa_offset 40
	.cfi_offset 6, -40
	push	rbx
	.cfi_def_cfa_offset 48
	.cfi_offset 3, -48
	call	tscTrace@PLT
	cmp	QWORD PTR 8[r13], 0
	mov	rsi, r13
	lea	rdi, .LC1[rip]
	je	.L34
	lea	rdi, 8[r13]
	xor	esi, esi
	lea	r14, .LC2[rip]
	call	atomic_exchange_ptr@PLT
	mov	rbp, rax
	lea	rbx, 128[rax]
	test	rax, rax
	jne	.L5
	mov	rsi, r13
	lea	rdi, .LC3[rip]
	xor	eax, eax
	call	tscTrace@PLT
	mov	rsi, r13
	lea	rdi, .LC4[rip]
.L34:
	pop	rbx
	.cfi_remember_state
	.cfi_restore 3
	.cfi_def_cfa_offset 40
	xor	eax, eax
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 32
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 24
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 8
	jmp	tscTrace@PLT
	.p2align 4,,10
	.p2align 3
.L6:
	.cfi_restore_state
	mov	edi, 100
	call	taosMsleep@PLT
	mov	rdx, r12
	mov	rsi, r13
	mov	rdi, r14
	xor	eax, eax
	call	tscTrace@PLT
.L5:
	mov	edx, DWORD PTR TSC_LOCALREDUCE_TOBE_FREED[rip]
	mov	esi, DWORD PTR TSC_LOCALREDUCE_READY[rip]
	mov	rdi, rbx
	call	atomic_val_compare_exchange_32@PLT
	cmp	QWORD PTR TSC_LOCALREDUCE_IN_PROGRESS[rip], rax
	mov	r12, rax
	je	.L6
	mov	rdi, QWORD PTR 120[rbp]
	call	tfree@PLT
	mov	rdi, QWORD PTR 112[rbp]
	call	tfree@PLT
	mov	rdi, QWORD PTR 104[rbp]
	test	rdi, rdi
	je	.L7
	cmp	QWORD PTR 0[r13], 0
	je	.L8
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L10:
	lea	rax, [r12+r12*2]
	add	r12, 1
	lea	rdi, 16[rdi+rax*8]
	call	tVariantDestroy@PLT
	cmp	QWORD PTR 0[r13], r12
	mov	rdi, QWORD PTR 104[rbp]
	ja	.L10
.L8:
	call	tfree@PLT
.L7:
	mov	rdi, QWORD PTR 96[rbp]
	call	tfree@PLT
	mov	rdi, QWORD PTR 88[rbp]
	call	tfree@PLT
	mov	rdi, QWORD PTR 80[rbp]
	call	tfree@PLT
	mov	rdi, QWORD PTR 72[rbp]
	test	rdi, rdi
	je	.L11
	cmp	QWORD PTR 0[r13], 0
	je	.L12
	xor	r12d, r12d
	.p2align 4,,10
	.p2align 3
.L14:
	lea	rax, [r12+r12*2]
	add	r12, 1
	mov	rdi, QWORD PTR 8[rdi+rax*8]
	call	tfree@PLT
	cmp	QWORD PTR 0[r13], r12
	mov	rdi, QWORD PTR 72[rbp]
	ja	.L14
.L12:
	call	tfree@PLT
.L11:
	mov	rax, QWORD PTR 64[rbp]
	test	rax, rax
	je	.L15
	mov	rdi, QWORD PTR [rax]
	call	tfree@PLT
	mov	rdi, QWORD PTR 64[rbp]
	call	tfree@PLT
.L15:
	mov	rdi, QWORD PTR 56[rbp]
	xor	r12d, r12d
	call	tfree@PLT
	mov	rdi, QWORD PTR 48[rbp]
	call	tfree@PLT
	mov	rdi, QWORD PTR 40[rbp]
	call	tfree@PLT
	mov	ecx, DWORD PTR 24[rbp]
	mov	edx, DWORD PTR 28[rbp]
	mov	esi, DWORD PTR 32[rbp]
	mov	edi, DWORD PTR 36[rbp]
	call	tscLocalReducerEnvDestroy@PLT
	cmp	QWORD PTR 0[rbp], 0
	je	.L18
	.p2align 4,,10
	.p2align 3
.L16:
	mov	rax, QWORD PTR 16[rbp]
	mov	rdi, QWORD PTR [rax+r12*8]
	add	r12, 1
	call	tfree@PLT
	cmp	QWORD PTR 0[rbp], r12
	ja	.L16
.L18:
	mov	QWORD PTR 0[rbp], 0
	mov	rdi, rbp
	mov	QWORD PTR 8[rbp], 0
	call	free@PLT
	pop	rbx
	.cfi_restore 3
	.cfi_def_cfa_offset 40
	mov	rsi, r13
	pop	rbp
	.cfi_restore 6
	.cfi_def_cfa_offset 32
	lea	rdi, .LC4[rip]
	pop	r12
	.cfi_restore 12
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	r13
	.cfi_restore 13
	.cfi_def_cfa_offset 16
	pop	r14
	.cfi_restore 14
	.cfi_def_cfa_offset 8
	jmp	tscTrace@PLT
	.p2align 4,,10
	.p2align 3
.L1:
	ret
	.cfi_endproc
.LFE0:
	.size	tscDestroyLocalReducer, .-tscDestroyLocalReducer
	.comm	TSC_LOCALREDUCE_TOBE_FREED,4,4
	.comm	TSC_LOCALREDUCE_READY,4,4
	.comm	TSC_LOCALREDUCE_IN_PROGRESS,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_tscSecondaryMerge.c_tscDestroyLocalReducer.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%p start to free local reducer\000"
	.align	2
.LC1:
	.ascii	"%p local reducer has been freed, abort\000"
	.align	2
.LC2:
	.ascii	"%p waiting for delete procedure, status: %d\000"
	.align	2
.LC3:
	.ascii	"%p already freed or another free function is invoke"
	.ascii	"d\000"
	.align	2
.LC4:
	.ascii	"%p free local reducer finished\000"
	.text
	.align	2
	.global	tscDestroyLocalReducer
	.syntax unified
	.arm
	.fpu softvfp
	.type	tscDestroyLocalReducer, %function
tscDestroyLocalReducer:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	subs	r5, r0, #0
	popeq	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
	mov	r1, r5
	ldr	r0, .L39
	bl	tscTrace
	ldr	r3, [r5, #4]
	cmp	r3, #0
	beq	.L38
	mov	r1, #0
	add	r0, r5, #4
	bl	atomic_exchange_ptr
	subs	r4, r0, #0
	beq	.L4
	ldr	r9, .L39+4
	ldr	r8, .L39+8
	ldr	r7, .L39+12
	ldr	fp, .L39+16
	add	r10, r4, #72
	b	.L5
.L6:
	mov	r0, #100
	bl	taosMsleep
	mov	r2, r6
	mov	r1, r5
	mov	r0, fp
	bl	tscTrace
.L5:
	mov	r0, r10
	ldr	r2, [r9]
	ldr	r1, [r8]
	bl	atomic_val_compare_exchange_32
	ldr	r6, [r7]
	cmp	r6, r0
	beq	.L6
	ldr	r0, [r4, #68]
	bl	tfree
	ldr	r0, [r4, #64]
	bl	tfree
	ldr	r0, [r4, #60]
	cmp	r0, #0
	beq	.L7
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L8
	mov	r6, #0
.L10:
	add	r3, r6, r6, lsl #1
	add	r0, r0, r3, lsl #2
	add	r0, r0, #8
	bl	tVariantDestroy
	ldr	r3, [r5]
	add	r6, r6, #1
	cmp	r3, r6
	ldr	r0, [r4, #60]
	bhi	.L10
.L8:
	bl	tfree
.L7:
	ldr	r0, [r4, #56]
	bl	tfree
	ldr	r0, [r4, #52]
	bl	tfree
	ldr	r0, [r4, #48]
	bl	tfree
	ldr	r0, [r4, #44]
	cmp	r0, #0
	beq	.L11
	ldr	r3, [r5]
	cmp	r3, #0
	beq	.L12
	mov	r6, #0
.L14:
	add	r3, r6, r6, lsl #1
	add	r0, r0, r3, lsl #2
	ldr	r0, [r0, #4]
	bl	tfree
	ldr	r3, [r5]
	add	r6, r6, #1
	cmp	r3, r6
	ldr	r0, [r4, #44]
	bhi	.L14
.L12:
	bl	tfree
.L11:
	ldr	r3, [r4, #40]
	cmp	r3, #0
	beq	.L15
	ldr	r0, [r3]
	bl	tfree
	ldr	r0, [r4, #40]
	bl	tfree
.L15:
	ldr	r0, [r4, #36]
	bl	tfree
	ldr	r0, [r4, #32]
	bl	tfree
	ldr	r0, [r4, #28]
	bl	tfree
	ldr	r3, [r4, #12]
	ldr	r2, [r4, #16]
	ldr	r1, [r4, #20]
	ldr	r0, [r4, #24]
	bl	tscLocalReducerEnvDestroy
	ldr	r3, [r4]
	cmp	r3, #0
	movne	r6, #0
	beq	.L18
.L16:
	ldr	r3, [r4, #8]
	ldr	r0, [r3, r6, lsl #2]
	bl	tfree
	ldr	r3, [r4]
	add	r6, r6, #1
	cmp	r3, r6
	bhi	.L16
.L18:
	mov	r3, #0
	mov	r0, r4
	str	r3, [r4]
	str	r3, [r4, #4]
	bl	free
	mov	r1, r5
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r0, .L39+20
	b	tscTrace
.L4:
	mov	r1, r5
	ldr	r0, .L39+24
	bl	tscTrace
	mov	r1, r5
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r0, .L39+20
	b	tscTrace
.L38:
	mov	r1, r5
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r0, .L39+28
	b	tscTrace
.L40:
	.align	2
.L39:
	.word	.LC0
	.word	TSC_LOCALREDUCE_TOBE_FREED
	.word	TSC_LOCALREDUCE_READY
	.word	TSC_LOCALREDUCE_IN_PROGRESS
	.word	.LC2
	.word	.LC4
	.word	.LC3
	.word	.LC1
	.size	tscDestroyLocalReducer, .-tscDestroyLocalReducer
	.comm	TSC_LOCALREDUCE_TOBE_FREED,4,4
	.comm	TSC_LOCALREDUCE_READY,4,4
	.comm	TSC_LOCALREDUCE_IN_PROGRESS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
