// File: /workspace/github_c_makefile_star2_O2/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 %rsi, %r14
movq %rdi, %rbx
cmpq $0x3800, %rdx           # imm = 0x3800
movq %rdi, 0x18(%rsp)
ja 0x1bf94
cmpq $0x1000, %r15           # imm = 0x1000
jb 0x1bedc
movq %r15, %rax
xorq $0x1000, %rax           # imm = 0x1000
movl %r13d, %ecx
andl $0xfff, %ecx            # imm = 0xFFF
orq %rax, %rcx
jne 0x1bf94
cmpq $0x1000, %r13           # imm = 0x1000
ja 0x1c3fd
leaq -0x1(%r13), %rax
shrq $0x3, %rax
leaq 0x1aac8(%rip), %rcx     # 0x369c0
movzbl (%rcx,%rax), %ebp
testq %r12, %r12
je 0x1c412
movl %ebp, %r13d
movq %r13, %rax
shlq $0x5, %rax
leaq (%r12,%rax), %rbx
addq $0x28, %rbx
movl 0x10(%rbx), %eax
testq %rax, %rax
je 0x1c434
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 0x1c4b7
leaq 0x1a2f6(%rip), %rax     # 0x36240
movq (%rax,%r13,8), %r14
leaq 0x2c5cc(%rip), %rax     # 0x48521
movb (%rax), %al
testb %r8b, %r8b
jne 0x1c489
testb %al, %al
jne 0x1c4bf
leaq 0x2c5c4(%rip), %rax     # 0x48533
cmpb $0x1, (%rax)
je 0x1c491
incq (%rbx)
movl 0x18(%r12), %eax
testl %eax, %eax
jle 0x1c49b
decl %eax
movl %eax, 0x18(%r12)
jmp 0x1c3eb
movq 0x2d005(%rip), %rax     # 0x48fa0
cmpq %r13, %rax
setb %cl
cmpq $0x1001, %r15           # imm = 0x1001
setae %dl
orb %cl, %dl
jne 0x1c07f
cmpq $0x1000, %r13           # imm = 0x1000
ja 0x1c4e6
leaq -0x1(%r13), %rax
shrq $0x3, %rax
leaq 0x1a9f1(%rip), %rcx     # 0x369c0
movzbl (%rcx,%rax), %ebp
testq %r12, %r12
je 0x1c5d1
cmpq $0x3800, %r13           # imm = 0x3800
ja 0x1c52b
movl %ebp, %r13d
movq %r13, %rax
shlq $0x5, %rax
leaq (%r12,%rax), %rbx
addq $0x28, %rbx
movl 0x10(%rbx), %eax
testq %rax, %rax
je 0x1c5ed
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 0x1c670
leaq 0x1a212(%rip), %rax     # 0x36240
movq (%rax,%r13,8), %r14
leaq 0x2c4e8(%rip), %rax     # 0x48521
movb (%rax), %al
testb %r8b, %r8b
jne 0x1c642
testb %al, %al
jne 0x1c678
leaq 0x2c4e0(%rip), %rax     # 0x48533
cmpb $0x1, (%rax)
je 0x1c64a
incq (%rbx)
movl 0x18(%r12), %eax
testl %eax, %eax
jle 0x1c654
decl %eax
movl %eax, 0x18(%r12)
andq $-0x1000, %r15          # imm = 0xF000
jmp 0x1c3eb
cmpq %r13, %rax
jb 0x1c4fb
movl %r8d, 0x14(%rsp)
testq %rbx, %rbx
je 0x1c0a0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1be70
movq %rax, %r14
testq %r14, %r14
je 0x1c163
addq $0xfff, %r15            # imm = 0xFFF
andq $-0x1000, %r15          # imm = 0xF000
leaq (%r15,%r13), %rbp
leaq 0x10(%r14), %r12
movq %r12, %rdi
callq 0xb5a0
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x1bb8a
testq %rax, %rax
je 0x1c15b
movq %rax, %rbx
movq %r12, 0x28(%rsp)
leaq 0x2cfe5(%rip), %rax     # 0x490d0
movq (%rax), %r12
notq %r12
leaq -0x18(%rbx), %r9
movq %r9, %r8
andq %r12, %r8
andq %rbx, %r12
movq 0x2cec3(%rip), %rdi     # 0x48fc8
leaq (%r8,%rdi), %rax
negq %rax
addq %rbx, %rax
addq $-0x18, %rax
pushq $0x60
popq %rcx
xorl %edx, %edx
divq %rcx
movq 0x2ce9e(%rip), %rsi     # 0x48fc0
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, %r8
subq %r13, %r8
subq %rdx, %r15
jne 0x1c16b
movq %r9, 0x30(%rsp)
jmp 0x1c245
movq %r12, %rdi
callq 0xb380
xorl %r15d, %r15d
jmp 0x1c3eb
movq %r15, %rdx
shrq $0xc, %rdx
addq %rcx, %rdx
addq %r12, %rdi
movq %r8, 0x40(%rsp)
imulq $0x60, %rdx, %r8
addq %rdi, %r8
movq %rsi, %rdi
negq %rdi
imulq $0x60, %rdi, %rdi
leaq (%r8,%rdi), %r9
movq %r9, 0x30(%rsp)
addq %r8, %rdi
addq $0x18, %rdi
movq %rdi, 0x38(%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 0x2cdd8(%rip), %rcx     # 0x48fc0
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 0x2cdb9(%rip), %rdx     # 0x48fc0
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 %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1fd91
movq 0x40(%rsp), %r8
movq 0x38(%rsp), %rbx
movl 0x14(%rsp), %eax
leaq 0x1000(%r13), %r15
cmpq $0x1000, %r8            # imm = 0x1000
je 0x1c27a
andl $0x0, (%rsp)
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movq %rbp, %r8
movq %r15, %r9
callq 0x20b62
movl 0x14(%rsp), %eax
movzbl %al, %r8d
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x1f332
movq 0x2cd33(%rip), %rcx     # 0x48fc8
testb %al, %al
je 0x1c2ed
leaq -0x18(%rbx), %rax
leaq 0x2ce2c(%rip), %rdx     # 0x490d0
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 0x18(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %r8d, %r8d
callq 0x1fd91
movq 0x28(%rsp), %rdi
callq 0xb380
jmp 0x1c3eb
leaq 0x2cddc(%rip), %rax     # 0x490d0
movq (%rax), %rbx
notq %rbx
movq 0x30(%rsp), %rax
andq %rax, %rbx
addq %rbx, %rcx
subq %rcx, %rax
xorl %edx, %edx
pushq $0x60
popq %rcx
divq %rcx
movq %rax, %r15
addq 0x2cca6(%rip), %r15     # 0x48fc0
shlq $0xc, %r15
cmpq $0x1000, %r13           # imm = 0x1000
ja 0x1c69f
leaq -0x1(%r13), %rax
shrq $0x3, %rax
leaq 0x1a686(%rip), %rcx     # 0x369c0
movzbl (%rcx,%rax), %eax
movq 0x28(%rsp), %rdi
addq %rbx, %r15
incq 0xb0(%r14)
addl $-0x27, %eax
movq %r13, %xmm0
shufpd $0x2, 0x1aaa2(%rip), %xmm0 # xmm0 = xmm0[0],mem[1]
movdqu 0x98(%r14), %xmm1
paddq %xmm1, %xmm0
movdqu %xmm0, 0x98(%r14)
movq 0xd0(%r14), %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)
movq 0x18(%rsp), %rbx
jne 0x1c3c8
leaq 0x2c172(%rip), %rax     # 0x48521
cmpb $0x1, (%rax)
je 0x1c6c3
leaq 0x2c174(%rip), %rax     # 0x48533
cmpb $0x1, (%rax)
je 0x1c6cd
testq %rbx, %rbx
je 0x1c3eb
movl (%r14), %esi
movq %rbx, %rdi
callq 0x20a5e
testq %rax, %rax
je 0x1c3eb
movl (%rax), %ecx
testl %ecx, %ecx
jle 0x1c6ac
decl %ecx
movl %ecx, (%rax)
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movl %r8d, %ebp
callq 0x20acc
movl %ebp, %r8d
movl %eax, %ebp
jmp 0x1befc
movzbl %r8b, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl %ebp, %ecx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1bc0d
movl %r8d, 0x14(%rsp)
orl $-0x1, 0x8(%rbx)
movq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1be70
testq %rax, %rax
je 0x1c163
leaq 0x26(%rsp), %r14
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
movq %r14, %r9
callq 0x30591
cmpb $0x0, (%r14)
je 0x1c163
movq %rax, %r15
movl 0x14(%rsp), %r8d
jmp 0x1bf43
testb %al, %al
jne 0x1c6e9
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
jmp 0x1c4dc
movl 0x1c(%r12), %eax
movl %eax, 0x18(%r12)
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x30129
jmp 0x1c3eb
movl %eax, 0x8(%rbx)
jmp 0x1bf43
shlq $0x6, %r13
leaq 0x2c116(%rip), %rax     # 0x485e0
movq %r15, %rdi
subq 0x8(%r13,%rax), %rdi
movq 0x10(%r13,%rax), %rdx
movl $0xa5, %esi
callq 0xb230
jmp 0x1bf78
movq %r13, %rdi
movl %r8d, %ebp
callq 0x20acc
movl %ebp, %r8d
movl %eax, %ebp
jmp 0x1bfd3
leaq 0x2cbc6(%rip), %rax     # 0x490c8
cmpq %r15, (%rax)
jb 0x1c72d
movzbl %r8b, %ecx
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2808c
leaq 0x2cf6e(%rip), %rax     # 0x494a0
cmpq %r13, (%rax)
jb 0x1c5d1
movq %rbx, %r13
movl %ebp, %eax
movq %rax, %rcx
shlq $0x5, %rcx
leaq (%r12,%rcx), %rbx
addq $0x28, %rbx
movl 0x10(%rbx), %ecx
testq %rcx, %rcx
je 0x1c750
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 0x1c7d0
leaq 0x19cbe(%rip), %rcx     # 0x36240
movq (%rcx,%rax,8), %rdx
testb %r8b, %r8b
jne 0x1c6df
leaq 0x2bf8b(%rip), %rax     # 0x48521
cmpb $0x1, (%rax)
je 0x1c7d8
leaq 0x2bf8d(%rip), %rax     # 0x48533
cmpb $0x1, (%rax)
je 0x1c6df
incq (%rbx)
movl 0x18(%r12), %eax
testl %eax, %eax
jg 0x1c06c
movl 0x1c(%r12), %eax
movl %eax, 0x18(%r12)
movq %r13, %rdi
jmp 0x1c663
movzbl %r8b, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movl %ebp, %ecx
callq 0x1bc0d
movq %rax, %r15
jmp 0x1c073
movl %r8d, 0x14(%rsp)
orl $-0x1, 0x8(%rbx)
movq 0x18(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1be70
testq %rax, %rax
je 0x1c784
leaq 0x27(%rsp), %r14
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
movq %r14, %r9
callq 0x30591
cmpb $0x0, (%r14)
je 0x1c784
movq %rax, %r15
movl 0x14(%rsp), %r8d
jmp 0x1c027
testb %al, %al
jne 0x1c78c
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
jmp 0x1c695
movl 0x1c(%r12), %eax
movl %eax, 0x18(%r12)
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x30129
jmp 0x1c073
movl %eax, 0x8(%rbx)
jmp 0x1c027
shlq $0x6, %r13
leaq 0x2bf5d(%rip), %rax     # 0x485e0
movq %r15, %rdi
subq 0x8(%r13,%rax), %rdi
movq 0x10(%r13,%rax), %rdx
movl $0xa5, %esi
callq 0xb230
jmp 0x1c05c
movq %r13, %rdi
callq 0x20acc
jmp 0x1c33e
movl 0x4(%rax), %ecx
movl %ecx, (%rax)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x1aac4
jmp 0x1c3eb
movq %r15, %rdi
movl $0xa5, %esi
jmp 0x1c6d2
movq %r15, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0xb230
jmp 0x1c3c8
movq %r15, %rdi
xorl %esi, %esi
jmp 0x1c7e0
shlq $0x6, %r13
leaq 0x2beec(%rip), %rax     # 0x485e0
movq 0x8(%r13,%rax), %rbp
movq %r15, %rdi
subq %rbp, %rdi
movl $0xa5, %esi
movq %rbp, %rdx
callq 0xb230
leaq 0x2becd(%rip), %rax     # 0x485e0
movq (%r13,%rax), %rdi
addq %r15, %rdi
movl $0xa5, %esi
movq %rbp, %rdx
callq 0xb230
jmp 0x1c491
movzbl %r8b, %r8d
movq %rbx, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2809e
movl %r8d, %r15d
orl $-0x1, 0x8(%rbx)
movq %r13, %rdi
movq %r14, %rsi
callq 0x1be70
testq %rax, %rax
je 0x1c784
movzbl %r15b, %ecx
movq %r13, %rdi
movq %rax, %rsi
movl %ebp, %edx
callq 0x1b9d9
movq %rax, %r15
testq %rax, %rax
jne 0x1c5b2
xorl %r15d, %r15d
jmp 0x1c073
shlq $0x6, %r13
leaq 0x2be49(%rip), %rax     # 0x485e0
movq 0x8(%r13,%rax), %rbp
movq %r15, %rdi
subq %rbp, %rdi
movl $0xa5, %esi
movq %rbp, %rdx
callq 0xb230
leaq 0x2be2a(%rip), %rax     # 0x485e0
movq (%r13,%rax), %rdi
addq %r15, %rdi
movl $0xa5, %esi
movq %rbp, %rdx
callq 0xb230
jmp 0x1c64a
movl %ecx, 0x8(%rbx)
jmp 0x1c57b
movq %r15, %rdi
movl $0xa5, %esi
callq 0xb230
jmp 0x1c5af