	.file	"extr_mgmtVgroup.c_mgmtSetVgroupIdPool.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mgmtSetVgroupIdPool
	.type	mgmtSetVgroupIdPool, @function
mgmtSetVgroupIdPool:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	mov	QWORD PTR [rsp], 0
	mov	rbx, rsp
	.p2align 4,,10
	.p2align 3
.L2:
	mov	edi, DWORD PTR vgSdb[rip]
	mov	rsi, rbp
	mov	rdx, rbx
	call	sdbFetchRow@PLT
	mov	rbp, rax
	mov	rax, QWORD PTR [rsp]
	test	rax, rax
	je	.L1
	mov	rdi, QWORD PTR [rax]
	test	rdi, rdi
	je	.L1
	call	taosIdPoolSetFreeList@PLT
	mov	r12, QWORD PTR [rsp]
	mov	rdi, QWORD PTR [r12]
	call	taosIdPoolNumOfUsed@PLT
	mov	DWORD PTR 8[r12], eax
	mov	rax, QWORD PTR [rsp]
	mov	edi, DWORD PTR 12[rax]
	call	mgmtGetDb@PLT
	mov	rsi, QWORD PTR [rsp]
	mov	rdi, rax
	mov	edx, DWORD PTR 8[rsi]
	add	DWORD PTR 4[rax], edx
	mov	eax, DWORD PTR [rax]
	sub	eax, 1
	cmp	edx, eax
	jl	.L4
	call	mgmtAddVgroupIntoDbTail@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L4:
	call	mgmtAddVgroupIntoDb@PLT
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 8[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L15
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L15:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	mgmtSetVgroupIdPool, .-mgmtSetVgroupIdPool
	.comm	vgSdb,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_mgmtVgroup.c_mgmtSetVgroupIdPool.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	mgmtSetVgroupIdPool
	.syntax unified
	.arm
	.fpu softvfp
	.type	mgmtSetVgroupIdPool, %function
mgmtSetVgroupIdPool:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	mov	r3, #0
	push	{r4, r5, r6, lr}
	mov	r4, r3
	ldr	r2, .L16
	sub	sp, sp, #8
	ldr	r5, .L16+4
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	str	r3, [sp]
.L2:
	mov	r1, r4
	mov	r2, sp
	ldr	r0, [r5]
	bl	sdbFetchRow
	ldr	r3, [sp]
	mov	r4, r0
	cmp	r3, #0
	beq	.L1
	ldr	r0, [r3]
	cmp	r0, #0
	beq	.L1
	bl	taosIdPoolSetFreeList
	ldr	r6, [sp]
	ldr	r0, [r6]
	bl	taosIdPoolNumOfUsed
	ldr	r3, [sp]
	str	r0, [r6, #4]
	ldr	r0, [r3, #8]
	bl	mgmtGetDb
	ldr	r1, [sp]
	ldr	ip, [r0]
	ldr	lr, [r1, #4]
	ldr	r2, [r0, #4]
	sub	ip, ip, #1
	add	r2, r2, lr
	cmp	lr, ip
	str	r2, [r0, #4]
	blt	.L4
	bl	mgmtAddVgroupIntoDbTail
	b	.L2
.L4:
	bl	mgmtAddVgroupIntoDb
	b	.L2
.L1:
	ldr	r3, .L16
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L15
	add	sp, sp, #8
	@ sp needed
	pop	{r4, r5, r6, pc}
.L15:
	bl	__stack_chk_fail
.L17:
	.align	2
.L16:
	.word	.LC0
	.word	vgSdb
	.size	mgmtSetVgroupIdPool, .-mgmtSetVgroupIdPool
	.comm	vgSdb,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
