	.file	"extr_mgmtMeter.c_mgmtMeterAddTags.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC0:
	.string	"Failed to add tag column %s to table %s"
	.align 8
.LC1:
	.string	"Succeed to add tag column %s to table %s"
	.text
	.p2align 4
	.globl	mgmtMeterAddTags
	.type	mgmtMeterAddTags, @function
mgmtMeterAddTags:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	je	.L31
	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
	mov	r13d, edx
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12, rsi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	call	mgmtIsMetric@PLT
	test	eax, eax
	je	.L4
	mov	rdx, QWORD PTR 0[rbp]
	movsx	r14, r13d
	mov	rax, QWORD PTR TSDB_CODE_APP_ERROR[rip]
	add	rdx, r14
	cmp	rdx, QWORD PTR TSDB_MAX_TAGS[rip]
	jg	.L1
	cmp	r13d, 1
	jle	.L25
	lea	eax, -2[r13]
	lea	rbx, 4[r12]
	lea	rax, 8[r12+rax*4]
	mov	QWORD PTR 8[rsp], rax
.L10:
	mov	r15, r12
	.p2align 4,,10
	.p2align 3
.L9:
	mov	esi, DWORD PTR [r15]
	mov	edi, DWORD PTR [rbx]
	call	strcasecmp@PLT
	test	rax, rax
	je	.L29
	add	r15, 4
	cmp	r15, rbx
	jne	.L9
	add	rbx, 4
	cmp	rbx, QWORD PTR 8[rsp]
	jne	.L10
.L12:
	xor	ebx, ebx
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L14:
	add	rbx, 1
	cmp	r13d, ebx
	jle	.L13
.L11:
	mov	esi, DWORD PTR [r12+rbx*4]
	mov	rdi, rbp
	call	mgmtFindTagCol@PLT
	test	rax, rax
	js	.L14
.L29:
	mov	rax, QWORD PTR TSDB_CODE_APP_ERROR[rip]
	add	rsp, 24
	.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
.L4:
	.cfi_restore_state
	mov	rax, QWORD PTR TSDB_CODE_INVALID_TABLE[rip]
.L1:
	add	rsp, 24
	.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
.L31:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	.cfi_restore 13
	.cfi_restore 14
	.cfi_restore 15
	mov	rax, QWORD PTR TSDB_CODE_INVALID_TABLE[rip]
	ret
.L25:
	.cfi_def_cfa_offset 80
	.cfi_offset 3, -56
	.cfi_offset 6, -48
	.cfi_offset 12, -40
	.cfi_offset 13, -32
	.cfi_offset 14, -24
	.cfi_offset 15, -16
	je	.L12
.L13:
	lea	r15d, 16[0+r14*4]
	mov	edi, r15d
	call	malloc@PLT
	mov	edx, r15d
	xor	esi, esi
	mov	r14, rax
	mov	rdi, rax
	call	memset@PLT
	mov	rsi, QWORD PTR 8[rbp]
	mov	edi, DWORD PTR 12[r14]
	mov	edx, DWORD PTR TSDB_METER_ID_LEN[rip]
	call	memcpy@PLT
	mov	eax, DWORD PTR SDB_TYPE_INSERT[rip]
	mov	DWORD PTR [r14], r13d
	mov	rsi, r12
	mov	edi, DWORD PTR 4[r14]
	lea	edx, 0[0+r13*4]
	mov	DWORD PTR 8[r14], eax
	call	memcpy@PLT
	mov	edi, DWORD PTR meterSdb[rip]
	mov	edx, r15d
	mov	rsi, r14
	call	sdbBatchUpdateRow@PLT
	mov	rdi, r14
	mov	rbx, rax
	call	tfree@PLT
	mov	rdx, QWORD PTR 8[rbp]
	mov	esi, DWORD PTR [r12]
	test	rbx, rbx
	js	.L32
	lea	rdi, .LC1[rip]
	call	mTrace@PLT
	mov	rax, QWORD PTR TSDB_CODE_SUCCESS[rip]
	jmp	.L1
.L32:
	lea	rdi, .LC0[rip]
	call	mError@PLT
	jmp	.L29
	.cfi_endproc
