	.file	"extr_mgmtMeter.c_mgmtMeterActionBatchUpdate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	mgmtMeterActionBatchUpdate
	.type	mgmtMeterActionBatchUpdate, @function
mgmtMeterActionBatchUpdate:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	call	mgmtIsMetric@PLT
	test	rax, rax
	je	.L2
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR SDB_TYPE_INSERT[rip]
	je	.L20
	cmp	rax, QWORD PTR SDB_TYPE_DELETE[rip]
	je	.L21
.L4:
	mov	rax, QWORD PTR 16[rbx]
.L1:
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	mov	rdi, rbx
	call	mgmtMeterCreateFromMetric@PLT
	mov	r8, rax
	xor	eax, eax
	test	r8, r8
	je	.L1
	mov	rax, QWORD PTR 0[rbp]
	cmp	rax, QWORD PTR SDB_TYPE_INSERT[rip]
	je	.L22
	cmp	rax, QWORD PTR SDB_TYPE_DELETE[rip]
	je	.L23
.L11:
	mov	rax, QWORD PTR 24[rbx]
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	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
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	esi, DWORD PTR 8[rbp]
	mov	r12d, DWORD PTR 4[rbx]
	add	r12d, DWORD PTR [rbx]
	mov	rdi, QWORD PTR 32[rbx]
	add	esi, r12d
	sal	esi, 3
	call	realloc@PLT
	mov	edx, DWORD PTR 8[rbp]
	add	DWORD PTR 4[rbx], edx
	mov	QWORD PTR 32[rbx], rax
	mov	rsi, QWORD PTR 16[rbp]
	lea	ecx, [rdx+r12]
	movsx	r12, r12d
	sal	edx, 3
	sal	ecx, 3
	lea	rdi, [rax+r12*8]
	mov	DWORD PTR 8[rbx], ecx
	call	memcpy@PLT
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L22:
	mov	edx, DWORD PTR 8[rbp]
	mov	rax, QWORD PTR 16[rbp]
	test	edx, edx
	jle	.L15
	sub	edx, 1
	xor	ebp, ebp
	lea	rdx, 8[rax+rdx*8]
	.p2align 4,,10
	.p2align 3
.L10:
	add	ebp, DWORD PTR [rax]
	add	rax, 8
	cmp	rax, rdx
	jne	.L10
.L9:
	mov	esi, DWORD PTR 8[rbx]
	mov	rdi, QWORD PTR 32[rbx]
	add	esi, ebp
	call	realloc@PLT
	movsx	rdi, DWORD PTR 8[rbx]
	mov	edx, ebp
	xor	esi, esi
	mov	QWORD PTR 32[rbx], rax
	mov	QWORD PTR 40[rbx], rax
	add	rdi, rax
	call	memset@PLT
	add	DWORD PTR 8[rbx], ebp
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L21:
	mov	rax, QWORD PTR 16[rbp]
	xor	edi, edi
	mov	ebp, DWORD PTR [rax]
	test	ebp, ebp
	jle	.L5
	xor	edi, edi
	cmp	DWORD PTR 4[rbx], ebp
	setg	dil
.L5:
	call	assert@PLT
	mov	eax, DWORD PTR 4[rbx]
	sub	eax, 1
	cmp	eax, ebp
	jg	.L24
.L6:
	mov	ecx, DWORD PTR 8[rbx]
	mov	rdi, QWORD PTR 32[rbx]
	mov	DWORD PTR 4[rbx], eax
	lea	esi, -8[rcx]
	mov	DWORD PTR 8[rbx], esi
	call	realloc@PLT
	mov	QWORD PTR 32[rbx], rax
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L24:
	add	ebp, DWORD PTR [rbx]
	mov	esi, DWORD PTR 8[rbx]
	lea	eax, 1[rbp]
	mov	rcx, QWORD PTR 32[rbx]
	movsx	rbp, ebp
	lea	edx, 0[0+rax*8]
	cdqe
	sub	esi, edx
	lea	rdi, [rcx+rbp*8]
	mov	edx, esi
	lea	rsi, [rcx+rax*8]
	call	memmove@PLT
	mov	eax, DWORD PTR 4[rbx]
	sub	eax, 1
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L23:
	mov	rax, QWORD PTR 16[rbp]
	xor	edi, edi
	movsx	rbp, DWORD PTR 4[rax]
	mov	r12d, DWORD PTR 8[rax]
	lea	r13d, 0[rbp+r12]
	cmp	r13d, DWORD PTR 8[rbx]
	setle	dil
	call	assert@PLT
	mov	esi, DWORD PTR 8[rbx]
	cmp	r13d, esi
	je	.L12
	mov	rdi, QWORD PTR 32[rbx]
	mov	edx, esi
	movsx	rsi, r12d
	add	rsi, rbp
	sub	edx, r13d
	add	rsi, rdi
	add	rdi, rbp
	call	memmove@PLT
	mov	esi, DWORD PTR 8[rbx]
.L12:
	sub	esi, r12d
	mov	rdi, QWORD PTR 32[rbx]
	mov	DWORD PTR 8[rbx], esi
	call	realloc@PLT
	mov	QWORD PTR 32[rbx], rax
	jmp	.L11
	.p2align 4,,10
	.p2align 3
