// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/deps/jemalloc/src/arena.c
// Function: je_arena_malloc_small
void *
arena_malloc_small(arena_t *arena, size_t size, bool zero)
{
	void *ret;
	arena_bin_t *bin;
	arena_run_t *run;
	szind_t binind;

	binind = size2index(size);
	assert(binind < NBINS);
	bin = &arena->bins[binind];
	size = index2size(binind);

	malloc_mutex_lock(&bin->lock);
	if ((run = bin->runcur) != NULL && run->nfree > 0)
		ret = arena_run_reg_alloc(run, &arena_bin_info[binind]);
	else
		ret = arena_bin_malloc_hard(arena, bin);

	if (ret == NULL) {
		malloc_mutex_unlock(&bin->lock);
		return (NULL);
	}

	if (config_stats) {
		bin->stats.nmalloc++;
		bin->stats.nrequests++;
		bin->stats.curregs++;
	}
	malloc_mutex_unlock(&bin->lock);
	if (config_prof && !isthreaded && arena_prof_accum(arena, size))
		prof_idump();

	if (!zero) {
		if (config_fill) {
			if (unlikely(opt_junk_alloc)) {
				arena_alloc_junk_small(ret,
				    &arena_bin_info[binind], false);
			} else if (unlikely(opt_zero))
				memset(ret, 0, size);
		}
		JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
	} else {
		if (config_fill && unlikely(opt_junk_alloc)) {
			arena_alloc_junk_small(ret, &arena_bin_info[binind],
			    true);
		}
		JEMALLOC_VALGRIND_MAKE_MEM_UNDEFINED(ret, size);
		memset(ret, 0, size);
	}

	return (ret);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movb %dl, %al
movq %rdi, -0x40(%rbp)
movq %rsi, -0x48(%rbp)
andb $0x1, %al
movb %al, -0x49(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x1000, -0x30(%rbp)    # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x3d8f0
jmp 0x3d91c
movq -0x30(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x51375(%rip), %rax     # 0x8ec80
movzbl (%rax,%rcx), %eax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl %eax, -0x28(%rbp)
jmp 0x3d928
movq -0x30(%rbp), %rdi
callq 0x4ca20
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x6c(%rbp)
jmp 0x3d930
movq -0x40(%rbp), %rax
addq $0x450, %rax            # imm = 0x450
movl -0x6c(%rbp), %ecx
imulq $0xe0, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0x50b9d(%rip), %rax     # 0x8e500
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x60(%rbp), %rdi
callq 0x3c3a0
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
je 0x3d9b8
movq -0x68(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jbe 0x3d9b8
movq -0x68(%rbp), %rdi
movl -0x6c(%rbp), %eax
leaq 0x63d7a(%rip), %rsi     # 0xa1720
imulq $0x60, %rax, %rax
addq %rax, %rsi
callq 0x3d3b0
movq %rax, -0x58(%rbp)
jmp 0x3d9c9
movq -0x40(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x3d4c0
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
jne 0x3d9e6
movq -0x60(%rbp), %rdi
callq 0x3c3c0
movq $0x0, -0x38(%rbp)
jmp 0x3db46
movq -0x60(%rbp), %rax
movq 0x98(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x98(%rax)
movq -0x60(%rbp), %rax
movq 0xa8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xa8(%rax)
movq -0x60(%rbp), %rax
movq 0xb0(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xb0(%rax)
movq -0x60(%rbp), %rdi
callq 0x3c3c0
testb $0x1, -0x49(%rbp)
jne 0x3dacb
leaq 0x63c5f(%rip), %rax     # 0xa16a1
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3da73
movq -0x58(%rbp), %rdi
movl -0x6c(%rbp), %eax
leaq 0x63cbd(%rip), %rsi     # 0xa1720
imulq $0x60, %rax, %rax
addq %rax, %rsi
xorl %edx, %edx
callq 0x3d600
jmp 0x3da9e
leaq 0x63c39(%rip), %rax     # 0xa16b3
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3da9c
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rdx
xorl %esi, %esi
callq 0x10250
jmp 0x3da9e
jmp 0x3daa0
leaq 0x63c5d(%rip), %rax     # 0xa1704
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3dac7
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x7faa0
jmp 0x3dac9
jmp 0x3db3e
leaq 0x63bcf(%rip), %rax     # 0xa16a1
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3db04
movq -0x58(%rbp), %rdi
movl -0x6c(%rbp), %eax
leaq 0x63c2d(%rip), %rsi     # 0xa1720
imulq $0x60, %rax, %rax
addq %rax, %rsi
movl $0x1, %edx
callq 0x3d600
jmp 0x3db06
leaq 0x63bf7(%rip), %rax     # 0xa1704
movb (%rax), %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x3db2d
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x7faa0
jmp 0x3db2f
movq -0x58(%rbp), %rdi
movq -0x48(%rbp), %rdx
xorl %esi, %esi
callq 0x10250
movq -0x58(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq