// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl 0x42b04(%rip), %eax     # 0x84748
movq %rsp, %r15
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
subq %rcx, %r15
movq %r15, %rsp
movq 0x42af0(%rip), %rcx     # 0x84750
imulq $0xaf0, %rax, %rax      # imm = 0xAF0
leaq (%rcx,%rax), %r14
addq $0x18, %r14
movl $0x0, -0x14(%r14)
leaq 0x2d3b2(%rip), %rax     # 0x6f030
movq 0x18(%rax), %rax
movq %rax, -0x10(%r14)
movq $-0x1, -0x8(%r14)
movl $0xac8, %edx            # imm = 0xAC8
movq %r14, %rdi
xorl %esi, %esi
callq 0x12380
movq 0xac8(%r14), %rdi
leaq 0x42895(%rip), %rax     # 0x84540
movl (%rax), %edx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x12380
movq 0xad0(%r14), %rdi
leaq 0x4287e(%rip), %rax     # 0x84544
movl (%rax), %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdx
xorl %esi, %esi
callq 0x12380
movq 0x2c30a(%rip), %rax     # 0x6dfe8
movq %fs:0x0, %r14
addq %rax, %r14
movl %fs:(%rax), %ecx
testl %ecx, %ecx
je 0x42167
cmpl $0x2, %ecx
je 0x42170
cmpl $0x0, 0x42a43(%rip)     # 0x84748
jne 0x42157
cmpl $0x0, 0x42a36(%rip)     # 0x84748
je 0x41d4f
movl $0x4, %ebx
xorl %r14d, %r14d
cmpq $0x0, (%r15,%r14,8)
movl $0x0, %eax
je 0x41d30
movl %r14d, %edi
callq 0x34896
movq 0x42a19(%rip), %rcx     # 0x84750
movl %eax, (%rcx,%rbx)
incq %r14
movl 0x42a05(%rip), %eax     # 0x84748
addq $0xaf0, %rbx            # imm = 0xAF0
cmpq %rax, %r14
jb 0x41d1c
movl 0x429f3(%rip), %eax     # 0x84748
testl %eax, %eax
je 0x420a7
movl $0xd8, %r10d
xorl %r8d, %r8d
leaq 0x17313(%rip), %r12     # 0x59080
xorl %ebx, %ebx
movq %r15, -0x30(%rbp)
movq (%r15,%rbx,8), %rcx
movq 0x429d2(%rip), %r14     # 0x84750
imulq $0xaf0, %rbx, %r15      # imm = 0xAF0
testq %rcx, %rcx
setne (%r14,%r15)
je 0x42086
movq %r8, -0x60(%rbp)
addq %r14, %r15
movl %eax, %eax
imulq $0xaf0, %rax, %rax      # imm = 0xAF0
movq %rax, -0x40(%rbp)
leaq (%r14,%rax), %r13
leaq 0x2d27e(%rip), %rax     # 0x6f030
movq 0x18(%rax), %rax
leaq 0x8(%r15), %rdx
movq %rdx, -0x58(%rbp)
movq %rax, 0x8(%r15)
leaq 0x10(%r15), %rax
movq %rax, -0x50(%rbp)
movq $-0x1, 0x10(%r15)
leaq 0x18(%r15), %rdi
movq %rdi, -0x48(%rbp)
movl $0xac8, %edx            # imm = 0xAC8
movq %rcx, -0x38(%rbp)
xorl %esi, %esi
movq %r10, -0x68(%rbp)
callq 0x12380
movq 0xae0(%r15), %rdi
leaq 0x42744(%rip), %rax     # 0x84540
movl (%rax), %edx
shlq $0x5, %rdx
xorl %esi, %esi
callq 0x12380
movq 0xae8(%r15), %rdi
leaq 0x4272d(%rip), %rax     # 0x84544
movl (%rax), %eax
shlq $0x3, %rax
leaq (%rax,%rax,2), %rdx
xorl %esi, %esi
callq 0x12380
movl 0x4(%r15), %eax
movq -0x40(%rbp), %rcx
addl %eax, 0x4(%r14,%rcx)
leaq 0x20(%r15), %r8
leaq 0x28(%r15), %r9
leaq 0xc0(%r15), %rax
movups 0xae0(%r15), %xmm0
subq $0x20, %rsp
movups %xmm0, 0x8(%rsp)
movq %rax, (%rsp)
movq -0x38(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdx
movq -0x48(%rbp), %rcx
callq 0x3ca34
movq -0x68(%rbp), %r10
addq $0x20, %rsp
movq 0xa0(%r15), %rax
movq 0xa8(%r15), %rcx
movq 0xb0(%r15), %rdx
movq 0xb8(%r15), %rsi
leaq (%r14,%r10), %rdi
xorl %r8d, %r8d
movq (%r12,%r8,8), %r9
imulq (%rdi), %r9
addq %r9, %rax
movq %rax, 0xa0(%r15)
addq -0x18(%rdi), %rcx
movq %rcx, 0xa8(%r15)
addq -0x10(%rdi), %rdx
movq %rdx, 0xb0(%r15)
addq -0x8(%rdi), %rsi
movq %rsi, 0xb8(%r15)
incq %r8
addq $0x48, %rdi
cmpq $0x24, %r8
jne 0x41e99
movq 0x18(%r15), %rdi
addq %rdi, 0x18(%r13)
movq 0x20(%r15), %rdi
addq %rdi, 0x20(%r13)
movq 0x28(%r15), %rdi
addq %rdi, 0x28(%r13)
movq 0x30(%r15), %rdi
addq %rdi, 0x30(%r13)
movq 0x38(%r15), %rdi
addq %rdi, 0x38(%r13)
movq 0x40(%r15), %rdi
addq %rdi, 0x40(%r13)
movq 0x48(%r15), %rdi
addq %rdi, 0x48(%r13)
movq 0x50(%r15), %rdi
addq %rdi, 0x50(%r13)
addq %rax, 0xa0(%r13)
addq %rcx, 0xa8(%r13)
addq %rdx, 0xb0(%r13)
addq %rsi, 0xb8(%r13)
movq 0x58(%r15), %rax
addq %rax, 0x58(%r13)
movq 0x60(%r15), %rax
addq %rax, 0x60(%r13)
movq 0x68(%r15), %rax
addq %rax, 0x68(%r13)
movq 0x70(%r15), %rax
addq %rax, 0x70(%r13)
movq 0x78(%r15), %rax
addq %rax, 0x78(%r13)
movq 0x80(%r15), %rax
addq %rax, 0x80(%r13)
movq 0x88(%r15), %rax
addq %rax, 0x88(%r13)
movq -0x60(%rbp), %r8
addq %r8, %r14
movl $0x100, %eax            # imm = 0x100
movq -0x40(%r14,%rax), %rcx
addq %rcx, -0x40(%r13,%rax)
movq -0x38(%r14,%rax), %rcx
addq %rcx, -0x38(%r13,%rax)
movq -0x30(%r14,%rax), %rcx
addq %rcx, -0x30(%r13,%rax)
movq -0x28(%r14,%rax), %rcx
addq %rcx, -0x28(%r13,%rax)
movq -0x20(%r14,%rax), %rcx
addq %rcx, -0x20(%r13,%rax)
movq -0x18(%r14,%rax), %rcx
addq %rcx, -0x18(%r13,%rax)
movq -0x10(%r14,%rax), %rcx
addq %rcx, -0x10(%r13,%rax)
movq -0x8(%r14,%rax), %rcx
addq %rcx, -0x8(%r13,%rax)
movq (%r14,%rax), %rcx
addq %rcx, (%r13,%rax)
addq $0x48, %rax
cmpq $0xb20, %rax            # imm = 0xB20
jne 0x41f85
leaq 0x4254f(%rip), %rax     # 0x84540
movl (%rax), %eax
testq %rax, %rax
je 0x4203b
movq 0xae0(%r15), %rcx
movq 0xae0(%r13), %rdx
shlq $0x5, %rax
xorl %esi, %esi
movq (%rcx,%rsi), %rdi
addq %rdi, (%rdx,%rsi)
movq 0x8(%rcx,%rsi), %rdi
addq %rdi, 0x8(%rdx,%rsi)
movq 0x10(%rcx,%rsi), %rdi
addq %rdi, 0x10(%rdx,%rsi)
movq 0x18(%rcx,%rsi), %rdi
addq %rdi, 0x18(%rdx,%rsi)
addq $0x20, %rsi
cmpq %rsi, %rax
jne 0x4200c
leaq 0x42502(%rip), %rax     # 0x84544
movl (%rax), %edx
testq %rdx, %rdx
je 0x42086
movq 0xae8(%r15), %rax
movq 0xae8(%r13), %rcx
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
movq (%rax,%rsi), %rdi
addq %rdi, (%rcx,%rsi)
movq 0x8(%rax,%rsi), %rdi
addq %rdi, 0x8(%rcx,%rsi)
movq 0x10(%rax,%rsi), %rdi
addq %rdi, 0x10(%rcx,%rsi)
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0x42061
incq %rbx
movl 0x426b9(%rip), %eax     # 0x84748
movl $0xaf0, %ecx            # imm = 0xAF0
addq %rcx, %r10
addq %rcx, %r8
cmpq %rax, %rbx
movq -0x30(%rbp), %r15
jb 0x41d73
leaq -0x80(%rbp), %r15
leaq -0x78(%rbp), %r14
leaq -0x70(%rbp), %rbx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x40065
movq 0x42688(%rip), %rax     # 0x84750
movl 0x4267a(%rip), %ecx     # 0x84748
imulq $0xaf0, %rcx, %rcx      # imm = 0xAF0
movq 0x58(%rax,%rcx), %rdx
addq 0xa0(%rax,%rcx), %rdx
addq 0x78(%rax,%rcx), %rdx
movq %rdx, 0x42632(%rip)     # 0x84720
movq 0x18(%rax,%rcx), %rdx
shlq $0xc, %rdx
movq %rdx, 0x4262a(%rip)     # 0x84728
movq 0x48(%rax,%rcx), %rdx
addq (%r15), %rdx
addq 0x50(%rax,%rcx), %rdx
movq %rdx, 0x4261e(%rip)     # 0x84730
movq 0x20(%rax,%rcx), %rdx
movq 0x48(%rax,%rcx), %rsi
addq (%r14), %rsi
addq 0x18(%rax,%rcx), %rdx
shlq $0xc, %rdx
addq %rsi, %rdx
movq %rdx, 0x42606(%rip)     # 0x84738
movq 0x28(%rax,%rcx), %rax
addq (%rbx), %rax
movq %rax, 0x425ff(%rip)     # 0x84740
incq 0x42610(%rip)           # 0x84758
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movq %r15, %rsi
callq 0x14be5
jmp 0x41d0b
movl $0x1, %fs:(%rax)
jmp 0x42177
movl $0x3, %fs:(%rax)
leaq 0x42c86(%rip), %rax     # 0x84e04
movl (%rax), %edi
movq %r14, %rsi
callq 0x12990
testl %eax, %eax
je 0x41cfe
leaq 0x17a1d(%rip), %rdi     # 0x59bb4
callq 0x4f37c
leaq 0x4158d(%rip), %rax     # 0x83730
cmpb $0x1, (%rax)
jne 0x41cfe
callq 0x120c0