// File: /workspace/github_c_makefile_star2_O1/erikdubbelboer[P]discnt/deps/jemalloc/src/arena.c
// Function: arena_bin_malloc_hard
static void *
arena_bin_malloc_hard(arena_t *arena, arena_bin_t *bin)
{
	szind_t binind;
	arena_bin_info_t *bin_info;
	arena_run_t *run;

	binind = arena_bin_index(arena, bin);
	bin_info = &arena_bin_info[binind];
	bin->runcur = NULL;
	run = arena_bin_nonfull_run_get(arena, bin);
	if (bin->runcur != NULL && bin->runcur->nfree > 0) {
		/*
		 * Another thread updated runcur while this one ran without the
		 * bin lock in arena_bin_nonfull_run_get().
		 */
		void *ret;
		assert(bin->runcur->nfree > 0);
		ret = arena_run_reg_alloc(bin->runcur, bin_info);
		if (run != NULL) {
			arena_chunk_t *chunk;

			/*
			 * arena_run_alloc_small() may have allocated run, or
			 * it may have pulled run from the bin's run tree.
			 * Therefore it is unsafe to make any assumptions about
			 * how run has previously been used, and
			 * arena_bin_lower_run() must be called, as if a region
			 * were just deallocated from the run.
			 */
			chunk = (arena_chunk_t *)CHUNK_ADDR2BASE(run);
			if (run->nfree == bin_info->nregs)
				arena_dalloc_bin_run(arena, chunk, run, bin);
			else
				arena_bin_lower_run(arena, chunk, run, bin);
		}
		return (ret);
	}

	if (run == NULL)
		return (NULL);

	bin->runcur = run;

	assert(bin->runcur->nfree > 0);

	return (arena_run_reg_alloc(bin->runcur, bin_info));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rsi, %rax
movq %rdi, 0x8(%rsp)
subq %rdi, %rax
addq $-0x450, %rax           # imm = 0xFBB0
sarq $0x5, %rax
movabsq $0x6db6db6db6db6db7, %r12 # imm = 0x6DB6DB6DB6DB6DB7
imulq %rax, %r12
movl %r12d, %eax
leaq (%rax,%rax,2), %rbp
shlq $0x5, %rbp
leaq 0x48bc4(%rip), %r15     # 0x837b0
movq $0x0, 0x28(%rsi)
movq %rsi, %rdi
callq 0x3f0f8
movq %rax, %rbx
testq %rax, %rax
jne 0x3ad06
movl %r12d, %eax
leaq (%rax,%rax,2), %r13
shlq $0x5, %r13
movq %r14, %rdi
callq 0x125c0
movq 0x8(%rsp), %rbx
leaq 0x8(%rbx), %rdi
movq %rdi, (%rsp)
callq 0x12960
movq 0x18(%r13,%r15), %r15
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x3f5e5
movq %rax, %rbx
testq %rax, %rax
jne 0x3ac99
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x3d9df
testq %rax, %rax
je 0x3ac88
movq 0x498ef(%rip), %rcx     # 0x84550
leaq (%rcx,%rax), %rsi
addq $0x10, %rsi
movq %rsi, 0x10(%rsp)
movq %rbx, %rdi
movq %r15, %rdx
movl %r12d, %ecx
callq 0x3f62c
xorl %ebx, %ebx
testb %al, %al
cmoveq 0x10(%rsp), %rbx
jmp 0x3ac99
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x3f5e5
movq %rax, %rbx
testq %rbx, %rbx
je 0x3ace3
leaq 0x48b0b(%rip), %r15     # 0x837b0
addq %r15, %r13
movl %r12d, (%rbx)
movl 0x20(%r13), %eax
movl %eax, 0x4(%rbx)
leaq 0x8(%rbx), %rdi
addq $0x28, %r13
movq %r13, %rsi
callq 0x401a1
movq (%rsp), %rdi
callq 0x125c0
movq %r14, %rdi
callq 0x12960
incq 0xc8(%r14)
incq 0xd8(%r14)
jmp 0x3ad06
movq (%rsp), %rdi
callq 0x125c0
movq %r14, %rdi
callq 0x12960
movq %r14, %rdi
callq 0x3f0f8
movq %rax, %rbx
leaq 0x48aaa(%rip), %r15     # 0x837b0
leaq (%r15,%rbp), %r8
movq 0x28(%r14), %r9
testq %r9, %r9
je 0x3ae73
movl 0x4(%r9), %eax
testl %eax, %eax
je 0x3ae73
movl %eax, (%rsp)
leaq 0x8(%r9), %rax
movl 0x30(%r8), %edx
leal -0x1(%rdx), %ecx
movq 0x38(%r8,%rcx,8), %rsi
movq 0x8(%r9,%rsi,8), %rsi
bsfq %rsi, %rdi
movq $-0x1, %rsi
cmoveq %rsi, %rdi
movq %r15, %r10
testl %ecx, %ecx
je 0x3ad72
movq 0x30(%r8,%rcx,8), %r11
leaq (%rax,%r11,8), %r11
movq (%r11,%rdi,8), %r11
shlq $0x6, %rdi
bsfq %r11, %r11
cmoveq %rsi, %r11
addq %r11, %rdi
decq %rcx
jne 0x3ad51
movq %rdi, %rsi
shrq $0x6, %rsi
movq (%rax,%rsi,8), %r11
movl $0x1, %r15d
movl %edi, %ecx
shlq %cl, %r15
movq %r11, %rcx
btcq %rdi, %rcx
movq %rcx, (%rax,%rsi,8)
cmpl $0x2, %edx
jb 0x3ade3
cmpq %r15, %r11
jne 0x3ade3
addq $-0x2, %rdx
leaq (%r10,%rbp), %r11
addq $0x40, %r11
xorl %r15d, %r15d
movq %rsi, %rcx
shrq $0x6, %rsi
movq (%r11,%r15,8), %r12
leaq (%rax,%r12,8), %r12
movq (%r12,%rsi,8), %r10
movl $0x1, %ebp
shlq %cl, %rbp
movq %r10, %r13
btcq %rcx, %r13
movq %r13, (%r12,%rsi,8)
cmpq %rbp, %r10
jne 0x3ade3
leaq 0x1(%r15), %rcx
cmpq %r15, %rdx
movq %rcx, %r15
jne 0x3adac
leaq -0x10(%r9), %rcx
leaq 0x498b2(%rip), %rax     # 0x846a0
movq (%rax), %rsi
notq %rsi
andq %rsi, %rcx
movq 0x49752(%rip), %rax     # 0x84550
addq %rcx, %rax
negq %rax
addq %r9, %rax
addq $-0x10, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq $0x6, %rdx
addq 0x49725(%rip), %rdx     # 0x84548
shlq $0xc, %rdx
movl 0x58(%r8), %eax
movl %edi, %r12d
imulq 0x10(%r8), %r12
addq %rax, %r12
addq %rcx, %r12
addq %rdx, %r12
movl (%rsp), %eax
decl %eax
movl %eax, 0x4(%r9)
testq %rbx, %rbx
je 0x3afa9
movl 0x4(%rbx), %eax
cmpl 0x20(%r8), %eax
jne 0x3af9e
andq %rbx, %rsi
movq 0x8(%rsp), %rdi
movq %rbx, %rdx
movq %r14, %rcx
callq 0x3f059
jmp 0x3afa9
testq %rbx, %rbx
je 0x3af99
movq %rbx, 0x28(%r14)
leaq 0x8(%rbx), %rax
movl 0x30(%r8), %edx
leal -0x1(%rdx), %ecx
movq 0x38(%r8,%rcx,8), %rsi
movq 0x8(%rbx,%rsi,8), %rsi
bsfq %rsi, %rsi
movq $-0x1, %rdi
cmoveq %rdi, %rsi
testl %ecx, %ecx
je 0x3aec9
movq 0x30(%r8,%rcx,8), %r9
leaq (%rax,%r9,8), %r9
movq (%r9,%rsi,8), %r9
shlq $0x6, %rsi
bsfq %r9, %r9
cmoveq %rdi, %r9
addq %r9, %rsi
decq %rcx
jne 0x3aea8
movq %rsi, %rdi
shrq $0x6, %rdi
movq (%rax,%rdi,8), %r9
movl $0x1, %r10d
movl %esi, %ecx
shlq %cl, %r10
movq %r9, %rcx
btcq %rsi, %rcx
movq %rcx, (%rax,%rdi,8)
cmpl $0x2, %edx
jb 0x3af3b
cmpq %r10, %r9
jne 0x3af3b
addq $-0x2, %rdx
leaq (%r15,%rbp), %r9
addq $0x40, %r9
xorl %r10d, %r10d
movq %rdi, %rcx
shrq $0x6, %rdi
movq (%r9,%r10,8), %r11
leaq (%rax,%r11,8), %r11
movq (%r11,%rdi,8), %r14
movl $0x1, %r15d
shlq %cl, %r15
movq %r14, %r12
btcq %rcx, %r12
movq %r12, (%r11,%rdi,8)
cmpq %r15, %r14
jne 0x3af3b
leaq 0x1(%r10), %rcx
cmpq %r10, %rdx
movq %rcx, %r10
jne 0x3af03
leaq -0x10(%rbx), %rax
leaq 0x4975a(%rip), %rcx     # 0x846a0
movq (%rcx), %rcx
notq %rcx
andq %rax, %rcx
movq 0x495fa(%rip), %rax     # 0x84550
addq %rcx, %rax
negq %rax
addq %rbx, %rax
addq $-0x10, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rdx
shrq $0x6, %rdx
addq 0x495cd(%rip), %rdx     # 0x84548
shlq $0xc, %rdx
movl 0x58(%r8), %eax
movl %esi, %r12d
imulq 0x10(%r8), %r12
addq %rax, %r12
addq %rcx, %r12
addq %rdx, %r12
decl 0x4(%rbx)
jmp 0x3afa9
xorl %r12d, %r12d
jmp 0x3afa9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3f0b2
movq %r12, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq