// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/tcache.c
// Function: je_tcache_create
tcache_t *
tcache_create(tsdn_t *tsdn, arena_t *arena)
{
	tcache_t *tcache;
	size_t size, stack_offset;
	unsigned i;

	size = offsetof(tcache_t, tbins) + (sizeof(tcache_bin_t) * nhbins);
	/* Naturally align the pointer stacks. */
	size = PTR_CEILING(size);
	stack_offset = size;
	size += stack_nelms * sizeof(void *);
	/* Avoid false cacheline sharing. */
	size = sa2u(size, CACHELINE);

	tcache = ipallocztm(tsdn, size, CACHELINE, true, NULL, true,
	    arena_get(TSDN_NULL, 0, true));
	if (tcache == NULL)
		return (NULL);

	tcache_arena_associate(tsdn, tcache, arena);

	ticker_init(&tcache->gc_ticker, TCACHE_GC_INCR);

	assert((TCACHE_NSLOTS_SMALL_MAX & 1U) == 0);
	for (i = 0; i < nhbins; i++) {
		tcache->tbins[i].lg_fill_div = 1;
		stack_offset += tcache_bin_info[i].ncached_max * sizeof(void *);
		/*
		 * avail points past the available space.  Allocations will
		 * access the slots toward higher addresses (for the benefit of
		 * prefetch).
		 */
		tcache->tbins[i].avail = (void **)((uintptr_t)tcache +
		    (uintptr_t)stack_offset);
	}

	return (tcache);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3a0, %rsp            # imm = 0x3A0
movq %rdi, -0x338(%rbp)
movq %rsi, -0x340(%rbp)
movl 0x24791(%rip), %eax     # 0xa44e0
shlq $0x5, %rax
addq $0x28, %rax
movq %rax, -0x350(%rbp)
movq -0x350(%rbp), %rax
addq $0x7, %rax
movabsq $0xfffffff8, %rcx       # imm = 0xFFFFFFF8
andq %rcx, %rax
movq %rax, -0x350(%rbp)
movq -0x350(%rbp), %rax
movq %rax, -0x358(%rbp)
movl 0x24753(%rip), %eax     # 0xa44e4
shlq $0x3, %rax
addq -0x350(%rbp), %rax
movq %rax, -0x350(%rbp)
movq -0x350(%rbp), %rax
movq %rax, -0x318(%rbp)
movq $0x40, -0x320(%rbp)
cmpq $0x3800, -0x318(%rbp) # imm = 0x3800
ja 0x7ffcd
cmpq $0x1000, -0x320(%rbp) # imm = 0x1000
jae 0x7ffcd
movq -0x318(%rbp), %rax
movq -0x320(%rbp), %rcx
subq $0x1, %rcx
addq %rcx, %rax
movq -0x320(%rbp), %rcx
xorq $-0x1, %rcx
addq $0x1, %rcx
andq %rcx, %rax
movq %rax, -0x2c8(%rbp)
cmpq $0x1000, -0x2c8(%rbp) # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x7fe23
jmp 0x7fea6
movq -0x2c8(%rbp), %rax
movq %rax, -0x250(%rbp)
movq -0x250(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x188(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x10c2b(%rip), %rax     # 0x90a80
movzbl (%rax,%rcx), %eax
movl %eax, -0x18c(%rbp)
movl -0x18c(%rbp), %eax
movl %eax, -0x23c(%rbp)
movl -0x23c(%rbp), %eax
movl %eax, %ecx
leaq 0x10486(%rip), %rax     # 0x90300
movq (%rax,%rcx,8), %rax
movq %rax, -0x248(%rbp)
movq -0x248(%rbp), %rax
movq %rax, -0x258(%rbp)
movq -0x258(%rbp), %rax
movq %rax, -0x2c0(%rbp)
jmp 0x7ff9d
movq -0x2c8(%rbp), %rax
movq %rax, -0x1a0(%rbp)
movabsq $0x7000000000000000, %rax # imm = 0x7000000000000000
cmpq %rax, -0x1a0(%rbp)
seta %al
testb $0x1, %al
jne 0x7fece
jmp 0x7fede
movq $0x0, -0x198(%rbp)
jmp 0x7ff8f
movq -0x1a0(%rbp), %rdi
shlq %rdi
subq $0x1, %rdi
callq 0x820a0
movl %eax, %eax
movq %rax, -0x1a8(%rbp)
cmpq $0x6, -0x1a8(%rbp)
jae 0x7ff12
movl $0x3, %eax
movq %rax, -0x368(%rbp)
jmp 0x7ff28
movq -0x1a8(%rbp), %rax
subq $0x2, %rax
subq $0x1, %rax
movq %rax, -0x368(%rbp)
movq -0x368(%rbp), %rax
movq %rax, -0x1b0(%rbp)
movq -0x1b0(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x1c0(%rbp)
movq -0x1a0(%rbp), %rax
addq -0x1c0(%rbp), %rax
movq -0x1c0(%rbp), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x1c8(%rbp)
movq -0x1c8(%rbp), %rax
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rax
movq %rax, -0x2c0(%rbp)
movq -0x2c0(%rbp), %rax
movq %rax, -0x328(%rbp)
cmpq $0x4000, -0x328(%rbp) # imm = 0x4000
jae 0x7ffcb
movq -0x328(%rbp), %rax
movq %rax, -0x310(%rbp)
jmp 0x804b5
jmp 0x7ffcd
movq -0x318(%rbp), %rax
leaq 0x23fa5(%rip), %rcx     # 0xa3f80
cmpq (%rcx), %rax
setbe %al
testb $0x1, %al
jne 0x7ffea
jmp 0x80235
movq -0x320(%rbp), %rax
leaq 0x240b0(%rip), %rcx     # 0xa40a8
cmpq (%rcx), %rax
setb %al
testb $0x1, %al
jne 0x80007
jmp 0x80235
movq -0x320(%rbp), %rax
addq $0xfff, %rax            # imm = 0xFFF
andq $-0x1000, %rax          # imm = 0xF000
movq %rax, -0x320(%rbp)
cmpq $0x4000, -0x318(%rbp) # imm = 0x4000
ja 0x8003f
movl $0x4000, %eax           # imm = 0x4000
movq %rax, -0x370(%rbp)
jmp 0x801ec
movq -0x318(%rbp), %rax
movq %rax, -0x2b8(%rbp)
cmpq $0x1000, -0x2b8(%rbp) # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x80064
jmp 0x800e7
movq -0x2b8(%rbp), %rax
movq %rax, -0x270(%rbp)
movq -0x270(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x109ea(%rip), %rax     # 0x90a80
movzbl (%rax,%rcx), %eax
movl %eax, -0x17c(%rbp)
movl -0x17c(%rbp), %eax
movl %eax, -0x25c(%rbp)
movl -0x25c(%rbp), %eax
movl %eax, %ecx
leaq 0x10245(%rip), %rax     # 0x90300
movq (%rax,%rcx,8), %rax
movq %rax, -0x268(%rbp)
movq -0x268(%rbp), %rax
movq %rax, -0x278(%rbp)
movq -0x278(%rbp), %rax
movq %rax, -0x2b0(%rbp)
jmp 0x801de
movq -0x2b8(%rbp), %rax
movq %rax, -0x1d8(%rbp)
movabsq $0x7000000000000000, %rax # imm = 0x7000000000000000
cmpq %rax, -0x1d8(%rbp)
seta %al
testb $0x1, %al
jne 0x8010f
jmp 0x8011f
movq $0x0, -0x1d0(%rbp)
jmp 0x801d0
movq -0x1d8(%rbp), %rdi
shlq %rdi
subq $0x1, %rdi
callq 0x820a0
movl %eax, %eax
movq %rax, -0x1e0(%rbp)
cmpq $0x6, -0x1e0(%rbp)
jae 0x80153
movl $0x3, %eax
movq %rax, -0x378(%rbp)
jmp 0x80169
movq -0x1e0(%rbp), %rax
subq $0x2, %rax
subq $0x1, %rax
movq %rax, -0x378(%rbp)
movq -0x378(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x1f0(%rbp)
movq -0x1f0(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x1f8(%rbp)
movq -0x1d8(%rbp), %rax
addq -0x1f8(%rbp), %rax
movq -0x1f8(%rbp), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x200(%rbp)
movq -0x200(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movq -0x1d0(%rbp), %rax
movq %rax, -0x2b0(%rbp)
movq -0x2b0(%rbp), %rax
movq %rax, -0x370(%rbp)
movq -0x370(%rbp), %rax
movq %rax, -0x328(%rbp)
movq -0x328(%rbp), %rax
addq $0x1000, %rax           # imm = 0x1000
addq -0x320(%rbp), %rax
subq $0x1000, %rax           # imm = 0x1000
leaq 0x23d95(%rip), %rcx     # 0xa3fb0
cmpq (%rcx), %rax
ja 0x80233
movq -0x328(%rbp), %rax
movq %rax, -0x310(%rbp)
jmp 0x804b5
jmp 0x80235
movabsq $0x7000000000000000, %rax # imm = 0x7000000000000000
cmpq %rax, -0x320(%rbp)
seta %al
testb $0x1, %al
jne 0x8024f
jmp 0x8025f
movq $0x0, -0x310(%rbp)
jmp 0x804b5
movq -0x320(%rbp), %rax
leaq 0x23e43(%rip), %rcx     # 0xa40b0
addq (%rcx), %rax
leaq 0x23e39(%rip), %rcx     # 0xa40b0
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x320(%rbp)
movq -0x318(%rbp), %rax
leaq 0x23e12(%rip), %rcx     # 0xa40a8
cmpq (%rcx), %rax
ja 0x802b1
leaq 0x23e06(%rip), %rax     # 0xa40a8
movq (%rax), %rax
movq %rax, -0x328(%rbp)
jmp 0x8047d
movq -0x318(%rbp), %rax
movq %rax, -0x2a8(%rbp)
cmpq $0x1000, -0x2a8(%rbp) # imm = 0x1000
setbe %al
testb $0x1, %al
jne 0x802d6
jmp 0x80359
movq -0x2a8(%rbp), %rax
movq %rax, -0x290(%rbp)
movq -0x290(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rcx
subq $0x1, %rcx
shrq $0x3, %rcx
leaq 0x10778(%rip), %rax     # 0x90a80
movzbl (%rax,%rcx), %eax
movl %eax, -0x16c(%rbp)
movl -0x16c(%rbp), %eax
movl %eax, -0x27c(%rbp)
movl -0x27c(%rbp), %eax
movl %eax, %ecx
leaq 0xffd3(%rip), %rax      # 0x90300
movq (%rax,%rcx,8), %rax
movq %rax, -0x288(%rbp)
movq -0x288(%rbp), %rax
movq %rax, -0x298(%rbp)
movq -0x298(%rbp), %rax
movq %rax, -0x2a0(%rbp)
jmp 0x80450
movq -0x2a8(%rbp), %rax
movq %rax, -0x210(%rbp)
movabsq $0x7000000000000000, %rax # imm = 0x7000000000000000
cmpq %rax, -0x210(%rbp)
seta %al
testb $0x1, %al
jne 0x80381
jmp 0x80391
movq $0x0, -0x208(%rbp)
jmp 0x80442
movq -0x210(%rbp), %rdi
shlq %rdi
subq $0x1, %rdi
callq 0x820a0
movl %eax, %eax
movq %rax, -0x218(%rbp)
cmpq $0x6, -0x218(%rbp)
jae 0x803c5
movl $0x3, %eax
movq %rax, -0x380(%rbp)
jmp 0x803db
movq -0x218(%rbp), %rax
subq $0x2, %rax
subq $0x1, %rax
movq %rax, -0x380(%rbp)
movq -0x380(%rbp), %rax
movq %rax, -0x220(%rbp)
movq -0x220(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0x228(%rbp)
movq -0x228(%rbp), %rax
subq $0x1, %rax
movq %rax, -0x230(%rbp)
movq -0x210(%rbp), %rax
addq -0x230(%rbp), %rax
movq -0x230(%rbp), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x238(%rbp)
movq -0x238(%rbp), %rax
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rax
movq %rax, -0x2a0(%rbp)
movq -0x2a0(%rbp), %rax
movq %rax, -0x328(%rbp)
movq -0x328(%rbp), %rax
cmpq -0x318(%rbp), %rax
jae 0x8047b
movq $0x0, -0x310(%rbp)
jmp 0x804b5
jmp 0x8047d
movq -0x328(%rbp), %rax
addq -0x320(%rbp), %rax
subq $0x1000, %rax           # imm = 0x1000
cmpq -0x328(%rbp), %rax
jae 0x804a7
movq $0x0, -0x310(%rbp)
jmp 0x804b5
movq -0x328(%rbp), %rax
movq %rax, -0x310(%rbp)
movq -0x310(%rbp), %rax
movq %rax, -0x350(%rbp)
movq -0x338(%rbp), %rax
movq %rax, -0x390(%rbp)
movq -0x350(%rbp), %rax
movq %rax, -0x388(%rbp)
xorl %eax, %eax
movl %eax, %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0x809f0
movq -0x390(%rbp), %rdx
movq -0x388(%rbp), %rcx
movq %rdx, -0x2d0(%rbp)
movq %rcx, -0x2d8(%rbp)
movq $0x40, -0x2e0(%rbp)
movb $0x1, -0x2e1(%rbp)
movq $0x0, -0x2f0(%rbp)
movb $0x1, -0x2f1(%rbp)
movq %rax, -0x300(%rbp)
movq -0x2d0(%rbp), %rdi
movq -0x300(%rbp), %rsi
movq -0x2d8(%rbp), %rdx
movq -0x2e0(%rbp), %rcx
movb -0x2e1(%rbp), %al
movq -0x2f0(%rbp), %r9
andb $0x1, %al
movzbl %al, %r8d
callq 0x3d8a0
movq %rax, -0x308(%rbp)
testb $0x1, -0x2f1(%rbp)
je 0x808dd
cmpq $0x0, -0x308(%rbp)
setne %al
testb $0x1, %al
jne 0x80592
jmp 0x808dd
movq -0x308(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x160(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
leaq 0x23afa(%rip), %rcx     # 0xa40b0
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
setne %al
testb $0x1, %al
jne 0x805d5
jmp 0x805e4
movq -0x18(%rbp), %rdi
callq 0x7f640
movq %rax, -0x8(%rbp)
jmp 0x805f1
movq -0x10(%rbp), %rdi
callq 0x63ec0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x398(%rbp)
movq -0x2d0(%rbp), %rcx
movq -0x308(%rbp), %rax
movq %rcx, -0x148(%rbp)
movq %rax, -0x150(%rbp)
movb $0x0, -0x151(%rbp)
movq -0x148(%rbp), %rdx
movq -0x150(%rbp), %rcx
movb -0x151(%rbp), %al
movq %rdx, -0x110(%rbp)
movq %rcx, -0x118(%rbp)
andb $0x1, %al
movb %al, -0x119(%rbp)
movq -0x118(%rbp), %rax
leaq 0x23a59(%rip), %rcx     # 0xa40b0
movq (%rcx), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
movq %rax, -0x130(%rbp)
movq -0x130(%rbp), %rax
cmpq -0x118(%rbp), %rax
setne %al
testb $0x1, %al
jne 0x80682
jmp 0x808b0
movq -0x118(%rbp), %rax
movq -0x130(%rbp), %rcx
subq %rcx, %rax
shrq $0xc, %rax
movq %rax, -0x138(%rbp)
movq -0x130(%rbp), %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0xf0(%rbp)
movq %rax, -0xf8(%rbp)
movq -0xf0(%rbp), %rcx
movq -0xf8(%rbp), %rax
movq %rcx, -0xb0(%rbp)
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rcx
movq -0xb8(%rbp), %rax
movq %rcx, -0x90(%rbp)
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rcx
movq -0x98(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, -0x40(%rbp)
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
addq $0x78, %rax
movq -0x48(%rbp), %rcx
leaq 0x23875(%rip), %rdx     # 0xa3fa0
subq (%rdx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
andq $0x1fe0, %rax           # imm = 0x1FE0
shrq $0x5, %rax
movl %eax, -0x104(%rbp)
movl -0x104(%rbp), %eax
movl %eax, -0x13c(%rbp)
movl -0x13c(%rbp), %eax
movl %eax, %ecx
movb $0x1, %al
cmpq $0xff, %rcx
movb %al, -0x399(%rbp)
je 0x80793
xorl %eax, %eax
movb %al, -0x399(%rbp)
jmp 0x80793
movb -0x399(%rbp), %al
testb $0x1, %al
jne 0x807a2
jmp 0x8087a
movq -0x130(%rbp), %rcx
movq -0x138(%rbp), %rax
movq %rcx, -0xd8(%rbp)
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rcx
movq -0xe0(%rbp), %rax
movq %rcx, -0xc0(%rbp)
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rcx
movq -0xc8(%rbp), %rax
movq %rcx, -0x80(%rbp)
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rcx
movq -0x88(%rbp), %rax
movq %rcx, -0x70(%rbp)
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rcx
movq -0x78(%rbp), %rax
movq %rcx, -0x60(%rbp)
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rax
addq $0x78, %rax
movq -0x68(%rbp), %rcx
leaq 0x23777(%rip), %rdx     # 0xa3fa0
subq (%rdx), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
andq $-0x2000, %rax          # imm = 0xE000
shrq %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
subq $0x1000, %rax           # imm = 0x1000
movq %rax, -0x128(%rbp)
jmp 0x808ae
movl -0x13c(%rbp), %eax
movl %eax, -0xcc(%rbp)
movl -0xcc(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
leaq 0xfa65(%rip), %rax      # 0x90300
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x128(%rbp)
jmp 0x808ca
movq -0x110(%rbp), %rdi
movq -0x118(%rbp), %rsi
callq 0x65c10
movq %rax, -0x128(%rbp)
movq -0x398(%rbp), %rdi
movq -0x128(%rbp), %rsi
callq 0x820c0
movq -0x308(%rbp), %rax
movq %rax, -0x348(%rbp)
cmpq $0x0, -0x348(%rbp)
jne 0x80905
movq $0x0, -0x330(%rbp)
jmp 0x809db
movq -0x338(%rbp), %rdi
movq -0x348(%rbp), %rsi
movq -0x340(%rbp), %rdx
callq 0x7f800
movq -0x348(%rbp), %rdi
addq $0x18, %rdi
movl $0xd3, %esi
callq 0x80aa0
jmp 0x80936
movl $0x0, -0x35c(%rbp)
movl -0x35c(%rbp), %eax
cmpl 0x23b94(%rip), %eax     # 0xa44e0
jae 0x809cd
movq -0x348(%rbp), %rax
addq $0x28, %rax
movl -0x35c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x1, 0xc(%rax)
movq 0x23b64(%rip), %rax     # 0xa44d8
movl -0x35c(%rbp), %ecx
movl (%rax,%rcx,4), %eax
shlq $0x3, %rax
addq -0x358(%rbp), %rax
movq %rax, -0x358(%rbp)
movq -0x348(%rbp), %rcx
addq -0x358(%rbp), %rcx
movq -0x348(%rbp), %rax
addq $0x28, %rax
movl -0x35c(%rbp), %edx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movl -0x35c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x35c(%rbp)
jmp 0x80940
movq -0x348(%rbp), %rax
movq %rax, -0x330(%rbp)
movq -0x330(%rbp), %rax
addq $0x3a0, %rsp            # imm = 0x3A0
popq %rbp
retq
nopl (%rax,%rax)