.LFE0:
	.size	mgmtMeterAddTags, .-mgmtMeterAddTags
	.comm	meterSdb,4,4
	.comm	TSDB_METER_ID_LEN,4,4
	.comm	TSDB_MAX_TAGS,8,8
	.comm	TSDB_CODE_SUCCESS,8,8
	.comm	TSDB_CODE_INVALID_TABLE,8,8
	.comm	TSDB_CODE_APP_ERROR,8,8
	.comm	SDB_TYPE_INSERT,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_mgmtMeter.c_mgmtMeterAddTags.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"Failed to add tag column %s to table %s\000"
	.align	2
.LC1:
	.ascii	"Succeed to add tag column %s to table %s\000"
	.text
	.align	2
	.global	mgmtMeterAddTags
	.syntax unified
	.arm
	.fpu softvfp
	.type	mgmtMeterAddTags, %function
mgmtMeterAddTags:
	@ 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	r8, r0, #0
	beq	.L4
	mov	r10, r1
	mov	r9, r2
	bl	mgmtIsMetric
	cmp	r0, #0
	beq	.L4
	ldr	r2, .L30
	ldr	r3, [r8]
	ldr	r2, [r2]
	add	r3, r9, r3
	cmp	r3, r2
	bgt	.L26
	cmp	r9, #1
	movgt	r6, #1
	addgt	r7, r10, #4
	subgt	fp, r10, #4
	ble	.L28
.L10:
	mov	r5, fp
	mov	r4, #0
.L9:
	ldr	r1, [r5, #4]!
	ldr	r0, [r7]
	bl	strcasecmp
	cmp	r0, #0
	add	r4, r4, #1
	beq	.L26
	cmp	r4, r6
	bne	.L9
	add	r6, r6, #1
	cmp	r9, r6
	add	r7, r7, #4
	bne	.L10
.L12:
	mov	r4, #0
	b	.L11
.L14:
	cmp	r9, r4
	ble	.L13
.L11:
	mov	r0, r8
	ldr	r1, [fp, #4]!
	bl	mgmtFindTagCol
	cmp	r0, #0
	add	r4, r4, #1
	blt	.L14
.L26:
	ldr	r3, .L30+4
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L4:
	ldr	r3, .L30+8
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L28:
	subeq	fp, r10, #4
	beq	.L12
.L13:
	add	r5, r9, #4
	lsl	r5, r5, #2
	mov	r0, r5
	bl	malloc
	mov	r4, r0
	mov	r2, r5
	mov	r1, #0
	bl	memset
	ldr	r3, .L30+12
	ldr	r1, [r8, #4]
	ldr	r2, [r3]
	ldr	r0, [r4, #12]
	bl	memcpy
	ldr	r3, .L30+16
	sub	r2, r5, #16
	ldr	r3, [r3]
	mov	r1, r10
	str	r3, [r4, #8]
	ldr	r0, [r4, #4]
	str	r9, [r4]
	bl	memcpy
	ldr	r3, .L30+20
	mov	r2, r5
	mov	r1, r4
	ldr	r0, [r3]
	bl	sdbBatchUpdateRow
	mov	r5, r0
	mov	r0, r4
	bl	tfree
	cmp	r5, #0
	ldr	r2, [r8, #4]
	ldr	r1, [r10]
	blt	.L29
	ldr	r0, .L30+24
	bl	mTrace
	ldr	r3, .L30+28
	ldr	r0, [r3]
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L29:
	ldr	r0, .L30+32
	bl	mError
	b	.L26
.L31:
	.align	2
.L30:
	.word	TSDB_MAX_TAGS
	.word	TSDB_CODE_APP_ERROR
	.word	TSDB_CODE_INVALID_TABLE
	.word	TSDB_METER_ID_LEN
	.word	SDB_TYPE_INSERT
	.word	meterSdb
	.word	.LC1
	.word	TSDB_CODE_SUCCESS
	.word	.LC0
	.size	mgmtMeterAddTags, .-mgmtMeterAddTags
	.comm	meterSdb,4,4
	.comm	TSDB_METER_ID_LEN,4,4
	.comm	TSDB_MAX_TAGS,4,4
	.comm	TSDB_CODE_SUCCESS,4,4
	.comm	TSDB_CODE_INVALID_TABLE,4,4
	.comm	TSDB_CODE_APP_ERROR,4,4
	.comm	SDB_TYPE_INSERT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
