// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/deps/jemalloc/src/arena.c
// Function: arena_dalloc_bin_locked_impl
static void
arena_dalloc_bin_locked_impl(arena_t *arena, arena_chunk_t *chunk, void *ptr,
    arena_chunk_map_bits_t *bitselm, bool junked)
{
	size_t pageind, rpages_ind;
	arena_run_t *run;
	arena_bin_t *bin;
	arena_bin_info_t *bin_info;
	szind_t binind;

	pageind = ((uintptr_t)ptr - (uintptr_t)chunk) >> LG_PAGE;
	rpages_ind = pageind - arena_mapbits_small_runind_get(chunk, pageind);
	run = &arena_miscelm_get(chunk, rpages_ind)->run;
	binind = run->binind;
	bin = &arena->bins[binind];
	bin_info = &arena_bin_info[binind];

	if (!junked && config_fill && unlikely(opt_junk_free))
		arena_dalloc_junk_small(ptr, bin_info);

	arena_run_reg_dalloc(run, ptr);
	if (run->nfree == bin_info->nregs) {
		arena_dissociate_bin_run(chunk, run, bin);
		arena_dalloc_bin_run(arena, chunk, run, bin);
	} else if (run->nfree == 1 && run != bin->runcur)
		arena_bin_lower_run(arena, chunk, run, bin);

	if (config_stats) {
		bin->stats.ndalloc++;
		bin->stats.curregs--;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r13
movq %rdi, 0x10(%rsp)
subq %rsi, %rdx
shrq $0xc, %rdx
movq 0x3332f(%rip), %rdi     # 0x57558
movq %rdx, %rax
subq %rdi, %rax
movq 0x68(%rsi,%rax,8), %rax
shrq $0xd, %rax
subq %rax, %rdx
movq 0x3331e(%rip), %rax     # 0x57560
movq %rsi, 0x8(%rsp)
addq %rax, %rsi
imulq $0x60, %rdx, %r14
addq %rsi, %r14
movq %rdi, %rdx
negq %rdx
imulq $0x60, %rdx, %rbx
leaq (%rbx,%r14), %r15
addq $0x10, %r15
movl (%r15), %ebp
imulq $0x60, %rbp, %r12
leaq 0x3242f(%rip), %r10     # 0x566a0
addq %r10, %r12
testl %ecx, %ecx
jne 0x24288
leaq 0x323a3(%rip), %rcx     # 0x56622
cmpb $0x1, (%rcx)
je 0x24438
addq %rbx, %r14
leaq 0x3341e(%rip), %rcx     # 0x576b0
movq (%rcx), %rcx
notq %rcx
leaq -0x10(%r15), %r8
andq %rcx, %r8
andq %r15, %rcx
movq %r13, %rdx
subq %rcx, %rdx
shrq $0xc, %rdx
subq %rdi, %rdx
movl 0x68(%rcx,%rdx,8), %ecx
shrl $0x5, %ecx
movzbl %cl, %ecx
imulq $0x60, %rcx, %rsi
addq %r8, %rax
negq %rax
addq %r15, %rax
addq $-0x10, %rax
xorl %ecx, %ecx
pushq $0x60
popq %r9
xorl %edx, %edx
divq %r9
addl %eax, %edi
addl 0x58(%rsi,%r10), %r8d
shll $0xc, %edi
addl %r8d, %edi
subl %edi, %r13d
movq 0x10(%rsi,%r10), %rdi
bsfl %edi, %eax
cmpl $0x1, %edi
sbbl %ecx, %ecx
orb %al, %cl
shrl %cl, %r13d
shrq %cl, %rdi
cmpq $0x1, %rdi
je 0x2431b
cmpq $0x1f, %rdi
ja 0x2445d
leaq 0x1ec5f(%rip), %rax     # 0x42f70
imull -0xc(%rax,%rdi,4), %r13d
shrl $0x17, %r13d
imulq $0xe0, %rbp, %rax
movl %r13d, %ecx
shrl $0x6, %ecx
movq 0x18(%r14,%rcx,8), %rdx
movq %rdx, %rdi
btcq %r13, %rdi
movq %rdi, 0x18(%r14,%rcx,8)
testq %rdx, %rdx
jne 0x24385
leaq 0x3235b(%rip), %rdx     # 0x566a0
addq %rdx, %rsi
leaq 0x18(%r14), %rdx
movl 0x30(%rsi), %edi
pushq $0x8
popq %r8
leaq -0x7(%r8), %r9
cmpq %rdi, %r9
jae 0x24385
movq %rcx, %r9
shrq $0x6, %r9
movq (%rsi,%r8,8), %r10
leaq (%rdx,%r10,8), %r10
movq (%r10,%r9,8), %r11
movq %r11, %rbx
btcq %rcx, %rbx
incq %r8
movq %rbx, (%r10,%r9,8)
movq %r9, %rcx
testq %r11, %r11
je 0x24353
movq 0x10(%rsp), %rbp
leaq (%rax,%rbp), %r13
addq $0x450, %r13            # imm = 0x450
movl 0x14(%r14), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x14(%r14)
cmpl 0x20(%r12), %ecx
jne 0x243e9
cmpq %r15, 0x28(%r13)
je 0x24400
movq %r13, %rax
movq 0x8(%rsp), %rbx
subq (%rbx), %rax
addq $-0x450, %rax           # imm = 0xFBB0
movl $0xe0, %ecx
cqto
idivq %rcx
movl %eax, %eax
imulq $0x60, %rax, %rax
leaq 0x322cb(%rip), %rcx     # 0x566a0
cmpl $0x1, 0x20(%rax,%rcx)
je 0x2440a
movq %r13, %rdi
movq %r15, %rsi
callq 0x27bc1
jmp 0x2440a
testl %eax, %eax
jne 0x2441b
cmpq 0x28(%r13), %r15
je 0x2441b
movq %r15, %rdi
movq %r13, %rsi
callq 0x27b21
jmp 0x2441b
andq $0x0, 0x28(%r13)
movq 0x8(%rsp), %rbx
movq %rbp, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x27ac8
incq 0xa0(%r13)
decq 0xb0(%r13)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movq %r12, %rsi
callq 0x233ee
leaq 0x32256(%rip), %r10     # 0x566a0
movq 0x33107(%rip), %rdi     # 0x57558
movq 0x33108(%rip), %rax     # 0x57560
jmp 0x24288
movl %r13d, %eax
xorl %edx, %edx
divq %rdi
movq %rax, %r13
jmp 0x2431b