// File: /workspace/github_c_makefile_star2_O3/zhou-yuxin[P]redis-aof-no-cow/deps/jemalloc/src/arena.c
// Function: je_arena_palloc
void *
arena_palloc(tsdn_t *tsdn, arena_t *arena, size_t usize, size_t alignment,
    bool zero, tcache_t *tcache)
{
	void *ret;

	if (usize <= SMALL_MAXCLASS && (alignment < PAGE || (alignment == PAGE
	    && (usize & PAGE_MASK) == 0))) {
		/* Small; alignment doesn't require special run placement. */
		ret = arena_malloc(tsdn, arena, usize, size2index(usize), zero,
		    tcache, true);
	} else if (usize <= large_maxclass && alignment <= PAGE) {
		/*
		 * Large; alignment doesn't require special run placement.
		 * However, the cached pointer may be at a random offset from
		 * the base of the run, so do some bit manipulation to retrieve
		 * the base.
		 */
		ret = arena_malloc(tsdn, arena, usize, size2index(usize), zero,
		    tcache, true);
		if (config_cache_oblivious)
			ret = (void *)((uintptr_t)ret & ~PAGE_MASK);
	} else {
		if (likely(usize <= large_maxclass)) {
			ret = arena_palloc_large(tsdn, arena, usize, alignment,
			    zero);
		} else if (likely(alignment <= chunksize))
			ret = huge_malloc(tsdn, arena, usize, zero);
		else {
			ret = huge_palloc(tsdn, arena, usize, alignment, zero);
		}
	}
	return (ret);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %r9, %r12
movq %rcx, %r15
movq %rdx, %r13
movq %rdi, %r14
cmpq $0x3800, %rdx           # imm = 0x3800
ja 0xd0dc
cmpq $0x1000, %r15           # imm = 0x1000
jb 0xd01f
movq %r15, %rax
xorq $0x1000, %rax           # imm = 0x1000
movl %r13d, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
orq %rax, %rcx
jne 0xd0dc
cmpq $0x1000, %r13           # imm = 0x1000
ja 0xd582
leaq -0x1(%r13), %rax
shrq $0x3, %rax
leaq 0x2ee05(%rip), %rcx     # 0x3be40
movzbl (%rcx,%rax), %ebp
testq %r12, %r12
je 0xd59d
movl %ebp, %r13d
movq %r13, %rax
shlq $0x5, %rax
leaq (%r12,%rax), %rbx
addq $0x28, %rbx
movl 0x10(%rbx), %eax
testq %rax, %rax
movq %r14, 0x18(%rsp)
je 0xd5bc
movq 0x18(%rbx), %rcx
movq %rax, %rdx
shlq $0x3, %rdx
negq %rdx
movq (%rcx,%rdx), %r15
decl %eax
movl %eax, 0x10(%rbx)
cmpl 0x8(%rbx), %eax
jl 0xd635
leaq 0x2e62e(%rip), %rax     # 0x3b6c0
movq (%rax,%r13,8), %r14
leaq 0x3f484(%rip), %rax     # 0x4c521
movb (%rax), %al
testb %r8b, %r8b
jne 0xd607
testb %al, %al
jne 0xd63d
leaq 0x3f47c(%rip), %rax     # 0x4c533
cmpb $0x1, (%rax)
je 0xd60f
incq (%rbx)
movl 0x18(%r12), %eax
testl %eax, %eax
jle 0xd619
decl %eax
movl %eax, 0x18(%r12)
jmp 0xd419
movq 0x3febd(%rip), %rax     # 0x4cfa0
cmpq %r13, %rax
setb %cl
cmpq $0x1001, %r15           # imm = 0x1001
setae %dl
orb %cl, %dl
jne 0xd1cc
cmpq $0x1000, %r13           # imm = 0x1000
ja 0xd676
leaq -0x1(%r13), %rax
shrq $0x3, %rax
leaq 0x2ed29(%rip), %rcx     # 0x3be40
movzbl (%rcx,%rax), %ebp
testq %r12, %r12
je 0xd761
cmpq $0x3800, %r13           # imm = 0x3800
ja 0xd6be
movl %ebp, %r13d
movq %r13, %rax
shlq $0x5, %rax
leaq (%r12,%rax), %rbx
addq $0x28, %rbx
movl 0x10(%rbx), %eax
testq %rax, %rax
movq %r14, 0x18(%rsp)
je 0xd77a
movq 0x18(%rbx), %rcx
movq %rax, %rdx
shlq $0x3, %rdx
negq %rdx
movq (%rcx,%rdx), %r15
decl %eax
movl %eax, 0x10(%rbx)
cmpl 0x8(%rbx), %eax
jl 0xd7fa
leaq 0x2e545(%rip), %rax     # 0x3b6c0
movq (%rax,%r13,8), %r14
leaq 0x3f39b(%rip), %rax     # 0x4c521
movb (%rax), %al
testb %r8b, %r8b
jne 0xd7cc
testb %al, %al
jne 0xd802
leaq 0x3f393(%rip), %rax     # 0x4c533
cmpb $0x1, (%rax)
je 0xd7d4
incq (%rbx)
movl 0x18(%r12), %eax
testl %eax, %eax
jle 0xd7de
decl %eax
movl %eax, 0x18(%r12)
andq $-0x1000, %r15          # imm = 0xF000
jmp 0xd419
cmpq %r13, %rax
jb 0xd691
testq %r14, %r14
je 0xd860
testq %rsi, %rsi
jne 0xd1f0
movq 0x30(%r14), %rsi
testq %rsi, %rsi
je 0xd84d
movl %r8d, 0x14(%rsp)
addq $0xfff, %r15            # imm = 0xFFF
andq $-0x1000, %r15          # imm = 0xF000
leaq (%r15,%r13), %rbp
leaq 0x10(%rsi), %r12
movq %r12, %rdi
movq %rsi, %rbx
callq 0xb5a0
movq %r14, %rdi
movq %rbx, 0x20(%rsp)
movq %rbx, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x234ca
testq %rax, %rax
je 0xd40e
movq %rax, %rbx
movq %r12, 0x30(%rsp)
movq %r14, 0x18(%rsp)
leaq 0x3fe88(%rip), %rax     # 0x4d0d0
movq (%rax), %r12
notq %r12
leaq -0x18(%rbx), %r8
movq %r8, 0x38(%rsp)
andq %r12, %r8
andq %rbx, %r12
movq 0x3fd64(%rip), %rdi     # 0x4cfc8
leaq (%r8,%rdi), %rax
negq %rax
addq %rbx, %rax
addq $-0x18, %rax
pushq $0x60
popq %rcx
xorl %edx, %edx
divq %rcx
movq 0x3fd3f(%rip), %rsi     # 0x4cfc0
leaq (%rax,%rsi), %rcx
movq %rcx, %rdx
shlq $0xc, %rdx
addq %r8, %rdx
leaq (%r15,%rdx), %r8
decq %r8
negq %r15
andq %r8, %r15
movq %r15, %r8
subq %rdx, %r8
subq %r8, %rbp
movq %rbp, %r14
subq %r13, %r14
subq %rdx, %r15
jne 0xd42b
movq 0x20(%rsp), %rsi
leaq 0x1000(%r13), %r15
cmpq $0x1000, %r14           # imm = 0x1000
movq 0x18(%rsp), %r14
movl 0x14(%rsp), %eax
jne 0xd508
movzbl %al, %r8d
movq %rsi, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x24f71
movq 0x3fcd7(%rip), %rcx     # 0x4cfc8
testb %al, %al
jne 0xd52e
leaq 0x3fdd0(%rip), %rax     # 0x4d0d0
movq (%rax), %rbx
notq %rbx
movq 0x38(%rsp), %rax
andq %rax, %rbx
addq %rbx, %rcx
subq %rcx, %rax
xorl %edx, %edx
pushq $0x60
popq %rcx
divq %rcx
movq %rax, %r15
addq 0x3fc9a(%rip), %r15     # 0x4cfc0
shlq $0xc, %r15
cmpq $0x1000, %r13           # imm = 0x1000
ja 0xd829
leaq -0x1(%r13), %rax
shrq $0x3, %rax
leaq 0x2eafa(%rip), %rcx     # 0x3be40
movzbl (%rcx,%rax), %eax
movq 0x30(%rsp), %rdi
addq %rbx, %r15
movq 0x20(%rsp), %rcx
incq 0xb0(%rcx)
addl $-0x27, %eax
movq %r13, %xmm0
shufpd $0x2, 0x2bcb1(%rip), %xmm0 # xmm0 = xmm0[0],mem[1]
movdqu 0x98(%rcx), %xmm1
paddq %xmm1, %xmm0
movdqu %xmm0, 0x98(%rcx)
movq 0xd0(%rcx), %rcx
shlq $0x5, %rax
incq (%rcx,%rax)
movdqu 0x10(%rcx,%rax), %xmm0
pcmpeqd %xmm1, %xmm1
psubq %xmm1, %xmm0
movdqu %xmm0, 0x10(%rcx,%rax)
callq 0xb380
cmpb $0x0, 0x14(%rsp)
jne 0xd3d2
leaq 0x3f168(%rip), %rax     # 0x4c521
cmpb $0x1, (%rax)
je 0xd86e
leaq 0x3f16a(%rip), %rax     # 0x4c533
cmpb $0x1, (%rax)
je 0xd878
testq %r14, %r14
je 0xd419
movq 0x20(%rsp), %rdx
movl (%rdx), %esi
movq 0x38(%r14), %rax
testq %rax, %rax
je 0xd664
cmpl %esi, 0x40(%r14)
jbe 0xd664
leaq (%rax,%rsi,8), %rax
testq %rax, %rax
je 0xd419
movl (%rax), %ecx
testl %ecx, %ecx
jle 0xd836
decl %ecx
movl %ecx, (%rax)
jmp 0xd419
movq %r12, %rdi
callq 0xb380
xorl %r15d, %r15d
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %rdx
shrq $0xc, %rdx
addq %rcx, %rdx
addq %r12, %rdi
imulq $0x60, %rdx, %r8
addq %rdi, %r8
movq %rsi, %rdi
negq %rdi
imulq $0x60, %rdi, %rdi
leaq (%r8,%rdi), %r9
movq %r9, 0x38(%rsp)
addq %r8, %rdi
addq $0x18, %rdi
movq %rdi, 0x40(%rsp)
movq 0x78(%r12,%rax,8), %r8
movl %r8d, %eax
andl $0x10, %eax
movl %r8d, %r9d
andl $0x4, %r9d
xorl %edi, %edi
testb $0x14, %r8b
sete %dil
shll $0x3, %edi
notq %rsi
addq %rdx, %rsi
movl 0x78(%r12,%rsi,8), %r8d
andl %edi, %r8d
orq %rax, %r8
movl $0x1fe3, %r10d          # imm = 0x1FE3
orq %r10, %r8
movq %r8, 0x78(%r12,%rsi,8)
subq 0x3fb1d(%rip), %rcx     # 0x4cfc0
movl 0x78(%r12,%rcx,8), %esi
andl %edi, %esi
addq %r15, %r15
orq %rax, %r15
orq %r10, %r15
orq %rsi, %r15
movq %r15, 0x78(%r12,%rcx,8)
subq 0x3fafe(%rip), %rdx     # 0x4cfc0
andl 0x78(%r12,%rdx,8), %edi
leaq (,%rbp,2), %rcx
orq %rax, %rcx
orq %r10, %rcx
orq %rdi, %rcx
movq %rcx, 0x78(%r12,%rdx,8)
shrl $0x2, %r9d
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %r15
movq %r15, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xed9d
movq %r15, %rsi
movq 0x40(%rsp), %rbx
jmp 0xd2b9
andl $0x0, (%rsp)
movq %r14, %rdi
movq %r12, %rdx
movq %rbx, %rcx
movq %rbp, %r8
movq %r15, %r9
callq 0xf76a
movq 0x20(%rsp), %rsi
movl 0x14(%rsp), %eax
jmp 0xd2d6
leaq -0x18(%rbx), %rax
leaq 0x3fb97(%rip), %rdx     # 0x4d0d0
andq (%rdx), %rax
subq %rcx, %rax
xorl %r15d, %r15d
xorl %edx, %edx
pushq $0x60
popq %rcx
divq %rcx
movl 0x78(%r12,%rax,8), %r9d
movl %r9d, %ecx
andl $0x10, %ecx
shrl $0x4, %ecx
andl $0x4, %r9d
shrl $0x2, %r9d
movq %r14, %rdi
movq 0x20(%rsp), %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0xed9d
movq 0x30(%rsp), %rdi
callq 0xb380
jmp 0xd419
movq %r13, %rdi
movl %r8d, %ebx
movq %rsi, %r15
callq 0xf6d1
movq %r15, %rsi
movl %ebx, %r8d
movl %eax, %ebp
jmp 0xd03f
movzbl %r8b, %r8d
movq %r14, %rdi
movq %r13, %rdx
movl %ebp, %ecx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xccb3
movl %r8d, 0x14(%rsp)
orl $-0x1, 0x8(%rbx)
testq %rsi, %rsi
jne 0xd5d7
movq 0x30(%r14), %rsi
testq %rsi, %rsi
je 0xd997
movq %r14, %rdi
leaq 0x2e(%rsp), %r14
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
movq %r14, %r9
callq 0x35a74
cmpb $0x0, (%r14)
je 0xd416
movq %rax, %r15
movl 0x14(%rsp), %r8d
jmp 0xd08b
testb %al, %al
jne 0xd894
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
jmp 0xd65a
movl 0x1c(%r12), %eax
movl %eax, 0x18(%r12)
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x35571
jmp 0xd419
movl %eax, 0x8(%rbx)
jmp 0xd08b
shlq $0x6, %r13
leaq 0x3ef98(%rip), %rax     # 0x4c5e0
movq %r15, %rdi
subq 0x8(%r13,%rax), %rdi
movq 0x10(%r13,%rax), %rdx
movl $0xa5, %esi
callq 0xb230
jmp 0xd0c0
movq %r14, %rdi
callq 0x1ade7
movq 0x20(%rsp), %rdx
jmp 0xd3f9
movq %r13, %rdi
movl %r8d, %ebx
movq %rsi, %r15
callq 0xf6d1
movq %r15, %rsi
movl %ebx, %r8d
movl %eax, %ebp
jmp 0xd11b
leaq 0x3fa30(%rip), %rax     # 0x4d0c8
cmpq %r15, (%rax)
jb 0xd8d8
movzbl %r8b, %ecx
movq %r14, %rdi
movq %r13, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2e080
leaq 0x3fddb(%rip), %rax     # 0x4d4a0
cmpq %r13, (%rax)
jb 0xd761
movl %ebp, %eax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%r12,%rcx), %rbx
addq $0x28, %rbx
movl 0x10(%rbx), %ecx
testq %rcx, %rcx
je 0xd8f8
movq 0x18(%rbx), %rdx
movq %rcx, %rsi
shlq $0x3, %rsi
negq %rsi
movq (%rdx,%rsi), %r15
decl %ecx
movl %ecx, 0x10(%rbx)
cmpl 0x8(%rbx), %ecx
jl 0xd97d
leaq 0x2dfae(%rip), %rcx     # 0x3b6c0
movq (%rcx,%rax,8), %rdx
testb %r8b, %r8b
jne 0xd88a
leaq 0x3edfb(%rip), %rax     # 0x4c521
cmpb $0x1, (%rax)
je 0xd985
leaq 0x3edfd(%rip), %rax     # 0x4c533
cmpb $0x1, (%rax)
je 0xd88a
incq (%rbx)
movl 0x18(%r12), %eax
testl %eax, %eax
jg 0xd1b9
movl 0x1c(%r12), %eax
movl %eax, 0x18(%r12)
movq %r14, %rdi
jmp 0xd7ed
movzbl %r8b, %r8d
movq %r14, %rdi
movq %r13, %rdx
movl %ebp, %ecx
callq 0xccb3
movq %rax, %r15
jmp 0xd1c0
movl %r8d, 0x14(%rsp)
orl $-0x1, 0x8(%rbx)
testq %rsi, %rsi
jne 0xd79a
movq 0x18(%rsp), %rax
movq 0x30(%rax), %rsi
testq %rsi, %rsi
je 0xd9b8
leaq 0x2f(%rsp), %r14
movq 0x18(%rsp), %rdi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
movq %r14, %r9
callq 0x35a74
cmpb $0x0, (%r14)
je 0xd9c9
movq %rax, %r15
movl 0x14(%rsp), %r8d
jmp 0xd174
testb %al, %al
jne 0xd939
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
jmp 0xd81f
movl 0x1c(%r12), %eax
movl %eax, 0x18(%r12)
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x35571
jmp 0xd1c0
movl %eax, 0x8(%rbx)
jmp 0xd174
shlq $0x6, %r13
leaq 0x3edd3(%rip), %rax     # 0x4c5e0
movq %r15, %rdi
subq 0x8(%r13,%rax), %rdi
movq 0x10(%r13,%rax), %rdx
movl $0xa5, %esi
callq 0xb230
jmp 0xd1a9
movq %r13, %rdi
callq 0xf6d1
jmp 0xd34a
movl 0x4(%rax), %ecx
movl %ecx, (%rax)
movq %r14, %rdi
movq %rdx, %rsi
xorl %edx, %edx
callq 0x225b4
jmp 0xd419
movq %r14, %rdi
xorl %esi, %esi
movl %r8d, %ebx
callq 0x1af15
movl %ebx, %r8d
movq %rax, %rsi
testq %rsi, %rsi
je 0xd416
jmp 0xd1f0
movq %r15, %rdi
movl $0xa5, %esi
jmp 0xd87d
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0xb230
jmp 0xd3d2
movq %r15, %rdi
xorl %esi, %esi
jmp 0xd98d
shlq $0x6, %r13
leaq 0x3ed41(%rip), %rax     # 0x4c5e0
movq 0x8(%r13,%rax), %rbp
movq %r15, %rdi
subq %rbp, %rdi
movl $0xa5, %esi
movq %rbp, %rdx
callq 0xb230
leaq 0x3ed22(%rip), %rax     # 0x4c5e0
movq (%r13,%rax), %rdi
addq %r15, %rdi
movl $0xa5, %esi
movq %rbp, %rdx
callq 0xb230
jmp 0xd60f
movzbl %r8b, %r8d
movq %r14, %rdi
movq %r13, %rdx
movq %r15, %rcx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xfbbb
movl %r8d, %r13d
orl $-0x1, 0x8(%rbx)
movq %rsi, %rax
testq %rsi, %rsi
jne 0xd917
movq 0x30(%r14), %rcx
movq %rcx, %rax
testq %rcx, %rcx
je 0xd9d1
movzbl %r13b, %ecx
movq %r14, %rdi
movq %rax, %rsi
movl %ebp, %edx
callq 0xcaea
movq %rax, %r15
testq %rax, %rax
jne 0xd742
jmp 0xd9c9
shlq $0x6, %r13
leaq 0x3ec9c(%rip), %rax     # 0x4c5e0
movq 0x8(%r13,%rax), %rbp
movq %r15, %rdi
subq %rbp, %rdi
movl $0xa5, %esi
movq %rbp, %rdx
callq 0xb230
leaq 0x3ec7d(%rip), %rax     # 0x4c5e0
movq (%r13,%rax), %rdi
addq %r15, %rdi
movl $0xa5, %esi
movq %rbp, %rdx
callq 0xb230
jmp 0xd7d4
movl %ecx, 0x8(%rbx)
jmp 0xd70b
movq %r15, %rdi
movl $0xa5, %esi
callq 0xb230
jmp 0xd73f
movq %r14, %r15
movq %r14, %rdi
xorl %esi, %esi
callq 0x1af15
testq %rax, %rax
je 0xd416
movq %rax, %rsi
movq %r15, %r14
jmp 0xd5d7
movq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x1af15
testq %rax, %rax
jne 0xd9ec
xorl %r15d, %r15d
jmp 0xd1c0
xorl %r15d, %r15d
movq %r14, %rdi
xorl %esi, %esi
callq 0x1af15
testq %rax, %rax
je 0xd1c0
jmp 0xd917
movq %rax, %rsi
jmp 0xd79a