// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/jemalloc/src/ctl.c
// Function: arena_purge
static void
arena_purge(unsigned arena_ind)
{
	tsd_t *tsd;
	unsigned i;
	bool refreshed;
	VARIABLE_ARRAY(arena_t *, tarenas, 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;
		}
	}

	if (arena_ind == ctl_stats.narenas) {
		unsigned i;
		for (i = 0; i < ctl_stats.narenas; i++) {
			if (tarenas[i] != NULL)
				arena_purge_all(tarenas[i]);
		}
	} else {
		assert(arena_ind < ctl_stats.narenas);
		if (tarenas[arena_ind] != NULL)
			arena_purge_all(tarenas[arena_ind]);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edi, %edx
movl 0x29b47(%rip), %eax     # 0x5b758
movq %rsp, %r12
leaq 0xf(,%rax,8), %rcx
andq $-0x10, %rcx
subq %rcx, %r12
movq %r12, %rsp
movq 0x263c3(%rip), %r13     # 0x57ff0
movq %fs:0x0, %rsi
addq %r13, %rsi
movl %fs:(%r13), %ecx
testl %ecx, %ecx
je 0x31d83
cmpl $0x2, %ecx
je 0x31d90
testl %eax, %eax
je 0x31d2a
xorl %r15d, %r15d
movq %r12, -0x38(%rbp)
xorl %ebx, %ebx
movq %fs:0x30(%r13), %rax
testq %rax, %rax
je 0x31cd8
movl %fs:0x38(%r13), %ecx
cmpq %rcx, %r15
jae 0x31c9e
movq (%rax,%r15,8), %rax
testq %rax, %rax
je 0x31c9e
movq %rax, (%r12)
movl %ebx, %r14d
incq %r15
movl 0x29acb(%rip), %eax     # 0x5b758
addq $0x8, %r12
movl %r14d, %ebx
cmpq %rax, %r15
jb 0x31c60
jmp 0x31d24
movq -0x38(%rbp), %rax
leaq (%rax,%r15,8), %rdi
movq $0x0, (%r12)
movb $0x1, %r14b
testb $0x1, %bl
jne 0x31c84
movq %fs:0x30(%r13), %rax
testq %rax, %rax
je 0x31d01
movl %fs:0x38(%r13), %ecx
cmpq %rcx, %r15
jae 0x31d01
movq (%rax,%r15,8), %rax
testq %rax, %rax
je 0x31d01
movq %rax, (%rdi)
jmp 0x31c84
movq %rsi, %rdi
movq %rsi, -0x30(%rbp)
movl %r15d, %esi
movl %edx, %r14d
xorl %edx, %edx
callq 0x21fbc
movq -0x30(%rbp), %rsi
movl %r14d, %edx
movq %rax, (%r12)
movq %r12, %rdi
testq %rax, %rax
jne 0x31c81
jmp 0x31cae
movq %rdi, -0x40(%rbp)
movq %rsi, %rdi
movq %rsi, -0x30(%rbp)
movl %r15d, %esi
movl %edx, %ebx
xorl %edx, %edx
callq 0x21fbc
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl %ebx, %edx
jmp 0x31cd3
movq -0x38(%rbp), %r12
jmp 0x31d2c
xorl %eax, %eax
cmpl %edx, %eax
jne 0x31d56
testl %edx, %edx
je 0x31d74
xorl %ebx, %ebx
movq (%r12,%rbx,8), %rdi
testq %rdi, %rdi
je 0x31d4a
callq 0x27e63
movl 0x29a0e(%rip), %edx     # 0x5b758
incq %rbx
movl %edx, %eax
cmpq %rax, %rbx
jb 0x31d36
jmp 0x31d74
movl %edx, %eax
movq (%r12,%rax,8), %rdi
testq %rdi, %rdi
je 0x31d74
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x27e63
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %edx, %ebx
movl $0x1, %fs:(%r13)
jmp 0x31d9b
movl %edx, %ebx
movl $0x3, %fs:(%r13)
leaq 0x2a072(%rip), %rax     # 0x5be14
movl (%rax), %edi
movq %rsi, %r14
callq 0x106f0
testl %eax, %eax
je 0x31dc8
leaq 0x165c2(%rip), %rdi     # 0x48379
callq 0x3d37c
leaq 0x2885d(%rip), %rax     # 0x5a620
cmpb $0x1, (%rax)
je 0x31dd8
movl 0x2998a(%rip), %eax     # 0x5b758
movl %ebx, %edx
movq %r14, %rsi
jmp 0x31c4f
callq 0x10090