// File: /workspace/github_c_makefile_star2_O0/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
subq $0x50, %rsp
movl %edi, -0x1c(%rbp)
movl 0x4ace7(%rip), %eax     # 0xa27d8
movq %rsp, %rcx
movq %rcx, -0x38(%rbp)
leaq 0xf(,%rax,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x50(%rbp)
movq %rcx, %rsp
movq %rax, -0x40(%rbp)
movq 0x474cc(%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 0x57b3f
jmp 0x57c4e
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x57bc5
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x47487(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rdi
addq %rax, %rdi
movq -0x10(%rbp), %rsi
movl $0x50, %edx
callq 0x103b0
leaq 0x4b392(%rip), %rax     # 0xa2f14
movl (%rax), %edi
movq 0x4745d(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rsi
addq %rax, %rsi
callq 0x106d0
cmpl $0x0, %eax
je 0x57bc0
leaq 0x37491(%rip), %rdi     # 0x8f039
callq 0x7c0e0
leaq 0x49aec(%rip), %rax     # 0xa16a0
testb $0x1, (%rax)
je 0x57bbe
callq 0x10070
jmp 0x57bc0
jmp 0x57c4c
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x57c48
movq -0x18(%rbp), %rax
movl $0x3, (%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq 0x47401(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rdi
addq %rax, %rdi
movq -0x8(%rbp), %rsi
movl $0x50, %edx
callq 0x103b0
leaq 0x4b30c(%rip), %rax     # 0xa2f14
movl (%rax), %edi
movq 0x473d7(%rip), %rax     # 0x9efe8
movq %fs:0x0, %rsi
addq %rax, %rsi
callq 0x106d0
cmpl $0x0, %eax
je 0x57c46
leaq 0x3740b(%rip), %rdi     # 0x8f039
callq 0x7c0e0
leaq 0x49a66(%rip), %rax     # 0xa16a0
testb $0x1, (%rax)
je 0x57c44
callq 0x10070
jmp 0x57c46
jmp 0x57c4a
jmp 0x57c4a
jmp 0x57c4c
jmp 0x57c4e
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movb $0x0, -0x2d(%rbp)
movl -0x2c(%rbp), %eax
cmpl 0x4ab6e(%rip), %eax     # 0xa27d8
jae 0x57ccc
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x537c0
movq %rax, %rdx
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movl -0x2c(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
jne 0x57cbf
testb $0x1, -0x2d(%rbp)
jne 0x57cbf
movq -0x28(%rbp), %rdi
movl -0x2c(%rbp), %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x537c0
movq %rax, %rdx
movq -0x50(%rbp), %rax
movl -0x2c(%rbp), %ecx
movq %rdx, (%rax,%rcx,8)
movb $0x1, -0x2d(%rbp)
jmp 0x57cc1
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x57c61
movl -0x1c(%rbp), %eax
cmpl 0x4ab03(%rip), %eax     # 0xa27d8
jne 0x57d16
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl 0x4aaf1(%rip), %eax     # 0xa27d8
jae 0x57d14
movq -0x50(%rbp), %rax
movl -0x44(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x57d07
movq -0x50(%rbp), %rax
movl -0x44(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x3d190
jmp 0x57d09
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x57cde
jmp 0x57d3c
jmp 0x57d18
jmp 0x57d1a
jmp 0x57d1c
movq -0x50(%rbp), %rax
movl -0x1c(%rbp), %ecx
cmpq $0x0, (%rax,%rcx,8)
je 0x57d3a
movq -0x50(%rbp), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rdi
callq 0x3d190
jmp 0x57d3c
movq -0x38(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax,%rax)