.L15:
	xor	ebp, ebp
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	mgmtMeterActionBatchUpdate, .-mgmtMeterActionBatchUpdate
	.comm	SDB_TYPE_INSERT,8,8
	.comm	SDB_TYPE_DELETE,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_mgmtMeter.c_mgmtMeterActionBatchUpdate.c"
	.text
	.align	2
	.global	mgmtMeterActionBatchUpdate
	.syntax unified
	.arm
	.fpu softvfp
	.type	mgmtMeterActionBatchUpdate, %function
mgmtMeterActionBatchUpdate:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r6, r1
	mov	r4, r0
	bl	mgmtIsMetric
	subs	r5, r0, #0
	beq	.L2
	ldr	r2, .L23
	ldr	r3, [r6]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L18
	ldr	r2, .L23+4
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L19
	ldr	r0, [r4, #12]
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	mov	r0, r4
	bl	mgmtMeterCreateFromMetric
	cmp	r0, #0
	popeq	{r4, r5, r6, r7, r8, pc}
	ldr	r2, .L23
	ldr	r3, [r6]
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L20
	ldr	r2, .L23+4
	ldr	r2, [r2]
	cmp	r3, r2
	beq	.L21
.L11:
	ldr	r0, [r4, #16]
	pop	{r4, r5, r6, r7, r8, pc}
.L18:
	ldr	r3, [r4, #4]
	ldr	r5, [r4]
	ldr	r1, [r6, #4]
	add	r5, r5, r3
	add	r1, r5, r1
	ldr	r0, [r4, #20]
	lsl	r1, r1, #2
	bl	realloc
	ldr	r2, [r6, #4]
	ldr	r3, [r4, #4]
	add	r1, r2, r5
	add	r3, r3, r2
	lsl	r1, r1, #2
	str	r0, [r4, #20]
	str	r1, [r4, #8]
	add	r0, r0, r5, lsl #2
	ldr	r1, [r6, #8]
	lsl	r2, r2, #2
	str	r3, [r4, #4]
	bl	memcpy
	ldr	r0, [r4, #12]
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	ldmib	r6, {r1, r3}
	cmp	r1, #0
	ble	.L9
	add	r1, r3, r1, lsl #2
.L10:
	ldr	r2, [r3], #4
	cmp	r3, r1
	add	r5, r5, r2
	bne	.L10
.L9:
	ldr	r1, [r4, #8]
	ldr	r0, [r4, #20]
	add	r1, r5, r1
	bl	realloc
	ldr	r3, [r4, #8]
	str	r0, [r4, #20]
	str	r0, [r4, #24]
	mov	r2, r5
	mov	r1, #0
	add	r0, r0, r3
	bl	memset
	ldr	r0, [r4, #8]
	add	r0, r0, r5
	str	r0, [r4, #8]
	b	.L11
.L19:
	ldr	r3, [r6, #8]
	ldr	r5, [r3]
	cmp	r5, #0
	movle	r0, #0
	ble	.L5
	ldr	r0, [r4, #4]
	cmp	r0, r5
	movle	r0, #0
	movgt	r0, #1
.L5:
	bl	assert
	ldr	r3, [r4, #4]
	sub	r3, r3, #1
	cmp	r3, r5
	bgt	.L22
.L6:
	ldr	r1, [r4, #8]
	ldr	r0, [r4, #20]
	sub	r1, r1, #4
	str	r3, [r4, #4]
	str	r1, [r4, #8]
	bl	realloc
	str	r0, [r4, #20]
	ldr	r0, [r4, #12]
	pop	{r4, r5, r6, r7, r8, pc}
.L22:
	ldr	r0, [r4]
	ldr	r2, [r4, #8]
	add	r5, r5, r0
	ldr	r0, [r4, #20]
	add	r1, r5, #1
	sub	r2, r2, r1, lsl #2
	add	r1, r0, r1, lsl #2
	add	r0, r0, r5, lsl #2
	bl	memmove
	ldr	r3, [r4, #4]
	sub	r3, r3, #1
	b	.L6
.L21:
	ldr	r3, [r6, #8]
	ldr	r0, [r4, #8]
	ldr	r7, [r3, #4]
	ldr	r6, [r3, #8]
	add	r5, r7, r6
	cmp	r5, r0
	movgt	r0, #0
	movle	r0, #1
	bl	assert
	ldr	r1, [r4, #8]
	cmp	r5, r1
	beq	.L12
	ldr	r0, [r4, #20]
	sub	r2, r1, r5
	add	r1, r0, r5
	add	r0, r0, r7
	bl	memmove
	ldr	r1, [r4, #8]
.L12:
	sub	r1, r1, r6
	ldr	r0, [r4, #20]
	str	r1, [r4, #8]
	bl	realloc
	str	r0, [r4, #20]
	b	.L11
.L24:
	.align	2
.L23:
	.word	SDB_TYPE_INSERT
	.word	SDB_TYPE_DELETE
	.size	mgmtMeterActionBatchUpdate, .-mgmtMeterActionBatchUpdate
	.comm	SDB_TYPE_INSERT,4,4
	.comm	SDB_TYPE_DELETE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
