// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/jemalloc/src/ctl.c
// Function: ctl_refresh
static void
ctl_refresh(void)
{
	tsd_t *tsd;
	unsigned i;
	bool refreshed;
	VARIABLE_ARRAY(arena_t *, tarenas, ctl_stats.narenas);

	/*
	 * Clear sum stats, since they will be merged into by
	 * ctl_arena_refresh().
	 */
	ctl_stats.arenas[ctl_stats.narenas].nthreads = 0;
	ctl_arena_clear(&ctl_stats.arenas[ctl_stats.narenas]);

	tsd = tsd_fetch();
	for (i = 0, refreshed = false; i < ctl_stats.narenas; i++) {
		tarenas[i] = arena_get(tsd, i, false, false);
		if (tarenas[i] == NULL && !refreshed) {
			tarenas[i] = arena_get(tsd, i, false, true);
			refreshed = true;
		}
	}

	for (i = 0; i < ctl_stats.narenas; i++) {
		if (tarenas[i] != NULL)
			ctl_stats.arenas[i].nthreads = arena_nbound(i);
		else
			ctl_stats.arenas[i].nthreads = 0;
	}

	for (i = 0; i < ctl_stats.narenas; i++) {
		bool initialized = (tarenas[i] != NULL);

		ctl_stats.arenas[i].initialized = initialized;
		if (initialized)
			ctl_arena_refresh(tarenas[i], i);
	}

	if (config_stats) {
		size_t base_allocated, base_resident, base_mapped;
		base_stats_get(&base_allocated, &base_resident, &base_mapped);
		ctl_stats.allocated =
		    ctl_stats.arenas[ctl_stats.narenas].allocated_small +
		    ctl_stats.arenas[ctl_stats.narenas].astats.allocated_large +
		    ctl_stats.arenas[ctl_stats.narenas].astats.allocated_huge;
		ctl_stats.active =
		    (ctl_stats.arenas[ctl_stats.narenas].pactive << LG_PAGE);
		ctl_stats.metadata = base_allocated +
		    ctl_stats.arenas[ctl_stats.narenas].astats.metadata_mapped +
		    ctl_stats.arenas[ctl_stats.narenas].astats
		    .metadata_allocated;
		ctl_stats.resident = base_resident +
		    ctl_stats.arenas[ctl_stats.narenas].astats.metadata_mapped +
		    ((ctl_stats.arenas[ctl_stats.narenas].pactive +
		    ctl_stats.arenas[ctl_stats.narenas].pdirty) << LG_PAGE);
		ctl_stats.mapped = base_mapped +
		    ctl_stats.arenas[ctl_stats.narenas].astats.mapped;
	}

	ctl_epoch++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x4f58a(%rip), %eax     # 0xa27d8
movq %rsp, %rcx
movq %rcx, -0x30(%rbp)
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x60(%rbp)
movq %rcx, %rsp
movq %rax, -0x38(%rbp)
movq 0x4f567(%rip), %rax     # 0xa27e0
movl 0x4f559(%rip), %ecx     # 0xa27d8
imulq $0xbc8, %rcx, %rcx      # imm = 0xBC8
addq %rcx, %rax
movl $0x0, 0x4(%rax)
movq 0x4f549(%rip), %rdi     # 0xa27e0
movl 0x4f53b(%rip), %eax     # 0xa27d8
imulq $0xbc8, %rax, %rax      # imm = 0xBC8
addq %rax, %rdi
callq 0x536d0
movq 0x4bd35(%rip), %rcx     # 0x9efe8
movq %fs:0x0, %rax
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
setne %al
testb $0x1, %al
jne 0x532d6
jmp 0x533e5
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x5335c
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x4bcf0(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rdi
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movl $0x50, %edx
callq 0x103b0
leaq 0x4fbfb(%rip), %rax     # 0xa2f14
movl (%rax), %edi
movq 0x4bcc6(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rsi
addq %rax, %rsi
callq 0x106d0
cmpl $0x0, %eax
je 0x53357
leaq 0x3bcfa(%rip), %rdi     # 0x8f039
callq 0x7c0e0
leaq 0x4e355(%rip), %rax     # 0xa16a0
testb $0x1, (%rax)
je 0x53355
callq 0x10070
jmp 0x53357
jmp 0x533e3
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x533df
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq 0x4bc6a(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rdi
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movl $0x50, %edx
callq 0x103b0
leaq 0x4fb75(%rip), %rax     # 0xa2f14
movl (%rax), %edi
movq 0x4bc40(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rsi
addq %rax, %rsi
callq 0x106d0
cmpl $0x0, %eax
je 0x533dd
leaq 0x3bc74(%rip), %rdi     # 0x8f039
callq 0x7c0e0
leaq 0x4e2cf(%rip), %rax     # 0xa16a0
testb $0x1, (%rax)
je 0x533db
callq 0x10070
jmp 0x533dd
jmp 0x533e1
jmp 0x533e1
jmp 0x533e3
jmp 0x533e5
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movb $0x0, -0x25(%rbp)
movl -0x24(%rbp), %eax
cmpl 0x4f3d7(%rip), %eax     # 0xa27d8
jae 0x53463
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x537c0
movq %rax, %rdx
movq -0x60(%rbp), %rax
movl -0x24(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x24(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
jne 0x53456
testb $0x1, -0x25(%rbp)
jne 0x53456
movq -0x20(%rbp), %rdi
movl -0x24(%rbp), %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x537c0
movq %rax, %rdx
movq -0x60(%rbp), %rax
movl -0x24(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movb $0x1, -0x25(%rbp)
jmp 0x53458
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x533f8
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl 0x4f365(%rip), %eax     # 0xa27d8
jae 0x534ce
movq -0x60(%rbp), %rax
movl -0x24(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x534a6
movl -0x24(%rbp), %edi
callq 0x26060
movl %eax, %ecx
movq 0x4f34c(%rip), %rax     # 0xa27e0
movl -0x24(%rbp), %edx
imulq $0xbc8, %rdx, %rdx      # imm = 0xBC8
addq %rdx, %rax
movl %ecx, 0x4(%rax)
jmp 0x534c1
movq 0x4f333(%rip), %rax     # 0xa27e0
movl -0x24(%rbp), %ecx
imulq $0xbc8, %rcx, %rcx      # imm = 0xBC8
addq %rcx, %rax
movl $0x0, 0x4(%rax)
jmp 0x534c3
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x5346a
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl 0x4f2fa(%rip), %eax     # 0xa27d8
jae 0x53536
movq -0x60(%rbp), %rax
movl -0x24(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
setne %al
andb $0x1, %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %cl
movq 0x4f2e2(%rip), %rax     # 0xa27e0
movl -0x24(%rbp), %edx
imulq $0xbc8, %rdx, %rdx      # imm = 0xBC8
addq %rdx, %rax
andb $0x1, %cl
movb %cl, (%rax)
testb $0x1, -0x39(%rbp)
je 0x53529
movq -0x60(%rbp), %rax
movl -0x24(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
movl -0x24(%rbp), %esi
callq 0x538f0
jmp 0x5352b
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x534d5
leaq -0x48(%rbp), %rdi
leaq -0x50(%rbp), %rsi
leaq -0x58(%rbp), %rdx
callq 0x4f940
movq 0x4f292(%rip), %rax     # 0xa27e0
movl 0x4f284(%rip), %ecx     # 0xa27d8
imulq $0xbc8, %rcx, %rcx      # imm = 0xBC8
addq %rcx, %rax
movq 0xa0(%rax), %rax
movq 0x4f274(%rip), %rcx     # 0xa27e0
movl 0x4f266(%rip), %edx     # 0xa27d8
imulq $0xbc8, %rdx, %rdx      # imm = 0xBC8
addq %rdx, %rcx
addq 0x58(%rcx), %rax
movq 0x4f259(%rip), %rcx     # 0xa27e0
movl 0x4f24b(%rip), %edx     # 0xa27d8
imulq $0xbc8, %rdx, %rdx      # imm = 0xBC8
addq %rdx, %rcx
addq 0x78(%rcx), %rax
movq %rax, 0x4f20e(%rip)     # 0xa27b0
movq 0x4f237(%rip), %rax     # 0xa27e0
movl 0x4f229(%rip), %ecx     # 0xa27d8
imulq $0xbc8, %rcx, %rcx      # imm = 0xBC8
addq %rcx, %rax
movq 0x18(%rax), %rax
shlq $0xc, %rax
movq %rax, 0x4f1f0(%rip)     # 0xa27b8
movq -0x48(%rbp), %rax
movq 0x4f20d(%rip), %rcx     # 0xa27e0
movl 0x4f1ff(%rip), %edx     # 0xa27d8
imulq $0xbc8, %rdx, %rdx      # imm = 0xBC8
addq %rdx, %rcx
addq 0x48(%rcx), %rax
movq 0x4f1f2(%rip), %rcx     # 0xa27e0
movl 0x4f1e4(%rip), %edx     # 0xa27d8
imulq $0xbc8, %rdx, %rdx      # imm = 0xBC8
addq %rdx, %rcx
addq 0x50(%rcx), %rax
movq %rax, 0x4f1b7(%rip)     # 0xa27c0
movq -0x50(%rbp), %rax
movq 0x4f1cc(%rip), %rcx     # 0xa27e0
movl 0x4f1be(%rip), %edx     # 0xa27d8
imulq $0xbc8, %rdx, %rdx      # imm = 0xBC8
addq %rdx, %rcx
addq 0x48(%rcx), %rax
movq 0x4f1b1(%rip), %rcx     # 0xa27e0
movl 0x4f1a3(%rip), %edx     # 0xa27d8
imulq $0xbc8, %rdx, %rdx      # imm = 0xBC8
addq %rdx, %rcx
movq 0x18(%rcx), %rcx
movq 0x4f196(%rip), %rdx     # 0xa27e0
movl 0x4f188(%rip), %esi     # 0xa27d8
imulq $0xbc8, %rsi, %rsi      # imm = 0xBC8
addq %rsi, %rdx
addq 0x20(%rdx), %rcx
shlq $0xc, %rcx
addq %rcx, %rax
movq %rax, 0x4f15c(%rip)     # 0xa27c8
movq -0x58(%rbp), %rax
movq 0x4f169(%rip), %rcx     # 0xa27e0
movl 0x4f15b(%rip), %edx     # 0xa27d8
imulq $0xbc8, %rdx, %rdx      # imm = 0xBC8
addq %rdx, %rcx
addq 0x28(%rcx), %rax
movq %rax, 0x4f13e(%rip)     # 0xa27d0
movq 0x4f14f(%rip), %rax     # 0xa27e8
addq $0x1, %rax
movq %rax, 0x4f144(%rip)     # 0xa27e8
movq -0x30(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq